Merging [8443-8477] to 2.1 branch

This commit is contained in:
Dan Stillman 2011-03-04 19:59:47 +00:00
parent cf9d3c67b4
commit 7cc57cfa18
46 changed files with 76 additions and 60 deletions

View file

@ -104,16 +104,9 @@ var Zotero_Browser = new function() {
* Initialize some variables and prepare event listeners for when chrome is done loading
*/
function init() {
try {
var gb = gBrowser;
} catch(e) {
if (!Zotero || !Zotero.initialized || !window.hasOwnProperty("gBrowser")) {
return;
}
if (!Zotero || !Zotero.initialized || !gb) {
return;
}
Zotero_Browser.browserData = new Object();
window.addEventListener("load",
function(e) { Zotero_Browser.chromeLoad(e) }, false);
@ -322,10 +315,9 @@ var Zotero_Browser = new function() {
}
/*
* When chrome unloads, delete our document objects
* Called when chrome is unloaded
*/
function chromeUnload() {
delete Zotero_Browser.browserData;
}
/*
@ -661,7 +653,7 @@ Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) {
// get translators
var me = this;
var translate = new Zotero.Translate("web");
var translate = new Zotero.Translate.Web();
translate.setDocument(doc);
translate.setHandler("translators", function(obj, item) { me._translatorsAvailable(obj, item) });
translate.getTranslators();
@ -715,7 +707,7 @@ Zotero_Browser.Tab.prototype._attemptLocalFileImport = function(doc) {
.getFileFromURLSpec(doc.documentURI);
var me = this;
var translate = new Zotero.Translate("import");
var translate = new Zotero.Translate.Import();
translate.setLocation(file);
translate.setHandler("translators", function(obj, item) { me._translatorsAvailable(obj, item) });
translate.getTranslators();

View file

@ -1752,7 +1752,7 @@ CSL.DateParser = function (txt) {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
this.processor_version = "1.0.118";
this.processor_version = "1.0.120";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@ -2158,6 +2158,13 @@ CSL.Engine.prototype.setOriginalCreatorNameFormatOption = function (arg) {
this.opt["locale-use-original-name-format"] = false;
}
};
CSL.Engine.prototype.setSuppressTitleTransliterationOption = function (arg) {
if (arg) {
this.opt["locale-suppress-title-transliteration"] = true;
} else {
this.opt["locale-suppress-title-transliteration"] = false;
}
};
CSL.Engine.prototype.setAutoVietnameseNamesOption = function (arg) {
if (arg) {
this.opt["auto-vietnamese-names"] = true;
@ -6244,7 +6251,16 @@ CSL.Transform = function (state) {
} else if (transform_locale === "locale-sec") {
return function (state, Item) {
var primary, secondary, primary_tok, secondary_tok, key;
primary = getTextSubField(Item, myfieldname, "locale-pri", transform_fallback);
if (state.opt["locale-suppress-title-transliteration"]
&& (state.tmp.area === 'bibliography'
|| (state.opt.xclass === "note" &&
state.tmp.area === "citation")
)
) {
primary = Item[myfieldname];
} else {
primary = getTextSubField(Item, myfieldname, "locale-pri", transform_fallback);
}
secondary = getTextSubField(Item, myfieldname, "locale-sec");
if (secondary) {
primary_tok = CSL.Util.cloneToken(this);
@ -8615,7 +8631,7 @@ CSL.Registry.Comparifier = function (state, keyset) {
} else if ("undefined" === typeof b.sortkeys[pos]) {
cmp = sort_directions[pos][0];
} else {
cmp = a.sortkeys[pos].toLocaleLowerCase().localeCompare(b.sortkeys[pos].toLocaleLowerCase());
cmp = a.sortkeys[pos].localeCompare(b.sortkeys[pos]);
}
if (0 < cmp) {
return sort_directions[pos][1];

View file

@ -868,10 +868,16 @@ Zotero.CollectionTreeView.prototype.deleteSelection = function()
}
this._treebox.endUpdateBatch();
if(end.value < this.rowCount)
if (end.value < this.rowCount) {
var row = this._getItemAtRow(end.value);
if (row.isSeparator()) {
return;
}
this.selection.select(end.value);
else
}
else {
this.selection.select(this.rowCount-1);
}
}
/*

View file

@ -1539,7 +1539,7 @@ Zotero.Integration.Session.prototype.updateUncitedItems = function() {
Zotero.Integration.Session.prototype.updateUpdateIndices = function(regenerateAll) {
if(regenerateAll || this.regenerateAll) {
// update all indices
for(var i=0; i<this.citationsByIndex.length; i++) {
for(var i in this.citationsByIndex) {
this.newIndices[i] = true;
this.updateIndices[i] = true;
}
@ -1661,7 +1661,7 @@ Zotero.Integration.Session.prototype.updateCitations = function() {
*/
Zotero.Integration.Session.prototype.restoreProcessorState = function() {
var citations = [];
for(var i in this.citationsByIndex.length) {
for(var i in this.citationsByIndex) {
if(this.citationsByIndex[i] && !this.newIndices[i] && !this.citationsByIndex[i].properties.delete) {
citations.push(this.citationsByIndex[i]);
}

View file

@ -3363,6 +3363,7 @@ Zotero.Sync.Server.Data = new function() {
var linkedItems = targetObj.getLinkedItems(true);
targetObj.linkedItems = linkedItems.concat(otherDiff.linkedItems);
/*
var msg = _generateTagItemMergeMessage(
targetObj.name,
otherDiff.linkedItems,
@ -3370,6 +3371,7 @@ Zotero.Sync.Server.Data = new function() {
);
// TODO: log rather than alert
alert(msg);
*/
}
targetObj.save();

View file

@ -81,7 +81,7 @@
onkeyup="ZoteroPane.handleKeyUp(event, this.id)"
chromedir="&locale.dir;">
<toolbar id="zotero-toolbar" class="toolbar">
<toolbar id="zotero-toolbar" class="toolbar" fullscreentoolbar="true">
<hbox id="zotero-collections-toolbar">
<toolbarbutton id="zotero-tb-collection-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/>
<toolbarbutton id="zotero-tb-group-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newGroup;" oncommand="ZoteroPane.newGroup()"/>

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label = Show File
locate.showFile.tooltip = Open the directory in which this file resides
locate.libraryLookup.label = Library Lookup
locate.libraryLookup.tooltip = Look up this item using the selected OpenURL resolver
locate.manageLocateEngines = Manage Locate Engines...
locate.manageLocateEngines = Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -728,4 +728,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -727,4 +727,4 @@ locate.showFile.label=Show File
locate.showFile.tooltip=Open the directory in which this file resides
locate.libraryLookup.label=Library Lookup
locate.libraryLookup.tooltip=Look up this item using the selected OpenURL resolver
locate.manageLocateEngines=Manage Locate Engines...
locate.manageLocateEngines=Manage Lookup Engines...

View file

@ -1,4 +1,4 @@
scrollbox
#item-box
{
overflow: auto;
}