diff --git a/index.html b/index.html index 142d0ba..00aea96 100644 --- a/index.html +++ b/index.html @@ -51,6 +51,7 @@ | - - - - - -
-
- - - - - - - - + + + + + + + +
+
@@ -131,6 +125,13 @@ + + @@ -155,14 +156,16 @@ var sel = $("#sel").val(); var from = $("#input_from")[0]; var to = $("#input_to")[0]; - if (sel == 1) { from.value= "08:50"; to.value= "10:40"; timechanged(); - } else if (sel == 2) { from.value= "10:40"; to.value= "12:50"; timechanged(); - } else if (sel == 3) { from.value= "13:20"; to.value= "15:10"; timechanged(); - } else if (sel == 4) { from.value = "15:00"; to.value = "16:50"; timechanged(); - } else if (sel == 5) { from.value = "16:40"; to.value = "18:30"; timechanged(); + if (sel == 1) { from.value= "09:00"; to.value= "10:30"; timechanged(); + } else if (sel == 2) { from.value= "10:50"; to.value= "12:40"; timechanged(); + } else if (sel == 12) { from.value= "09:00"; to.value= "12:40"; timechanged(); + } else if (sel == 3) { from.value= "13:30"; to.value= "15:00"; timechanged(); + } else if (sel == 4) { from.value = "15:10"; to.value = "16:40"; timechanged(); + } else if (sel == 5) { from.value = "16:50"; to.value = "18:20"; timechanged(); } else if (sel ==99) { from.value = "18:30"; to.value = "23:59"; timechanged(); - } else { from.value = "00:00"; to.value = "08:50"; timechanged(); } + } else { from.value = "00:00"; to.value = "09:00"; timechanged(); } } + var sortkey_prev = null; function timechanged() { sortkey_prev = null; @@ -177,6 +180,7 @@ clicked(); filter(); $(".waitboard").css("display", "none"); + $("#excel").prop("disabled", false); }); } } @@ -196,49 +200,56 @@ if (s == "日時") { db = db.sort(check(1)); } else if(s == "学生番号") { - db = db.sort(check(4)); - }else if (s == "名前") { db = db.sort(check(5)); - }else if (s == "ヨミガナ") { + }else if (s == "名前") { db = db.sort(check(6)); - }else if (s == "所属") { + }else if (s == "ヨミガナ") { db = db.sort(check(7)); + }else if (s == "所属") { + db = db.sort(check(8)); } else return; filter(); } function filter() { var checkbox = {}; - ["logon", "logoff", "grl", "ml1", "ml2", "hsi", "uniq"].forEach( + ["GRL", "ML1", "ML2", "HSJ", "uniq"].forEach( function (s) {checkbox[s]=$("#"+s)[0].checked; }); var table = $("#output table"); $("#output table tbody tr:nth-child(n+2)").remove(); var prev = null; db.forEach(function (s) { - var room = s[0].split(".")[2]; + var host = s[0]; var accept = false; - if (room == 116 && checkbox["grl"]) { + if (host.startsWith("GRL") && checkbox["GRL"]) { accept = true; - } else if (room == 117 && checkbox["ml1"]) { + } else if (host.startsWith("ML1") && checkbox["ML1"]) { accept = true; - } else if (room == 118 && checkbox["ml2"]) { + } else if (host.startsWith("ML2") && checkbox["ML2"]) { accept = true; - } else if (room == 119 && checkbox["hsi"]) { + } else if (host.startsWith("HSJ") && checkbox["HSJ"]) { accept = true; } if (accept) { - if((s[2] == "on" && checkbox["logon"]) || (s[2] == "off" && checkbox["logoff"])) { - console.log(prev, s[4], prev != s[4]); if(!checkbox["uniq"] || prev != s[4]) { var tr = $("").appendTo(table); - [1,4,5,6,7].forEach(function(i) {$(""+s[i]+"").appendTo(tr); }); + [1,5,6,7,8].forEach(function(i) {$(""+s[i]+"").appendTo(tr); }); } prev = s[4]; - } } table.appendTo("#output"); }); } + function getexcel() { + var date = "date="+$("#input_01").val(); + var from = "from="+$("#input_from").val(); + var to = "to="+$("#input_to").val(); + var query = [date, from, to]; + ["GRL", "ML1", "ML2", "HSJ", "uniq"].forEach( + function (s) {if($("#"+s).prop("checked")) {query.unshift(s+"=true");}}); + query = query.join('&'); + window.location.href = escape("../cgi-bin/attend/call.cgi?"+query+"&excel=true"); + } diff --git a/lib/themes/sitelocal.css b/lib/themes/sitelocal.css index 5b7cdb3..4ba0654 100644 --- a/lib/themes/sitelocal.css +++ b/lib/themes/sitelocal.css @@ -45,6 +45,16 @@ background: linear-gradient(to bottom, #f0f0ff 0%, #d0cff0 50%, #8098ad 100%); } +footer { + border-top: solid #804050; + font-family: Times; + font-weight: medium; + font-size: 15px; + text-align: right; + color: #503030; + margin: 5% 12%; +} + #output table { border-collapse:collapse; margin: 0 auto; @@ -83,6 +93,14 @@ padding: 4px 12px 3px 12px; } +input[type=text] { + font-size: 15px; +} + +input[type=text],input[type=time] { + text-shadow: 1px 1px 4px #205fb0; +} + input[type=radio], input[type=checkbox] { display: none; }