OSDN Git Service

ShipInfoPanelの高さを縮める
[kancollesniffer/KancolleSniffer.git] / LogViewer / index.html
index 9229c43..74b1fea 100644 (file)
@@ -4,16 +4,15 @@
 <meta charset="utf-8">
 <title>各種報告書 - KancolleSniffer</title>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.16/js/jquery.dataTables.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.19/js/jquery.dataTables.min.js"></script>
 <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.16/css/jquery.dataTables.min.css">
 <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.5.4/c3.min.js"></script>
-<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.5.4/c3.min.css">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
-<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
-<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/i18n/datepicker-ja.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.9.4/riot+compiler.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.7/c3.min.js"></script>
+<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.7/c3.min.css">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css" />
+<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.12.0/riot+compiler.min.js"></script>
 <style>
 body {
     font-family:'Lucida Grande','Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
@@ -76,9 +75,33 @@ var mixin = {
             height: Math.max($(window).height() - 15 * this.pxPerEm, 400),
             width: Math.max($(window).width() - 6 * this.pxPerEm, 800)
         };
+    },
+    initPicker: function(from, to, updatePicker) {
+        [$(from), $(to)].forEach(function(input) {
+            var prev, ignore;
+            input.attr('autocomplete', 'off');
+            input.datetimepicker({
+                onSelectDate: function() {
+                    ignore = true;
+                }
+            });
+            input.change(function() {
+                if (ignore) {
+                    ignore = false;
+                    return;
+                }
+                var cur = input.val();
+                if (typeof cur !== 'string' || cur === prev)
+                    return;
+                prev = cur;
+                input.datetimepicker({value: cur});
+                updatePicker(input);
+            });
+        });
     }
 };
 
+$.datetimepicker.setLocale('ja');
 </script>
 
 <main-tab></main-tab>