www/js/inv_hops.js

changeset 34
a720353fada9
parent 30
f5ab22446aa5
child 37
9362eb9e9e5b
equal deleted inserted replaced
33:2ee6ad5d6f14 34:a720353fada9
24 function createDelElements() { 24 function createDelElements() {
25 $('#eventWindow').jqxWindow({ 25 $('#eventWindow').jqxWindow({
26 theme: theme, 26 theme: theme,
27 position: { x: 490, y: 210 }, 27 position: { x: 490, y: 210 },
28 width: 300, 28 width: 300,
29 height: 145, 29 height: 175,
30 resizable: false, 30 resizable: false,
31 isModal: true, 31 isModal: true,
32 modalOpacity: 0.4, 32 modalOpacity: 0.4,
33 okButton: $('#delOk'), 33 okButton: $('#delOk'),
34 cancelButton: $('#delCancel'), 34 cancelButton: $('#delCancel'),
155 theme: theme, 155 theme: theme,
156 showstatusbar: true, 156 showstatusbar: true,
157 localization: getLocalization(), 157 localization: getLocalization(),
158 renderstatusbar: function (statusbar) { 158 renderstatusbar: function (statusbar) {
159 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 159 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
160 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;'>Add</span></div>"); 160 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>");
161 container.append(addButton); 161 container.append(addButton);
162 statusbar.append(container); 162 statusbar.append(container);
163 addButton.jqxButton({ width: 60, height: 20 }); 163 addButton.jqxButton({ theme: theme, width: 120, height: 20 });
164 // add new row. 164 // add new row.
165 addButton.click(function (event) { 165 addButton.click(function (event) {
166 editrow = -1; 166 editrow = -1;
167 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 167 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
168 $("#name").val(''); 168 $("#name").val('');
199 { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, 199 { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
200 { text: 'Herkomst', datafield: 'origin', align: 'center', cellsalign: 'center', width: 150 }, 200 { text: 'Herkomst', datafield: 'origin', align: 'center', cellsalign: 'center', width: 150 },
201 { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', width: 100 }, 201 { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', width: 100 },
202 { text: 'Voor, gr.', datafield: 'inventory', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, 202 { text: 'Voor, gr.', datafield: 'inventory', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
203 { text: 'Prijs /kg', datafield: 'cost', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'c2' }, 203 { text: 'Prijs /kg', datafield: 'cost', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'c2' },
204 { text: 'Edit', datafield: 'Edit', columntype: 'button', align: 'center', cellsrenderer: function () { 204 { text: 'Wijzig', datafield: 'Wijzig', columntype: 'button', align: 'center', cellsrenderer: function () {
205 return "Edit"; 205 return "Wijzig";
206 }, buttonclick: function (row) { 206 }, buttonclick: function (row) {
207 // open the popup window when the user clicks a button. 207 // open the popup window when the user clicks a button.
208 editrow = row; 208 editrow = row;
209 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 209 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
210 // get the clicked row's data and initialize the input fields. 210 // get the clicked row's data and initialize the input fields.

mercurial