diff options
author | Christoph Brill <egore911@gmail.com> | 2017-02-07 12:29:03 +0100 |
---|---|---|
committer | Christoph Brill <egore911@gmail.com> | 2017-02-07 12:30:01 +0100 |
commit | 87e3127729906d3fe5748816e6f94a4b8776c005 (patch) | |
tree | dc71da8443175fe91d46895f69dda161856837ef | |
parent | 776410cf7d709d18317d0734099e486224882a3b (diff) |
Redesign using bootstrap 3
-rw-r--r-- | css/bootstrap-datepicker3.min.css | 9 | ||||
-rw-r--r-- | css/bootstrap-datepicker3.min.css.map | 1 | ||||
-rw-r--r-- | css/datechooser.css | 28 | ||||
-rw-r--r-- | css/select-free.css | 19 | ||||
-rw-r--r-- | details.php | 39 | ||||
-rwxr-xr-x | index.php | 199 | ||||
-rw-r--r-- | js/bootstrap-datepicker.min.js | 9 | ||||
-rw-r--r-- | js/date-functions.js | 411 | ||||
-rw-r--r-- | js/datechooser.js | 267 | ||||
-rw-r--r-- | js/script.js | 100 | ||||
-rw-r--r-- | overview.php | 14 |
11 files changed, 162 insertions, 934 deletions
diff --git a/css/bootstrap-datepicker3.min.css b/css/bootstrap-datepicker3.min.css new file mode 100644 index 0000000..897f246 --- /dev/null +++ b/css/bootstrap-datepicker3.min.css @@ -0,0 +1,9 @@ +/*! + * Datepicker for Bootstrap v1.6.4 (https://github.com/eternicode/bootstrap-datepicker) + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ +.datepicker{border-radius:4px;direction:ltr}.datepicker-inline{width:220px}.datepicker.datepicker-rtl{direction:rtl}.datepicker.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{top:0;left:0;padding:4px}.datepicker-dropdown:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.15);border-top:0;border-bottom-color:rgba(0,0,0,.2);position:absolute}.datepicker-dropdown:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;border-top:0;position:absolute}.datepicker-dropdown.datepicker-orient-left:before{left:6px}.datepicker-dropdown.datepicker-orient-left:after{left:7px}.datepicker-dropdown.datepicker-orient-right:before{right:6px}.datepicker-dropdown.datepicker-orient-right:after{right:7px}.datepicker-dropdown.datepicker-orient-bottom:before{top:-7px}.datepicker-dropdown.datepicker-orient-bottom:after{top:-6px}.datepicker-dropdown.datepicker-orient-top:before{bottom:-7px;border-bottom:0;border-top:7px solid rgba(0,0,0,.15)}.datepicker-dropdown.datepicker-orient-top:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.datepicker table{margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker table tr td,.datepicker table tr th{text-align:center;width:30px;height:30px;border-radius:4px;border:none}.table-striped .datepicker table tr td,.table-striped .datepicker table tr th{background-color:transparent}.datepicker table tr td.new,.datepicker table tr td.old{color:#777}.datepicker table tr td.day:hover,.datepicker table tr td.focused{background:#eee;cursor:pointer}.datepicker table tr td.disabled,.datepicker table tr td.disabled:hover{background:0 0;color:#777;cursor:default}.datepicker table tr td.highlighted{color:#000;background-color:#d9edf7;border-color:#85c5e5;border-radius:0}.datepicker table tr td.highlighted.focus,.datepicker table tr td.highlighted:focus{color:#000;background-color:#afd9ee;border-color:#298fc2}.datepicker table tr td.highlighted:hover{color:#000;background-color:#afd9ee;border-color:#52addb}.datepicker table tr td.highlighted.active,.datepicker table tr td.highlighted:active{color:#000;background-color:#afd9ee;border-color:#52addb}.datepicker table tr td.highlighted.active.focus,.datepicker table tr td.highlighted.active:focus,.datepicker table tr td.highlighted.active:hover,.datepicker table tr td.highlighted:active.focus,.datepicker table tr td.highlighted:active:focus,.datepicker table tr td.highlighted:active:hover{color:#000;background-color:#91cbe8;border-color:#298fc2}.datepicker table tr td.highlighted.disabled.focus,.datepicker table tr td.highlighted.disabled:focus,.datepicker table tr td.highlighted.disabled:hover,.datepicker table tr td.highlighted[disabled].focus,.datepicker table tr td.highlighted[disabled]:focus,.datepicker table tr td.highlighted[disabled]:hover,fieldset[disabled] .datepicker table tr td.highlighted.focus,fieldset[disabled] .datepicker table tr td.highlighted:focus,fieldset[disabled] .datepicker table tr td.highlighted:hover{background-color:#d9edf7;border-color:#85c5e5}.datepicker table tr td.highlighted.focused{background:#afd9ee}.datepicker table tr td.highlighted.disabled,.datepicker table tr td.highlighted.disabled:active{background:#d9edf7;color:#777}.datepicker table tr td.today{color:#000;background-color:#ffdb99;border-color:#ffb733}.datepicker table tr td.today.focus,.datepicker table tr td.today:focus{color:#000;background-color:#ffc966;border-color:#b37400}.datepicker table tr td.today:hover{color:#000;background-color:#ffc966;border-color:#f59e00}.datepicker table tr td.today.active,.datepicker table tr td.today:active{color:#000;background-color:#ffc966;border-color:#f59e00}.datepicker table tr td.today.active.focus,.datepicker table tr td.today.active:focus,.datepicker table tr td.today.active:hover,.datepicker table tr td.today:active.focus,.datepicker table tr td.today:active:focus,.datepicker table tr td.today:active:hover{color:#000;background-color:#ffbc42;border-color:#b37400}.datepicker table tr td.today.disabled.focus,.datepicker table tr td.today.disabled:focus,.datepicker table tr td.today.disabled:hover,.datepicker table tr td.today[disabled].focus,.datepicker table tr td.today[disabled]:focus,.datepicker table tr td.today[disabled]:hover,fieldset[disabled] .datepicker table tr td.today.focus,fieldset[disabled] .datepicker table tr td.today:focus,fieldset[disabled] .datepicker table tr td.today:hover{background-color:#ffdb99;border-color:#ffb733}.datepicker table tr td.today.focused{background:#ffc966}.datepicker table tr td.today.disabled,.datepicker table tr td.today.disabled:active{background:#ffdb99;color:#777}.datepicker table tr td.range{color:#000;background-color:#eee;border-color:#bbb;border-radius:0}.datepicker table tr td.range.focus,.datepicker table tr td.range:focus{color:#000;background-color:#d5d5d5;border-color:#7c7c7c}.datepicker table tr td.range:hover{color:#000;background-color:#d5d5d5;border-color:#9d9d9d}.datepicker table tr td.range.active,.datepicker table tr td.range:active{color:#000;background-color:#d5d5d5;border-color:#9d9d9d}.datepicker table tr td.range.active.focus,.datepicker table tr td.range.active:focus,.datepicker table tr td.range.active:hover,.datepicker table tr td.range:active.focus,.datepicker table tr td.range:active:focus,.datepicker table tr td.range:active:hover{color:#000;background-color:#c3c3c3;border-color:#7c7c7c}.datepicker table tr td.range.disabled.focus,.datepicker table tr td.range.disabled:focus,.datepicker table tr td.range.disabled:hover,.datepicker table tr td.range[disabled].focus,.datepicker table tr td.range[disabled]:focus,.datepicker table tr td.range[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.focus,fieldset[disabled] .datepicker table tr td.range:focus,fieldset[disabled] .datepicker table tr td.range:hover{background-color:#eee;border-color:#bbb}.datepicker table tr td.range.focused{background:#d5d5d5}.datepicker table tr td.range.disabled,.datepicker table tr td.range.disabled:active{background:#eee;color:#777}.datepicker table tr td.range.highlighted{color:#000;background-color:#e4eef3;border-color:#9dc1d3}.datepicker table tr td.range.highlighted.focus,.datepicker table tr td.range.highlighted:focus{color:#000;background-color:#c1d7e3;border-color:#4b88a6}.datepicker table tr td.range.highlighted:hover{color:#000;background-color:#c1d7e3;border-color:#73a6c0}.datepicker table tr td.range.highlighted.active,.datepicker table tr td.range.highlighted:active{color:#000;background-color:#c1d7e3;border-color:#73a6c0}.datepicker table tr td.range.highlighted.active.focus,.datepicker table tr td.range.highlighted.active:focus,.datepicker table tr td.range.highlighted.active:hover,.datepicker table tr td.range.highlighted:active.focus,.datepicker table tr td.range.highlighted:active:focus,.datepicker table tr td.range.highlighted:active:hover{color:#000;background-color:#a8c8d8;border-color:#4b88a6}.datepicker table tr td.range.highlighted.disabled.focus,.datepicker table tr td.range.highlighted.disabled:focus,.datepicker table tr td.range.highlighted.disabled:hover,.datepicker table tr td.range.highlighted[disabled].focus,.datepicker table tr td.range.highlighted[disabled]:focus,.datepicker table tr td.range.highlighted[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.highlighted.focus,fieldset[disabled] .datepicker table tr td.range.highlighted:focus,fieldset[disabled] .datepicker table tr td.range.highlighted:hover{background-color:#e4eef3;border-color:#9dc1d3}.datepicker table tr td.range.highlighted.focused{background:#c1d7e3}.datepicker table tr td.range.highlighted.disabled,.datepicker table tr td.range.highlighted.disabled:active{background:#e4eef3;color:#777}.datepicker table tr td.range.today{color:#000;background-color:#f7ca77;border-color:#f1a417}.datepicker table tr td.range.today.focus,.datepicker table tr td.range.today:focus{color:#000;background-color:#f4b747;border-color:#815608}.datepicker table tr td.range.today:hover{color:#000;background-color:#f4b747;border-color:#bf800c}.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:active{color:#000;background-color:#f4b747;border-color:#bf800c}.datepicker table tr td.range.today.active.focus,.datepicker table tr td.range.today.active:focus,.datepicker table tr td.range.today.active:hover,.datepicker table tr td.range.today:active.focus,.datepicker table tr td.range.today:active:focus,.datepicker table tr td.range.today:active:hover{color:#000;background-color:#f2aa25;border-color:#815608}.datepicker table tr td.range.today.disabled.focus,.datepicker table tr td.range.today.disabled:focus,.datepicker table tr td.range.today.disabled:hover,.datepicker table tr td.range.today[disabled].focus,.datepicker table tr td.range.today[disabled]:focus,.datepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.today.focus,fieldset[disabled] .datepicker table tr td.range.today:focus,fieldset[disabled] .datepicker table tr td.range.today:hover{background-color:#f7ca77;border-color:#f1a417}.datepicker table tr td.range.today.disabled,.datepicker table tr td.range.today.disabled:active{background:#f7ca77;color:#777}.datepicker table tr td.selected,.datepicker table tr td.selected.highlighted{color:#fff;background-color:#777;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.selected.focus,.datepicker table tr td.selected.highlighted.focus,.datepicker table tr td.selected.highlighted:focus,.datepicker table tr td.selected:focus{color:#fff;background-color:#5e5e5e;border-color:#161616}.datepicker table tr td.selected.highlighted:hover,.datepicker table tr td.selected:hover{color:#fff;background-color:#5e5e5e;border-color:#373737}.datepicker table tr td.selected.active,.datepicker table tr td.selected.highlighted.active,.datepicker table tr td.selected.highlighted:active,.datepicker table tr td.selected:active{color:#fff;background-color:#5e5e5e;border-color:#373737}.datepicker table tr td.selected.active.focus,.datepicker table tr td.selected.active:focus,.datepicker table tr td.selected.active:hover,.datepicker table tr td.selected.highlighted.active.focus,.datepicker table tr td.selected.highlighted.active:focus,.datepicker table tr td.selected.highlighted.active:hover,.datepicker table tr td.selected.highlighted:active.focus,.datepicker table tr td.selected.highlighted:active:focus,.datepicker table tr td.selected.highlighted:active:hover,.datepicker table tr td.selected:active.focus,.datepicker table tr td.selected:active:focus,.datepicker table tr td.selected:active:hover{color:#fff;background-color:#4c4c4c;border-color:#161616}.datepicker table tr td.selected.disabled.focus,.datepicker table tr td.selected.disabled:focus,.datepicker table tr td.selected.disabled:hover,.datepicker table tr td.selected.highlighted.disabled.focus,.datepicker table tr td.selected.highlighted.disabled:focus,.datepicker table tr td.selected.highlighted.disabled:hover,.datepicker table tr td.selected.highlighted[disabled].focus,.datepicker table tr td.selected.highlighted[disabled]:focus,.datepicker table tr td.selected.highlighted[disabled]:hover,.datepicker table tr td.selected[disabled].focus,.datepicker table tr td.selected[disabled]:focus,.datepicker table tr td.selected[disabled]:hover,fieldset[disabled] .datepicker table tr td.selected.focus,fieldset[disabled] .datepicker table tr td.selected.highlighted.focus,fieldset[disabled] .datepicker table tr td.selected.highlighted:focus,fieldset[disabled] .datepicker table tr td.selected.highlighted:hover,fieldset[disabled] .datepicker table tr td.selected:focus,fieldset[disabled] .datepicker table tr td.selected:hover{background-color:#777;border-color:#555}.datepicker table tr td.active,.datepicker table tr td.active.highlighted{color:#fff;background-color:#337ab7;border-color:#2e6da4;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.active.focus,.datepicker table tr td.active.highlighted.focus,.datepicker table tr td.active.highlighted:focus,.datepicker table tr td.active:focus{color:#fff;background-color:#286090;border-color:#122b40}.datepicker table tr td.active.highlighted:hover,.datepicker table tr td.active:hover{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td.active.active,.datepicker table tr td.active.highlighted.active,.datepicker table tr td.active.highlighted:active,.datepicker table tr td.active:active{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td.active.active.focus,.datepicker table tr td.active.active:focus,.datepicker table tr td.active.active:hover,.datepicker table tr td.active.highlighted.active.focus,.datepicker table tr td.active.highlighted.active:focus,.datepicker table tr td.active.highlighted.active:hover,.datepicker table tr td.active.highlighted:active.focus,.datepicker table tr td.active.highlighted:active:focus,.datepicker table tr td.active.highlighted:active:hover,.datepicker table tr td.active:active.focus,.datepicker table tr td.active:active:focus,.datepicker table tr td.active:active:hover{color:#fff;background-color:#204d74;border-color:#122b40}.datepicker table tr td.active.disabled.focus,.datepicker table tr td.active.disabled:focus,.datepicker table tr td.active.disabled:hover,.datepicker table tr td.active.highlighted.disabled.focus,.datepicker table tr td.active.highlighted.disabled:focus,.datepicker table tr td.active.highlighted.disabled:hover,.datepicker table tr td.active.highlighted[disabled].focus,.datepicker table tr td.active.highlighted[disabled]:focus,.datepicker table tr td.active.highlighted[disabled]:hover,.datepicker table tr td.active[disabled].focus,.datepicker table tr td.active[disabled]:focus,.datepicker table tr td.active[disabled]:hover,fieldset[disabled] .datepicker table tr td.active.focus,fieldset[disabled] .datepicker table tr td.active.highlighted.focus,fieldset[disabled] .datepicker table tr td.active.highlighted:focus,fieldset[disabled] .datepicker table tr td.active.highlighted:hover,fieldset[disabled] .datepicker table tr td.active:focus,fieldset[disabled] .datepicker table tr td.active:hover{background-color:#337ab7;border-color:#2e6da4}.datepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.datepicker table tr td span.focused,.datepicker table tr td span:hover{background:#eee}.datepicker table tr td span.disabled,.datepicker table tr td span.disabled:hover{background:0 0;color:#777;cursor:default}.datepicker table tr td span.active,.datepicker table tr td span.active.disabled,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active:hover{color:#fff;background-color:#337ab7;border-color:#2e6da4;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td span.active.disabled.focus,.datepicker table tr td span.active.disabled:focus,.datepicker table tr td span.active.disabled:hover.focus,.datepicker table tr td span.active.disabled:hover:focus,.datepicker table tr td span.active.focus,.datepicker table tr td span.active:focus,.datepicker table tr td span.active:hover.focus,.datepicker table tr td span.active:hover:focus{color:#fff;background-color:#286090;border-color:#122b40}.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active.disabled:hover:hover,.datepicker table tr td span.active:hover,.datepicker table tr td span.active:hover:hover{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td span.active.active,.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover.active,.datepicker table tr td span.active.disabled:hover:active,.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover.active,.datepicker table tr td span.active:hover:active{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td span.active.active.focus,.datepicker table tr td span.active.active:focus,.datepicker table tr td span.active.active:hover,.datepicker table tr td span.active.disabled.active.focus,.datepicker table tr td span.active.disabled.active:focus,.datepicker table tr td span.active.disabled.active:hover,.datepicker table tr td span.active.disabled:active.focus,.datepicker table tr td span.active.disabled:active:focus,.datepicker table tr td span.active.disabled:active:hover,.datepicker table tr td span.active.disabled:hover.active.focus,.datepicker table tr td span.active.disabled:hover.active:focus,.datepicker table tr td span.active.disabled:hover.active:hover,.datepicker table tr td span.active.disabled:hover:active.focus,.datepicker table tr td span.active.disabled:hover:active:focus,.datepicker table tr td span.active.disabled:hover:active:hover,.datepicker table tr td span.active:active.focus,.datepicker table tr td span.active:active:focus,.datepicker table tr td span.active:active:hover,.datepicker table tr td span.active:hover.active.focus,.datepicker table tr td span.active:hover.active:focus,.datepicker table tr td span.active:hover.active:hover,.datepicker table tr td span.active:hover:active.focus,.datepicker table tr td span.active:hover:active:focus,.datepicker table tr td span.active:hover:active:hover{color:#fff;background-color:#204d74;border-color:#122b40}.datepicker table tr td span.active.disabled.disabled.focus,.datepicker table tr td span.active.disabled.disabled:focus,.datepicker table tr td span.active.disabled.disabled:hover,.datepicker table tr td span.active.disabled.focus,.datepicker table tr td span.active.disabled:focus,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active.disabled:hover.disabled.focus,.datepicker table tr td span.active.disabled:hover.disabled:focus,.datepicker table tr td span.active.disabled:hover.disabled:hover,.datepicker table tr td span.active.disabled:hover[disabled].focus,.datepicker table tr td span.active.disabled:hover[disabled]:focus,.datepicker table tr td span.active.disabled:hover[disabled]:hover,.datepicker table tr td span.active.disabled[disabled].focus,.datepicker table tr td span.active.disabled[disabled]:focus,.datepicker table tr td span.active.disabled[disabled]:hover,.datepicker table tr td span.active:hover.disabled.focus,.datepicker table tr td span.active:hover.disabled:focus,.datepicker table tr td span.active:hover.disabled:hover,.datepicker table tr td span.active:hover[disabled].focus,.datepicker table tr td span.active:hover[disabled]:focus,.datepicker table tr td span.active:hover[disabled]:hover,.datepicker table tr td span.active[disabled].focus,.datepicker table tr td span.active[disabled]:focus,.datepicker table tr td span.active[disabled]:hover,fieldset[disabled] .datepicker table tr td span.active.disabled.focus,fieldset[disabled] .datepicker table tr td span.active.disabled:focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover,fieldset[disabled] .datepicker table tr td span.active.disabled:hover.focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .datepicker table tr td span.active.focus,fieldset[disabled] .datepicker table tr td span.active:focus,fieldset[disabled] .datepicker table tr td span.active:hover,fieldset[disabled] .datepicker table tr td span.active:hover.focus,fieldset[disabled] .datepicker table tr td span.active:hover:focus,fieldset[disabled] .datepicker table tr td span.active:hover:hover{background-color:#337ab7;border-color:#2e6da4}.datepicker table tr td span.new,.datepicker table tr td span.old{color:#777}.datepicker .datepicker-switch{width:145px}.datepicker .datepicker-switch,.datepicker .next,.datepicker .prev,.datepicker tfoot tr th{cursor:pointer}.datepicker .datepicker-switch:hover,.datepicker .next:hover,.datepicker .prev:hover,.datepicker tfoot tr th:hover{background:#eee}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.input-group.date .input-group-addon{cursor:pointer}.input-daterange{width:100%}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;line-height:1.42857143;text-shadow:0 1px 0 #fff;border-width:1px 0;margin-left:-5px;margin-right:-5px} +/*# sourceMappingURL=bootstrap-datepicker3.min.css.map */
\ No newline at end of file diff --git a/css/bootstrap-datepicker3.min.css.map b/css/bootstrap-datepicker3.min.css.map new file mode 100644 index 0000000..d769109 --- /dev/null +++ b/css/bootstrap-datepicker3.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/datepicker3.less","build/build3.less"],"names":[],"mappings":"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"}
\ No newline at end of file diff --git a/css/datechooser.css b/css/datechooser.css deleted file mode 100644 index f2d71d1..0000000 --- a/css/datechooser.css +++ /dev/null @@ -1,28 +0,0 @@ -.dateChooser td { - cursor:default; - text-align:center; -} -.dateChooser td.dateChooserActive:hover { - color:white; - background:#0A246A; -} -.dateChooser td.dateChooserActiveToday { - border: 1px solid red; -} -.dateChooser th { - background: #aaa; - color: white; - width: 18px; - border: none; -} -.dateChooser option, .dateChooser select { - font-size:10px; -} -.dateChooser { - border: 2px outset #aaa; - background: white; - padding: 1px; -} -.dateChooser table { - width:160px; -} diff --git a/css/select-free.css b/css/select-free.css deleted file mode 100644 index bb30b75..0000000 --- a/css/select-free.css +++ /dev/null @@ -1,19 +0,0 @@ -/* http://www.hedgerwow.com/360/bugs/css-select-free.html */ -.select-free { - position:absolute; - z-index:10; - cursor:pointer; - overflow:hidden; - width:33em; -} -.select-free iframe { - display:none; - display/**/:block; - position:absolute; - top:0; - left:0; - z-index:-1; - filter:mask(); - width:3000px; - height:3000px -} diff --git a/details.php b/details.php index dbe1052..8245f2b 100644 --- a/details.php +++ b/details.php @@ -1,42 +1,5 @@ <?php -echo ' <h1>'.$title.'</h1> - <hr/> - <form id="datepick" name="setup" action="" method="get"> - <div style="right: 5px; top: 5px; visibility: hidden" id="setupdiv" onmousedown="dragstart(this)">'.PHP_EOL; -$even = false; -foreach ($channels as $c) { - echo ' <label><input name="channel" value="'.$c.'"'.($c == $channel ? ' checked="checked"' : '').' type="radio"/>'.$c.'</label>'.($even ? '<br/>' : '').PHP_EOL; - $even = !$even; -} -echo ' <hr/> - <input name="show_joins" value="true" type="checkbox"'.($show_joins ? ' checked="checked"' : '').'/>Show Joins/Disconnects<br/> - <input name="show_irssi" value="true" type="checkbox"'.($show_irssi ? ' checked="checked"' : '').'/>Show IRSSI<br/> - <input name="show_html" value="true"'.($show_html ? ' checked="checked"' : '').' type="checkbox"/>Linkify HTML<br/> - <label for="highlight_names">Highlight names:</label><input id="highlight_names" name="highlight_names" type="text" value="'.$highlight_names.'"/> - <input value="Update" type="submit"/> - <div id="usernames">'.PHP_EOL; -foreach ($users as $user) { - echo '<span class="user_'.$user.'" id="user_'.$user.'" style="display: block;"><a style="color: inherit;" href="javascript:addUser(\''.$user.'\');">'.$user.'</a></span>'.PHP_EOL; -} -echo ' </div> - </div> - <label for="date">Enter date of the log to open:</label>'.PHP_EOL; -if (file_exists(LOG_DIR.'dri-devel-' . $prevday . '.log')) { - echo '<a href="#" title="Previous day" onclick="prevDay(); return false;"><img src="images/play_blue_rev.png" alt="Previous day" title="Previous day" /></a>'; -} else { - echo '<img src="images/play_gray_rev.png" alt="Previous day" title="Previous day" />'; -} -echo '<input id="date" size="10" maxlength="10" name="date" value="'.$date.'" onkeyup="javascript:makeValid(\'date\')" onblur="javascript:makeValidFinal(this, \'date\', \'date_chooser\', 1950, 2049, Date.patterns.ISO8601ShortPattern, false)" type="text"/><img src="images/calendar.png" alt="Choose date" onclick="showChooser(this, \'date\', \'date_chooser\', 1950, 2049, Date.patterns.ISO8601ShortPattern, false);"/><div id="date_chooser" class="dateChooser select-free" style="display: none; visibility: hidden; width: 160px;"></div>'; -if (file_exists(LOG_DIR.'dri-devel-' . $nextday . '.log')) { - echo '<a href="#" title="Next day" onclick="nextDay(); return false;" ><img src="images/play_blue.png" alt="Next day" title="Next day" /></a>'.PHP_EOL; -} else { - echo '<img src="images/play_gray.png" alt="Next day" title="Next day" />'.PHP_EOL; -} -echo ' <input value="OK" type="submit"/> - <a href="#" onclick="showHideMenu(); return false;" title="Show menu" id="showhidebutton"><img id="showhidebuttonimage" src="images/application_form.png" alt="Show menu" title="Show menu" /></a>'.PHP_EOL; -echo ' </form> - <hr/>'.PHP_EOL; $filename = 'dri-devel-'.$date.'.log'; $pattern = '#(^|[^\"=]{1})(http://|ftp://|https://|mailto:|news:)([^\s<>]+)([\s\n<>]|$)#sm'; @@ -68,7 +31,7 @@ foreach ($lines as $line_num => $line) { } $user_link .= '>'.str_replace('<', '<', str_replace('>', '>', $user)).'</a>'; if (!in_array($time, $timehashes)) { - $time_link = '<a name="t-'.str_replace(':', '', $time).'">'.$time.'</a>'; + $time_link = '<a class="inherit" name="t-'.str_replace(':', '', $time).'">'.$time.'</a>'; $line = str_replace($time, $time_link, $line); array_push($timehashes, $time); } @@ -18,123 +18,166 @@ require_once('common.inc.php'); if (isset($date)) { - $title = 'IRC Logs of #'.$channel.' on irc.freenode.net for '.$date; - $oneday = new DateInterval("P1D"); - $prevday = date_sub(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); - $nextday = date_add(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); - - // Set a cookie to store the reference to the last time we showed the log - if (isset($_COOKIE[$channel . '_last_visit'])) { - $last_visit = $_COOKIE[$channel . '_last_visit']; - if ($date == date('Y-m-d', $last_visit)) { - $last_visit = date('H:i', $last_visit); - setcookie($channel . '_last_visit', time(), time()+2592000); - } else { - unset($last_visit); - } - } else { - setcookie($channel . '_last_visit', time(), time()+2592000); - } + $title = 'IRC Logs of #'.$channel.' on irc.freenode.net for '.$date; + $oneday = new DateInterval("P1D"); + $prevday = date_sub(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); + $nextday = date_add(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); + + // Set a cookie to store the reference to the last time we showed the log + if (isset($_COOKIE[$channel . '_last_visit'])) { + $last_visit = $_COOKIE[$channel . '_last_visit']; + if ($date == date('Y-m-d', $last_visit)) { + $last_visit = date('H:i', $last_visit); + setcookie($channel . '_last_visit', time(), time()+2592000); + } else { + unset($last_visit); + } + } else { + setcookie($channel . '_last_visit', time(), time()+2592000); + } } else { - $title = 'DRI IRC log overview'; + $title = 'DRI IRC log overview'; } $show_html = !isset($_GET['channel']) || (isset($_GET['show_html']) && $_GET['show_html'] == 'true'); $show_joins = isset($_GET['show_joins']) && $_GET['show_joins'] == 'true'; $show_irssi = isset($_GET['show_irssi']) && $_GET['show_irssi'] == 'true'; $highlight_names = isset($_GET['highlight_names']) ? $_GET['highlight_names'] : (isset($_COOKIE['stored_users']) ? $_COOKIE['stored_users'] : ''); if ($highlight_names == '') { - $users = array(); + $users = array(); } else { - $users = explode(';', $highlight_names); + $users = explode(';', $highlight_names); } if (isset($_GET['highlight_names'])) { - setcookie('stored_users', $highlight_names, time()+2592000); + setcookie('stored_users', $highlight_names, time()+2592000); } $colors = array('#009900', '#CC3300', '#330099', '#FF6600', '#CC33CC', '#66CCCC', '#FF0066', '#9900FF', '#00FFCC', '#6600FF'); -echo '<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> +echo '<!DOCTYPE html> +<html lang="en"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>'.$title.'</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>'.$title.'</title> <link rel="shortcut icon" href="favicon.ico" /> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> + <link rel="stylesheet" href="css/bootstrap-datepicker3.min.css"> + <script src="js/bootstrap-datepicker.min.js"></script> <style type="text/css"> -body { font-family:monospace; } -h1 { text-align: center; } +body { padding-top: 60px; } #setupdiv {position: absolute; top: 8.6em; right: 2em; width: 18em; background-color:white; border:solid 1px gray; padding: 10px;} -html>body #setupdiv { position: fixed; } - </style> - <script src="js/date-functions.js" type="text/javascript"></script> - <script src="js/datechooser.js" type="text/javascript"></script> - <link rel="stylesheet" type="text/css" href="css/datechooser.css"/> - <!--[if lte IE 6.5]> - <link rel="stylesheet" type="text/css" href="css/select-free.css"/> - <![endif]-->'.PHP_EOL; +html { position: relative; min-height: 100%; } +body { margin-bottom: 60px; } +.footer { position: absolute; bottom: 0; width: 100%; height: 45px; background-color: #f5f5f5; } +div.checkbox { margin-left: 10px; } +ul#usernames li > span { margin-left: 10px; } +ul#usernames li > span > a, a.inherit { color: inherit; } + </style>'.PHP_EOL; if (!isset($_SERVER['HTTP_DNT']) || $_SERVER['HTTP_DNT'] != 1) { - include_once("analyticstracking.php"); + include_once("analyticstracking.php"); } if (isset($date)) { - echo ' <script type="text/javascript" src="js/core-min.js"></script> + echo ' <script type="text/javascript" src="js/core-min.js"></script> <script type="text/javascript" src="js/sha1-min.js"></script> <script type="text/javascript" src="js/script.js"></script> - <script type="text/javascript"> -<!-- - -function prevDay() { - $s = document.getElementById("date"); - $s.value="' . $prevday . '"; - document.getElementById("datepick").submit(); -} -function nextDay() { - $s = document.getElementById("date"); - $s.value="' . $nextday . '"; - document.getElementById("datepick").submit(); -} - -//--> </script>'.PHP_EOL; - if (count($users) > 0) { - echo ' <style type="text/css">'.PHP_EOL; - foreach ($users as $user) { - echo ' span.user_'.$user.' { '.get_color($user).'; }'.PHP_EOL; - } - echo ' </style>'.PHP_EOL; - } + if (count($users) > 0) { + echo ' <style type="text/css">'.PHP_EOL; + foreach ($users as $user) { + echo ' span.user_'.$user.' { '.get_color($user).'; }'.PHP_EOL; + } + echo ' </style>'.PHP_EOL; + } } -echo ' </head>'.PHP_EOL; +echo ' </head> + <body> + <nav class="navbar navbar-default navbar-fixed-top"> + <div class="container-fluid"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.php">Home</a> + </div> + <div id="navbar" class="collapse navbar-collapse"> + <form method="get" action="" id="mainform" name="mainform"> + <ul class="nav navbar-nav">'.PHP_EOL; +foreach ($channels as $channel_) { + echo ' <li'.($channel_ == $channel ? ' class="active"' : '').'><a href="#" onclick="$(\'#channel\').val(\''.$channel_.'\'); $(\'#mainform\').submit(); return false;">'.$channel_.'</a></li>'.PHP_EOL; +} +echo ' </ul> + <div class="navbar-form navbar-right"> + <input id="channel" name="channel" type="hidden" value="' . $channel . '" style="display: none; visibility: hidden;"/> + <input id="highlight_names" name="highlight_names" type="hidden" value="'.$highlight_names.'" style="display: none; visibility: hidden;"/> + <div class="input-group date"> + <input type="text" class="form-control" id="date" name="date" value="'.(isset($date) ? $date : date('Y-m-d')).'"> + <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span> + </div> + </div>'.PHP_EOL; if (isset($date)) { - echo ' <body onload="draginit()">'.PHP_EOL; -} else { - echo ' <body>'.PHP_EOL; +echo ' <ul class="nav navbar-nav navbar-right"> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#">Options + <span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><div class="checkbox"><label><input type="checkbox" name="show_joins" value="true"'.($show_joins ? ' checked="checked"' : '').' onchange="this.form.submit();">Joins/Disconnects</label></div></li> + <li><div class="checkbox"><label><input type="checkbox" name="show_irssi" value="true"'.($show_irssi ? ' checked="checked"' : '').' onchange="this.form.submit();">IRSSI</label></div></li> + <li><div class="checkbox"><label><input type="checkbox" name="show_html" value="true"'.($show_html ? ' checked="checked"' : '').' onchange="this.form.submit();">Linkify HTML</label></div></li> + </ul> + </li> + </ul> + <ul class="nav navbar-nav navbar-right"> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span id="users_label">Users'.(count($users) > 0 ? ' ('.count($users).')' : '').'</span> + <span class="caret"></span></a> + <ul class="dropdown-menu" id="usernames">'.PHP_EOL; +foreach ($users as $user) { + echo ' <li id="user_'.$user.'"><span class="checkbox user_'.$user.'"><a href="javascript:addUser(\''.$user.'\');">'.$user.'</a></span></li>'.PHP_EOL; +} +echo ' </ul> + </li> + </ul>'.PHP_EOL; } +echo ' </form> + </div> + </div> + </nav> + <div class="container-fluid">'.PHP_EOL; function get_color($user) { - global $users; - $isUser = array_search($user, $users); - if ($isUser !== false) { - return 'color: #'.substr(sha1($user), 0, 6); - } + global $users; + $isUser = array_search($user, $users); + if ($isUser !== false) { + return 'color: #'.substr(sha1($user), 0, 6); + } } if (!isset($date)) { - require_once('overview.php'); + require_once('overview.php'); } else { - require_once('details.php'); + require_once('details.php'); } -echo ' <br/> - <hr/> - <span>Written by <a href="mailto:egore911%20-%20at%20%21%20egore911%20/%20de">Christoph Brill</a> © 2007-'.date('Y').'</span> - <p style="text-align: center;"> - <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" style="border: none;" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a><br/><br/> - <a href="https://play.google.com/store/apps/details?id=de.egore911.drilog"><img src="http://www.android.com/images/brand/android_app_on_play_logo_small.png" style="border: none;" alt="Available in Android Market" height="45" width="129" /></a> - </p> +echo ' </div> + <footer class="footer"> + <div class="container-fluid"> + <span class="text-muted">Written by <a href="mailto:egore911%20-%20at%20%21%20egore911%20/%20de">Christoph Brill</a> © 2007-'.date('Y').'<a href="https://play.google.com/store/apps/details?id=de.egore911.drilog"><img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="45" /></a></span> + </div> + </footer> </body> + <script type="text/javascript"> + $(\'.input-group.date\').datepicker({ format: \'yyyy-mm-dd\', autoclose: true, todayHighlight: true, endDate: \'+1d\' }).on(\'changeDate\', function(e) { + this.parentElement.parentElement.submit(); + }); + </script> </html>'.PHP_EOL; diff --git a/js/bootstrap-datepicker.min.js b/js/bootstrap-datepicker.min.js new file mode 100644 index 0000000..48cb452 --- /dev/null +++ b/js/bootstrap-datepicker.min.js @@ -0,0 +1,9 @@ +/*! + * Datepicker for Bootstrap v1.6.4 (https://github.com/eternicode/bootstrap-datepicker) + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(a){return function(){return this[a].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split("-")[0],q[b])){var d=q[b];return a.each(p,function(a,b){b in d&&(c[b]=d[b])}),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;d>c;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new j;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),k=function(b,c){a(b).data("datepicker",this),this._process_options(c),this.dates=new j,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1,this.hasInput=this.component&&this.inputField.length,this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=a(r.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted),this.setDatesDisabled(this.o.datesDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};k.prototype={constructor:k,_resolveViewName:function(a,c){return 0===a||"days"===a||"month"===a?0:1===a||"months"===a||"year"===a?1:2===a||"years"===a||"decade"===a?2:3===a||"decades"===a||"century"===a?3:4===a||"centuries"===a||"millennium"===a?4:c===b?!1:c},_check_template:function(c){try{if(c===b||""===c)return!1;if((c.match(/[<>]/g)||[]).length<=0)return!0;var d=a(c);return d.length>0}catch(e){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split("-")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView,0),e.minViewMode=this._resolveViewName(e.minViewMode,0),e.maxViewMode=this._resolveViewName(e.maxViewMode,4),e.startView=Math.min(e.startView,e.maxViewMode),e.startView=Math.max(e.startView,e.minViewMode),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);e.startDate!==-(1/0)&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-(1/0)),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],a.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=a.map(e.daysOfWeekDisabled,function(a){return parseInt(a,10)}),e.daysOfWeekHighlighted=e.daysOfWeekHighlighted||[],a.isArray(e.daysOfWeekHighlighted)||(e.daysOfWeekHighlighted=e.daysOfWeekHighlighted.split(/[,\s]*/)),e.daysOfWeekHighlighted=a.map(e.daysOfWeekHighlighted,function(a){return parseInt(a,10)}),e.datesDisabled=e.datesDisabled||[],a.isArray(e.datesDisabled)||(e.datesDisabled=[e.datesDisabled]),e.datesDisabled=a.map(e.datesDisabled,function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)});var h=String(e.orientation).toLowerCase().split(/\s+/g),i=e.orientation.toLowerCase();if(h=a.grep(h,function(a){return/^auto|left|right|top|bottom$/.test(a)}),e.orientation={x:"auto",y:"auto"},i&&"auto"!==i)if(1===h.length)switch(h[0]){case"top":case"bottom":e.orientation.y=h[0];break;case"left":case"right":e.orientation.x=h[0]}else i=a.grep(h,function(a){return/^left|right$/.test(a)}),e.orientation.x=i[0]||"auto",i=a.grep(h,function(a){return/^top|bottom$/.test(a)}),e.orientation.y=i[0]||"auto";else;if(e.defaultViewDate){var j=e.defaultViewDate.year||(new Date).getFullYear(),k=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=c(j,k,l)}else e.defaultViewDate=d()},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){var b={keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this),paste:a.proxy(this.paste,this)};this.o.showOnFocus===!0&&(b.focus=a.proxy(this.show,this)),this.isInput?this._events=[[this.element,b]]:this.component&&this.hasInput?this._events=[[this.inputField,b],[this.component,{click:a.proxy(this.show,this)}]]:this._events=[[this.element,{click:a.proxy(this.show,this),keydown:a.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":a.proxy(function(a){this.update(a.date)},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{mousedown:a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return r.formatDate(c,b,this.o.language)},this)})},show:function(){return this.inputField.prop("disabled")||this.inputField.prop("readonly")&&this.o.enableOnReadonly===!1?void 0:(this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&a(this.element).blur(),this)},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(b){var c;if(b.originalEvent.clipboardData&&b.originalEvent.clipboardData.types&&-1!==a.inArray("text/plain",b.originalEvent.clipboardData.types))c=b.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;c=window.clipboardData.getData("Text")}this.setDate(c),this.update(),b.preventDefault()},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var a=this.dates.get(-1);return"undefined"!=typeof a?new Date(a):null},clearDates:function(){this.inputField&&this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,b),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:f("setDates"),setUTCDate:f("setUTCDates"),remove:f("destroy"),setValue:function(){var a=this.getFormattedDate();return this.inputField.val(a),this},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language;return a.map(this.dates,function(a){return r.formatDate(a,c,d)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(a){return this._process_options({startDate:a}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(a){return this._process_options({endDate:a}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(a){return this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows(),this},setDaysOfWeekHighlighted:function(a){return this._process_options({daysOfWeekHighlighted:a}),this.update(),this},setDatesDisabled:function(a){this._process_options({datesDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return this;var b=this.picker.outerWidth(),c=this.picker.outerHeight(),d=10,e=a(this.o.container),f=e.width(),g="body"===this.o.container?a(document).scrollTop():e.scrollTop(),h=e.offset(),i=[];this.element.parents().each(function(){var b=a(this).css("z-index");"auto"!==b&&0!==b&&i.push(parseInt(b))});var j=Math.max.apply(Math,i)+this.o.zIndexOffset,k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left-h.left,o=k.top-h.top;"body"!==this.o.container&&(o+=g),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=b-m)):k.left<0?(this.picker.addClass("datepicker-orient-left"),n-=k.left-d):n+b>f?(this.picker.addClass("datepicker-orient-right"),n+=m-b):this.picker.addClass("datepicker-orient-left");var p,q=this.o.orientation.y;if("auto"===q&&(p=-g+o-c,q=0>p?"bottom":"top"),this.picker.addClass("datepicker-orient-"+q),"top"===q?o-=c+parseInt(this.picker.css("padding-top")):o+=l,this.o.rtl){var r=f-(n+m);this.picker.css({top:o,right:r,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),c=a.grep(c,a.proxy(function(a){return!this.dateWithinRange(a)||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate,d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill(),this.element.change(),this},fillDow:function(){var b=this.o.weekStart,c="<tr>";for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days .datepicker-switch").attr("colspan",function(a,b){return parseInt(b)+1}),c+='<th class="cw"> </th>');b<this.o.weekStart+7;)c+='<th class="dow',a.inArray(b,this.o.daysOfWeekDisabled)>-1&&(c+=" disabled"),c+='">'+q[this.o.language].daysMin[b++%7]+"</th>";c+="</tr>",this.picker.find(".datepicker-days thead").append(c)},fillMonths:function(){for(var a=this._utc_to_local(this.viewDate),b="",c=0;12>c;){var d=a&&a.getMonth()===c?" focused":"";b+='<span class="month'+d+'">'+q[this.o.language].monthsShort[c++]+"</span>"}this.picker.find(".datepicker-months td").html(b)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),this.dateWithinRange(b)||c.push("disabled"),this.dateIsDisabled(b)&&c.push("disabled","disabled-date"),-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)&&c.push("highlighted"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected"),b.valueOf()===this.range[0]&&c.push("range-start"),b.valueOf()===this.range[this.range.length-1]&&c.push("range-end")),c},_fill_yearsView:function(c,d,e,f,g,h,i,j){var k,l,m,n,o,p,q,r,s,t,u;for(k="",l=this.picker.find(c),m=parseInt(g/e,10)*e,o=parseInt(h/f,10)*f,p=parseInt(i/f,10)*f,n=a.map(this.dates,function(a){return parseInt(a.getUTCFullYear()/f,10)*f}),l.find(".datepicker-switch").text(m+"-"+(m+9*f)),q=m-f,r=-1;11>r;r+=1)s=[d],t=null,-1===r?s.push("old"):10===r&&s.push("new"),-1!==a.inArray(q,n)&&s.push("active"),(o>q||q>p)&&s.push("disabled"),q===this.viewDate.getFullYear()&&s.push("focused"),j!==a.noop&&(u=j(new Date(q,0,1)),u===b?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),u.enabled===!1&&s.push("disabled"),u.classes&&(s=s.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip)),k+='<span class="'+s.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+q+"</span>",q+=f;l.find("td").html(k)},fill:function(){var d,e,f=new Date(this.viewDate),g=f.getUTCFullYear(),h=f.getUTCMonth(),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),j=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=q[this.o.language].today||q.en.today||"",n=q[this.o.language].clear||q.en.clear||"",o=q[this.o.language].titleFormat||q.en.titleFormat;if(!isNaN(g)&&!isNaN(h)){this.picker.find(".datepicker-days .datepicker-switch").text(r.formatDate(f,o,this.o.language)),this.picker.find("tfoot .today").text(m).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(n).toggle(this.o.clearBtn!==!1),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths();var p=c(g,h-1,28),s=r.getDaysInMonth(p.getUTCFullYear(),p.getUTCMonth());p.setUTCDate(s),p.setUTCDate(s-(p.getUTCDay()-this.o.weekStart+7)%7);var t=new Date(p);p.getUTCFullYear()<100&&t.setUTCFullYear(p.getUTCFullYear()),t.setUTCDate(t.getUTCDate()+42),t=t.valueOf();for(var u,v=[];p.valueOf()<t;){if(p.getUTCDay()===this.o.weekStart&&(v.push("<tr>"),this.o.calendarWeeks)){var w=new Date(+p+(this.o.weekStart-p.getUTCDay()-7)%7*864e5),x=new Date(Number(w)+(11-w.getUTCDay())%7*864e5),y=new Date(Number(y=c(x.getUTCFullYear(),0,1))+(11-y.getUTCDay())%7*864e5),z=(x-y)/864e5/7+1;v.push('<td class="cw">'+z+"</td>")}u=this.getClassNames(p),u.push("day"),this.o.beforeShowDay!==a.noop&&(e=this.o.beforeShowDay(this._utc_to_local(p)),e===b?e={}:"boolean"==typeof e?e={enabled:e}:"string"==typeof e&&(e={classes:e}),e.enabled===!1&&u.push("disabled"),e.classes&&(u=u.concat(e.classes.split(/\s+/))),e.tooltip&&(d=e.tooltip)),u=a.isFunction(a.uniqueSort)?a.uniqueSort(u):a.unique(u),v.push('<td class="'+u.join(" ")+'"'+(d?' title="'+d+'"':"")+">"+p.getUTCDate()+"</td>"),d=null,p.getUTCDay()===this.o.weekEnd&&v.push("</tr>"),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(v.join(""));var A=q[this.o.language].monthsTitle||q.en.monthsTitle||"Months",B=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?A:g).end().find("span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===g&&B.eq(b.getUTCMonth()).addClass("active")}),(i>g||g>k)&&B.addClass("disabled"),g===i&&B.slice(0,j).addClass("disabled"),g===k&&B.slice(l+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var C=this;a.each(B,function(c,d){var e=new Date(g,c,1),f=C.o.beforeShowMonth(e);f===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),f.enabled!==!1||a(d).hasClass("disabled")||a(d).addClass("disabled"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop("title",f.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,1,g,i,k,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,10,g,i,k,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,100,g,i,k,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:case 3:case 4:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault(),b.stopPropagation();var e,f,g,h,i,j,k;e=a(b.target),e.hasClass("datepicker-switch")&&this.showMode(1);var l=e.closest(".prev, .next");l.length>0&&(f=r.modes[this.viewMode].navStep*(l.hasClass("prev")?-1:1),0===this.viewMode?(this.viewDate=this.moveMonth(this.viewDate,f),this._trigger("changeMonth",this.viewDate)):(this.viewDate=this.moveYear(this.viewDate,f),1===this.viewMode&&this._trigger("changeYear",this.viewDate)),this.fill()),e.hasClass("today")&&!e.hasClass("day")&&(this.showMode(-2),this._setDate(d(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("day")&&(g=parseInt(e.text(),10)||1,h=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),e.hasClass("old")&&(0===i?(i=11,h-=1,j=!0,k=!0):(i-=1,j=!0)),e.hasClass("new")&&(11===i?(i=0,h+=1,j=!0,k=!0):(i+=1,j=!0)),this._setDate(c(h,i,g)),k&&this._trigger("changeYear",this.viewDate),j&&this._trigger("changeMonth",this.viewDate)),e.hasClass("month")&&(this.viewDate.setUTCDate(1),g=1,i=e.parent().find("span").index(e),h=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(i),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode?(this._setDate(c(h,i,g)),this.showMode()):this.showMode(-1),this.fill()),(e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),g=1,i=0,h=parseInt(e.text(),10)||0,this.viewDate.setUTCFullYear(h),e.hasClass("year")&&(this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(h,i,g))),e.hasClass("decade")&&(this._trigger("changeDecade",this.viewDate),3===this.o.minViewMode&&this._setDate(c(h,i,g))),e.hasClass("century")&&(this._trigger("changeCentury",this.viewDate),4===this.o.minViewMode&&this._setDate(c(h,i,g))),this.showMode(-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),-1!==b?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate"),this.inputField&&this.inputField.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=-1===b?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),(0>c||c>11)&&(c=(c+12)%12);else{for(var j=0;i>j;j++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e},moveYear:function(a,b){return this.moveMonth(a,12*b)},moveAvailableDate:function(a,b,c){do{if(a=this[c](a,b),!this.dateWithinRange(a))return!1;c="moveDay"}while(this.dateIsDisabled(a));return a},weekOfDateIsDisabled:function(b){return-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(b){return this.weekOfDateIsDisabled(b)||a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void((40===a.keyCode||27===a.keyCode)&&(this.show(),a.stopPropagation()));var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,"moveYear"),c&&this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveAvailableDate(e,b,"moveMonth"),c&&this._trigger("changeMonth",this.viewDate)):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,"moveDay"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,"moveWeek")):1===this.viewMode?((38===a.keyCode||40===a.keyCode)&&(b=4*b),c=this.moveAvailableDate(e,b,"moveMonth")):2===this.viewMode&&((38===a.keyCode||40===a.keyCode)&&(b=4*b),c=this.moveAvailableDate(e,b,"moveYear")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}d&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField&&this.inputField.change())},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,this.viewMode+a))),this.picker.children("div").hide().filter(".datepicker-"+r.modes[this.viewMode].clsName).show(),this.updateNavArrows()}};var l=function(b,c){a(b).data("datepicker",this),this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,n.call(a(this.inputs),c).on("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("datepicker");if("undefined"!=typeof c){var d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=e-1,g=e+1,h=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[f])for(;f>=0&&d<this.dates[f];)this.pickers[f--].setUTCDate(d);else if(d>this.dates[g])for(;h>g&&d>this.dates[g];)this.pickers[g++].setUTCDate(d);this.updateDates(),delete this.updating}}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments);d.shift();var e;if(this.each(function(){var b=a(this),f=b.data("datepicker"),g="object"==typeof c&&c;if(!f){var j=h(this,"date"),m=a.extend({},o,j,g),n=i(m.language),p=a.extend({},o,n,j,g);b.hasClass("input-daterange")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find("input").toArray()}),f=new l(this,p)):f=new k(this,p),b.data("datepicker",f)}"string"==typeof c&&"function"==typeof f[c]&&(e=f[c].apply(f,d))}),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+c+" function)");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"}},p=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},r={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10},{clsName:"decades",navFnc:"FullDecade",navStep:100},{clsName:"centuries",navFnc:"FullCentury",navStep:1e3}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,b){return[31,r.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(a){if("function"==typeof a.toValue&&"function"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,"\x00").split("\x00"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(e,f,g,h){function i(a,b){return b===!0&&(b=10),100>a&&(a+=2e3,a>(new Date).getFullYear()+b&&(a-=100)),a}function j(){var a=this.slice(0,s[n].length),b=s[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!e)return b;if(e instanceof Date)return e;if("string"==typeof f&&(f=r.parseFormat(f)),f.toValue)return f.toValue(e,f,g);var l,m,n,o,p=/([\-+]\d+)([dmwy])/,s=e.match(/([\-+]\d+)([dmwy])/g),t={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},u={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)){for(e=new Date,n=0;n<s.length;n++)l=p.exec(s[n]),m=parseInt(l[1]),o=t[l[2]],e=k.prototype[o](e,m);return c(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}if("undefined"!=typeof u[e]&&(e=u[e],s=e.match(/([\-+]\d+)([dmwy])/g),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e))){for(e=new Date,n=0;n<s.length;n++)l=p.exec(s[n]),m=parseInt(l[1]),o=t[l[2]],e=k.prototype[o](e,m);return c(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}s=e&&e.match(this.nonpunctuation)||[],e=new Date;var v,w,x={},y=["yyyy","yy","M","MM","m","mm","d","dd"],z={yyyy:function(a,b){return a.setUTCFullYear(h?i(b,h):b)},yy:function(a,b){return a.setUTCFullYear(h?i(b,h):b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;0>b;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};z.M=z.MM=z.mm=z.m,z.dd=z.d,e=d();var A=f.parts.slice();if(s.length!==A.length&&(A=a(A).filter(function(b,c){return-1!==a.inArray(c,y)}).toArray()),s.length===A.length){var B;for(n=0,B=A.length;B>n;n++){if(v=parseInt(s[n],10),l=A[n],isNaN(v))switch(l){case"MM":w=a(q[g].months).filter(j),v=a.inArray(w[0],q[g].months)+1;break;case"M":w=a(q[g].monthsShort).filter(j),v=a.inArray(w[0],q[g].monthsShort)+1}x[l]=v}var C,D;for(n=0;n<y.length;n++)D=y[n],D in x&&!isNaN(x[D])&&(C=new Date(e),z[D](C,x[D]),isNaN(C)||(e=C))}return e},formatDate:function(b,c,d){if(!b)return"";if("string"==typeof c&&(c=r.parseFormat(c)), +c.toDisplay)return c.toDisplay(b,c,d);var e={d:b.getUTCDate(),D:q[d].daysShort[b.getUTCDay()],DD:q[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:q[d].monthsShort[b.getUTCMonth()],MM:q[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;h>=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">«</th><th colspan="5" class="datepicker-switch"></th><th class="next">»</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};r.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+r.headTemplate+"<tbody></tbody>"+r.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+"</table></div></div>",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version="1.6.4",a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),n.call(c,"show"))}),a(function(){n.call(a('[data-provide="datepicker-inline"]'))})});
\ No newline at end of file diff --git a/js/date-functions.js b/js/date-functions.js deleted file mode 100644 index c70f225..0000000 --- a/js/date-functions.js +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright (C) 2004 Baron Schwartz <baron at sequent dot org> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, version 2.1. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * $Revision: 1.2 $ - */ - -Date.parseFunctions = {count:0}; -Date.parseRegexes = []; -Date.formatFunctions = {count:0}; - -Date.prototype.dateFormat = function(format) { - if (Date.formatFunctions[format] == null) { - Date.createNewFormat(format); - } - var func = Date.formatFunctions[format]; - return this[func](); -} - -Date.createNewFormat = function(format) { - var funcName = "format" + Date.formatFunctions.count++; - Date.formatFunctions[format] = funcName; - var code = "Date.prototype." + funcName + " = function(){return "; - var special = false; - var ch = ''; - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; - } - else if (special) { - special = false; - code += "'" + String.escape(ch) + "' + "; - } - else { - code += Date.getFormatCode(ch); - } - } - eval(code.substring(0, code.length - 3) + ";}"); -} - -Date.getFormatCode = function(character) { - switch (character) { - case "d": - return "String.leftPad(this.getDate(), 2, '0') + "; - case "D": - return "Date.dayNames[this.getDay()].substring(0, 3) + "; - case "j": - return "this.getDate() + "; - case "l": - return "Date.dayNames[this.getDay()] + "; - case "S": - return "this.getSuffix() + "; - case "w": - return "this.getDay() + "; - case "z": - return "this.getDayOfYear() + "; - case "W": - return "this.getWeekOfYear() + "; - case "F": - return "Date.monthNames[this.getMonth()] + "; - case "m": - return "String.leftPad(this.getMonth() + 1, 2, '0') + "; - case "M": - return "Date.monthNames[this.getMonth()].substring(0, 3) + "; - case "n": - return "(this.getMonth() + 1) + "; - case "t": - return "this.getDaysInMonth() + "; - case "L": - return "(this.isLeapYear() ? 1 : 0) + "; - case "Y": - return "this.getFullYear() + "; - case "y": - return "('' + this.getFullYear()).substring(2, 4) + "; - case "a": - return "(this.getHours() < 12 ? 'am' : 'pm') + "; - case "A": - return "(this.getHours() < 12 ? 'AM' : 'PM') + "; - case "g": - return "((this.getHours() %12) ? this.getHours() % 12 : 12) + "; - case "G": - return "this.getHours() + "; - case "h": - return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + "; - case "H": - return "String.leftPad(this.getHours(), 2, '0') + "; - case "i": - return "String.leftPad(this.getMinutes(), 2, '0') + "; - case "s": - return "String.leftPad(this.getSeconds(), 2, '0') + "; - case "O": - return "this.getGMTOffset() + "; - case "T": - return "this.getTimezone() + "; - case "Z": - return "(this.getTimezoneOffset() * -60) + "; - default: - return "'" + String.escape(character) + "' + "; - } -} - -Date.parseDate = function(input, format) { - if (Date.parseFunctions[format] == null) { - Date.createParser(format); - } - var func = Date.parseFunctions[format]; - return Date[func](input); -} - -Date.createParser = function(format) { - var funcName = "parse" + Date.parseFunctions.count++; - var regexNum = Date.parseRegexes.length; - var currentGroup = 1; - Date.parseFunctions[format] = funcName; - - var code = "Date." + funcName + " = function(input){\n" - + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\n" - + "var d = new Date();\n" - + "y = d.getFullYear();\n" - + "m = d.getMonth();\n" - + "d = d.getDate();\n" - + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" - + "if (results && results.length > 0) {" - var regex = ""; - - var special = false; - var ch = ''; - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; - } - else if (special) { - special = false; - regex += String.escape(ch); - } - else { - obj = Date.formatCodeToRegex(ch, currentGroup); - currentGroup += obj.g; - regex += obj.s; - if (obj.g && obj.c) { - code += obj.c; - } - } - } - - code += "if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n" - + "{return new Date(y, m, d, h, i, s);}\n" - + "else if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n" - + "{return new Date(y, m, d, h, i);}\n" - + "else if (y > 0 && m >= 0 && d > 0 && h >= 0)\n" - + "{return new Date(y, m, d, h);}\n" - + "else if (y > 0 && m >= 0 && d > 0)\n" - + "{return new Date(y, m, d);}\n" - + "else if (y > 0 && m >= 0)\n" - + "{return new Date(y, m);}\n" - + "else if (y > 0)\n" - + "{return new Date(y);}\n" - + "}return null;}"; - - Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$"); - eval(code); -} - -Date.formatCodeToRegex = function(character, currentGroup) { - switch (character) { - case "D": - return {g:0, - c:null, - s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"}; - case "j": - case "d": - return {g:1, - c:"d = parseInt(results[" + currentGroup + "], 10);\n", - s:"(\\d{1,2})"}; - case "l": - return {g:0, - c:null, - s:"(?:" + Date.dayNames.join("|") + ")"}; - case "S": - return {g:0, - c:null, - s:"(?:st|nd|rd|th)"}; - case "w": - return {g:0, - c:null, - s:"\\d"}; - case "z": - return {g:0, - c:null, - s:"(?:\\d{1,3})"}; - case "W": - return {g:0, - c:null, - s:"(?:\\d{2})"}; - case "F": - return {g:1, - c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "].substring(0, 3)], 10);\n", - s:"(" + Date.monthNames.join("|") + ")"}; - case "M": - return {g:1, - c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "]], 10);\n", - s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"}; - case "n": - case "m": - return {g:1, - c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", - s:"(\\d{1,2})"}; - case "t": - return {g:0, - c:null, - s:"\\d{1,2}"}; - case "L": - return {g:0, - c:null, - s:"(?:1|0)"}; - case "Y": - return {g:1, - c:"y = parseInt(results[" + currentGroup + "], 10);\n", - s:"(\\d{4})"}; - case "y": - return {g:1, - c:"var ty = parseInt(results[" + currentGroup + "], 10);\n" - + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", - s:"(\\d{1,2})"}; - case "a": - return {g:1, - c:"if (results[" + currentGroup + "] == 'am') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", - s:"(am|pm)"}; - case "A": - return {g:1, - c:"if (results[" + currentGroup + "] == 'AM') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", - s:"(AM|PM)"}; - case "g": - case "G": - case "h": - case "H": - return {g:1, - c:"h = parseInt(results[" + currentGroup + "], 10);\n", - s:"(\\d{1,2})"}; - case "i": - return {g:1, - c:"i = parseInt(results[" + currentGroup + "], 10);\n", - s:"(\\d{2})"}; - case "s": - return {g:1, - c:"s = parseInt(results[" + currentGroup + "], 10);\n", - s:"(\\d{2})"}; - case "O": - return {g:0, - c:null, - s:"[+-]\\d{4}"}; - case "T": - return {g:0, - c:null, - s:"[A-Z]{3}"}; - case "Z": - return {g:0, - c:null, - s:"[+-]\\d{1,5}"}; - default: - return {g:0, - c:null, - s:String.escape(character)}; - } -} - -Date.prototype.getTimezone = function() { - return this.toString().replace( - /^.*? ([A-Z]{3}) [0-9]{4}.*$/, "$1").replace( - /^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); -} - -Date.prototype.getGMTOffset = function() { - return (this.getTimezoneOffset() > 0 ? "-" : "+") - + String.leftPad(Math.floor(this.getTimezoneOffset() / 60), 2, "0") - + String.leftPad(this.getTimezoneOffset() % 60, 2, "0"); -} - -Date.prototype.getDayOfYear = function() { - var num = 0; - Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; - for (var i = 0; i < this.getMonth(); ++i) { - num += Date.daysInMonth[i]; - } - return num + this.getDate() - 1; -} - -Date.prototype.getWeekOfYear = function() { - // Skip to Thursday of this week - var now = this.getDayOfYear() + (4 - this.getDay()); - // Find the first Thursday of the year - var jan1 = new Date(this.getFullYear(), 0, 1); - var then = (7 - jan1.getDay() + 4); - document.write(then); - return String.leftPad(((now - then) / 7) + 1, 2, "0"); -} - -Date.prototype.isLeapYear = function() { - var year = this.getFullYear(); - return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))); -} - -Date.prototype.getFirstDayOfMonth = function() { - var day = (this.getDay() - (this.getDate() - 1)) % 7; - return (day < 0) ? (day + 7) : day; -} - -Date.prototype.getLastDayOfMonth = function() { - var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7; - return (day < 0) ? (day + 7) : day; -} - -Date.prototype.getDaysInMonth = function() { - Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; - return Date.daysInMonth[this.getMonth()]; -} - -Date.prototype.getSuffix = function() { - switch (this.getDate()) { - case 1: - case 21: - case 31: - return "st"; - case 2: - case 22: - return "nd"; - case 3: - case 23: - return "rd"; - default: - return "th"; - } -} - -String.escape = function(string) { - return string.replace(/('|\\)/g, "\\$1"); -} - -String.leftPad = function (val, size, ch) { - var result = new String(val); - if (ch == null) { - ch = " "; - } - while (result.length < size) { - result = ch + result; - } - return result; -} - -Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; -Date.monthNames = - ["January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December"]; -Date.dayNames = - ["Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday"]; -Date.y2kYear = 50; -Date.monthNumbers = { - Jan:0, - Feb:1, - Mar:2, - Apr:3, - May:4, - Jun:5, - Jul:6, - Aug:7, - Sep:8, - Oct:9, - Nov:10, - Dec:11}; -Date.patterns = { - ISO8601LongPattern:"Y-m-d H:i:s", - ISO8601ShortPattern:"Y-m-d", - ShortDatePattern: "n/j/Y", - LongDatePattern: "l, F d, Y", - FullDateTimePattern: "l, F d, Y g:i:s A", - MonthDayPattern: "F d", - ShortTimePattern: "g:i A", - LongTimePattern: "g:i:s A", - SortableDateTimePattern: "Y-m-d\\TH:i:s", - UniversalSortableDateTimePattern: "Y-m-d H:i:sO", - YearMonthPattern: "F, Y"}; diff --git a/js/datechooser.js b/js/datechooser.js deleted file mode 100644 index 6f984bc..0000000 --- a/js/datechooser.js +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (C) 2004 Baron Schwartz <baron at sequent dot org> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, version 2.1. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * $Revision: 1.1 $ - */ - -// Shows or hides the date chooser on the page -function showChooser(obj, inputId, divId, start, end, format, isTimeChooser) { - if (document.getElementById) { - var input = document.getElementById(inputId); - var div = document.getElementById(divId); - if (input !== undefined && div !== undefined) { - if (input.DateChooser === undefined) { - input.DateChooser = new DateChooser(input, div, start, end, format, isTimeChooser); - } - input.DateChooser.setDate(Date.parseDate(input.value, format)); - if (input.DateChooser.isVisible()) { - input.DateChooser.hide(); - } - else { - input.DateChooser.show(); - } - } - } -} - -// Sets a date on the object attached to 'inputId' -function dateChooserSetDate(inputId, value) { - var input = document.getElementById(inputId); - if (input !== undefined && input.DateChooser !== undefined) { - input.DateChooser.setDate(Date.parseDate(value, input.DateChooser._format)); - if (input.DateChooser.isTimeChooser()) { - var theForm = input.form; - var prefix = input.DateChooser._prefix; - input.DateChooser.setTime( - parseInt(theForm.elements[prefix + 'hour'].options[ - theForm.elements[prefix + 'hour'].selectedIndex].value) - + parseInt(theForm.elements[prefix + 'ampm'].options[ - theForm.elements[prefix + 'ampm'].selectedIndex].value), - parseInt(theForm.elements[prefix + 'min'].options[ - theForm.elements[prefix + 'min'].selectedIndex].value)); - } - input.value = input.DateChooser.getValue(); - input.DateChooser.hide(); - } -} - -// The callback function for when someone changes the pulldown menus on the date -// chooser -function dateChooserDateChange(theForm, prefix) { - var input = document.getElementById( - theForm.elements[prefix + 'inputId'].value); - var newDate = new Date( - theForm.elements[prefix + 'year'].options[ - theForm.elements[prefix + 'year'].selectedIndex].value, - theForm.elements[prefix + 'month'].options[ - theForm.elements[prefix + 'month'].selectedIndex].value, - 1); - // Try to preserve the day of month (watch out for months with 31 days) - newDate.setDate(Math.max(1, Math.min(newDate.getDaysInMonth(), - input.DateChooser._date.getDate()))); - input.DateChooser.setDate(newDate); - if (input.DateChooser.isTimeChooser()) { - input.DateChooser.setTime( - parseInt(theForm.elements[prefix + 'hour'].options[ - theForm.elements[prefix + 'hour'].selectedIndex].value) - + parseInt(theForm.elements[prefix + 'ampm'].options[ - theForm.elements[prefix + 'ampm'].selectedIndex].value), - parseInt(theForm.elements[prefix + 'min'].options[ - theForm.elements[prefix + 'min'].selectedIndex].value)); - } - input.DateChooser.show(); -} - -// Gets the absolute position on the page of the element passed in -function getAbsolutePosition(obj) { - var result = [0, 0]; - while (obj != null) { - result[0] += obj.offsetTop; - result[1] += obj.offsetLeft; - obj = obj.offsetParent; - } - return result; -} - -// DateChooser constructor -function DateChooser(input, div, start, end, format, isTimeChooser) { - this._input = input; - this._div = div; - this._start = start; - this._end = end; - this._format = format; - this._date = new Date(); - this._isTimeChooser = isTimeChooser; - // Choose a random prefix for all pulldown menus - this._prefix = ""; - var letters = ["a", "b", "c", "d", "e", "f", "h", "i", "j", "k", "l", - "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; - for (var i = 0; i < 10; ++i) { - this._prefix += letters[Math.floor(Math.random() * letters.length)]; - } -} - -// DateChooser prototype variables -DateChooser.prototype._isVisible = false; - -// Returns true if the chooser is currently visible -DateChooser.prototype.isVisible = function() { - return this._isVisible; -} - -// Returns true if the chooser is to allow choosing the time as well as the date -DateChooser.prototype.isTimeChooser = function() { - return this._isTimeChooser; -} - -// Gets the value, as a formatted string, of the date attached to the chooser -DateChooser.prototype.getValue = function() { - return this._date.dateFormat(this._format); -} - -// Hides the chooser -DateChooser.prototype.hide = function() { - this._div.style.visibility = "hidden"; - this._div.style.display = "none"; - this._div.innerHTML = ""; - this._isVisible = false; -} - -// Shows the chooser on the page -DateChooser.prototype.show = function() { - // calculate the position before making it visible - var inputPos = getAbsolutePosition(this._input); - this._div.style.top = (inputPos[0] + this._input.offsetHeight) + "px"; - this._div.style.left = (inputPos[1] + this._input.offsetWidth) + "px"; - this._div.innerHTML = this.createChooserHtml(); - this._div.style.display = "block"; - this._div.style.visibility = "visible"; - this._div.style.position = "absolute"; - this._isVisible = true; -} - -// Sets the date to what is in the input box -DateChooser.prototype.initializeDate = function() { - if (this._input.value != null && this._input.value != "") { - this._date = Date.parseDate(this._input.value, this._format); - } - else { - this._date = new Date(); - } -} - -// Sets the date attached to the chooser -DateChooser.prototype.setDate = function(date) { - this._date = date ? date : new Date(); -} - -// Sets the time portion of the date attached to the chooser -DateChooser.prototype.setTime = function(hour, minute) { - this._date.setHours(hour); - this._date.setMinutes(minute); -} - -// Creates the HTML for the whole chooser -DateChooser.prototype.createChooserHtml = function() { - var formHtml = "<input type=\"hidden\" name=\"" - + this._prefix + "inputId\" value=\"" - + this._input.getAttribute('id') + "\">" - + "\r\n <select name=\"" + this._prefix - + "month\" onChange=\"dateChooserDateChange(this.form, '" - + this._prefix + "');\">"; - for (var monIndex = 0; monIndex <= 11; monIndex++) { - formHtml += "\r\n <option value=\"" + monIndex + "\"" - + (monIndex == this._date.getMonth() ? " selected=\"1\"" : "") - + ">" + Date.monthNames[monIndex] + "</option>"; - } - formHtml += "\r\n </select>\r\n <select name=\"" - + this._prefix + "year\" onChange=\"dateChooserDateChange(this.form, '" - + this._prefix + "');\">"; - for (var i = this._start; i <= this._end; ++i) { - formHtml += "\r\n <option value=\"" + i + "\"" - + (i == this._date.getFullYear() ? " selected=\"1\"" : "") - + ">" + i + "</option>"; - } - formHtml += "\r\n </select>"; - formHtml += this.createCalendarHtml(); - if (this._isTimeChooser) { - formHtml += this.createTimeChooserHtml(); - } - return formHtml; -} - -// Creates the extra HTML needed for choosing the time -DateChooser.prototype.createTimeChooserHtml = function() { - // Add hours - var result = "\r\n <select name=\"" + this._prefix + "hour\">"; - for (var i = 0; i < 12; ++i) { - result += "\r\n <option value=\"" + i + "\"" - + (((this._date.getHours() % 12) == i) ? " selected=\"1\">" : ">") - + i + "</option>"; - } - // Add extra entry for 12:00 - result += "\r\n <option value=\"0\">12</option>"; - result += "\r\n </select>"; - // Add minutes - result += "\r\n <select name=\"" + this._prefix + "min\">"; - for (var i = 0; i < 60; i += 15) { - result += "\r\n <option value=\"" + i + "\"" - + ((this._date.getMinutes() == i) ? " selected=\"1\">" : ">") - + String.leftPad(i, 2, '0') + "</option>"; - } - result += "\r\n </select>"; - // Add AM/PM - result += "\r\n <select name=\"" + this._prefix + "ampm\">"; - result += "\r\n <option value=\"0\"" - + (this._date.getHours() < 12 ? " selected=\"1\">" : ">") - + "AM</option>"; - result += "\r\n <option value=\"12\"" - + (this._date.getHours() >= 12 ? " selected=\"1\">" : ">") - + "PM</option>"; - result += "\r\n </select>"; - return result; -} - -// Creates the HTML for the actual calendar part of the chooser -DateChooser.prototype.createCalendarHtml = function() { - var result = "\r\n<table cellspacing=\"0\" class=\"dateChooser\">" - + "\r\n <tr><th>S</th><th>M</th><th>T</th>" - + "<th>W</th><th>T</th><th>F</th><th>S</th></tr>\r\n <tr>"; - // Fill up the days of the week until we get to the first day of the month - var firstDay = this._date.getFirstDayOfMonth(); - var lastDay = this._date.getLastDayOfMonth(); - if (firstDay != 0) { - result += "<td colspan=\"" + firstDay + "\"> </td>"; - } - // Fill in the days of the month - var i = 0; - while (i < this._date.getDaysInMonth()) { - if (((i++ + firstDay) % 7) == 0) { - result += "</tr>\r\n <tr>"; - } - var thisDay = new Date( - this._date.getFullYear(), - this._date.getMonth(), i); - var js = '"dateChooserSetDate(\'' - + this._input.getAttribute('id') + "', '" - + thisDay.dateFormat(this._format) + '\');"' - result += "\r\n <td class=\"dateChooserActive" - // If the date is the currently chosen date, highlight it - + (i == this._date.getDate() ? " dateChooserActiveToday" : "") - + "\" onClick=" + js + ">" + i + "</td>"; - } - // Fill in any days after the end of the month - if (lastDay != 6) { - result += "<td colspan=\"" + (6 - lastDay) + "\"> </td>"; - } - return result + "\r\n </tr>\r\n</table><!--[if lte IE 6.5]><iframe></iframe><![endif]-->"; -} diff --git a/js/script.js b/js/script.js index 55d16d1..e7c29e0 100644 --- a/js/script.js +++ b/js/script.js @@ -1,31 +1,17 @@ -function showHideMenu() { - var setupdiv = document.getElementById("setupdiv"); - showhidebutton = document.getElementById("showhidebutton"); - showhidebuttonimage = document.getElementById("showhidebuttonimage"); - - if (setupdiv.style.visibility == "hidden") { - setupdiv.style.visibility = ""; - showhidebutton.title = "Hide menu"; - showhidebuttonimage.src = "images/application_form_delete.png"; - } else { - setupdiv.style.visibility = "hidden"; - showhidebutton.title = "Show menu"; - showhidebuttonimage.src = "images/application_form.png"; - } -} - function addUser(username) { + var colorlist = document.getElementById('usernames'); + // The user was already in the list - if (document.setup.highlight_names.value.indexOf(username) >= 0) { + if (document.mainform.highlight_names.value.indexOf(username) >= 0) { // Remove the username from the list - var myvalue = document.setup.highlight_names.value; + var myvalue = document.mainform.highlight_names.value; myvalue = myvalue.replace(username, ""); myvalue = myvalue.replace(/;;/g,";"); myvalue = myvalue.replace(/^;/, ""); myvalue = myvalue.replace(/;$/, ""); - document.setup.highlight_names.value = myvalue; + document.mainform.highlight_names.value = myvalue; // Unmark the lines of the user for (var k = 0; k < document.styleSheets.length; k++) { @@ -38,17 +24,15 @@ function addUser(username) { } // Now drop the username from the colorlist - var colorlist = document.getElementById('usernames'); - var colorlistelement = document.getElementById('user_' + username); - colorlist.removeChild(colorlistelement); + colorlist.removeChild(document.getElementById('user_' + username)); } else { // Add the username to the list - if (document.setup.highlight_names.value != '') { - document.setup.highlight_names.value += ';'; + if (document.mainform.highlight_names.value !== '') { + document.mainform.highlight_names.value += ';'; } - document.setup.highlight_names.value += username; + document.mainform.highlight_names.value += username; // Mark all the lines of the newly selected user var color = CryptoJS.SHA1(username).toString().substr(0, 6); @@ -58,65 +42,21 @@ function addUser(username) { } else if (styleSheet.insertRule) { styleSheet.insertRule('span.user_' + username + ' { color: #' + color + '; }', 0); } else { - document.getElementById("datepick").submit(); + document.mainform.submit(); } // Now add the username to the colorlist - var colorlist = document.getElementById('usernames'); - var colorlistelement = document.createElement('span'); - colorlistelement.setAttribute('id', 'user_' + username); - colorlistelement.setAttribute('class', 'user_' + username); - colorlistelement.style.display = 'block'; - colorlistelement.innerHTML = '<a href="javascript:addUser(\'' + username + '\');" style="color: inherit;">' + username + '</a>'; - colorlist.appendChild(colorlistelement); + var listelement = document.createElement('li'); + listelement.setAttribute('id', 'user_' + username); + var spanelement = document.createElement('span'); + spanelement.setAttribute('class', 'checkbox user_' + username); + listelement.appendChild(spanelement); + spanelement.innerHTML = '<a href="javascript:addUser(\'' + username + '\');">' + username + '</a>'; + colorlist.appendChild(listelement); } - document.cookie = 'stored_users=' + escape(document.setup.highlight_names.value) + '; path=/'; -} - -// Stuff for drag and drop copied from http://aktuell.de.selfhtml.org/artikel/dhtml/draganddrop/ - -//Das Objekt, das gerade bewegt wird. -var dragobjekt = null; - -// Position, an der das Objekt angeklickt wurde. -var dragx = 0; -var dragy = 0; - -// Mausposition -var posx = 0; -var posy = 0; - - -function draginit() { - // Initialisierung der berwachung der Events - - document.onmousemove = drag; - document.onmouseup = dragstop; -} - - -function dragstart(element) { - //Wird aufgerufen, wenn ein Objekt bewegt werden soll. - dragobjekt = element; - dragx = posx - dragobjekt.offsetLeft; - dragy = posy - dragobjekt.offsetTop; -} - - -function dragstop() { - //Wird aufgerufen, wenn ein Objekt nicht mehr bewegt werden soll. - dragobjekt=null; -} - - -function drag(ereignis) { - //Wird aufgerufen, wenn die Maus bewegt wird und bewegt bei Bedarf das Objekt. + var semicolons = (document.mainform.highlight_names.value.match(/;/g) || []).length; + document.getElementById('users_label').innerHTML = 'Users ' + (semicolons > 0 ? ' (' + (semicolons + 1) + ')' : ''); - posx = document.all ? window.event.clientX : ereignis.pageX; - posy = document.all ? window.event.clientY : ereignis.pageY; - if(dragobjekt != null) { - dragobjekt.style.left = (posx - dragx) + "px"; - dragobjekt.style.top = (posy - dragy) + "px"; - } + document.cookie = 'stored_users=' + escape(document.mainform.highlight_names.value) + '; path=/'; } diff --git a/overview.php b/overview.php index e1a95c1..c844601 100644 --- a/overview.php +++ b/overview.php @@ -15,16 +15,6 @@ function finish_month() { } } -echo ' <h1>'.$title.'</h1> - <hr/> - <form name="open_for" method="get" action=""> - <input name="channel" type="text" value="' . $channel . '" style="display: none; visibility: hidden;"/> - <label for="date">Enter date of the log to open:</label> - <input id="date" size="10" maxlength="10" name="date" value="'.date('Y-m-d').'" onkeyup="javascript:makeValid(\'date\')" onblur="javascript:makeValidFinal(this, \'date\', \'date_chooser\', 1950, 2049, Date.patterns.ISO8601ShortPattern, false)" type="text"/><img src="images/calendar.png" alt="Choose date" onclick="showChooser(this, \'date\', \'date_chooser\', 1950, 2049, Date.patterns.ISO8601ShortPattern, false);"/><div id="date_chooser" class="dateChooser select-free" style="display: none; visibility: hidden; width: 160px;"></div> - <input value="OK" type="submit"/> - </form> - <hr/>'.PHP_EOL; - if ($handle = opendir(LOG_DIR)) { // Get the files sorted by name $files = array(); @@ -38,17 +28,15 @@ if ($handle = opendir(LOG_DIR)) { $last_month = ''; $month_counter = 0; // Border for all month blocks, floating so it will put them right - echo ' <div style="float: right; width: 100%;">'.PHP_EOL; foreach ($files as $file) { $month = get_month($file); if ($last_month != $month) { finish_month(); $last_month = $month; - echo ' <div style="border: 1px solid gray; margin: 10px; padding: 20px; float: left;">'.$month.'<hr/>'.PHP_EOL; + echo ' <div class="col-lg-1 col-md-2 col-sm-3 col-xs-6"><h2 class="subheader">'.$month.'</h2>'.PHP_EOL; } echo ' <a href="?channel='.$channel.'&date='.get_date($file).'">'.get_date($file).'</a> <a href="'.LOG_DIR.'/'.$file.'">(raw)</a><br/>'.PHP_EOL; $month_counter++; } finish_month(); - echo ' </div>'.PHP_EOL; } |