Closes #350, Buttons to select/deselect all items when ingesting multiple items

This commit is contained in:
Dan Stillman 2006-10-25 01:02:07 +00:00
parent c00c2dfe81
commit 0b1002c8ce
2 changed files with 11 additions and 0 deletions

View File

@ -55,6 +55,13 @@ Zotero_Ingester_Interface_SelectItems.init = function() {
}
}
Zotero_Ingester_Interface_SelectItems.selectAll = function(deselect) {
var listbox = document.getElementById("zotero-selectitems-links");
for (var i=0; i<listbox.childNodes.length; i++){
listbox.childNodes[i].setAttribute('checked', !deselect);
}
}
Zotero_Ingester_Interface_SelectItems.acceptSelection = function() {
var listbox = document.getElementById("zotero-selectitems-links");

View File

@ -16,4 +16,8 @@
<box flex="1">
<listbox id="zotero-selectitems-links" flex="1" context="zoteroSelectContext"></listbox>
</box>
<hbox>
<button label="Select All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll()"/>
<button label="Deselect All" oncommand="Zotero_Ingester_Interface_SelectItems.selectAll(true)"/>
</hbox>
</dialog>