Hedera.Shelves = new Class ({ Extends: Hedera.Form ,activate: function () { this.$('date').value = new Date (); } ,onConfigChange: function () { var c = this.$('config'); this.$('warehouse').value = c.get ('warehouse_id'); this.$('shelf').value = c.get ('shelf_id'); this.$('reign').value = c.get ('reino_id'); this.$('family').value = c.get ('family_id'); this.$('filter').value = c.get ('name_prefix'); this.$('max-amount').value = c.get ('max_amount'); this.$('show-packing').value = c.get ('show_packing'); this.$('stack').value = c.get ('stack'); this.$('report-title').value = c.get ('name'); } ,onPreviewClick: function () { var batch = new Sql.Batch (); batch.addValues ({ 'shelf': this.$('shelf').value, 'wh': this.$('warehouse').value, 'date': this.$('date').value, 'family': this.$('family').value, 'filter': this.$('filter').value, 'title': this.$('report-title').value, 'max-amount': this.$('max-amount').value, 'show-packing': this.$('show-packing').value, 'stack': this.$('stack').value, 'use-ids': this.$('use-ids').value, }); this.gui.openReport ('shelves-report', batch); } });