www/js/profile_mash.js

changeset 701
3ce3df681be0
parent 688
0ce464e42d8b
child 702
f0896a6f9b64
equal deleted inserted replaced
700:89b7449d1fd9 701:3ce3df681be0
255 $('#m_ramp_time').jqxNumberInput({ Min: 1, Max: 30 }); 255 $('#m_ramp_time').jqxNumberInput({ Min: 1, Max: 30 });
256 256
257 // initialize the input fields. 257 // initialize the input fields.
258 $('#name').jqxInput({ theme: theme, width: 480, height: 23 }); 258 $('#name').jqxInput({ theme: theme, width: 480, height: 23 });
259 $('#notes').jqxInput({ theme: theme, width: 800, height: 100 }); 259 $('#notes').jqxInput({ theme: theme, width: 800, height: 100 });
260
261 var localizationobj = {};
262 localizationobj.filterchoosestring= "Keuze:";
263
260 // initialize jqxGrid 264 // initialize jqxGrid
261 $('#jqxgrid').jqxGrid({ 265 $('#jqxgrid').jqxGrid({
262 width: 1280, 266 width: 1280,
263 height: 630, 267 height: 630,
264 source: dataAdapter, 268 source: dataAdapter,
265 theme: theme, 269 theme: theme,
266 showstatusbar: true, 270 showstatusbar: true,
267 renderstatusbar: function(statusbar) { 271 renderstatusbar: function(statusbar) {
268 var container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>'); 272 var container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>');
269 var addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' + 273 var addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' +
270 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Add</span></div>'); 274 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -4px;">Add</span></div>');
271 var expButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' + 275 var expButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' +
272 'src="images/database.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Export</span></div>'); 276 'src="images/database.png"/><span style="margin-left: 4px; position: relative; top: -10px;">Export</span></div>');
273 container.append(addButton); 277 container.append(addButton);
274 container.append(expButton); 278 container.append(expButton);
275 statusbar.append(container); 279 statusbar.append(container);
276 addButton.jqxButton({ theme: theme, width: 90, height: 20 }); 280 addButton.jqxButton({ theme: theme, width: 90, height: 17 });
277 expButton.jqxButton({ theme: theme, width: 90, height: 20 }); 281 expButton.jqxButton({ theme: theme, width: 90, height: 17 });
278 // add new row. 282 // add new row.
279 addButton.click(function(event) { 283 addButton.click(function(event) {
280 editrow = -1; 284 editrow = -1;
281 $('#name').val('Nieuw maisch schema'); 285 $('#name').val('Nieuw maisch schema');
282 $('#notes').val(''); 286 $('#notes').val('');
285 }); 289 });
286 expButton.click(function(event) { 290 expButton.click(function(event) {
287 window.open('export_mashs.php'); 291 window.open('export_mashs.php');
288 }); 292 });
289 }, 293 },
294 ready: function () {
295 $("#jqxgrid").jqxGrid('localizestrings', localizationobj);
296 },
297 filterable: true,
298 showfilterrow: true,
290 columns: [ 299 columns: [
291 { text: 'Maish schema', datafield: 'name', width: 250 }, 300 { text: 'Maish schema', datafield: 'name', width: 250, filtertype: 'textbox' },
292 { text: 'Opmerkingen', datafield: 'notes' }, 301 { text: 'Opmerkingen', datafield: 'notes', filtertype: 'textbox' },
293 { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', 302 { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', filterable: false,
294 cellsrenderer: function() { 303 cellsrenderer: function() {
295 return 'Wijzig'; 304 return 'Wijzig';
296 }, buttonclick: function(row) { 305 }, buttonclick: function(row) {
297 editrow = row; 306 editrow = row;
298 // get the clicked row's data and initialize the input fields. 307 // get the clicked row's data and initialize the input fields.

mercurial