www/js/rec_main.js

changeset 286
124af734af68
parent 95
8dc0a00b1db4
child 471
0bf73d605604
equal deleted inserted replaced
285:0ea9dfb3fce9 286:124af734af68
46 height: 630, 46 height: 630,
47 source: dataAdapter, 47 source: dataAdapter,
48 groupable: true, 48 groupable: true,
49 theme: theme, 49 theme: theme,
50 showstatusbar: true, 50 showstatusbar: true,
51 localization: getLocalization(),
52 renderstatusbar: function (statusbar) { 51 renderstatusbar: function (statusbar) {
53 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); 52 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
54 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>"); 53 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>");
55 container.append(addButton); 54 container.append(addButton);
56 statusbar.append(container); 55 statusbar.append(container);
57 addButton.jqxButton({ theme: theme, width: 120, height: 20 }); 56 addButton.jqxButton({ theme: theme, width: 100, height: 20 });
58 // add new recipe. 57 // add new recipe.
59 addButton.click(function (event) { 58 addButton.click(function (event) {
60 var url= "rec_new.php?return=rec_main.php"; 59 var url= "rec_new.php?return=rec_main.php";
61 window.location.href = url; 60 window.location.href = url;
62 }); 61 });
70 { text: 'Naam', datafield: 'name' }, 69 { text: 'Naam', datafield: 'name' },
71 { text: 'OG', datafield: 'est_og', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, 70 { text: 'OG', datafield: 'est_og', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
72 { text: 'EBC', datafield: 'est_color', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, 71 { text: 'EBC', datafield: 'est_color', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
73 { text: 'IBU', datafield: 'est_ibu', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, 72 { text: 'IBU', datafield: 'est_ibu', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' },
74 { text: 'ABV', datafield: 'est_abv', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, 73 { text: 'ABV', datafield: 'est_abv', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
75 { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { 74 { text: '', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () {
76 return "Wijzig"; 75 return "Wijzig";
77 }, buttonclick: function (row) { 76 }, buttonclick: function (row) {
78 var datarecord = dataAdapter.records[row]; 77 var datarecord = dataAdapter.records[row];
79 var url= "rec_edit.php?record=" + datarecord.record + "&return=rec_main.php"; 78 var url= "rec_edit.php?record=" + datarecord.record + "&return=rec_main.php";
80 window.location.href = url; 79 window.location.href = url;

mercurial