Links toolbar. Bug 87428. r=bzbarsky, sr=hewitt. At last!

This commit is contained in:
gerv%gerv.net 2001-10-03 05:08:20 +00:00
Родитель 0701a60928
Коммит 15e32f4249
53 изменённых файлов: 1519 добавлений и 3 удалений

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -32,6 +32,34 @@ toolbarbutton.bookmark-item:not([container="true"]):hover:active > .toolbarbutto
border: 1px solid transparent;
}
toolbarbutton.bookmark-item[disabled="true"],
toolbarbutton.bookmark-item[disabled="true"]:hover,
toolbarbutton.bookmark-item[disabled="true"]:hover:active
{
color : GrayText;
text-decoration : none;
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item-disabled.gif");
cursor : default;
}
toolbarbutton.bookmark-item[disabled="true"][container="true"],
toolbarbutton.bookmark-item[disabled="true"][container="true"]:hover,
toolbarbutton.bookmark-item[disabled="true"][container="true"]:hover:active
{
border : 1px solid transparent !important;
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-disabled.gif");
}
.menuitem-iconic.bookmark-item[disabled="true"]
{
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item-disabled.gif");
}
.menu-iconic.bookmark-item[disabled="true"][container="true"]
{
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-disabled.gif");
}
/* ::::: toolbarbutton drag and drop feedback ::::: */
toolbarbutton.bookmark-item[dragover-right="true"] {

Просмотреть файл

@ -16,9 +16,11 @@ classic.jar:
skin/classic/communicator/search-active.gif (communicator/search-active.gif)
skin/classic/communicator/bookmarks/bookmark-folder-closed.gif (communicator/bookmarks/bookmark-folder-closed.gif)
skin/classic/communicator/bookmarks/bookmark-folder-open.gif (communicator/bookmarks/bookmark-folder-open.gif)
skin/classic/communicator/bookmarks/bookmark-folder-disabled.gif (communicator/bookmarks/bookmark-folder-disabled.gif)
skin/classic/communicator/bookmarks/bookmark-folder-button.gif (communicator/bookmarks/bookmark-folder-button.gif)
skin/classic/communicator/bookmarks/bookmark-item.gif (communicator/bookmarks/bookmark-item.gif)
skin/classic/communicator/bookmarks/bookmark-item-updated.gif (communicator/bookmarks/bookmark-item-updated.gif)
skin/classic/communicator/bookmarks/bookmark-item-disabled.gif (communicator/bookmarks/bookmark-item-disabled.gif)
skin/classic/communicator/bookmarks/home.gif (communicator/bookmarks/home.gif)
skin/classic/communicator/bookmarks/home-hover.gif (communicator/bookmarks/home-hover.gif)
skin/classic/communicator/bookmarks/home-active.gif (communicator/bookmarks/home-active.gif)
@ -544,3 +546,22 @@ classic.jar:
skin/classic/navigator/stop-hover.gif (navigator/stop-hover.gif)
skin/classic/navigator/stop-hover-active.gif (navigator/stop-hover-active.gif)
skin/classic/navigator/personalToolbar.css (navigator/personalToolbar.css)
skin/classic/navigator/first-disabled.gif (navigator/first-disabled.gif)
skin/classic/navigator/first.gif (navigator/first.gif)
skin/classic/navigator/first-hover.gif (navigator/first-hover.gif)
skin/classic/navigator/last-disabled.gif (navigator/last-disabled.gif)
skin/classic/navigator/last.gif (navigator/last.gif)
skin/classic/navigator/last-hover.gif (navigator/last-hover.gif)
skin/classic/navigator/next-disabled.gif (navigator/next-disabled.gif)
skin/classic/navigator/next.gif (navigator/next.gif)
skin/classic/navigator/next-hover.gif (navigator/next-hover.gif)
skin/classic/navigator/previous-disabled.gif (navigator/previous-disabled.gif)
skin/classic/navigator/previous.gif (navigator/previous.gif)
skin/classic/navigator/previous-hover.gif (navigator/previous-hover.gif)
skin/classic/navigator/top-disabled.gif (navigator/top-disabled.gif)
skin/classic/navigator/top.gif (navigator/top.gif)
skin/classic/navigator/top-hover.gif (navigator/top-hover.gif)
skin/classic/navigator/up-disabled.gif (navigator/up-disabled.gif)
skin/classic/navigator/up.gif (navigator/up.gif)
skin/classic/navigator/up-hover.gif (navigator/up-hover.gif)
skin/classic/navigator/linkToolbar.css (navigator/linkToolbar.css)

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,153 @@
/* -*- Mode: C; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
* Josh Soref <timeless@mac.com>
* Tim Taylor <tim@tool-man.org>
* Eric Hodel <drbrain@segment7.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**
* Link toolbar items
**/
#link-top
{
list-style-image : url("chrome://navigator/skin/top.gif");
}
#link-top[disabled="true"],
#link-top[disabled="true"]:hover,
#link-top[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/top-disabled.gif");
}
#link-top:hover,
#link-top:hover:active
{
list-style-image : url("chrome://navigator/skin/top-hover.gif");
}
#link-up
{
list-style-image : url("chrome://navigator/skin/up.gif");
}
#link-up[disabled="true"],
#link-up[disabled="true"]:hover,
#link-up[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/up-disabled.gif");
}
#link-up:hover,
#link-up:hover:active
{
list-style-image : url("chrome://navigator/skin/up-hover.gif");
}
#link-first
{
list-style-image : url("chrome://navigator/skin/first.gif");
}
#link-first[disabled="true"],
#link-first[disabled="true"]:hover,
#link-first[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/first-disabled.gif");
}
#link-first:hover,
#link-first:hover:active
{
list-style-image : url("chrome://navigator/skin/first-hover.gif");
}
#link-prev
{
list-style-image : url("chrome://navigator/skin/previous.gif");
}
#link-prev[disabled="true"],
#link-prev[disabled="true"]:hover,
#link-prev[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/previous-disabled.gif");
}
#link-prev:hover,
#link-prev:hover:active
{
list-style-image : url("chrome://navigator/skin/previous-hover.gif");
}
#link-next
{
list-style-image : url("chrome://navigator/skin/next.gif");
}
#link-next[disabled="true"],
#link-next[disabled="true"]:hover,
#link-next[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/next-disabled.gif");
}
#link-next:hover,
#link-next:hover:active
{
list-style-image : url("chrome://navigator/skin/next-hover.gif");
}
#link-last
{
list-style-image : url("chrome://navigator/skin/last.gif");
}
#link-last[disabled="true"],
#link-last[disabled="true"]:hover,
#link-last[disabled="true"]:hover:active
{
list-style-image : url("chrome://navigator/skin/last-disabled.gif");
}
#link-last:hover,
#link-last:hover:active
{
list-style-image : url("chrome://navigator/skin/last-hover.gif");
}

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -52,6 +52,34 @@ toolbarbutton.bookmark-item:not([container="true"]):hover:active {
border: 1px solid transparent;
}
toolbarbutton.bookmark-item[disabled="true"],
toolbarbutton.bookmark-item[disabled="true"]:hover,
toolbarbutton.bookmark-item[disabled="true"]:hover:active
{
color : #9399AB;
text-decoration : none;
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item-disabled.gif");
cursor : default;
}
toolbarbutton.bookmark-item[disabled="true"][container="true"],
toolbarbutton.bookmark-item[disabled="true"][container="true"]:hover,
toolbarbutton.bookmark-item[disabled="true"][container="true"]:hover:active
{
border : 1px solid transparent !important;
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-disabled.gif");
}
.menuitem-iconic.bookmark-item[disabled="true"]
{
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item-disabled.gif");
}
.menu-iconic.bookmark-item[disabled="true"][container="true"]
{
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-disabled.gif");
}
.bookmark-item > .toolbarbutton-box > .toolbarbutton-dropmarker {
display: none;
}

Просмотреть файл

@ -12,6 +12,7 @@ modern.jar:
skin/modern/communicator/toolbar.css (communicator/toolbar.css)
skin/modern/communicator/bookmarks/bookmark-folder-closed.gif (communicator/bookmarks/bookmark-folder-closed.gif)
skin/modern/communicator/bookmarks/bookmark-folder-open.gif (communicator/bookmarks/bookmark-folder-open.gif)
skin/modern/communicator/bookmarks/bookmark-folder-dis.gif (communicator/bookmarks/bookmark-folder-dis.gif)
skin/modern/communicator/bookmarks/bookmark-item.gif (communicator/bookmarks/bookmark-item.gif)
skin/modern/communicator/bookmarks/bookmark-item-dis.gif (communicator/bookmarks/bookmark-item-dis.gif)
skin/modern/communicator/bookmarks/bookmarks.css (communicator/bookmarks/bookmarks.css)
@ -793,3 +794,22 @@ modern.jar:
skin/modern/navigator/toolbar/urlbar-rit-mid.gif (navigator/toolbar/urlbar-rit-mid.gif)
skin/modern/navigator/toolbar/urlbar-rit-top.gif (navigator/toolbar/urlbar-rit-top.gif)
skin/modern/navigator/toolbar/search.gif (navigator/toolbar/search.gif)
skin/modern/navigator/btn1/first-dis.gif (navigator/btn1/first-dis.gif)
skin/modern/navigator/btn1/first.gif (navigator/btn1/first.gif)
skin/modern/navigator/btn1/first-hov.gif (navigator/btn1/first-hov.gif)
skin/modern/navigator/btn1/last-dis.gif (navigator/btn1/last-dis.gif)
skin/modern/navigator/btn1/last.gif (navigator/btn1/last.gif)
skin/modern/navigator/btn1/last-hov.gif (navigator/btn1/last-hov.gif)
skin/modern/navigator/btn1/next-dis.gif (navigator/btn1/next-dis.gif)
skin/modern/navigator/btn1/next.gif (navigator/btn1/next.gif)
skin/modern/navigator/btn1/next-hov.gif (navigator/btn1/next-hov.gif)
skin/modern/navigator/btn1/previous-dis.gif (navigator/btn1/previous-dis.gif)
skin/modern/navigator/btn1/previous.gif (navigator/btn1/previous.gif)
skin/modern/navigator/btn1/previous-hov.gif (navigator/btn1/previous-hov.gif)
skin/modern/navigator/btn1/top-dis.gif (navigator/btn1/top-dis.gif)
skin/modern/navigator/btn1/top.gif (navigator/btn1/top.gif)
skin/modern/navigator/btn1/top-hov.gif (navigator/btn1/top-hov.gif)
skin/modern/navigator/btn1/up-dis.gif (navigator/btn1/up-dis.gif)
skin/modern/navigator/btn1/up.gif (navigator/btn1/up.gif)
skin/modern/navigator/btn1/up-hov.gif (navigator/btn1/up-hov.gif)
skin/modern/navigator/linkToolbar.css (navigator/linkToolbar.css)

Двоичные данные
themes/modern/navigator/btn1/first-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 75 B

Двоичные данные
themes/modern/navigator/btn1/first-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 71 B

Двоичные данные
themes/modern/navigator/btn1/first.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 71 B

Двоичные данные
themes/modern/navigator/btn1/last-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 74 B

Двоичные данные
themes/modern/navigator/btn1/last-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 70 B

Двоичные данные
themes/modern/navigator/btn1/last.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 70 B

Двоичные данные
themes/modern/navigator/btn1/next-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 68 B

Двоичные данные
themes/modern/navigator/btn1/next-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 66 B

Двоичные данные
themes/modern/navigator/btn1/next.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 66 B

Двоичные данные
themes/modern/navigator/btn1/previous-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 68 B

Двоичные данные
themes/modern/navigator/btn1/previous-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 67 B

Двоичные данные
themes/modern/navigator/btn1/previous.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 67 B

Двоичные данные
themes/modern/navigator/btn1/top-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 70 B

Двоичные данные
themes/modern/navigator/btn1/top-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 68 B

Двоичные данные
themes/modern/navigator/btn1/top.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 68 B

Двоичные данные
themes/modern/navigator/btn1/up-dis.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 68 B

Двоичные данные
themes/modern/navigator/btn1/up-hov.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 65 B

Двоичные данные
themes/modern/navigator/btn1/up.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 65 B

Просмотреть файл

@ -0,0 +1,133 @@
/* -*- Mode: C; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
* Josh Soref <timeless@mac.com>
* Tim Taylor <tim@tool-man.org>
* Eric Hodel <drbrain@segment7.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* ::::: Link toolbar items ::::: */
#link-top {
list-style-image: url("chrome://navigator/skin/btn1/top.gif");
}
#link-top[disabled="true"],
#link-top[disabled="true"]:hover,
#link-top[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/top-dis.gif");
}
#link-top:hover,
#link-top:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/top-hov.gif");
}
#link-up {
list-style-image: url("chrome://navigator/skin/btn1/up.gif");
}
#link-up[disabled="true"],
#link-up[disabled="true"]:hover,
#link-up[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/up-dis.gif");
}
#link-up:hover,
#link-up:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/up-hov.gif");
}
#link-first {
list-style-image: url("chrome://navigator/skin/btn1/first.gif");
}
#link-first[disabled="true"],
#link-first[disabled="true"]:hover,
#link-first[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/first-dis.gif");
}
#link-first:hover,
#link-first:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/first-hov.gif");
}
#link-prev {
list-style-image: url("chrome://navigator/skin/btn1/previous.gif");
}
#link-prev[disabled="true"],
#link-prev[disabled="true"]:hover,
#link-prev[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/previous-dis.gif");
}
#link-prev:hover,
#link-prev:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/previous-hov.gif");
}
#link-next {
list-style-image: url("chrome://navigator/skin/btn1/next.gif");
}
#link-next[disabled="true"],
#link-next[disabled="true"]:hover,
#link-next[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/next-dis.gif");
}
#link-next:hover,
#link-next:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/next-hov.gif");
}
#link-last {
list-style-image: url("chrome://navigator/skin/btn1/last.gif");
}
#link-last[disabled="true"],
#link-last[disabled="true"]:hover,
#link-last[disabled="true"]:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/last-dis.gif");
}
#link-last:hover,
#link-last:hover:active {
list-style-image: url("chrome://navigator/skin/btn1/last-hov.gif");
}

Просмотреть файл

@ -12,14 +12,19 @@ comm.jar:
content/navigator/navigator.js (resources/content/navigator.js)
content/navigator/navigatorDD.js (resources/content/navigatorDD.js)
content/navigator/nsBrowserStatusHandler.js (resources/content/nsBrowserStatusHandler.js)
content/navigator/nsBrowserContentListener.js (resources/content/nsBrowserContentListener.js)
content/navigator/nsBrowserContentListener.js (resources/content/nsBrowserContentListener.js)
content/navigator/tooltip.js (resources/content/tooltip.js)
content/navigator/urlbarBindings.xml (resources/content/urlbarBindings.xml)
content/navigator/navigator.css (resources/content/navigator.css)
content/navigator/metadata.xul (resources/content/metadata.xul)
content/navigator/metadata.js (resources/content/metadata.js)
content/navigator/personalToolbar.js (resources/content/personalToolbar.js)
content/navigator/turboDialog.xul (resources/content/turboDialog.xul)
content/navigator/languageDictionary.js (resources/content/languageDictionary.js)
content/navigator/linkToolbarHandler.js (resources/content/linkToolbarHandler.js)
content/navigator/linkToolbarItem.js (resources/content/linkToolbarItem.js)
content/navigator/linkToolbarOverlay.js (resources/content/linkToolbarOverlay.js)
content/navigator/linkToolbarOverlay.xul (resources/content/linkToolbarOverlay.xul)
content/navigator/personalToolbar.js (resources/content/personalToolbar.js)
content/navigator/turboDialog.xul (resources/content/turboDialog.xul)
en-US.jar:
locale/en-US/navigator/contents.rdf (resources/locale/en-US/contents.rdf)
locale/en-US/navigator/viewSource.dtd (resources/locale/en-US/viewSource.dtd)
@ -29,6 +34,7 @@ en-US.jar:
locale/en-US/navigator/metadata.dtd (resources/locale/en-US/metadata.dtd)
locale/en-US/navigator/metadata.properties (resources/locale/en-US/metadata.properties)
locale/en-US/navigator/pageInfo.properties (resources/locale/en-US/pageInfo.properties)
locale/en-US/navigator/linkToolbar.dtd (resources/locale/en-US/linkToolbar.dtd)
locale/en-US/navigator/turboDialog.dtd (resources/locale/en-US/turboDialog.dtd)
locale/en-US/navigator/turboMenu.properties (resources/locale/en-US/turboMenu.properties)

Просмотреть файл

@ -0,0 +1,89 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* LanguageDictionary is a Singleton for looking up a language name
* given its language code.
*/
function LanguageDictionary() {
this.dictionary = null;
}
LanguageDictionary.prototype = {
lookupLanguageName: function(languageCode)
{
if (this.getDictionary()[languageCode])
return this.getDictionary()[languageCode];
else
// XXX: handle non-standard language code's per
// hixie's spec (see bug 2800)
return "";
},
getDictionary: function()
{
if (!this.dictionary)
this.dictionary = LanguageDictionary.createDictionary();
return this.dictionary;
}
}
LanguageDictionary.createDictionary = function()
{
var dictionary = new Array();
var e = LanguageDictionary.getLanguageNames().getSimpleEnumeration();
while (e.hasMoreElements()) {
var property = e.getNext();
property = property.QueryInterface(
Components.interfaces.nsIPropertyElement);
dictionary[property.getKey()] = property.getValue();
}
return dictionary;
}
LanguageDictionary.getLanguageNames = function()
{
return srGetStrBundle(
"chrome://global/locale/languageNames.properties");
}
const languageDictionary = new LanguageDictionary();

Просмотреть файл

@ -0,0 +1,329 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**
* LinkToolbarHandler is a Singleton that displays LINK elements
* and nodeLists of LINK elements in the Link Toolbar. It
* associates the LINK with a corresponding LinkToolbarItem based
* on it's REL attribute and the toolbar item's ID attribute.
* LinkToolbarHandler is also a Factory and will create
* LinkToolbarItems as necessary.
*/
function LinkToolbarHandler()
{
this.items = new Array();
}
LinkToolbarHandler.prototype.handleLinks =
function(nodeList)
{
if (!nodeList) return;
var len = nodeList.length;
for (var i = 0; i < len; i++) {
// optimization: weed out useless links here to avoid
// the function call. More in depth checks are done
// in this.handle
var node = nodeList.item(i);
if (node && (node.rel || node.rev) && node.href)
this.handle(node);
}
}
LinkToolbarHandler.prototype.handle =
function(element)
{
// XXX: if you're going to re-enable handling of anchor elements,
// you'll want to change this to AnchorElementDecorator
var linkElement = new LinkElementDecorator(element);
if (linkElement.isIgnored()) return;
var relAttributes = linkElement.rel.split(" ");
for (var i = 0; i < relAttributes.length; i++) {
var linkType = LinkToolbarHandler.getLinkType(relAttributes[i]);
this.getItemForLinkType(linkType).displayLink(linkElement);
}
}
LinkToolbarHandler.getLinkType =
function(relAttribute)
{
switch (relAttribute.toLowerCase()) {
case "home":
case "start":
case "top":
case "origin":
return "top";
case "up":
case "parent":
return "up";
case "begin":
case "first":
return "first";
case "next":
case "child":
return "next";
case "prev":
case "previous":
return "prev";
case "end":
case "last":
return "last";
case "author":
case "made":
return "author";
case "contents":
case "toc":
return "toc";
default:
return relAttribute.toLowerCase();
}
}
LinkToolbarHandler.prototype.getItemForLinkType =
function(linkType) {
if (!this.items[linkType])
this.items[linkType] = LinkToolbarHandler.createItemForLinkType(linkType);
return this.items[linkType];
}
LinkToolbarHandler.createItemForLinkType =
function(linkType)
{
if (!document.getElementById("link-" + linkType))
return new LinkToolbarTransientMenu(linkType);
// XXX: replace switch with polymorphism
switch(document.getElementById("link-" + linkType).localName) {
case "toolbarbutton":
return new LinkToolbarButton(linkType);
case "menuitem":
return new LinkToolbarItem(linkType);
case "menu":
return new LinkToolbarMenu(linkType);
default:
return new LinkToolbarTransientMenu(linkType);
}
}
LinkToolbarHandler.prototype.clearAllItems =
function()
{
for (var linkType in this.items)
this.items[linkType].clear();
}
const linkToolbarHandler = new LinkToolbarHandler();
function LinkElementDecorator(element) {
/*
* XXX: this is an incomplete decorator, because it doesn't implement
* the full Element interface. If you need to use a method
* or member in the Element interface, just add it here and
* have it delegate to this.element
*
* XXX: would rather add some methods to Element.prototype instead of
* using a decorator, but Element.prototype is no longer exposed
* since the XPCDOM landing, see bug 83433
*/
if (!element) return; // skip the rest on foo.prototype = new ThisClass calls
this.element = element;
this.rel = LinkElementDecorator.convertRevMade(element.rel, element.rev);
this.rev = element.rev;
this.title = element.title;
this.href = element.href;
this.hreflang = element.hreflang;
this.media = element.media;
this.longTitle = null;
}
LinkElementDecorator.prototype.isIgnored =
function()
{
if (!this.rel) return true;
if (this.isStylesheet()) return true;
if (this.isIcon()) return true;
return false;
}
LinkElementDecorator.prototype.isStylesheet =
function() {
if (LinkElementDecorator.findWord("stylesheet", this.rel.toLowerCase()))
return true;
else
return false;
}
LinkElementDecorator.prototype.isIcon =
function() {
if (LinkElementDecorator.findWord("icon", this.rel.toLowerCase()))
return true;
else
return false;
return false;
}
LinkElementDecorator.convertRevMade =
function(rel, rev)
{
if (!rel && rev && LinkElementDecorator.findWord("made", rev.toLowerCase()))
return rev;
else
return rel;
}
LinkElementDecorator.prototype.getTooltip =
function()
{
return this.getLongTitle() != "" ? this.getLongTitle() : this.href;
}
LinkElementDecorator.prototype.getLabel =
function()
{
return this.getLongTitle() != "" ? this.getLongTitle() : this.rel;
}
LinkElementDecorator.prototype.getLongTitle =
function()
{
if (this.longTitle == null)
this.longTitle = this.makeLongTitle();
return this.longTitle;
}
LinkElementDecorator.prototype.makeLongTitle =
function()
{
var prefix = "";
// XXX: lookup more meaningful and localized version of media,
// i.e. media="print" becomes "Printable" or some such
// XXX: use localized version of ":" separator
if (this.media
&& !LinkElementDecorator.findWord("all", this.media.toLowerCase())
&& !LinkElementDecorator.findWord("screen", this.media.toLowerCase()))
prefix += this.media + ": ";
if (this.hreflang)
prefix += languageDictionary.lookupLanguageName(this.hreflang)
+ ": ";
return this.title ? prefix + this.title : prefix;
}
LinkElementDecorator.findWord =
function(word, string)
{
var barePattern = eval("/^" + word + "$/");
var middlePattern = eval("/[-\\W]" + word + "[-\\W]/");
var startPattern = eval("/^" + word + "[-\\W]/");
var endPattern = eval("/[-\\W]" + word + "$/");
if (string.search(barePattern) != -1)
return true;
if (string.search(middlePattern) != -1)
return true;
if (string.search(startPattern) != -1)
return true;
if (string.search(endPattern) != -1)
return true;
return false;
}
function AnchorElementDecorator(element) {
this.constructor(element);
}
AnchorElementDecorator.prototype = new LinkElementDecorator;
AnchorElementDecorator.prototype.getLongTitle =
function()
{
return this.title ? this.__proto__.getLongTitle.apply(this)
: getText(this.element);
}
AnchorElementDecorator.prototype.getText =
function(element)
{
return condenseWhitespace(getTextRecursive(element));
}
AnchorElementDecorator.prototype.getTextRecursive =
function(node)
{
var text = "";
node.normalize();
if (node.hasChildNodes()) {
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes.item(i).nodeType == Node.TEXT_NODE)
text += node.childNodes.item(i).nodeValue;
else if (node.childNodes.item(i).nodeType == Node.ELEMENT_NODE)
text += getTextRecursive(node.childNodes.item(i));
}
}
return text;
}
AnchorElementDecorator.prototype.condenseWhitespace =
function(text)
{
return text.replace(/\W*$/, "").replace(/^\W*/, "").replace(/\W+/g, " ");
}

Просмотреть файл

@ -0,0 +1,265 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* LinkToolbarItem and its subclasses represent the buttons, menuitems,
* and menus that handle the various link types.
*/
function LinkToolbarItem (linkType) {
this.linkType = linkType;
this.xulElementId = "link-" + linkType;
this.xulPopupId = this.xulElementId + "-popup";
this.parentMenuButton = null;
this.getXULElement = function() {
return document.getElementById(this.xulElementId);
}
this.clear = function() {
this.disableParentMenuButton();
this.getXULElement().setAttribute("disabled", "true");
this.getXULElement().removeAttribute("href");
}
this.displayLink = function(linkElement) {
if (this.getXULElement().hasAttribute("href")) return false;
this.setItem(linkElement);
this.enableParentMenuButton();
return true;
}
this.setItem = function(linkElement) {
this.getXULElement().setAttribute("href", linkElement.href);
this.getXULElement().removeAttribute("disabled");
}
this.enableParentMenuButton = function() {
if(this.getParentMenuButton())
this.getParentMenuButton().removeAttribute("disabled");
}
this.disableParentMenuButton = function() {
if (!this.parentMenuButton) return;
this.parentMenuButton.setAttribute("disabled", "true");
this.parentMenuButton = null;
}
this.getParentMenuButton = function() {
if (!this.parentMenuButton)
this.parentMenuButton = getParentMenuButtonRecursive(
this.getXULElement());
return this.parentMenuButton;
}
function getParentMenuButtonRecursive(xulElement) {
if (!xulElement) return null;
if (xulElement.tagName == "toolbarbutton")
return xulElement;
return getParentMenuButtonRecursive(xulElement.parentNode)
}
}
function LinkToolbarButton (linkType) {
this.constructor(linkType);
this.clear = function() {
this.__proto__.clear.apply(this);
this.getXULElement().removeAttribute("tooltiptext");
}
this.setItem = function(linkElement) {
this.__proto__.setItem.apply(this, [linkElement]);
this.getXULElement().setAttribute("tooltiptext", linkElement.getTooltip());
}
this.enableParentMenuButton = function() { /* do nothing */ }
this.disableParentMenuButton = function() { /* do nothing */ }
}
LinkToolbarButton.prototype = new LinkToolbarItem;
function LinkToolbarMenu (linkType) {
this.constructor(linkType);
this.knownLinks = null;
this.clear = function() {
this.disableParentMenuButton();
this.getXULElement().setAttribute("disabled", "true");
clearPopup(this.getPopup());
this.knownLinks = null;
}
function clearPopup(popup) {
while (popup.hasChildNodes())
popup.removeChild(popup.lastChild);
}
this.getPopup = function() {
return document.getElementById(this.xulPopupId);
}
this.displayLink = function(linkElement) {
if (this.isAlreadyAdded(linkElement)) return false;
this.getKnownLinks()[linkElement.href] = true;
this.addMenuItem(linkElement);
this.getXULElement().removeAttribute("disabled");
this.enableParentMenuButton();
return true;
}
this.isAlreadyAdded = function(linkElement) {
return this.getKnownLinks()[linkElement.href];
}
this.getKnownLinks = function() {
if (!this.knownLinks)
this.knownLinks = new Array();
return this.knownLinks;
}
function match(first, second) {
if (!first && !second) return true;
if (!first || !second) return false;
return first == second;
}
this.addMenuItem = function(linkElement) {
this.getPopup().appendChild(this.createMenuItem(linkElement));
}
this.createMenuItem = function(linkElement) {
// XXX: clone a prototypical XUL element instead of hardcoding these
// attributes
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", linkElement.getLabel());
menuitem.setAttribute("href", linkElement.href);
menuitem.setAttribute("class", "menuitem-iconic bookmark-item");
menuitem.setAttribute("rdf:type",
"rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#linkType");
return menuitem;
}
}
LinkToolbarMenu.prototype = new LinkToolbarItem;
function LinkToolbarTransientMenu (linkType) {
this.constructor(linkType);
this.getXULElement = function() {
if (this.__proto__.getXULElement.apply(this))
return this.__proto__.getXULElement.apply(this);
else
return this.createXULElement();
}
this.createXULElement = function() {
// XXX: clone a prototypical XUL element instead of hardcoding these
// attributes
var menu = document.createElement("menu");
menu.setAttribute("id", this.xulElementId);
menu.setAttribute("label", this.linkType);
menu.setAttribute("disabled", "true");
menu.setAttribute("class", "menu-iconic bookmark-item");
menu.setAttribute("container", "true");
menu.setAttribute("type", "rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
document.getElementById("more-menu-popup").appendChild(menu);
return menu;
}
this.getPopup = function() {
if (!this.__proto__.getPopup.apply(this))
this.getXULElement().appendChild(this.createPopup());
return this.__proto__.getPopup.apply(this)
}
this.createPopup = function() {
var popup = document.createElement("menupopup");
popup.setAttribute("id", this.xulPopupId);
return popup;
}
this.clear = function() {
this.__proto__.clear.apply(this);
// XXX: we really want to use this instead of removeXULElement
//this.hideXULElement();
this.removeXULElement();
}
this.hideXULElement = function() {
/*
* XXX: using "hidden" or "collapsed" leads to a crash when you
* open the More menu under certain circumstances. Maybe
* related to bug 83906. As of 0.9.2 I it doesn't seem
* to crash anymore.
*/
this.getXULElement().setAttribute("collapsed", "true");
}
this.removeXULElement = function() {
// XXX: stop using this method once it's safe to use hideXULElement
if (this.__proto__.getXULElement.apply(this))
this.__proto__.getXULElement.apply(this).parentNode.removeChild(
this.__proto__.getXULElement.apply(this));
}
this.displayLink = function(linkElement) {
if(!this.__proto__.displayLink.apply(this, [linkElement])) return false;
this.getXULElement().removeAttribute("collapsed");
showMiscellaneousSeperator();
return true;
}
}
LinkToolbarTransientMenu.prototype = new LinkToolbarMenu;

Просмотреть файл

@ -0,0 +1,191 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**
* called on every page load
*
* FIXME: refresh isn't called until the entire document has finished loading
* XXX: optimization: don't refresh when page reloaded if the page hasn't
* been modified
* XXX: optimization: don't refresh when toolbar is compacted
*/
LinkToolbarUI = function()
{
}
LinkToolbarUI.prototype.refresh =
function()
{
if (!linkToolbarUI.isLinkToolbarEnabled())
return;
linkToolbarUI.doRefresh();
}
LinkToolbarUI.prototype.isLinkToolbarEnabled =
function()
{
if (document.getElementById("cmd_viewlinktoolbar").getAttribute("checked") == "true")
return true;
else
return false;
}
LinkToolbarUI.prototype.doRefresh =
function()
{
// Not doing <meta http-equiv> elements yet.
// If you enable checking for A links, the browser becomes
// unresponsive during this call...for as long as 2 or more
// seconds on heavily linked documents.
var currentNode = window._content.document.documentElement;
if(!(currentNode instanceof Components.interfaces.nsIDOMHTMLHtmlElement)) return;
currentNode = currentNode.firstChild;
while(currentNode) {
if(currentNode instanceof Components.interfaces.nsIDOMHTMLHeadElement) {
currentNode = currentNode.firstChild;
while(currentNode) {
if ((currentNode instanceof Components.interfaces.nsIDOMHTMLLinkElement) &&
(currentNode.rel || currentNode.rev) &&
currentNode.href) {
linkToolbarHandler.handle(currentNode);
}
currentNode = currentNode.nextSibling;
}
} else if (currentNode instanceof Components.interfaces.nsIDOMElement) {
// head is supposed to be the first element inside html.
// Got something else instead. returning
return;
} else {
// Got a comment node or something like that. Moving on.
currentNode = currentNode.nextSibling;
}
}
}
LinkToolbarUI.prototype.getLinkElements =
function()
{
return getHeadElement().getElementsByTagName("link");
}
LinkToolbarUI.prototype.getHeadElement =
function()
{
return window._content.document.getElementsByTagName("head").item(0);
}
LinkToolbarUI.prototype.getAnchorElements =
function()
{
// XXX: document.links includes AREA links, which technically
// shouldn't be checked for REL attributes
// FIXME: doesn't work on XHTML served as application/xhtml+xml
return window._content.document.links;
}
/** called on every page unload */
LinkToolbarUI.prototype.clear =
function()
{
if (!linkToolbarUI.isLinkToolbarEnabled())
return;
linkToolbarUI.doClear();
}
LinkToolbarUI.prototype.doClear =
function()
{
this.hideMiscellaneousSeperator();
linkToolbarHandler.clearAllItems();
}
/* called whenever something on the toolbar is clicked */
LinkToolbarUI.prototype.clicked =
function(event)
{
// Return if this is one of the menubuttons.
if (event.target.getAttribute("type") == "menu") return;
if (!event.target.getAttribute("href")) return;
var destURL = event.target.getAttribute("href");
// We have to do a security check here, because we are loading URIs given
// to us by a web page from chrome, which is privileged.
try {
var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService().
QueryInterface(Components.interfaces.nsIScriptSecurityManager);
ssm.checkLoadURIStr(window.content.location.href, destURL, 0);
loadURI(destURL);
} catch (e) {
dump("Error: it is not permitted to load this URI from a <link> element: " + e);
}
}
// functions for twiddling XUL elements in the toolbar
LinkToolbarUI.prototype.toggleLinkToolbar =
function()
{
goToggleToolbar('linktoolbar', 'cmd_viewlinktoolbar');
if (this.isLinkToolbarEnabled())
this.doRefresh();
else
this.doClear();
}
LinkToolbarUI.prototype.showMiscellaneousSeperator =
function()
{
document.getElementById("misc-seperator").removeAttribute("collapsed");
}
LinkToolbarUI.prototype.hideMiscellaneousSeperator =
function()
{
document.getElementById("misc-seperator").setAttribute("collapsed", "true");
}
const linkToolbarUI = new LinkToolbarUI;

Просмотреть файл

@ -0,0 +1,183 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Eric Hodel's <drbrain@segment7.net> code.
-
- The Initial Developer of the Original Code is
- Eric Hodel.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Christopher Hoess <choess@force.stwing.upenn.edu>
- Tim Taylor <tim@tool-man.org>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/linkToolbar.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://navigator/locale/linkToolbar.dtd">
<overlay id="linkToolbarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.mozilla.org/rdf">
<!-- classes -->
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarHandler.js" />
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarItem.js" />
<script type="application/x-javascript" src="chrome://navigator/content/languageDictionary.js" />
<!-- functions -->
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarOverlay.js" />
<script type="application/x-javascript">
<![CDATA[
var contentArea = document.getElementById("appcontent");
contentArea.addEventListener("load", linkToolbarUI.refresh, true);
contentArea.addEventListener("unload", linkToolbarUI.clear, true);
]]>
</script>
<broadcasterset id="navBroadcasters">
<broadcaster id="cmd_viewlinktoolbar" oncommand="linkToolbarUI.toggleLinkToolbar();" checked="true" />
</broadcasterset>
<menupopup id="view_toolbars_popup">
<menuitem label="&linkToolbar.label;" class="menuitem-iconic" type="checkbox" observes="cmd_viewlinktoolbar" position="3" />
</menupopup>
<toolbox id="navigator-toolbox">
<toolbar id="linktoolbar" class="chromeclass-directories"
onclick="event.preventBubble(); return linkToolbarUI.clicked(event);"
tbautostretch="always">
<toolbarbutton id="link-top" class="bookmark-item"
label="&topButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarbutton id="link-up" class="bookmark-item"
label="&upButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarseparator />
<toolbarbutton id="link-first" class="bookmark-item"
label="&firstButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarbutton id="link-prev" class="bookmark-item"
label="&prevButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarbutton id="link-next" class="bookmark-item"
label="&nextButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarbutton id="link-last" class="bookmark-item"
label="&lastButton.label;" disabled="true" tooltip="aTooltip" />
<toolbarseparator />
<toolbarbutton id="document-menu" class="bookmark-item"
type="menu"
container="true"
label="&documentButton.label;" disabled="true">
<menupopup id="document-menu-popup">
<menuitem id="link-toc" label="&tocButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menu id="link-chapter" label="&chapterButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-chapter-popup" />
</menu>
<menu id="link-section" label="&sectionButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-section-popup" />
</menu>
<menu id="link-subsection" label="&subSectionButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-subsection-popup" />
</menu>
<menu id="link-appendix" label="&appendixButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-appendix-popup" />
</menu>
<menuitem id="link-glossary" label="&glossaryButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-index" label="&indexButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
</menupopup>
</toolbarbutton>
<toolbarbutton id="more-menu" class="bookmark-item"
type="menu"
container="true"
label="&moreButton.label;" disabled="true">
<menupopup id="more-menu-popup">
<menuitem id="link-help" label="&helpButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-search" label="&searchButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuseparator />
<menuitem id="link-author" label="&authorButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-copyright" label="&copyrightButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuseparator />
<menu id="link-bookmark" label="&bookmarkButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-bookmark-popup" />
</menu>
<menuseparator />
<menu id="link-alternate" label="&alternateButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-alternate-popup" />
</menu>
<menuseparator collapsed="true" id="misc-seperator" />
</menupopup>
</toolbarbutton>
</toolbar>
</toolbox>
</overlay>

Просмотреть файл

@ -27,6 +27,7 @@ Contributor(s): ______________________________________. -->
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/navExtraOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/linkToolbarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/securityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>

Просмотреть файл

@ -0,0 +1,69 @@
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Christopher Hoess <choess@stwing.upenn.edu>'s code.
-
- The Initial Developer of the Original Code is
- Christopher Hoess.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Eric Hodel <drbrain@segment7.net>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- Link Toolbar Title -->
<!ENTITY linkToolbar.label "Link Toolbar">
<!-- Toolbar buttons, menus, and menuitems -->
<!ENTITY topButton.label "Top">
<!ENTITY upButton.label "Up">
<!ENTITY firstButton.label "First">
<!ENTITY prevButton.label "Previous">
<!ENTITY nextButton.label "Next">
<!ENTITY lastButton.label "Last">
<!ENTITY documentButton.label "Document">
<!ENTITY tocButton.label "Table of Contents">
<!ENTITY chapterButton.label "Chapters">
<!ENTITY sectionButton.label "Sections">
<!ENTITY subSectionButton.label "Subsections">
<!ENTITY appendixButton.label "Appendices">
<!ENTITY glossaryButton.label "Glossary">
<!ENTITY indexButton.label "Index">
<!ENTITY moreButton.label "More">
<!ENTITY helpButton.label "Help">
<!ENTITY searchButton.label "Search">
<!ENTITY authorButton.label "Authors">
<!ENTITY copyrightButton.label "Copyright">
<!ENTITY bookmarkButton.label "Bookmarks">
<!ENTITY alternateButton.label "Other Versions">