cargo3_schedule.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Aisky-coffee</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  8. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  9. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  10. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  11. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  12. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  13. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  14. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  15. <!--可用來建立使用者小圖示-->
  16. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  17. <script>
  18. $(function () {
  19. //提升機
  20. {% if params.hoists %}
  21. var hoist_num = 0;
  22. {% for hoist in params.hoists %}
  23. if ('{{hoist.start}}' != '00:00' && '{{hoist.end}}' != '00:00' && hoist_num == 0) {
  24. var ho = $(".set-schedule")[0];
  25. var ho_div = $("#hoist_div");
  26. ho.style.display = 'none';
  27. ho_div.css('visibility', 'visible');
  28. $('select[name=hoist_duration1]').val('{{hoist.duration}}');
  29. $('select[name=hoist_from_hr1]').val('{{hoist.start}}'.split(':')[0]);
  30. $('select[name=hoist_from_min1]').val('{{hoist.start}}'.split(':')[1]);
  31. $('select[name=hoist_to_hr1]').val('{{hoist.end}}'.split(':')[0]);
  32. $('select[name=hoist_to_min1]').val('{{hoist.end}}'.split(':')[1]);
  33. hoist_num++;
  34. } else if (hoist_num > 0) {
  35. if (hoist_num == 1) {
  36. var add = document.getElementById('hoist_add1');
  37. hoist_num++;
  38. } else {
  39. var add = document.getElementById('hoist_add' + i);
  40. };
  41. Add(add);
  42. // Rita 從資料庫回傳最新資料 ???
  43. $('select[name=hoist_duration' + i + ']').val('{{hoist.duration}}');
  44. $('select[name=' + 'hoist_from_hr' + i + ']').val('{{hoist.start}}'.split(':')[0]);
  45. $('select[name=' + 'hoist_from_min' + i + ']').val('{{hoist.start}}'.split(':')[1]);
  46. $('select[name=' + 'hoist_to_hr' + i + ']').val('{{hoist.end}}'.split(':')[0]);
  47. $('select[name=' + 'hoist_to_min' + i + ']').val('{{hoist.end}}'.split(':')[1]);
  48. };
  49. {% endfor %}
  50. {% endif %}
  51. //烘乾機
  52. {% if params.dryers %}
  53. var dryer_num = 0;
  54. {% for dryer in params.dryers %}
  55. if ('{{dryer.start}}' != '00:00' && '{{dryer.end}}' != '00:00' && dryer_num == 0) {
  56. var dry = $(".set-schedule")[1];
  57. var dry_div = $("#dryer_div");
  58. dry.style.display = 'none';
  59. dry_div.css('visibility', 'visible');
  60. $('select[name=dryer_duration1]').val('{{dryer.duration}}');
  61. $('select[name=dryer_from_hr1]').val('{{dryer.start}}'.split(':')[0]);
  62. $('select[name=dryer_from_min1]').val('{{dryer.start}}'.split(':')[1]);
  63. $('select[name=dryer_to_hr1]').val('{{dryer.end}}'.split(':')[0]);
  64. $('select[name=dryer_to_min1]').val('{{dryer.end}}'.split(':')[1]);
  65. dryer_num++;
  66. } else if (dryer_num > 0) {
  67. if (dryer_num == 1) {
  68. var add = document.getElementById('dryer_add1');
  69. dryer_num++;
  70. } else {
  71. var add = document.getElementById('dryer_add' + i);
  72. };
  73. Add(add);
  74. $('select[name=dryer_duration' + i + ']').val('{{dryer.duration}}');
  75. $('select[name=' + 'dryer_from_hr' + i + ']').val('{{dryer.start}}'.split(':')[0]);
  76. $('select[name=' + 'dryer_from_min' + i + ']').val('{{dryer.start}}'.split(':')[1]);
  77. $('select[name=' + 'dryer_to_hr' + i + ']').val('{{dryer.end}}'.split(':')[0]);
  78. $('select[name=' + 'dryer_to_min' + i + ']').val('{{dryer.end}}'.split(':')[1]);
  79. };
  80. {% endfor %}
  81. {% endif %}
  82. });
  83. </script>
  84. <script>
  85. var i = 1;
  86. function Cancel() {
  87. window.location.href = '/cargo3';
  88. };
  89. function Add(evt) {
  90. // onclick = "Add(hoist_add1);""
  91. // evt = hoist_num (= hoist_add1 / hoist_add2 / hoist_add3 ...)
  92. evt.style.display = "none"; // 元素不顯示
  93. i++;
  94. var div = document.createElement('div'); // 輸出 <div></div>
  95. var from_hr = 'from_hr' + i;
  96. var from_min = 'from_min' + i;
  97. var to_hr = 'to_hr' + i;
  98. var to_min = 'to_min' + i;
  99. var id = evt.getAttribute('id'); // 輸出 hoist_add1
  100. var len = id.length;
  101. var add = id.split('_')[0] + '_add' + i; // hoist + _add + 2 => 輸出 hoist_add2
  102. var del = id.split('_')[0] + '_del' + i; // hoist + _del + 2 => 輸出 hoist_del2
  103. var html = '';
  104. var begin = id.split('_')[0]; // 輸出 hoist
  105. div.className = "col-12 row";
  106. div.style.marginTop = "10px";
  107. console.log(div)
  108. html += '<div class="col-xl-5 col-lg-5 col-md-4" style="margin-top:10px;">';
  109. html += '<span>Duration</span>';
  110. if (begin == 'hoist') {
  111. html += ' <select name="hoist_duration' + i + '" class="duration">';
  112. } else if (begin == 'dryer') {
  113. html += ' <select name="dryer_duration' + i + '" class="duration">';
  114. } else {
  115. };
  116. html += '<option selected value="30min">30 min</option><option value="60min">60 min</option><option value="90min">90 min</option><option value="120min">120 min</option><option value="150min">150 min</option></select>';
  117. html += '</div>';
  118. html += '<div class="from-to col-xl-7 col-lg-7 col-md-8" style="margin-top:10px;">';
  119. html += '<div>';
  120. html += '<div class="from row">';
  121. html += '<div class="col-3">';
  122. html += '<span>From</span>';
  123. html += '</div>';
  124. html += '<div class="col-xs-6">';
  125. if (id.split('_')[0] == 'hoist') {
  126. html += '<select name="hoist_from_hr' + i + '">';
  127. } else if (id.split('_')[0] == 'dryer') {
  128. html += '<select name="dryer_from_hr' + i + '">';
  129. } else {
  130. };
  131. for (var hr = 0; hr < 24; hr++) {
  132. if (hr < 10) {
  133. html += '<option value="0' + hr + '">0' + hr + '</option>';
  134. } else {
  135. html += '<option value="' + hr + '">' + hr + '</option>';
  136. };
  137. };
  138. html += '</select>';
  139. if (id.split('_')[0] == 'hoist') {
  140. html += ' : <select name="hoist_from_min' + i + '">';
  141. } else if (id.split('_')[0] == 'dryer') {
  142. html += ' : <select name="dryer_from_min' + i + '">';
  143. } else {
  144. };
  145. for (var min = 0; min < 60; min++) {
  146. if (min < 10) {
  147. html += '<option value="0' + min + '">0' + min + '</option>';
  148. } else {
  149. html += '<option value="' + min + '">' + min + '</option>';
  150. };
  151. };
  152. html += '</select>';
  153. html += '</div>';
  154. html += '<div class="col-xs-3">';
  155. html += '<input id=' + del + ' class="delete" type="button" value="Delete" onclick="Delete(' + del + ');">';
  156. html += '</div>';
  157. html += '</div>';
  158. html += '<div class="to row">';
  159. html += '<div class="col-3">';
  160. html += '<span>To</span>';
  161. html += '</div>';
  162. html += '<div class="col-xs-6">';
  163. if (id.split('_')[0] == 'hoist') {
  164. html += '<select name="hoist_to_hr' + i + '">';
  165. } else if (id.split('_')[0] == 'dryer') {
  166. html += '<select name="dryer_to_hr' + i + '">';
  167. } else {
  168. };
  169. for (var hr = 0; hr < 24; hr++) {
  170. if (hr < 10) {
  171. html += '<option value="0' + hr + '">0' + hr + '</option>';
  172. } else {
  173. html += '<option value="' + hr + '">' + hr + '</option>';
  174. };
  175. };
  176. html += '</select>';
  177. if (id.split('_')[0] == 'hoist') {
  178. html += ' : <select name="hoist_to_min' + i + '">';
  179. } else if (id.split('_')[0] == 'dryer') {
  180. html += ' : <select name="dryer_to_min' + i + '">';
  181. } else {
  182. };
  183. for (var min = 0; min < 60; min++) {
  184. if (min < 10) {
  185. html += '<option value="0' + min + '">0' + min + '</option>';
  186. } else {
  187. html += '<option value="' + min + '">' + min + '</option>';
  188. };
  189. };
  190. html += '</select><br>';
  191. html += '<input id=' + add + ' class="add" type="button" value="Add" onclick="Add(' + add + ');">';
  192. html += '</div>';
  193. html += '<div class="col-xs-3"></div>';
  194. html += '</div>';
  195. html += '</div>';
  196. html += '</div>';
  197. div.innerHTML = html;
  198. //console.log(html)
  199. div.style.marginTop = '15px';
  200. div.style.zIndex = '100';
  201. evt.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(div);
  202. };
  203. function Delete(evt) {
  204. var id = evt.getAttribute('id'); // dryinput_del2
  205. var add = id.split('_')[0] + '_' + 'add'; // add = dryinput_add
  206. var clo_xs_3 = evt.parentNode;
  207. var from = clo_xs_3.parentNode;
  208. var begin = id.split('_')[0]; // begin = dryinput
  209. var div = from.parentNode.parentNode.parentNode; // 輸出 div[object HTMLDivElement]
  210. var next_div = div.nextElementSibling; // 輸出 null
  211. var pre_div = div.previousElementSibling; // 輸出 null
  212. if (next_div && pre_div == null) { // 1 && null == null (true)
  213. div.parentNode.removeChild(div);
  214. next_div.style.marginTop = '0px';
  215. } else if (next_div && pre_div) { // 兩者都有時 true
  216. div.parentNode.removeChild(div);
  217. } else if (next_div == null && pre_div == null) { // 兩者都沒有時 true
  218. div.parentNode.parentNode.children[1].style.display = 'inline-block';
  219. div.parentNode.style.visibility = 'hidden';
  220. var name = id.split('_')[0];
  221. var from_hr = name + '_from_hr' + 1;
  222. var from_min = name + '_from_min' + 1;
  223. var to_hr = name + '_to_hr' + 1;
  224. var to_min = name + '_to_min' + 1;
  225. $('select[name=' + from_hr + ']').val('00');
  226. $('select[name=' + from_min + ']').val('00');
  227. $('select[name=' + to_hr + ']').val('00');
  228. $('select[name=' + to_min + ']').val('00');
  229. } else {
  230. div.parentNode.removeChild(div);
  231. i--;
  232. add = add + i;
  233. add = document.getElementById(add);
  234. if (add == null) {
  235. add = pre_div.children[1].children[0].children[1].children[1].children[3];
  236. };
  237. add.style.display = 'block';
  238. };
  239. };
  240. $(function () {
  241. var hoist = $(".set-schedule")[0];
  242. var hoist_div = $("#hoist_div");
  243. var dryer = $(".set-schedule")[1];
  244. var dryer_div = $("#dryer_div");
  245. hoist.onclick = function () {
  246. hoist.style.display = 'none';
  247. hoist_div.css('visibility', 'visible');
  248. };
  249. dryer.onclick = function () {
  250. dryer.style.display = 'none';
  251. dryer_div.css('visibility', 'visible');
  252. };
  253. });
  254. </script>
  255. <style>
  256. body {
  257. margin: 0;
  258. }
  259. .navbar-dark .navbar-nav .nav-link {
  260. color: white;
  261. cursor: pointer;
  262. text-decoration: none;
  263. width: 110px;
  264. height: 46px;
  265. }
  266. .nav-top {
  267. line-height: 40px;
  268. background-color: #C4C4C4;
  269. }
  270. .website_title {
  271. font-family: Roboto;
  272. font-style: normal;
  273. font-weight: normal;
  274. font-size: 30px;
  275. color: #000000;
  276. }
  277. .navbar-nav>li {
  278. float: none;
  279. display: inline-block;
  280. width: 100px;
  281. margin: 0 auto;
  282. text-align: center;
  283. }
  284. .navbar-nav>li a {
  285. font-size: 20px;
  286. }
  287. .main-page {
  288. margin-top: 200px;
  289. }
  290. .page-title {
  291. font-family: Roboto;
  292. font-style: normal;
  293. font-weight: bold;
  294. font-size: 36px;
  295. color: #000000;
  296. }
  297. form {
  298. margin-top: 70px;
  299. }
  300. .flex {
  301. display: flex;
  302. flex-direction: row;
  303. flex-wrap: wrap;
  304. justify-content: center;
  305. }
  306. .flex span {
  307. font-family: Roboto;
  308. font-style: normal;
  309. font-weight: normal;
  310. font-size: 18px;
  311. margin-left: 20px;
  312. color: #000000;
  313. }
  314. .duration {
  315. background: #FFFFFF;
  316. border: 1px solid #000000;
  317. box-sizing: border-box;
  318. border-radius: 5px;
  319. width: 110px;
  320. height: 40px;
  321. font-size: 20px;
  322. margin-left: 15px;
  323. text-align: center;
  324. }
  325. .from select,
  326. .to select {
  327. width: 65px;
  328. height: 35px;
  329. margin-left: 2px;
  330. }
  331. .to {
  332. margin-top: 10px;
  333. margin-left: 10px;
  334. }
  335. .from {
  336. margin-left: 10px;
  337. }
  338. .from>div:first-child,
  339. .to>div:first-child {
  340. padding-right: 0px;
  341. text-align: right;
  342. margin-right: 5px;
  343. }
  344. .hoist,
  345. .dryer {
  346. height: 400px;
  347. border: 2px solid #E5E5E5;
  348. border-radius: 5px;
  349. margin-top: 35px;
  350. margin-left: 35px;
  351. }
  352. .item-title {
  353. display: inline-block;
  354. margin-top: 20px;
  355. margin-left: 20px;
  356. font-family: Roboto;
  357. font-style: normal;
  358. font-weight: bold;
  359. font-size: 24px;
  360. color: #000000;
  361. }
  362. .set-schedule {
  363. width: 200px;
  364. height: 45px;
  365. background: #008CBA;
  366. border: 1px solid #CFCFCF;
  367. box-sizing: border-box;
  368. color: #FFFFFF;
  369. border-radius: 5px;
  370. font-size: 17px;
  371. margin-left: 10px;
  372. }
  373. .delete {
  374. background: #E43030;
  375. border: 1px solid #CFCFCF;
  376. box-sizing: border-box;
  377. border-radius: 5px;
  378. margin-left: 5px;
  379. width: 65px;
  380. height: 33px;
  381. font-size: 16px;
  382. text-align: center;
  383. line-height: 16px;
  384. color: #FFFFFF;
  385. }
  386. .add {
  387. background: #008CBA;
  388. border: 1px solid #CFCFCF;
  389. box-sizing: border-box;
  390. border-radius: 5px;
  391. margin-top: 10px;
  392. margin-left: 82px;
  393. ;
  394. width: 65px;
  395. height: 33px;
  396. font-size: 16px;
  397. text-align: center;
  398. line-height: 16px;
  399. color: #FFFFFF;
  400. }
  401. .page-bottom {
  402. margin-top: 100px;
  403. }
  404. .form-control {
  405. background: #008CBA;
  406. border: 1px solid #CFCFCF;
  407. box-sizing: border-box;
  408. border-radius: 5px;
  409. width: 120px;
  410. height: 58px;
  411. text-align: center;
  412. line-height: 50px;
  413. color: #FFFFFF;
  414. display: inline-block;
  415. }
  416. @media(max-width:373px) {
  417. .card {
  418. margin-right: 0px;
  419. }
  420. .hoist,
  421. .dryer {
  422. margin-left: 0px;
  423. }
  424. .col {
  425. padding-right: 0px;
  426. padding-left: 0px;
  427. }
  428. .from,
  429. .to {
  430. margin-left: 0px;
  431. }
  432. .flex span {
  433. margin-left: 0px;
  434. }
  435. .from select,
  436. .to select {
  437. width: 45px;
  438. }
  439. .add {
  440. width: 50px;
  441. margin-left: 62px;
  442. }
  443. .delete {
  444. width: 58px;
  445. }
  446. .col-xs-8:not(:first-child) {
  447. margin-top: 150px;
  448. }
  449. .form-group {
  450. margin-top: 50px;
  451. }
  452. }
  453. @media(max-width:577px) {}
  454. @media(min-width:576px) {}
  455. @media(min-width:768px) {
  456. .navbar-nav>li {
  457. margin-left: 0px;
  458. }
  459. .navbar-nav .li-block {
  460. display: none;
  461. }
  462. }
  463. @media(min-width:991px) {
  464. .navbar-nav>li {
  465. margin-left: 20px;
  466. }
  467. .navbar-nav .li-block {
  468. display: none;
  469. }
  470. .page-bottom input:last-child {
  471. margin-left: 100px;
  472. }
  473. }
  474. @media(min-width:1200px) {
  475. .navbar-nav>li {
  476. margin-left: 50px;
  477. }
  478. .navbar-nav .li-block {
  479. display: inline-block;
  480. width: 100px;
  481. }
  482. .page-bottom input:last-child {
  483. margin-left: 100px;
  484. }
  485. }
  486. @media(min-width:1400px) {
  487. .navbar-nav .li-block {
  488. display: inline-block;
  489. width: 200px;
  490. }
  491. .page-bottom input:last-child {
  492. margin-left: 100px;
  493. }
  494. }
  495. @media(min-width:1689px) {
  496. .navbar-nav>li {
  497. margin-left: 50px;
  498. }
  499. .navbar-nav .li-block {
  500. display: inline-block;
  501. width: 500px;
  502. }
  503. .page-bottom input:last-child {
  504. margin-left: 100px;
  505. }
  506. }
  507. </style>
  508. </head>
  509. <body>
  510. <nav class="fixed-top">
  511. <nav class="navbar navbar-expand-md nav-top justify-content-center">
  512. <div>
  513. <span class="website_title">貨櫃3</span>
  514. </div>
  515. </nav>
  516. <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
  517. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
  518. <span class="navbar-toggler-icon"></span>
  519. </button>
  520. <div class="collapse navbar-collapse" id="collapsibleNavbar">
  521. <ul class="navbar-nav">
  522. <li class="nav-item">
  523. <a class="nav-link" href="/">首頁</a>
  524. </li>
  525. <li class="nav-item">
  526. <a class="nav-link" href="#">關於我們</a>
  527. </li>
  528. <li class="nav-item">
  529. <a class="nav-link" href="#">資訊</a>
  530. </li>
  531. <li class="nav-item">
  532. <a class="nav-link" href="#">聯絡方法</a>
  533. </li>
  534. <li class="nav-item">
  535. <a class="nav-link" href="/cargo_list">咖啡貨櫃</a>
  536. </li>
  537. <li class="nav-item">
  538. <a class="nav-link" href="/video">影像串流</a>
  539. </li>
  540. <li class="li-block"></li>
  541. <li class="nav-item">
  542. <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
  543. </li>
  544. <li class="nav-item">
  545. <a class="nav-link" href="/logout">Logout</a>
  546. </li>
  547. </ul>
  548. </div>
  549. </nav>
  550. </nav>
  551. <div class="main-page">
  552. <div class="page-title text-center">
  553. </div>
  554. <form method="post" action="/b_cargo3">
  555. <div class="container-fluid">
  556. <div class="row">
  557. <div class="col flex">
  558. <div class="hoist col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
  559. <h2 class="item-title">提升機</h2>
  560. <input class="set-schedule" type="button" value="Set up the schedule">
  561. <br>
  562. <div id="hoist_div" class="row" style="visibility:hidden;">
  563. <div class="col-12 row">
  564. <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"
  565. style="margin-top:10px;">
  566. <span>Duration</span>
  567. <select name="hoist_duration1" class="duration">
  568. <option selected value="30min">30 min</option>
  569. <option value="60min">60 min</option>
  570. <option value="90min">90 min</option>
  571. <option value="120min">120 min</option>
  572. <option value="150min">150 min</option>
  573. </select>
  574. </div>
  575. <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"
  576. style="margin-top:10px;">
  577. <div>
  578. <div class="from row">
  579. <div class="col-3">
  580. <span>From</span>
  581. </div>
  582. <div class="col-xs-6">
  583. <select name="hoist_from_hr1">
  584. {% for hr in range(0, 24) %}
  585. {% if hr < 10 %}
  586. <option value="0{{hr}}">0{{hr}}</option>
  587. {% else %}
  588. <option value="{{hr}}">{{hr}}</option>
  589. {% endif %}
  590. {% endfor %}
  591. </select>
  592. :
  593. <select name="hoist_from_min1">
  594. {% for min in range(0, 60) %}
  595. {% if min < 10 %} <option value="0{{min}}">0{{min}}</option>
  596. {% else %}
  597. <option value="{{min}}">{{min}}</option>
  598. {% endif %}
  599. {% endfor %}
  600. </select>
  601. </div>
  602. <div class="col-xs-3">
  603. <input id="hoist_del1" class="delete" type="button" value="Delete"
  604. onclick="Delete(hoist_del1);">
  605. </div>
  606. </div>
  607. <div class="to row">
  608. <div class="col-3">
  609. <span>To</span>
  610. </div>
  611. <div class="col-xs-6">
  612. <select name="hoist_to_hr1">
  613. {% for hr in range(0, 24) %}
  614. {% if hr < 10 %}
  615. <option value="0{{hr}}">0{{hr}}</option>
  616. {% else %}
  617. <option value="{{hr}}">{{hr}}</option>
  618. {% endif %}
  619. {% endfor %}
  620. </select>
  621. : <select name="hoist_to_min1">
  622. {% for min in range(0, 60) %}
  623. {% if min < 10 %} <option value="0{{min}}">0{{min}}</option>
  624. {% else %}
  625. <option value="{{min}}">{{min}}</option>
  626. {% endif %}
  627. {% endfor %}
  628. </select><br>
  629. <input id="hoist_add1" class="add" type="button" value="Add"
  630. onclick="Add(hoist_add1);">
  631. </div>
  632. <div class="col-xs-3"></div>
  633. </div>
  634. </div>
  635. </div>
  636. </div>
  637. </div>
  638. </div>
  639. <div class="dryer col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
  640. <h2 class="item-title">烘乾機</h2>
  641. <input class="set-schedule" type="button" value="Set up the schedule">
  642. <br>
  643. <div id="dryer_div" class="row" style="visibility:hidden;">
  644. <div class="col-12 row">
  645. <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"
  646. style="margin-top:10px;">
  647. <span>Duration</span>
  648. <select name="dryer_duration1" class="duration">
  649. <option selected value="30min">30 min</option>
  650. <option value="60min">60 min</option>
  651. <option value="90min">90 min</option>
  652. <option value="120min">120 min</option>
  653. <option value="150min">150 min</option>
  654. </select>
  655. </div>
  656. <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"
  657. style="margin-top:10px;">
  658. <div>
  659. <div class="from row">
  660. <div class="col-3">
  661. <span>From</span>
  662. </div>
  663. <div class="col-xs-6">
  664. <select name="dryer_from_hr1">
  665. {% for hr in range(0, 24) %}
  666. {% if hr < 10 %} <option value="0{{hr}}">0{{hr}}</option>
  667. {% else %}
  668. <option value="{{hr}}">{{hr}}</option>
  669. {% endif %}
  670. {% endfor %}
  671. </select>
  672. : <select name="dryer_from_min1">
  673. {% for min in range(0, 60) %}
  674. {% if min < 10 %} <option value="0{{min}}">0{{min}}</option>
  675. {% else %}
  676. <option value="{{min}}">{{min}}</option>
  677. {% endif %}
  678. {% endfor %}
  679. </select>
  680. </div>
  681. <div class="col-xs-3">
  682. <input id="dryer_del1" class="delete" type="button" value="Delete"
  683. onclick="Delete(dryer_del1);">
  684. </div>
  685. </div>
  686. <div class="to row">
  687. <div class="col-3">
  688. <span>To</span>
  689. </div>
  690. <div class="col-xs-6">
  691. <select name="dryer_to_hr1">
  692. {% for hr in range(0, 24) %}
  693. {% if hr < 10 %} <option value="0{{hr}}">0{{hr}}</option>
  694. {% else %}
  695. <option value="{{hr}}">{{hr}}</option>
  696. {% endif %}
  697. {% endfor %}
  698. </select>
  699. : <select name="dryer_to_min1">
  700. {% for min in range(0, 60) %}
  701. {% if min < 10 %} <option value="0{{min}}">0{{min}}</option>
  702. {% else %}
  703. <option value="{{min}}">{{min}}</option>
  704. {% endif %}
  705. {% endfor %}
  706. </select><br>
  707. <input id="dryer_add1" class="add" type="button" value="Add"
  708. onclick="Add(dryer_add1);">
  709. </div>
  710. <div class="col-xs-3"></div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. </div>
  717. </div>
  718. </div>
  719. </div>
  720. <div class="row page-bottom">
  721. <div class="col"></div>
  722. <div class="col-xl-4 col-lg-6 col-md-8 col-sm-10 col-xs-10" style="text-align:center;">
  723. <div class="form-group">
  724. <input type="button" class="form-control" value="Cancel" onclick="Cancel();">
  725. <input type="submit" class="form-control" value="Confirm">
  726. </div>
  727. </div>
  728. <div class="col"></div>
  729. </div>
  730. </form>
  731. </div>
  732. </body>
  733. </html>