startup : function() {
this.inherited(arguments);
this.progress = new dijit.ProgressBar();
- this.progress.indeterminate = this.indeterminate;
this.progress.startup();
openils.Util.addCSSClass(this.progress.domNode, 'oils-progress-dialog');
this.containerNode.appendChild(this.progress.domNode);
- if(this.indeterminate) this.update();
},
update : function() {
this.progress.update.apply(this.progress, arguments);
},
- setInd : function(isInd) {
- this.progress.indeterminate = this.indeterminate = isInd;
- }
+ show : function(ind) {
+ if(ind || this.indeterminate) {
+ this.progress.indeterminate = true;
+ this.update();
+ } else {
+ this.progress.indeterminate = false;
+ }
+
+ this.inherited(arguments);
+ },
}
);
}
this.printPO = function() {
if(!this.isPO) return;
- progressDialogInd.show();
+ progressDialog.show(true);
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.purchase_order.format'],
{ async: true,
params: [this.authtoken, this.isPO, 'html'],
oncomplete: function(r) {
- progressDialogInd.hide();
+ progressDialog.hide();
var evt = openils.Util.readResponse(r);
if(evt && evt.template_output()) {
win = window.open('','', 'resizable,width=800,height=600,scrollbars=1');
this.receiveLi = function(li) {
if(!this.isPO) return;
- progressDialogInd.show();
+ progressDialog.show(true);
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem.receive'],
{ async: true,
params: [this.authtoken, li.id()],
onresponse : function(r) {
var resp = openils.Util.readResponse(r);
- progressDialogInd.hide();
+ progressDialog.hide();
},
}
);
this.receiveLid = function(li) {
if(!this.isPO) return;
- progressDialogInd.show();
+ progressDialog.show(true);
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem_detail.receive'],
{ async: true,
params: [this.authtoken, li.id()],
onresponse : function(r) {
var resp = openils.Util.readResponse(r);
- progressDialogInd.hide();
+ progressDialog.hide();
},
}
);
return dojo.date.locale.format(date, {formatLength:'short'});
}
function deleteFromGrid() {
- progressDialog.setInd(true);
- progressDialog.update();
- progressDialog.show();
+ progressDialog.show(true);
var list = [];
dojo.forEach(
plListGrid.getSelectedItems(),
var plId = plListGrid.store.getValue(item, 'id');
var entryCount = Number(plListGrid.store.getValue(item, 'entry_count'));
- progressDialog.setInd(false);
progressDialog.show();
progressDialog.update({maximum:entryCount, progress:0});
}
);
- progressDialog.setInd(false);
progressDialog.show();
progressDialog.update({maximum:totalLi, progress:0});