[open-ils-commits] r12566 - in trunk/Open-ILS/web: css/skin/default js/ui/default/acq/common js/ui/default/acq/picklist templates/default/acq/common templates/default/acq/picklist (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 17 14:50:31 EDT 2009
Author: erickson
Date: 2009-03-17 14:50:27 -0400 (Tue, 17 Mar 2009)
New Revision: 12566
Modified:
trunk/Open-ILS/web/css/skin/default/acq.css
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
trunk/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2
Log:
progress bar to show lineitem update progress. some small style cleanup
Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css 2009-03-17 18:49:24 UTC (rev 12565)
+++ trunk/Open-ILS/web/css/skin/default/acq.css 2009-03-17 18:50:27 UTC (rev 12566)
@@ -27,7 +27,6 @@
#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;}
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-03-17 18:49:24 UTC (rev 12565)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-03-17 18:50:27 UTC (rev 12566)
@@ -63,12 +63,13 @@
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;
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js 2009-03-17 18:49:24 UTC (rev 12565)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js 2009-03-17 18:50:27 UTC (rev 12566)
@@ -1,4 +1,5 @@
dojo.require('dijit.form.FilteringSelect');
+dojo.require('dijit.ProgressBar');
dojo.require('dijit.Dialog');
dojo.require('dojox.form.CheckedMultiSelect');
dojo.require('fieldmapper.Fieldmapper');
@@ -169,11 +170,9 @@
function saveResults(values) {
- selectedLIs = resultLIs;
+ openils.Util.show('oils-acq-update-li-progress');
+ selectedLIs = liTable.getSelected( (values.which == 'all') );
- if(values.which == 'selected')
- selectedLIs = liTable.getSelected();
-
if(values.new_name && values.new_name != '') {
// save selected lineitems to a new picklist
if(values.which = 'selected') {
@@ -201,10 +200,13 @@
}
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);
@@ -213,3 +215,5 @@
}
openils.Util.addOnLoad(drawForm);
+
+
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-17 18:49:24 UTC (rev 12565)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-17 18:50:27 UTC (rev 12566)
@@ -23,7 +23,7 @@
<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'>
@@ -45,6 +45,7 @@
</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>
@@ -54,8 +55,9 @@
</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>
Modified: trunk/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 2009-03-17 18:49:24 UTC (rev 12565)
+++ trunk/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 2009-03-17 18:50:27 UTC (rev 12566)
@@ -54,6 +54,9 @@
<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>
More information about the open-ils-commits
mailing list