www-thermferm/js/main.js

Wed, 23 Jul 2014 21:14:20 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 23 Jul 2014 21:14:20 +0200
changeset 127
f2f45c44942f
permissions
-rw-r--r--

Added the maintenance 1-Wire display tab

127
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * Copyright (C) 2014
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of ThermFerm
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * ThermFerm is distributed in the hope that it will be useful, but
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 function addEventListeners() {
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 $("#maintenance").mousedown(function () {
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 $("#maintenance_window").jqxWindow('open');
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 });
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 }
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 function createMaintenance() {
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 $("#maintenance_window").jqxWindow({
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 height: 400, width: 800, autoOpen: false, theme: 'ui-redmond',
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 position: { x:100, y:50 },
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 resizable: false, isModal: true, modalOpacity: 0.5,
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 okButton: $("#maintenance_ok"),
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 initContent: function () {
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 $("#maintenance_ok").jqxButton({ width: 70, height: 25, theme: 'ui-redmond' });
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 }
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 });
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 $("#maintenance").jqxButton({ width: 150, height: 25, theme: 'ui-redmond' });
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 }
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 $(document).ready(function () {
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 // Create jqxTabs.
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 $("#jqxTabs").jqxTabs({ width: 978, height: 428, position: 'top', theme: 'ui-redmond'});
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 addEventListeners();
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 createMaintenance();
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 });
f2f45c44942f Added the maintenance 1-Wire display tab
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49

mercurial