0
1
Fork 0
hedera-web-mindshore/forms/admin/shelves/shelves.js

54 lines
850 B
JavaScript

Hedera.Shelves = new Class
({
Extends: Hedera.Form
,activate: function ()
{
this.$('date').value = new Date ();
this.$('useIds').value = false;
}
,onConfigChange: function ()
{
var fields = [
'realm'
,'family'
,'warehouse'
,'shelf'
,'namePrefix'
,'maxAmount'
,'reportTitle'
,'showPacking'
,'stack'
];
for (var i = 0; i < fields.length; i++)
this.$(fields[i]).value = this.$('config').get (fields[i]);
}
,onPreviewClick: function ()
{
var fields = [
'family'
,'warehouse'
,'shelf'
,'namePrefix'
,'maxAmount'
,'reportTitle'
,'showPacking'
,'stack'
,'useIds'
,'date'
];
var batch = new Sql.Batch ();
for (var i = 0; i < fields.length; i++)
batch.addValue (fields[i], this.$(fields[i]).value);
this.gui.openReport ('shelves-report', batch);
}
});