17 * |
17 * |
18 * You should have received a copy of the GNU General Public License |
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 |
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. |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
21 *****************************************************************************/ |
21 *****************************************************************************/ |
|
22 |
|
23 function createAbortElements() { |
|
24 $('#eventWindow').jqxWindow({ |
|
25 theme: theme, |
|
26 position: { x: 440, y: 210 }, |
|
27 width: 400, |
|
28 height: 200, |
|
29 resizable: false, |
|
30 isModal: true, |
|
31 modalOpacity: 0.4, |
|
32 okButton: $('#delOk'), |
|
33 cancelButton: $('#delCancel'), |
|
34 initContent: function () { |
|
35 $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); |
|
36 $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); |
|
37 $('#delCancel').focus(); |
|
38 } |
|
39 }); |
|
40 $('#eventWindow').jqxWindow('hide'); |
|
41 } |
22 |
42 |
23 |
43 |
24 $(document).ready(function () { |
44 $(document).ready(function () { |
25 |
45 |
26 var record = {}; |
46 var record = {}; |
610 if (record.mode == "PROFILE") { |
632 if (record.mode == "PROFILE") { |
611 if (record.profile_state == "OFF") { |
633 if (record.profile_state == "OFF") { |
612 ppayload = '{"profile":{"command":"start"}}'; |
634 ppayload = '{"profile":{"command":"start"}}'; |
613 newProfile = true; |
635 newProfile = true; |
614 } else if ((record.profile_state == "RUN") || (record.profile_state == "PAUSE")) { |
636 } else if ((record.profile_state == "RUN") || (record.profile_state == "PAUSE")) { |
615 ppayload = '{"profile":{"command":"abort"}}'; |
637 // Open a popup to confirm this action. |
616 newProfile = true; |
638 $('#eventWindow').jqxWindow('open'); |
|
639 $("#delOk").click(function () { |
|
640 ppayload = '{"profile":{"command":"abort"}}'; |
|
641 newProfile = true; |
|
642 }); |
617 } else if (record.profile_state == "DONE") { |
643 } else if (record.profile_state == "DONE") { |
618 ppayload = '{"profile":{"command":"done"}}'; |
644 ppayload = '{"profile":{"command":"done"}}'; |
619 newProfile = true; |
645 newProfile = true; |
620 } |
646 } |
621 } |
647 } |
633 $("#FLog").jqxButton({ template: "primary", width: '150px', theme: theme }); |
659 $("#FLog").jqxButton({ template: "primary", width: '150px', theme: theme }); |
634 $("#FLog").click(function () { |
660 $("#FLog").click(function () { |
635 var url="log_fermentation.php?code=" + record.beercode + "&name=" + record.beername; |
661 var url="log_fermentation.php?code=" + record.beercode + "&name=" + record.beername; |
636 window.open(url); |
662 window.open(url); |
637 }); |
663 }); |
|
664 createAbortElements(); |
638 }); |
665 }); |