www-thermferm/liveview.php

changeset 305
fc2fae36f4ba
parent 304
c1be51c076c9
child 320
9e419f3c4e49
equal deleted inserted replaced
304:c1be51c076c9 305:fc2fae36f4ba
1 <?php 1 <?php
2 /***************************************************************************** 2 /*****************************************************************************
3 * Copyright (C) 2014 3 * Copyright (C) 2014-2015
4 * 4 *
5 * Michiel Broek <mbroek at mbse dot eu> 5 * Michiel Broek <mbroek at mbse dot eu>
6 * 6 *
7 * This file is part of ThermFerm 7 * This file is part of ThermFerm
8 * 8 *
426 426
427 $answer = send_cmd("LIST"); 427 $answer = send_cmd("LIST");
428 if (strlen($answer)) { 428 if (strlen($answer)) {
429 $arr = explode("\r\n", $answer); 429 $arr = explode("\r\n", $answer);
430 430
431 $outstr .= ' <script type="text/javascript">'.PHP_EOL;
432 $outstr .= ' $(document).ready(function () {'.PHP_EOL;
433 $outstr .= ' var index = $.jqx.cookie.cookie("jqxTabs_jqxWidget");'.PHP_EOL;
434 $outstr .= ' if (undefined == index) index = 0;'.PHP_EOL;
435 $outstr .= ' $(\'#jqxTabs\').jqxTabs({selectedItem: index, width: \'90%\', height: 200, position: \'top\'});'.PHP_EOL;
436 // on to the select event.
437 $outstr .= ' $("#jqxTabs").on(\'selected\', function (event) {'.PHP_EOL;
438 // save the index in cookie.
439 $outstr .= ' $.jqx.cookie.cookie("jqxTabs_jqxWidget", event.args.item);'.PHP_EOL;
440 $outstr .= ' });'.PHP_EOL;
441 $outstr .= ' });'.PHP_EOL;
442 $outstr .= ' </script>'.PHP_EOL;
443
444 $outstr .= ' <div id="jqxTabs">'.PHP_EOL; 431 $outstr .= ' <div id="jqxTabs">'.PHP_EOL;
445 $outstr .= ' <ul>'.PHP_EOL; 432 $outstr .= ' <ul>'.PHP_EOL;
446 if (startsWith($arr[0], "212")) { 433 if (startsWith($arr[0], "212")) {
447 $i = 1; 434 $i = 1;
448 while (1) { 435 while (1) {

mercurial