Closes #350, Buttons to select/deselect all items when ingesting multiple items
This commit is contained in:
parent
c00c2dfe81
commit
0b1002c8ce
|
@ -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() {
|
Zotero_Ingester_Interface_SelectItems.acceptSelection = function() {
|
||||||
var listbox = document.getElementById("zotero-selectitems-links");
|
var listbox = document.getElementById("zotero-selectitems-links");
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,8 @@
|
||||||
<box flex="1">
|
<box flex="1">
|
||||||
<listbox id="zotero-selectitems-links" flex="1" context="zoteroSelectContext"></listbox>
|
<listbox id="zotero-selectitems-links" flex="1" context="zoteroSelectContext"></listbox>
|
||||||
</box>
|
</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>
|
</dialog>
|
Loading…
Reference in New Issue
Block a user