#oils-acq-search-fields-label { margin-bottom: 10px; }
/*#oils-acq-search-fields-submit-block { margin: 5px; text-align: center;}*/
#oils-acq-search-fields-submit-block { margin: 5px; }
-#oils-acq-search-progress {width: 100%; text-align: center;}
#oils-acq-search-source-select option {padding: 5px;}
#oils-acq-search-fields-tbody td {padding: 3px;}
self.toggleState = !self.toggleState;
};
- this.getSelected = function() {
+ /** @param all If true, assume all are selected */
+ this.getSelected = function(all) {
var selected = [];
dojo.forEach(self.selectors,
function(i) {
- if(!i.checked) return;
- selected.push(self.liCache[i.parentNode.parentNode.getAttribute('li')]);
+ if(i.checked || all)
+ selected.push(self.liCache[i.parentNode.parentNode.getAttribute('li')]);
}
);
return selected;
dojo.require('dijit.form.FilteringSelect');
+dojo.require('dijit.ProgressBar');
dojo.require('dijit.Dialog');
dojo.require('dojox.form.CheckedMultiSelect');
dojo.require('fieldmapper.Fieldmapper');
function saveResults(values) {
- selectedLIs = resultLIs;
-
- if(values.which == 'selected')
- selectedLIs = liTable.getSelected();
+ openils.Util.show('oils-acq-update-li-progress');
+ selectedLIs = liTable.getSelected( (values.which == 'all') );
if(values.new_name && values.new_name != '') {
// save selected lineitems to a new picklist
}
function updateLiList(pl, list, idx, oncomplete) {
- if(idx >= list.length)
+ if(idx >= list.length) {
+ openils.Util.hide('oils-acq-update-li-progress');
return oncomplete();
+ }
var li = selectedLIs[idx];
li.picklist(pl);
+ liUpdateProgress.update({maximum: list.length, progress: idx});
new openils.acq.Lineitem({lineitem:li}).update(
function(r) {
updateLiList(pl, list, ++idx, oncomplete);
}
openils.Util.addOnLoad(drawForm);
+
+
<td>
<table>
<tr>
- <td rowspan='3'><img style='width:40px;height:65px;' name='jacket' onerror='dojo.style(this, "display", "none")'/></td>
+ <td rowspan='3'><img style='width:40px;height:65px;' name='jacket'/></td>
<td colspan='0'><a href='javascript:void(0);' attr='title'></a></td>
</tr>
<tr class='acq-lit-alt-row'>
</tbody>
</table>
</div>
+
<div id='acq-lit-info-div' class='hidden'>
<div dojoType='dijit.form.Button' id='acq-lit-info-back-button'>↖ Return</div>
<table>
</table>
<div style='margin-top:40px;'>
<h3>MARC Record</h3>
- <div id='acq-lit-marc-div' style='margin-top:20px;'/>
+ <div id='acq-lit-marc-div' style='margin-top:20px;'> </div>
</div>
</div>
+
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>Search Results</div>
<div>
+ <div id='oils-acq-update-li-progress' class='hidden'>
+ <div dojoType="dijit.ProgressBar" style="width:300px" jsId="liUpdateProgress"></div>
+ </div>
<div dojoType='dijit.form.Button' onClick='showDiv("oils-acq-search-block");'>New Search</div>
<div dojoType="dijit.form.DropDownButton">
<span>Save Results</span>