Checking in Frank Bennett's single-to-multiple citation dialog fix.
This commit is contained in:
parent
cc31544f6e
commit
17d07b37bc
1 changed files with 22 additions and 2 deletions
|
@ -149,14 +149,34 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
function toggleMultipleSources() {
|
function toggleMultipleSources() {
|
||||||
_multipleSourcesOn = !_multipleSourcesOn;
|
_multipleSourcesOn = !_multipleSourcesOn;
|
||||||
if(_multipleSourcesOn) {
|
if(_multipleSourcesOn) {
|
||||||
|
var items = itemsView.getSelectedItems(true);
|
||||||
|
var itemID = (items.length ? items[0] : false);
|
||||||
|
// var itemDataID = itemID+"::"+0;
|
||||||
document.getElementById("multiple-sources").hidden = undefined;
|
document.getElementById("multiple-sources").hidden = undefined;
|
||||||
document.getElementById("zotero-add-citation-dialog").width = "750";
|
document.getElementById("zotero-add-citation-dialog").width = "750";
|
||||||
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource");
|
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource");
|
||||||
|
// move user field content to multiple before adding XXXXX
|
||||||
|
if (itemID) {
|
||||||
|
// _itemData[itemDataID] = new Object();
|
||||||
|
_itemData[itemID] = new Object();
|
||||||
|
for (box in _preserveData) {
|
||||||
|
element = document.getElementById(box);
|
||||||
|
// _itemData[itemDataID][box] = element[_preserveData[box]];
|
||||||
|
_itemData[itemID][box] = element[_preserveData[box]];
|
||||||
|
}
|
||||||
|
}
|
||||||
window.sizeToContent();
|
window.sizeToContent();
|
||||||
window.moveTo((window.screenX-75), window.screenY);
|
window.moveTo((window.screenX-75), window.screenY);
|
||||||
treeItemSelected();
|
treeItemSelected();
|
||||||
// disable adding info until citation added
|
// disable adding info until citation added
|
||||||
_itemSelected(false);
|
_itemSelected(false);
|
||||||
|
// add current selection
|
||||||
|
if (itemID) {
|
||||||
|
this.add();
|
||||||
|
} else {
|
||||||
|
_updateAccept();
|
||||||
|
_updatePreview();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("multiple-sources").hidden = true;
|
document.getElementById("multiple-sources").hidden = true;
|
||||||
document.getElementById("zotero-add-citation-dialog").width = "600";
|
document.getElementById("zotero-add-citation-dialog").width = "600";
|
||||||
|
@ -174,10 +194,10 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
|
|
||||||
// delete all items
|
// delete all items
|
||||||
_clearCitationList();
|
_clearCitationList();
|
||||||
}
|
|
||||||
_updateAccept();
|
_updateAccept();
|
||||||
_updatePreview();
|
_updatePreview();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* called when an item in the item selection tree is clicked
|
* called when an item in the item selection tree is clicked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue