www/js/rec_main.js

changeset 815
5714ea86187d
parent 813
752bb80362fb
equal deleted inserted replaced
814:de4a74899969 815:5714ea86187d
46 width: 1280, 46 width: 1280,
47 height: 630, 47 height: 630,
48 source: dataAdapter, 48 source: dataAdapter,
49 groupable: true, 49 groupable: true,
50 theme: theme, 50 theme: theme,
51 showstatusbar: true,
52 renderstatusbar: function(statusbar) {
53 var addButton, container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
54 addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' +
55 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Add</span></div>');
56 container.append(addButton);
57 statusbar.append(container);
58 addButton.jqxButton({ theme: theme, width: 100, height: 20 });
59 // add new recipe.
60 addButton.click(function(event) {
61 window.location.href = 'rec_new.php?return=rec_main.php';
62 });
63 },
64 filterable: true, 51 filterable: true,
65 filtermode: 'excel', 52 filtermode: 'excel',
66 columns: [ 53 columns: [
67 { text: 'Stijlgids', datafield: 'st_guide', width: 120 }, 54 { text: 'Stijlgids', datafield: 'st_guide', width: 120 },
68 { text: 'Letter', datafield: 'st_letter', width: 60 }, 55 { text: 'Letter', datafield: 'st_letter', width: 60 },
74 { text: 'ABV', datafield: 'est_abv', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, 61 { text: 'ABV', datafield: 'est_abv', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
75 { text: '', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function() { 62 { text: '', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function() {
76 return 'Bekijk'; 63 return 'Bekijk';
77 }, buttonclick: function(row) { 64 }, buttonclick: function(row) {
78 var datarecord = dataAdapter.records[row]; 65 var datarecord = dataAdapter.records[row];
79 window.location.href = 'rec_edit.php?record=' + datarecord.record + '&return=rec_main.php'; 66 window.location.href = 'rec_view.php?record=' + datarecord.record + '&return=rec_main.php';
80 } 67 }
81 } 68 }
82 ], 69 ],
83 groups: ['st_guide', 'st_letter'] 70 groups: ['st_guide', 'st_letter']
84 }); 71 });

mercurial