www/js/inv_styles.js

changeset 34
a720353fada9
parent 28
ac959f98e107
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'),
159 theme: theme, 159 theme: theme,
160 showstatusbar: true, 160 showstatusbar: true,
161 localization: getLocalization(), 161 localization: getLocalization(),
162 renderstatusbar: function (statusbar) { 162 renderstatusbar: function (statusbar) {
163 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 163 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
164 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>"); 164 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>");
165 container.append(addButton); 165 container.append(addButton);
166 statusbar.append(container); 166 statusbar.append(container);
167 addButton.jqxButton({ width: 60, height: 20 }); 167 addButton.jqxButton({ theme: theme, width: 120, height: 20 });
168 // add new row. 168 // add new row.
169 addButton.click(function (event) { 169 addButton.click(function (event) {
170 editrow = -1; 170 editrow = -1;
171 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 171 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
172 $("#name").val(''); 172 $("#name").val('');
196 }, 196 },
197 filterable: true, 197 filterable: true,
198 filtermode: 'excel', 198 filtermode: 'excel',
199 columns: [ 199 columns: [
200 { text: 'Groep', datafield: 'style_letter', width: 30 }, 200 { text: 'Groep', datafield: 'style_letter', width: 30 },
201 { text: 'Style Name', datafield: 'name', width: 250 }, 201 { text: 'Style Name', datafield: 'name' },
202 { text: 'OG', datafield: 'og_min', width: 60, cellsalign: 'right', cellsformat: 'f3' }, 202 { text: 'OG', datafield: 'og_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
203 { text: 'OG', datafield: 'og_max', width: 60, cellsalign: 'right', cellsformat: 'f3' }, 203 { text: 'OG', datafield: 'og_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
204 { text: 'FG', datafield: 'fg_min', width: 60, cellsalign: 'right', cellsformat: 'f3' }, 204 { text: 'FG', datafield: 'fg_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
205 { text: 'FG', datafield: 'fg_max', width: 60, cellsalign: 'right', cellsformat: 'f3' }, 205 { text: 'FG', datafield: 'fg_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
206 { text: 'IBU', datafield: 'ibu_min', width: 60, cellsalign: 'right', cellsformat: 'f0' }, 206 { text: 'IBU', datafield: 'ibu_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
207 { text: 'IBU', datafield: 'ibu_max', width: 60, cellsalign: 'right', cellsformat: 'f0' }, 207 { text: 'IBU', datafield: 'ibu_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
208 { text: 'EBC', datafield: 'color_min', width: 60, cellsalign: 'right', cellsformat: 'f0' }, 208 { text: 'EBC', datafield: 'color_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
209 { text: 'EBC', datafield: 'color_max', width: 60, cellsalign: 'right', cellsformat: 'f0' }, 209 { text: 'EBC', datafield: 'color_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
210 { text: 'Co2', datafield: 'carb_min', width: 60, cellsalign: 'right', cellsformat: 'f1' }, 210 { text: 'Co2', datafield: 'carb_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
211 { text: 'Co2', datafield: 'carb_max', width: 60, cellsalign: 'right', cellsformat: 'f1' }, 211 { text: 'Co2', datafield: 'carb_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
212 { text: 'ABV', datafield: 'abv_min', width: 60, cellsalign: 'right', cellsformat: 'f1' }, 212 { text: 'ABV', datafield: 'abv_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
213 { text: 'ABV', datafield: 'abv_max', width: 60, cellsalign: 'right', cellsformat: 'f1' }, 213 { text: 'ABV', datafield: 'abv_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
214 { text: 'Edit', datafield: 'Edit', columntype: 'button', cellsrenderer: function () { 214 { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () {
215 return "Edit"; 215 return "Wijzig";
216 }, buttonclick: function (row) { 216 }, buttonclick: function (row) {
217 // open the popup window when the user clicks a button. 217 // open the popup window when the user clicks a button.
218 editrow = row; 218 editrow = row;
219 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); 219 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
220 // get the clicked row's data and initialize the input fields. 220 // get the clicked row's data and initialize the input fields.

mercurial