mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
Merge branch 'master' of github.com:zogodo/zTC1
This commit is contained in:
@@ -734,3 +734,9 @@ table {
|
|||||||
.mdl-button {
|
.mdl-button {
|
||||||
padding: 2px 6px 0 6px;
|
padding: 2px 6px 0 6px;
|
||||||
}
|
}
|
||||||
|
.over-unset {
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
.on-off {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
|||||||
@@ -246,19 +246,23 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page page3 mdl-cell mdl-cell--5-col demo-card-square mdl-card mdl-shadow--2dp" style="z-index: unset;">
|
<div class="page page3 over-unset mdl-cell mdl-cell--5-col demo-card-square mdl-card mdl-shadow--2dp" style="z-index: unset;">
|
||||||
<div class="mdl-card__title mdl-card--expand">
|
<div class="mdl-card__title mdl-card--expand">
|
||||||
<h2 class="mdl-card__title-text">Add Task</h2>
|
<h2 class="mdl-card__title-text">Add Task</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-card__supporting-text">
|
<div class="over-unset mdl-card__supporting-text">
|
||||||
<form action="#">
|
<form action="#">
|
||||||
|
<div class="mdl-textfield mdl-js-textfield">
|
||||||
|
<input class="mdl-textfield__input" type="datetime-local" id="task_time">
|
||||||
|
<label class="mdl-textfield__label" for="sample1"></label>
|
||||||
|
</div>
|
||||||
<!-- Simple Select with arrow -->
|
<!-- Simple Select with arrow -->
|
||||||
<div class="mdl-textfield mdl-js-textfield getmdl-select">
|
<div class="mdl-textfield mdl-js-textfield getmdl-select">
|
||||||
<input type="text" value="" class="mdl-textfield__input" id="sample2" readonly>
|
<input type="text" value="" class="mdl-textfield__input" readonly>
|
||||||
<input type="hidden" value="" name="sample2">
|
<input type="hidden" value="" id="task_skt_idx" name="task_skt_idx">
|
||||||
<i class="mdl-icon-toggle__label material-icons">keyboard_arrow_down</i>
|
<i class="mdl-icon-toggle__label material-icons">keyboard_arrow_down</i>
|
||||||
<label for="sample2" class="mdl-textfield__label">Socket</label>
|
<label for="task_skt_idx" class="mdl-textfield__label">Socket</label>
|
||||||
<ul for="sample2" class="mdl-menu mdl-menu--bottom-left mdl-js-menu">
|
<ul for="task_skt_idx" class="mdl-menu mdl-menu--bottom-left mdl-js-menu">
|
||||||
<li class="mdl-menu__item" data-val="1">Socket-1</li>
|
<li class="mdl-menu__item" data-val="1">Socket-1</li>
|
||||||
<li class="mdl-menu__item" data-val="2">Socket-2</li>
|
<li class="mdl-menu__item" data-val="2">Socket-2</li>
|
||||||
<li class="mdl-menu__item" data-val="3">Socket-3</li>
|
<li class="mdl-menu__item" data-val="3">Socket-3</li>
|
||||||
@@ -268,18 +272,17 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-textfield mdl-js-textfield">
|
<div class="mdl-textfield mdl-js-textfield">
|
||||||
<input class="mdl-textfield__input" type="datetime-local" id="sample1">
|
<span>On or Off: </span>
|
||||||
<label class="mdl-textfield__label" for="sample1"></label>
|
<span class="on-off mdl-list__item-secondary-action">
|
||||||
</div>
|
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="task_on">
|
||||||
<span class="mdl-list__item-secondary-action">
|
<input type="checkbox" id="task_on" class="mdl-switch__input" checked />
|
||||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="task-on">
|
</label>
|
||||||
<input type="checkbox" id="task-on" class="mdl-switch__input" checked />
|
</span>
|
||||||
</label>
|
</div>
|
||||||
</span>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-card__actions mdl-card--border">
|
<div class="mdl-card__actions mdl-card--border">
|
||||||
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
|
<a href="javascript:AddTimedTask();" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
|
||||||
Submit
|
Submit
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -634,7 +637,7 @@ GetTimedTask();
|
|||||||
function AddTimedTask() {
|
function AddTimedTask() {
|
||||||
var tim = document.getElementById("task_time").value;
|
var tim = document.getElementById("task_time").value;
|
||||||
var idx = document.getElementById("task_skt_idx").value;
|
var idx = document.getElementById("task_skt_idx").value;
|
||||||
var on = document.getElementById("task_on").value;
|
var on = document.getElementById("task_on").checked;
|
||||||
|
|
||||||
if (tim == null || tim == "" || tim.length < 10) {
|
if (tim == null || tim == "" || tim.length < 10) {
|
||||||
alert("task time invalid!");
|
alert("task time invalid!");
|
||||||
@@ -642,6 +645,7 @@ function AddTimedTask() {
|
|||||||
}
|
}
|
||||||
var prs_time = Math.round(new Date(tim) / 1000);
|
var prs_time = Math.round(new Date(tim) / 1000);
|
||||||
//prs_time = prs_time + parseInt(sec);
|
//prs_time = prs_time + parseInt(sec);
|
||||||
|
on = on ? "1" : "0";
|
||||||
var cmd = prs_time + " " + idx + " " + on;
|
var cmd = prs_time + " " + idx + " " + on;
|
||||||
if (cmd.length >= 16) {
|
if (cmd.length >= 16) {
|
||||||
alert("CMD ERROR!");
|
alert("CMD ERROR!");
|
||||||
|
|||||||
@@ -251,3 +251,9 @@ table {
|
|||||||
.mdl-button {
|
.mdl-button {
|
||||||
padding: 2px 6px 0 6px;
|
padding: 2px 6px 0 6px;
|
||||||
}
|
}
|
||||||
|
.over-unset {
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
.on-off {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user