Beautify and tidy up copyright message
This commit is contained in:
parent
3a6b95a0f3
commit
12964b550a
|
@ -2,10 +2,16 @@
|
|||
<!--
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2009 Center for History and New Media
|
||||
Copyright © 2012 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
The Initial Developer of this code is Gracile. Portions created by the
|
||||
Initial Developer are Copyright © 2012 the Initial Developer.
|
||||
|
||||
This file contains code derived from Mozilla's tree.xml, © 2012 its
|
||||
developers.
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
|
@ -26,127 +32,115 @@
|
|||
|
||||
<!DOCTYPE bindings SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<binding id="extended-columnpicker" display="xul:button"
|
||||
extends="chrome://global/content/bindings/tree.xml#tree-base">
|
||||
<content>
|
||||
<xul:image class="tree-columnpicker-icon"/>
|
||||
<xul:menupopup anonid="zotero-items-column-main-menu">
|
||||
<xul:menuseparator/>
|
||||
<xul:menu label="&zotero.items.moreColumns.label;">
|
||||
<xul:menupopup anonid="zotero-items-column-sub-menu"/>
|
||||
</xul:menu>
|
||||
<xul:menuseparator/>
|
||||
<xul:menuitem anonid="menuitem"
|
||||
label="&zotero.items.restoreColumnOrder.label;"/>
|
||||
</xul:menupopup>
|
||||
</content>
|
||||
extends="chrome://global/content/bindings/tree.xml#tree-base">
|
||||
<content>
|
||||
<xul:image class="tree-columnpicker-icon"/>
|
||||
<xul:menupopup anonid="zotero-items-column-main-menu">
|
||||
<xul:menuseparator/>
|
||||
<xul:menu label="&zotero.items.moreColumns.label;">
|
||||
<xul:menupopup anonid="zotero-items-column-sub-menu"/>
|
||||
</xul:menu>
|
||||
<xul:menuseparator/>
|
||||
<xul:menuitem anonid="menuitem" label="&zotero.items.restoreColumnOrder.label;"/>
|
||||
</xul:menupopup>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULButton;
|
||||
</getter>
|
||||
</property>
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULButton;
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<method name="buildPopup">
|
||||
<parameter name="aPopup"/>
|
||||
<parameter name="bPopup"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
// We no longer cache the picker content, remove the old content.
|
||||
while (aPopup.childNodes.length > 4) {
|
||||
aPopup.removeChild(aPopup.firstChild);
|
||||
}
|
||||
while (bPopup.childNodes.length > 0) {
|
||||
bPopup.removeChild(bPopup.firstChild);
|
||||
}
|
||||
var refChild = aPopup.firstChild;
|
||||
var refChild2 = bPopup.firstChild;
|
||||
<method name="buildPopup">
|
||||
<parameter name="aPopup"/>
|
||||
<parameter name="bPopup"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
// We no longer cache the picker content, remove the old content.
|
||||
while (aPopup.childNodes.length > 4) {
|
||||
aPopup.removeChild(aPopup.firstChild);
|
||||
}
|
||||
while (bPopup.childNodes.length > 0) {
|
||||
bPopup.removeChild(bPopup.firstChild);
|
||||
}
|
||||
var refChild = aPopup.firstChild;
|
||||
var refChild2 = bPopup.firstChild;
|
||||
|
||||
var tree = this.parentNode.parentNode;
|
||||
for (var currCol = tree.columns.getFirstColumn(); currCol; currCol = currCol.getNext()) {
|
||||
var currElement = currCol.element;
|
||||
|
||||
// Construct an entry for each column in the row, unless
|
||||
// it is not being shown.
|
||||
if ((!currElement.hasAttribute("ignoreincolumnpicker")) && (!currElement.hasAttribute("submenu"))) {
|
||||
var popupChild = document.createElement("menuitem");
|
||||
popupChild.setAttribute("type", "checkbox");
|
||||
var columnName = currElement.getAttribute("display") || currElement.getAttribute("label");
|
||||
popupChild.setAttribute("label", columnName);
|
||||
popupChild.setAttribute("colindex", currCol.index);
|
||||
if (currElement.getAttribute("hidden") != "true") {
|
||||
popupChild.setAttribute("checked", "true");
|
||||
}
|
||||
if (currCol.primary) {
|
||||
popupChild.setAttribute("disabled", "true");
|
||||
}
|
||||
aPopup.insertBefore(popupChild, refChild);
|
||||
}
|
||||
|
||||
//Idem for the submenu
|
||||
if ((!currElement.hasAttribute("ignoreincolumnpicker")) && (currElement.hasAttribute("submenu"))) {
|
||||
var popupChild = document.createElement("menuitem");
|
||||
popupChild.setAttribute("type", "checkbox");
|
||||
var columnName = currElement.getAttribute("display") || currElement.getAttribute("label");
|
||||
popupChild.setAttribute("label", columnName);
|
||||
popupChild.setAttribute("colindex", currCol.index);
|
||||
if (currElement.getAttribute("hidden") != "true") {
|
||||
popupChild.setAttribute("checked", "true");
|
||||
}
|
||||
bPopup.insertBefore(popupChild, refChild2);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
var tree = this.parentNode.parentNode;
|
||||
for (var currCol = tree.columns.getFirstColumn(); currCol;
|
||||
currCol = currCol.getNext()) {
|
||||
var currElement = currCol.element;
|
||||
|
||||
// Construct an entry for each column in the row, unless
|
||||
// it is not being shown.
|
||||
|
||||
if ((!currElement.hasAttribute("ignoreincolumnpicker")) &&
|
||||
(!currElement.hasAttribute("submenu"))) {
|
||||
var popupChild = document.createElement("menuitem");
|
||||
popupChild.setAttribute("type", "checkbox");
|
||||
var columnName = currElement.getAttribute("display") ||
|
||||
currElement.getAttribute("label");
|
||||
popupChild.setAttribute("label", columnName);
|
||||
popupChild.setAttribute("colindex", currCol.index);
|
||||
if (currElement.getAttribute("hidden") != "true") {
|
||||
popupChild.setAttribute("checked", "true");
|
||||
}
|
||||
if (currCol.primary) {
|
||||
popupChild.setAttribute("disabled", "true");
|
||||
}
|
||||
aPopup.insertBefore(popupChild, refChild);
|
||||
}
|
||||
|
||||
//Idem for the submenu
|
||||
if ((!currElement.hasAttribute("ignoreincolumnpicker")) &&
|
||||
(currElement.hasAttribute("submenu"))) {
|
||||
var popupChild = document.createElement("menuitem");
|
||||
popupChild.setAttribute("type", "checkbox");
|
||||
var columnName = currElement.getAttribute("display") ||
|
||||
currElement.getAttribute("label");
|
||||
popupChild.setAttribute("label", columnName);
|
||||
popupChild.setAttribute("colindex", currCol.index);
|
||||
if (currElement.getAttribute("hidden") != "true") {
|
||||
popupChild.setAttribute("checked", "true");
|
||||
}
|
||||
bPopup.insertBefore(popupChild, refChild2);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="command">
|
||||
<![CDATA[
|
||||
if (event.originalTarget == this) {
|
||||
var popup = document.getAnonymousElementByAttribute(this, "anonid", "zotero-items-column-main-menu");
|
||||
var popup2 = document.getAnonymousElementByAttribute(this, "anonid", "zotero-items-column-sub-menu");
|
||||
this.buildPopup(popup, popup2);
|
||||
popup.showPopup(this, -1, -1, "popup", "bottomright", "topright");
|
||||
|
||||
<handlers>
|
||||
<handler event="command">
|
||||
<![CDATA[
|
||||
if (event.originalTarget == this) {
|
||||
var popup = document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"zotero-items-column-main-menu");
|
||||
var popup2 = document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"zotero-items-column-sub-menu");
|
||||
this.buildPopup(popup, popup2);
|
||||
popup.showPopup(this, -1, -1, "popup", "bottomright", "topright");
|
||||
|
||||
}
|
||||
else {
|
||||
var tree = this.parentNode.parentNode;
|
||||
tree.stopEditing(true);
|
||||
var menuitem = document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
|
||||
if (event.originalTarget == menuitem) {
|
||||
tree.columns.restoreNaturalOrder();
|
||||
tree._ensureColumnOrder();
|
||||
}
|
||||
else {
|
||||
var colindex = event.originalTarget.getAttribute("colindex");
|
||||
var column = tree.columns[colindex];
|
||||
if (column) {
|
||||
var element = column.element;
|
||||
if (element.getAttribute("hidden") == "true") {
|
||||
element.setAttribute("hidden", "false");
|
||||
} else {
|
||||
var tree = this.parentNode.parentNode;
|
||||
tree.stopEditing(true);
|
||||
var menuitem = document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
|
||||
if (event.originalTarget == menuitem) {
|
||||
tree.columns.restoreNaturalOrder();
|
||||
tree._ensureColumnOrder();
|
||||
} else {
|
||||
var colindex = event.originalTarget.getAttribute("colindex");
|
||||
var column = tree.columns[colindex];
|
||||
if (column) {
|
||||
var element = column.element;
|
||||
if (element.getAttribute("hidden") == "true") {
|
||||
element.setAttribute("hidden", "false");
|
||||
} else {
|
||||
element.setAttribute("hidden", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
element.setAttribute("hidden", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -1 +1 @@
|
|||
Subproject commit afb3b9397b907c78f16694c589553fb767fb40fd
|
||||
Subproject commit 6dfd753bb5dfabca0837d2b57c93c0c41afa7d0a
|
Loading…
Reference in New Issue
Block a user