www/js/inv_hops.js

changeset 311
f6fafccd8a6d
parent 286
124af734af68
child 395
463d64cce768
equal deleted inserted replaced
310:b316b88ebe12 311:f6fafccd8a6d
181 theme: theme, 181 theme: theme,
182 showstatusbar: true, 182 showstatusbar: true,
183 renderstatusbar: function (statusbar) { 183 renderstatusbar: function (statusbar) {
184 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 184 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
185 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>"); 185 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>");
186 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>");
186 container.append(addButton); 187 container.append(addButton);
188 container.append(impButton);
187 statusbar.append(container); 189 statusbar.append(container);
188 addButton.jqxButton({ theme: theme, width: 90, height: 20 }); 190 addButton.jqxButton({ theme: theme, width: 90, height: 20 });
191 impButton.jqxButton({ theme: theme, width: 90, height: 20 });
189 // add new row. 192 // add new row.
190 addButton.click(function (event) { 193 addButton.click(function (event) {
191 editrow = -1; 194 editrow = -1;
192 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); 195 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } });
193 $("#name").val('Nieuwe hop'); 196 $("#name").val('Nieuwe hop');
208 $("#cost").val(0); 211 $("#cost").val(0);
209 $("#production_date").val(''); 212 $("#production_date").val('');
210 $("#tht_date").val(''); 213 $("#tht_date").val('');
211 $("#total_oil").val(0); 214 $("#total_oil").val(0);
212 $("#popupWindow").jqxWindow('open'); 215 $("#popupWindow").jqxWindow('open');
216 });
217 impButton.click(function (event) {
218 var url="import_ingredients.php?select=hops";
219 window.location.href = url;
213 }); 220 });
214 }, 221 },
215 filterable: true, 222 filterable: true,
216 filtermode: 'excel', 223 filtermode: 'excel',
217 columns: [ 224 columns: [

mercurial