diff -r 55a246085522 -r 8bbc5730aaa8 www/js/prod_archive_date.js --- a/www/js/prod_archive_date.js Fri Oct 18 20:04:40 2019 +0200 +++ b/www/js/prod_archive_date.js Fri Oct 18 20:49:07 2019 +0200 @@ -21,50 +21,50 @@ *****************************************************************************/ -$(document).ready(function () { - var source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'code', type: 'string' }, - { name: 'year', type: 'string' }, - { name: 'date', type: 'string' }, - { name: 'style', type: 'string' }, - { name: 'og', type: 'float' }, - { name: 'fg', type: 'float' }, - { name: 'batch_size', type: 'float' }, - ], - id: 'record', - url: "includes/db_product.php?select=archdate" - }, - dataAdapter = new $.jqx.dataAdapter(source); +$(document).ready(function() { + var source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'code', type: 'string' }, + { name: 'year', type: 'string' }, + { name: 'date', type: 'string' }, + { name: 'style', type: 'string' }, + { name: 'og', type: 'float' }, + { name: 'fg', type: 'float' }, + { name: 'batch_size', type: 'float' }, + ], + id: 'record', + url: 'includes/db_product.php?select=archdate' + }, + dataAdapter = new $.jqx.dataAdapter(source); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - groupable: true, - theme: theme, - columns: [ - { text: 'Jaar', datafield: 'year', width: 80 }, - { text: 'Datum', datafield: 'date', width: 120, menu: false }, - { text: 'Naam', datafield: 'name', menu: false }, - { text: 'Stijl', datafield: 'style', width: 250 }, - { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3', menu: false }, - { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3', menu: false }, - { text: 'Code', datafield: 'code', width: 100, menu: false }, - { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1', menu: false }, - { text: '', datafield: 'Edit', width: 80, align: 'center', columntype: 'button', cellsrenderer: function () { - return "Bekijk"; - }, buttonclick: function (row) { - var datarecord = dataAdapter.records[row]; - window.location.href = "prod_edit.php?record=" + datarecord.record + "&select=archdate&return=prod_archive_date.php"; - } - } - ], - groups: ['year'] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + groupable: true, + theme: theme, + columns: [ + { text: 'Jaar', datafield: 'year', width: 80 }, + { text: 'Datum', datafield: 'date', width: 120, menu: false }, + { text: 'Naam', datafield: 'name', menu: false }, + { text: 'Stijl', datafield: 'style', width: 250 }, + { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3', menu: false }, + { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3', menu: false }, + { text: 'Code', datafield: 'code', width: 100, menu: false }, + { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1', menu: false }, + { text: '', datafield: 'Edit', width: 80, align: 'center', columntype: 'button', cellsrenderer: function() { + return 'Bekijk'; + }, buttonclick: function(row) { + var datarecord = dataAdapter.records[row]; + window.location.href = 'prod_edit.php?record=' + datarecord.record + '&select=archdate&return=prod_archive_date.php'; + } + } + ], + groups: ['year'] + }); });