Wed, 04 Mar 2020 10:48:21 +0100
Workaround for hang during startup. Changed order of displayed fields on the yeast tab. Tooltip text changes. More decimals on the checklist for misc ingredients. More decimals for the starter on product print.
290 | 1 | /***************************************************************************** |
2 | * Copyright (C) 2019 | |
3 | * | |
4 | * Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
6 | * This file is part of BMS | |
7 | * | |
8 | * This is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License as published by the | |
10 | * Free Software Foundation; either version 2, or (at your option) any | |
11 | * later version. | |
12 | * | |
13 | * BrewCloud is distributed in the hope that it will be useful, but | |
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | * General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
21 | *****************************************************************************/ | |
22 | ||
23 | ||
525
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
24 | $(document).ready(function() { |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
25 | var source = { |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
26 | datatype: 'json', |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
27 | cache: false, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
28 | datafields: [ |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
29 | { name: 'record', type: 'number' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
30 | { name: 'name', type: 'string' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
31 | { name: 'code', type: 'string' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
32 | { name: 'date', type: 'string' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
33 | { name: 'style', type: 'string' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
34 | { name: 'og', type: 'float' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
35 | { name: 'fg', type: 'float' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
36 | { name: 'batch_size', type: 'float' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
37 | ], |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
38 | id: 'record', |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
39 | url: 'includes/db_product.php?select=archname' |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
40 | }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
41 | dataAdapter = new $.jqx.dataAdapter(source); |
468
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
42 | |
525
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
43 | // initialize jqxGrid |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
44 | $('#jqxgrid').jqxGrid({ |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
45 | width: 1280, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
46 | height: 630, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
47 | source: dataAdapter, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
48 | theme: theme, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
49 | columns: [ |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
50 | { text: 'Naam', datafield: 'name' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
51 | { text: 'Stijl', datafield: 'style', width: 250 }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
52 | { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
53 | { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
54 | { text: 'Datum', datafield: 'date', width: 120 }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
55 | { text: 'Code', datafield: 'code', width: 100 }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
56 | { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
57 | { text: '', datafield: 'Edit', width: 80, align: 'center', columntype: 'button', cellsrenderer: function() { |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
58 | return 'Bekijk'; |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
59 | }, buttonclick: function(row) { |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
60 | var datarecord = dataAdapter.records[row]; |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
61 | window.location.href = 'prod_edit.php?record=' + datarecord.record + '&select=archname&return=prod_archive_name.php'; |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
62 | } |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
63 | } |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
64 | ], |
8bbc5730aaa8
Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
65 | }); |
290 | 66 | }); |