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'), |
142 theme: theme, |
142 theme: theme, |
143 showstatusbar: true, |
143 showstatusbar: true, |
144 localization: getLocalization(), |
144 localization: getLocalization(), |
145 renderstatusbar: function (statusbar) { |
145 renderstatusbar: function (statusbar) { |
146 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
146 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
147 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>"); |
147 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>"); |
148 container.append(addButton); |
148 container.append(addButton); |
149 statusbar.append(container); |
149 statusbar.append(container); |
150 addButton.jqxButton({ width: 60, height: 20 }); |
150 addButton.jqxButton({ theme: theme, width: 120, height: 20 }); |
151 // add new row. |
151 // add new row. |
152 addButton.click(function (event) { |
152 addButton.click(function (event) { |
153 editrow = -1; |
153 editrow = -1; |
154 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |
154 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |
155 $("#name").val(''); |
155 $("#name").val(''); |
170 }); |
170 }); |
171 }, |
171 }, |
172 filterable: true, |
172 filterable: true, |
173 filtermode: 'excel', |
173 filtermode: 'excel', |
174 columns: [ |
174 columns: [ |
175 { text: 'Water Profile', datafield: 'name', width: 250 }, |
175 { text: 'Water leverancier', datafield: 'name', width: 250 }, |
176 { text: 'Notes', datafield: 'notes', width: 850 }, |
176 { text: 'Opmerkingen', datafield: 'notes', width: 850 }, |
177 { text: 'Standaard', datafield: 'default_water', columntype: 'checkbox', width: 80 }, |
177 { text: 'Standaard', datafield: 'default_water', columntype: 'checkbox', width: 80 }, |
178 { text: 'Edit', datafield: 'Edit', columntype: 'button', cellsrenderer: function () { |
178 { text: 'Wijzig', datafield: 'Edit', columntype: 'button', cellsrenderer: function () { |
179 return "Edit"; |
179 return "Wijzig"; |
180 }, buttonclick: function (row) { |
180 }, buttonclick: function (row) { |
181 // open the popup window when the user clicks a button. |
181 // open the popup window when the user clicks a button. |
182 editrow = row; |
182 editrow = row; |
183 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |
183 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |
184 // get the clicked row's data and initialize the input fields. |
184 // get the clicked row's data and initialize the input fields. |