156 width: 1280, |
156 width: 1280, |
157 height: 630, |
157 height: 630, |
158 source: dataAdapter, |
158 source: dataAdapter, |
159 theme: theme, |
159 theme: theme, |
160 showstatusbar: true, |
160 showstatusbar: true, |
161 localization: getLocalization(), |
|
162 renderstatusbar: function (statusbar) { |
161 renderstatusbar: function (statusbar) { |
163 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
162 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;'>Nieuw</span></div>"); |
163 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); |
164 container.append(addButton); |
166 statusbar.append(container); |
165 statusbar.append(container); |
190 { text: 'Water leverancier', datafield: 'name', width: 225 }, |
189 { text: 'Water leverancier', datafield: 'name', width: 225 }, |
191 { text: 'Opmerkingen', datafield: 'notes' }, |
190 { text: 'Opmerkingen', datafield: 'notes' }, |
192 { text: 'Onbeperkt', datafield: 'unlimited_stock', columntype: 'checkbox', width: 80 }, |
191 { text: 'Onbeperkt', datafield: 'unlimited_stock', columntype: 'checkbox', width: 80 }, |
193 { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
192 { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
194 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
193 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
195 if ((value == 0) || rowdata.unlimited_stock) |
194 var amount = ""; |
196 return "<div style='margin: 4px;' class='jqx-right-align'></div>"; |
195 if (value > 0 && rowdata.unlimited_stock == 0) |
197 return "<div style='margin: 4px;' class='jqx-right-align'>"+dataAdapter.formatNumber(value,"f1")+" L</div>"; |
196 amount = dataAdapter.formatNumber(value,"f1")+" L"; |
|
197 return "<span style='margin: 3px; margin-top: 6px; float: right;'>" + amount + "</span>"; |
198 } |
198 } |
199 }, |
199 }, |
200 { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () { |
200 { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () { |
201 return "Wijzig"; |
201 return "Wijzig"; |
202 }, buttonclick: function (row) { |
202 }, buttonclick: function (row) { |
203 // open the popup window when the user clicks a button. |
203 // open the popup window when the user clicks a button. |
204 editrow = row; |
204 editrow = row; |
205 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); |
205 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); |