www/js/inv_fermentables.js

changeset 311
f6fafccd8a6d
parent 286
124af734af68
child 324
d49da6d0b451
equal deleted inserted replaced
310:b316b88ebe12 311:f6fafccd8a6d
198 theme: theme, 198 theme: theme,
199 showstatusbar: true, 199 showstatusbar: true,
200 renderstatusbar: function (statusbar) { 200 renderstatusbar: function (statusbar) {
201 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 201 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
202 var addButton = $("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>"); 202 var addButton = $("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>");
203 var impButton = $("<div style='float: right; margin-right: 50px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Import</span></div>");
203 container.append(addButton); 204 container.append(addButton);
205 container.append(impButton);
204 statusbar.append(container); 206 statusbar.append(container);
205 addButton.jqxButton({ theme: theme, width: 90, height: 20 }); 207 addButton.jqxButton({ theme: theme, width: 90, height: 20 });
208 impButton.jqxButton({ theme: theme, width: 90, height: 20 });
206 // add new row. 209 // add new row.
207 addButton.click(function (event) { 210 addButton.click(function (event) {
208 editrow = -1; 211 editrow = -1;
209 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); 212 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } });
210 $("#name").val('Nieuw product'); 213 $("#name").val('Nieuw product');
230 $("#inventory").val(0); 233 $("#inventory").val(0);
231 $("#cost").val(0); 234 $("#cost").val(0);
232 $("#production_date").val(''); 235 $("#production_date").val('');
233 $("#tht_date").val(''); 236 $("#tht_date").val('');
234 $("#popupWindow").jqxWindow('open'); 237 $("#popupWindow").jqxWindow('open');
238 });
239 impButton.click(function (event) {
240 var url="import_ingredients.php?select=fermentables";
241 window.location.href = url;
235 }); 242 });
236 }, 243 },
237 filterable: true, 244 filterable: true,
238 filtermode: 'excel', 245 filtermode: 'excel',
239 columns: [ 246 columns: [

mercurial