www/js/inv_yeasts.js

changeset 34
a720353fada9
parent 33
2ee6ad5d6f14
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'),
151 theme: theme, 151 theme: theme,
152 showstatusbar: true, 152 showstatusbar: true,
153 localization: getLocalization(), 153 localization: getLocalization(),
154 renderstatusbar: function (statusbar) { 154 renderstatusbar: function (statusbar) {
155 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 155 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
156 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>"); 156 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>");
157 container.append(addButton); 157 container.append(addButton);
158 statusbar.append(container); 158 statusbar.append(container);
159 addButton.jqxButton({ width: 60, height: 20 }); 159 addButton.jqxButton({ theme: theme, width: 120, height: 20 });
160 // add new row. 160 // add new row.
161 addButton.click(function (event) { 161 addButton.click(function (event) {
162 editrow = -1; 162 editrow = -1;
163 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 163 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
164 $("#name").val(''); 164 $("#name").val('');
189 { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 }, 189 { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 },
190 { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 90 }, 190 { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 90 },
191 { text: 'Vergistingsgraad', datafield: 'attenuation', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'p0' }, 191 { text: 'Vergistingsgraad', datafield: 'attenuation', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'p0' },
192 { text: 'Voor. gr/ml', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, 192 { text: 'Voor. gr/ml', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
193 { text: 'Prijs kg/l', datafield: 'cost', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'c2' }, 193 { text: 'Prijs kg/l', datafield: 'cost', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'c2' },
194 { text: 'Edit', datafield: 'Edit', columntype: 'button', align: 'center', cellsrenderer: function () { 194 { text: 'Wijzig', datafield: 'Edit', columntype: 'button', align: 'center', cellsrenderer: function () {
195 return "Edit"; 195 return "Wijzig";
196 }, buttonclick: function (row) { 196 }, buttonclick: function (row) {
197 // open the popup window when the user clicks a button. 197 // open the popup window when the user clicks a button.
198 editrow = row; 198 editrow = row;
199 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 199 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
200 // get the clicked row's data and initialize the input fields. 200 // get the clicked row's data and initialize the input fields.

mercurial