diff --git a/src/assets/bootstrap-colorpicker/LICENSE b/src/assets/bootstrap-colorpicker/LICENSE
new file mode 100644
index 00000000..a37331e7
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2012 Stefan Petre
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/src/assets/bootstrap-colorpicker/README.md b/src/assets/bootstrap-colorpicker/README.md
new file mode 100644
index 00000000..57a85d55
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/README.md
@@ -0,0 +1,19 @@
+# Bootstrap Colorpicker 2.0
+
+[![Build Status](https://travis-ci.org/mjolnic/bootstrap-colorpicker.png)](https://travis-ci.org/mjolnic/bootstrap-colorpicker)
+
+Originally written by [Stefan Petre](http://www.eyecon.ro/)
+
+Read the documentation [here](http://mjolnic.github.io/bootstrap-colorpicker/)
+
+## Contributing
+
+* All the sources are compiled using Grunt, please do not modify dist files directly
+* If you modify some source code, please recompile the project dist files
+* Check that the index.html demos aren't broken (modify if necessary)
+* Test your code at least in Chrome, Firefox and IE >= 9
+
+Thanks =)
+
+[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/mjolnic/bootstrap-colorpicker/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
+
diff --git a/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.css b/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.css
new file mode 100644
index 00000000..28d2bca7
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.css
@@ -0,0 +1,214 @@
+/*!
+ * Bootstrap Colorpicker
+ * http://mjolnic.github.io/bootstrap-colorpicker/
+ *
+ * Originally written by (c) 2012 Stefan Petre
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ */
+
+.colorpicker-saturation {
+ float: left;
+ width: 100px;
+ height: 100px;
+ cursor: crosshair;
+ background-image: url("../img/bootstrap-colorpicker/saturation.png");
+}
+
+.colorpicker-saturation i {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 5px;
+ height: 5px;
+ margin: -4px 0 0 -4px;
+ border: 1px solid #000;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.colorpicker-saturation i b {
+ display: block;
+ width: 5px;
+ height: 5px;
+ border: 1px solid #fff;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.colorpicker-hue,
+.colorpicker-alpha {
+ float: left;
+ width: 15px;
+ height: 100px;
+ margin-bottom: 4px;
+ margin-left: 4px;
+ cursor: row-resize;
+}
+
+.colorpicker-hue i,
+.colorpicker-alpha i {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 100%;
+ height: 1px;
+ margin-top: -1px;
+ background: #000;
+ border-top: 1px solid #fff;
+}
+
+.colorpicker-hue {
+ background-image: url("../img/bootstrap-colorpicker/hue.png");
+}
+
+.colorpicker-alpha {
+ display: none;
+ background-image: url("../img/bootstrap-colorpicker/alpha.png");
+}
+
+.colorpicker {
+ top: 0;
+ left: 0;
+ z-index: 2500;
+ min-width: 130px;
+ padding: 4px;
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ *zoom: 1;
+}
+
+.colorpicker:before,
+.colorpicker:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+
+.colorpicker:after {
+ clear: both;
+}
+
+.colorpicker:before {
+ position: absolute;
+ top: -7px;
+ left: 6px;
+ display: inline-block;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.colorpicker:after {
+ position: absolute;
+ top: -6px;
+ left: 7px;
+ display: inline-block;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #ffffff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+.colorpicker div {
+ position: relative;
+}
+
+.colorpicker.colorpicker-with-alpha {
+ min-width: 140px;
+}
+
+.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
+ display: block;
+}
+
+.colorpicker-color {
+ height: 10px;
+ margin-top: 5px;
+ clear: both;
+ background-image: url("../img/bootstrap-colorpicker/alpha.png");
+ background-position: 0 100%;
+}
+
+.colorpicker-color div {
+ height: 10px;
+}
+
+.colorpicker-element .input-group-addon i {
+ display: block;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+}
+
+.colorpicker.colorpicker-inline {
+ position: relative;
+ display: inline-block;
+ float: none;
+}
+
+.colorpicker.colorpicker-horizontal {
+ width: 110px;
+ height: auto;
+ min-width: 110px;
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-saturation {
+ margin-bottom: 4px;
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-color {
+ width: 100px;
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-hue,
+.colorpicker.colorpicker-horizontal .colorpicker-alpha {
+ float: left;
+ width: 100px;
+ height: 15px;
+ margin-bottom: 4px;
+ margin-left: 0;
+ cursor: col-resize;
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-hue i,
+.colorpicker.colorpicker-horizontal .colorpicker-alpha i {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 1px;
+ height: 15px;
+ margin-top: 0;
+ background: #ffffff;
+ border: none;
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-hue {
+ background-image: url("../img/bootstrap-colorpicker/hue-horizontal.png");
+}
+
+.colorpicker.colorpicker-horizontal .colorpicker-alpha {
+ background-image: url("../img/bootstrap-colorpicker/alpha-horizontal.png");
+}
+
+.colorpicker.colorpicker-hidden {
+ display: none;
+}
+
+.colorpicker.colorpicker-visible {
+ display: block;
+}
+
+.colorpicker-inline.colorpicker-visible {
+ display: inline-block;
+}
\ No newline at end of file
diff --git a/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css b/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css
new file mode 100644
index 00000000..d48417fa
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap Colorpicker
+ * http://mjolnic.github.io/bootstrap-colorpicker/
+ *
+ * Originally written by (c) 2012 Stefan Petre
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ */.colorpicker-saturation{float:left;width:100px;height:100px;cursor:crosshair;background-image:url("../img/bootstrap-colorpicker/saturation.png")}.colorpicker-saturation i{position:absolute;top:0;left:0;display:block;width:5px;height:5px;margin:-4px 0 0 -4px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-saturation i b{display:block;width:5px;height:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-hue,.colorpicker-alpha{float:left;width:15px;height:100px;margin-bottom:4px;margin-left:4px;cursor:row-resize}.colorpicker-hue i,.colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:100%;height:1px;margin-top:-1px;background:#000;border-top:1px solid #fff}.colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue.png")}.colorpicker-alpha{display:none;background-image:url("../img/bootstrap-colorpicker/alpha.png")}.colorpicker{top:0;left:0;z-index:2500;min-width:130px;padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1}.colorpicker:before,.colorpicker:after{display:table;line-height:0;content:""}.colorpicker:after{clear:both}.colorpicker:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.colorpicker:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url("../img/bootstrap-colorpicker/alpha.png");background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-element .input-group-addon i{display:block;width:16px;height:16px;cursor:pointer}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none}.colorpicker.colorpicker-horizontal{width:110px;height:auto;min-width:110px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-hue,.colorpicker.colorpicker-horizontal .colorpicker-alpha{float:left;width:100px;height:15px;margin-bottom:4px;margin-left:0;cursor:col-resize}.colorpicker.colorpicker-horizontal .colorpicker-hue i,.colorpicker.colorpicker-horizontal .colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:1px;height:15px;margin-top:0;background:#fff;border:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue-horizontal.png")}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url("../img/bootstrap-colorpicker/alpha-horizontal.png")}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block}
\ No newline at end of file
diff --git a/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png
new file mode 100644
index 00000000..d0a65c08
Binary files /dev/null and b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png differ
diff --git a/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png
new file mode 100644
index 00000000..38043f1c
Binary files /dev/null and b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png differ
diff --git a/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png
new file mode 100644
index 00000000..a0d9add8
Binary files /dev/null and b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png differ
diff --git a/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png
new file mode 100644
index 00000000..d89560e9
Binary files /dev/null and b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png differ
diff --git a/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png
new file mode 100644
index 00000000..594ae50e
Binary files /dev/null and b/src/assets/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png differ
diff --git a/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js b/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js
new file mode 100644
index 00000000..15f9b9ec
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js
@@ -0,0 +1,951 @@
+/*!
+ * Bootstrap Colorpicker
+ * http://mjolnic.github.io/bootstrap-colorpicker/
+ *
+ * Originally written by (c) 2012 Stefan Petre
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ * @todo Update DOCS
+ */
+(function($) {
+ 'use strict';
+
+ // Color object
+ var Color = function(val) {
+ this.value = {
+ h: 0,
+ s: 0,
+ b: 0,
+ a: 1
+ };
+ this.origFormat = null; // original string format
+ if (val) {
+ if (val.toLowerCase !== undefined) {
+ this.setColor(val);
+ } else if (val.h !== undefined) {
+ this.value = val;
+ }
+ }
+ };
+
+ Color.prototype = {
+ constructor: Color,
+ _sanitizeNumber: function(val) {
+ if (typeof val === 'number') {
+ return val;
+ }
+ if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {
+ return 1;
+ }
+ if (val.toLowerCase !== undefined) {
+ return parseFloat(val);
+ }
+ return 1;
+ },
+ //parse a string to HSB
+ setColor: function(strVal) {
+ strVal = strVal.toLowerCase();
+ this.value = this.stringToHSB(strVal) || {
+ h: 0,
+ s: 0,
+ b: 0,
+ a: 1
+ };
+ },
+ stringToHSB: function(strVal) {
+ strVal = strVal.toLowerCase();
+ var that = this,
+ result = false;
+ $.each(this.stringParsers, function(i, parser) {
+ var match = parser.re.exec(strVal),
+ values = match && parser.parse.apply(that, [match]),
+ format = parser.format || 'rgba';
+ if (values) {
+ if (format.match(/hsla?/)) {
+ result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));
+ } else {
+ result = that.RGBtoHSB.apply(that, values);
+ }
+ that.origFormat = format;
+ return false;
+ }
+ return true;
+ });
+ return result;
+ },
+ setHue: function(h) {
+ this.value.h = 1 - h;
+ },
+ setSaturation: function(s) {
+ this.value.s = s;
+ },
+ setBrightness: function(b) {
+ this.value.b = 1 - b;
+ },
+ setAlpha: function(a) {
+ this.value.a = parseInt((1 - a) * 100, 10) / 100;
+ },
+ toRGB: function(h, s, v, a) {
+ h = h || this.value.h;
+ s = s || this.value.s;
+ v = v || this.value.b;
+ a = a || this.value.a;
+
+ var r, g, b, i, f, p, q, t;
+ if (h && s === undefined && v === undefined) {
+ s = h.s, v = h.v, h = h.h;
+ }
+ i = Math.floor(h * 6);
+ f = h * 6 - i;
+ p = v * (1 - s);
+ q = v * (1 - f * s);
+ t = v * (1 - (1 - f) * s);
+ switch (i % 6) {
+ case 0:
+ r = v, g = t, b = p;
+ break;
+ case 1:
+ r = q, g = v, b = p;
+ break;
+ case 2:
+ r = p, g = v, b = t;
+ break;
+ case 3:
+ r = p, g = q, b = v;
+ break;
+ case 4:
+ r = t, g = p, b = v;
+ break;
+ case 5:
+ r = v, g = p, b = q;
+ break;
+ }
+ return {
+ r: Math.floor(r * 255),
+ g: Math.floor(g * 255),
+ b: Math.floor(b * 255),
+ a: a
+ };
+ },
+ toHex: function(h, s, b, a) {
+ var rgb = this.toRGB(h, s, b, a);
+ return '#' + ((1 << 24) | (parseInt(rgb.r) << 16) | (parseInt(rgb.g) << 8) | parseInt(rgb.b)).toString(16).substr(1);
+ },
+ toHSL: function(h, s, b, a) {
+ h = h || this.value.h;
+ s = s || this.value.s;
+ b = b || this.value.b;
+ a = a || this.value.a;
+
+ var H = h,
+ L = (2 - s) * b,
+ S = s * b;
+ if (L > 0 && L <= 1) {
+ S /= L;
+ } else {
+ S /= 2 - L;
+ }
+ L /= 2;
+ if (S > 1) {
+ S = 1;
+ }
+ return {
+ h: isNaN(H) ? 0 : H,
+ s: isNaN(S) ? 0 : S,
+ l: isNaN(L) ? 0 : L,
+ a: isNaN(a) ? 0 : a,
+ };
+ },
+ RGBtoHSB: function(r, g, b, a) {
+ r /= 255;
+ g /= 255;
+ b /= 255;
+
+ var H, S, V, C;
+ V = Math.max(r, g, b);
+ C = V - Math.min(r, g, b);
+ H = (C === 0 ? null :
+ V === r ? (g - b) / C :
+ V === g ? (b - r) / C + 2 :
+ (r - g) / C + 4
+ );
+ H = ((H + 360) % 6) * 60 / 360;
+ S = C === 0 ? 0 : C / V;
+ return {
+ h: this._sanitizeNumber(H),
+ s: S,
+ b: V,
+ a: this._sanitizeNumber(a)
+ };
+ },
+ HueToRGB: function(p, q, h) {
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
+ if ((h * 6) < 1) {
+ return p + (q - p) * h * 6;
+ } else if ((h * 2) < 1) {
+ return q;
+ } else if ((h * 3) < 2) {
+ return p + (q - p) * ((2 / 3) - h) * 6;
+ } else {
+ return p;
+ }
+ },
+ HSLtoRGB: function(h, s, l, a) {
+ if (s < 0) {
+ s = 0;
+ }
+ var q;
+ if (l <= 0.5) {
+ q = l * (1 + s);
+ } else {
+ q = l + s - (l * s);
+ }
+
+ var p = 2 * l - q;
+
+ var tr = h + (1 / 3);
+ var tg = h;
+ var tb = h - (1 / 3);
+
+ var r = Math.round(this.HueToRGB(p, q, tr) * 255);
+ var g = Math.round(this.HueToRGB(p, q, tg) * 255);
+ var b = Math.round(this.HueToRGB(p, q, tb) * 255);
+ return [r, g, b, this._sanitizeNumber(a)];
+ },
+ toString: function(format) {
+ format = format || 'rgba';
+ switch (format) {
+ case 'rgb':
+ {
+ var rgb = this.toRGB();
+ return 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';
+ }
+ break;
+ case 'rgba':
+ {
+ var rgb = this.toRGB();
+ return 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')';
+ }
+ break;
+ case 'hsl':
+ {
+ var hsl = this.toHSL();
+ return 'hsl(' + Math.round(hsl.h * 360) + ',' + Math.round(hsl.s * 100) + '%,' + Math.round(hsl.l * 100) + '%)';
+ }
+ break;
+ case 'hsla':
+ {
+ var hsl = this.toHSL();
+ return 'hsla(' + Math.round(hsl.h * 360) + ',' + Math.round(hsl.s * 100) + '%,' + Math.round(hsl.l * 100) + '%,' + hsl.a + ')';
+ }
+ break;
+ case 'hex':
+ {
+ return this.toHex();
+ }
+ break;
+ default:
+ {
+ return false;
+ }
+ break;
+ }
+ },
+ // a set of RE's that can match strings and generate color tuples.
+ // from John Resig color plugin
+ // https://github.com/jquery/jquery-color/
+ stringParsers: [{
+ re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
+ format: 'hex',
+ parse: function(execResult) {
+ return [
+ parseInt(execResult[1], 16),
+ parseInt(execResult[2], 16),
+ parseInt(execResult[3], 16),
+ 1
+ ];
+ }
+ }, {
+ re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
+ format: 'hex',
+ parse: function(execResult) {
+ return [
+ parseInt(execResult[1] + execResult[1], 16),
+ parseInt(execResult[2] + execResult[2], 16),
+ parseInt(execResult[3] + execResult[3], 16),
+ 1
+ ];
+ }
+ }, {
+ re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,
+ format: 'rgb',
+ parse: function(execResult) {
+ return [
+ execResult[1],
+ execResult[2],
+ execResult[3],
+ 1
+ ];
+ }
+ }, {
+ re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
+ format: 'rgb',
+ parse: function(execResult) {
+ return [
+ 2.55 * execResult[1],
+ 2.55 * execResult[2],
+ 2.55 * execResult[3],
+ 1
+ ];
+ }
+ }, {
+ re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ format: 'rgba',
+ parse: function(execResult) {
+ return [
+ execResult[1],
+ execResult[2],
+ execResult[3],
+ execResult[4]
+ ];
+ }
+ }, {
+ re: /rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ format: 'rgba',
+ parse: function(execResult) {
+ return [
+ 2.55 * execResult[1],
+ 2.55 * execResult[2],
+ 2.55 * execResult[3],
+ execResult[4]
+ ];
+ }
+ }, {
+ re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
+ format: 'hsl',
+ parse: function(execResult) {
+ return [
+ execResult[1] / 360,
+ execResult[2] / 100,
+ execResult[3] / 100,
+ execResult[4]
+ ];
+ }
+ }, {
+ re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ format: 'hsla',
+ parse: function(execResult) {
+ return [
+ execResult[1] / 360,
+ execResult[2] / 100,
+ execResult[3] / 100,
+ execResult[4]
+ ];
+ }
+ }, {
+ //predefined color name
+ re: /^([a-z]{3,})$/,
+ format: 'alias',
+ parse: function(execResult) {
+ var hexval = this.colorNameToHex(execResult[0]) || '#000000';
+ var match = this.stringParsers[0].re.exec(hexval),
+ values = match && this.stringParsers[0].parse.apply(this, [match]);
+ return values;
+ }
+ }],
+ colorNameToHex: function(name) {
+ // 140 predefined colors from the HTML Colors spec
+ var colors = {
+ "aliceblue": "#f0f8ff",
+ "antiquewhite": "#faebd7",
+ "aqua": "#00ffff",
+ "aquamarine": "#7fffd4",
+ "azure": "#f0ffff",
+ "beige": "#f5f5dc",
+ "bisque": "#ffe4c4",
+ "black": "#000000",
+ "blanchedalmond": "#ffebcd",
+ "blue": "#0000ff",
+ "blueviolet": "#8a2be2",
+ "brown": "#a52a2a",
+ "burlywood": "#deb887",
+ "cadetblue": "#5f9ea0",
+ "chartreuse": "#7fff00",
+ "chocolate": "#d2691e",
+ "coral": "#ff7f50",
+ "cornflowerblue": "#6495ed",
+ "cornsilk": "#fff8dc",
+ "crimson": "#dc143c",
+ "cyan": "#00ffff",
+ "darkblue": "#00008b",
+ "darkcyan": "#008b8b",
+ "darkgoldenrod": "#b8860b",
+ "darkgray": "#a9a9a9",
+ "darkgreen": "#006400",
+ "darkkhaki": "#bdb76b",
+ "darkmagenta": "#8b008b",
+ "darkolivegreen": "#556b2f",
+ "darkorange": "#ff8c00",
+ "darkorchid": "#9932cc",
+ "darkred": "#8b0000",
+ "darksalmon": "#e9967a",
+ "darkseagreen": "#8fbc8f",
+ "darkslateblue": "#483d8b",
+ "darkslategray": "#2f4f4f",
+ "darkturquoise": "#00ced1",
+ "darkviolet": "#9400d3",
+ "deeppink": "#ff1493",
+ "deepskyblue": "#00bfff",
+ "dimgray": "#696969",
+ "dodgerblue": "#1e90ff",
+ "firebrick": "#b22222",
+ "floralwhite": "#fffaf0",
+ "forestgreen": "#228b22",
+ "fuchsia": "#ff00ff",
+ "gainsboro": "#dcdcdc",
+ "ghostwhite": "#f8f8ff",
+ "gold": "#ffd700",
+ "goldenrod": "#daa520",
+ "gray": "#808080",
+ "green": "#008000",
+ "greenyellow": "#adff2f",
+ "honeydew": "#f0fff0",
+ "hotpink": "#ff69b4",
+ "indianred ": "#cd5c5c",
+ "indigo ": "#4b0082",
+ "ivory": "#fffff0",
+ "khaki": "#f0e68c",
+ "lavender": "#e6e6fa",
+ "lavenderblush": "#fff0f5",
+ "lawngreen": "#7cfc00",
+ "lemonchiffon": "#fffacd",
+ "lightblue": "#add8e6",
+ "lightcoral": "#f08080",
+ "lightcyan": "#e0ffff",
+ "lightgoldenrodyellow": "#fafad2",
+ "lightgrey": "#d3d3d3",
+ "lightgreen": "#90ee90",
+ "lightpink": "#ffb6c1",
+ "lightsalmon": "#ffa07a",
+ "lightseagreen": "#20b2aa",
+ "lightskyblue": "#87cefa",
+ "lightslategray": "#778899",
+ "lightsteelblue": "#b0c4de",
+ "lightyellow": "#ffffe0",
+ "lime": "#00ff00",
+ "limegreen": "#32cd32",
+ "linen": "#faf0e6",
+ "magenta": "#ff00ff",
+ "maroon": "#800000",
+ "mediumaquamarine": "#66cdaa",
+ "mediumblue": "#0000cd",
+ "mediumorchid": "#ba55d3",
+ "mediumpurple": "#9370d8",
+ "mediumseagreen": "#3cb371",
+ "mediumslateblue": "#7b68ee",
+ "mediumspringgreen": "#00fa9a",
+ "mediumturquoise": "#48d1cc",
+ "mediumvioletred": "#c71585",
+ "midnightblue": "#191970",
+ "mintcream": "#f5fffa",
+ "mistyrose": "#ffe4e1",
+ "moccasin": "#ffe4b5",
+ "navajowhite": "#ffdead",
+ "navy": "#000080",
+ "oldlace": "#fdf5e6",
+ "olive": "#808000",
+ "olivedrab": "#6b8e23",
+ "orange": "#ffa500",
+ "orangered": "#ff4500",
+ "orchid": "#da70d6",
+ "palegoldenrod": "#eee8aa",
+ "palegreen": "#98fb98",
+ "paleturquoise": "#afeeee",
+ "palevioletred": "#d87093",
+ "papayawhip": "#ffefd5",
+ "peachpuff": "#ffdab9",
+ "peru": "#cd853f",
+ "pink": "#ffc0cb",
+ "plum": "#dda0dd",
+ "powderblue": "#b0e0e6",
+ "purple": "#800080",
+ "red": "#ff0000",
+ "rosybrown": "#bc8f8f",
+ "royalblue": "#4169e1",
+ "saddlebrown": "#8b4513",
+ "salmon": "#fa8072",
+ "sandybrown": "#f4a460",
+ "seagreen": "#2e8b57",
+ "seashell": "#fff5ee",
+ "sienna": "#a0522d",
+ "silver": "#c0c0c0",
+ "skyblue": "#87ceeb",
+ "slateblue": "#6a5acd",
+ "slategray": "#708090",
+ "snow": "#fffafa",
+ "springgreen": "#00ff7f",
+ "steelblue": "#4682b4",
+ "tan": "#d2b48c",
+ "teal": "#008080",
+ "thistle": "#d8bfd8",
+ "tomato": "#ff6347",
+ "turquoise": "#40e0d0",
+ "violet": "#ee82ee",
+ "wheat": "#f5deb3",
+ "white": "#ffffff",
+ "whitesmoke": "#f5f5f5",
+ "yellow": "#ffff00",
+ "yellowgreen": "#9acd32"
+ };
+
+ if (typeof colors[name.toLowerCase()] !== 'undefined') {
+ return colors[name.toLowerCase()];
+ }
+ return false;
+ }
+ };
+
+
+ var defaults = {
+ horizontal: false, // horizontal mode layout ?
+ inline: false, //forces to show the colorpicker as an inline element
+ color: false, //forces a color
+ format: false, //forces a format
+ input: 'input', // children input selector
+ container: false, // container selector
+ component: '.add-on, .input-group-addon', // children component selector
+ sliders: {
+ saturation: {
+ maxLeft: 100,
+ maxTop: 100,
+ callLeft: 'setSaturation',
+ callTop: 'setBrightness'
+ },
+ hue: {
+ maxLeft: 0,
+ maxTop: 100,
+ callLeft: false,
+ callTop: 'setHue'
+ },
+ alpha: {
+ maxLeft: 0,
+ maxTop: 100,
+ callLeft: false,
+ callTop: 'setAlpha'
+ }
+ },
+ slidersHorz: {
+ saturation: {
+ maxLeft: 100,
+ maxTop: 100,
+ callLeft: 'setSaturation',
+ callTop: 'setBrightness'
+ },
+ hue: {
+ maxLeft: 100,
+ maxTop: 0,
+ callLeft: 'setHue',
+ callTop: false
+ },
+ alpha: {
+ maxLeft: 100,
+ maxTop: 0,
+ callLeft: 'setAlpha',
+ callTop: false
+ }
+ },
+ template: '
'
+ };
+
+ var Colorpicker = function(element, options) {
+ this.element = $(element).addClass('colorpicker-element');
+ this.options = $.extend({}, defaults, this.element.data(), options);
+ this.component = this.options.component;
+ this.component = (this.component !== false) ? this.element.find(this.component) : false;
+ if (this.component && (this.component.length === 0)) {
+ this.component = false;
+ }
+ this.container = (this.options.container === true) ? this.element : this.options.container;
+ this.container = (this.container !== false) ? $(this.container) : false;
+
+ // Is the element an input? Should we search inside for any input?
+ this.input = this.element.is('input') ? this.element : (this.options.input ?
+ this.element.find(this.options.input) : false);
+ if (this.input && (this.input.length === 0)) {
+ this.input = false;
+ }
+ // Set HSB color
+ this.color = new Color(this.options.color !== false ? this.options.color : this.getValue());
+ this.format = this.options.format !== false ? this.options.format : this.color.origFormat;
+
+ // Setup picker
+ this.picker = $(this.options.template);
+ if (this.options.inline) {
+ this.picker.addClass('colorpicker-inline colorpicker-visible');
+ } else {
+ this.picker.addClass('colorpicker-hidden');
+ }
+ if (this.options.horizontal) {
+ this.picker.addClass('colorpicker-horizontal');
+ }
+ if (this.format === 'rgba' || this.format === 'hsla') {
+ this.picker.addClass('colorpicker-with-alpha');
+ }
+ this.picker.on('mousedown.colorpicker', $.proxy(this.mousedown, this));
+ this.picker.appendTo(this.container ? this.container : $('body'));
+
+ // Bind events
+ if (this.input !== false) {
+ this.input.on({
+ 'keyup.colorpicker': $.proxy(this.keyup, this)
+ });
+ if (this.component === false) {
+ this.element.on({
+ 'focus.colorpicker': $.proxy(this.show, this)
+ });
+ }
+ if (this.options.inline === false) {
+ this.element.on({
+ 'focusout.colorpicker': $.proxy(this.hide, this)
+ });
+ }
+ }
+
+ if (this.component !== false) {
+ this.component.on({
+ 'click.colorpicker': $.proxy(this.show, this)
+ });
+ }
+
+ if ((this.input === false) && (this.component === false)) {
+ this.element.on({
+ 'click.colorpicker': $.proxy(this.show, this)
+ });
+ }
+ this.update();
+
+ $($.proxy(function() {
+ this.element.trigger('create');
+ }, this));
+ };
+
+ Colorpicker.version = '2.0.0-beta';
+
+ Colorpicker.Color = Color;
+
+ Colorpicker.prototype = {
+ constructor: Colorpicker,
+ destroy: function() {
+ this.picker.remove();
+ this.element.removeData('colorpicker').off('.colorpicker');
+ if (this.input !== false) {
+ this.input.off('.colorpicker');
+ }
+ if (this.component !== false) {
+ this.component.off('.colorpicker');
+ }
+ this.element.removeClass('colorpicker-element');
+ this.element.trigger({
+ type: 'destroy'
+ });
+ },
+ reposition: function() {
+ if (this.options.inline !== false) {
+ return false;
+ }
+ var offset = this.component ? this.component.offset() : this.element.offset();
+ this.picker.css({
+ top: offset.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()),
+ left: offset.left
+ });
+ },
+ show: function(e) {
+ if (this.isDisabled()) {
+ return false;
+ }
+ this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');
+ this.reposition();
+ $(window).on('resize.colorpicker', $.proxy(this.reposition, this));
+ if (!this.hasInput() && e) {
+ if (e.stopPropagation && e.preventDefault) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
+ }
+ if (this.options.inline === false) {
+ $(window.document).on({
+ 'mousedown.colorpicker': $.proxy(this.hide, this)
+ });
+ }
+ this.element.trigger({
+ type: 'showPicker',
+ color: this.color
+ });
+ },
+ hide: function() {
+ this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');
+ $(window).off('resize.colorpicker', this.reposition);
+ $(document).off({
+ 'mousedown.colorpicker': this.hide
+ });
+ this.update();
+ this.element.trigger({
+ type: 'hidePicker',
+ color: this.color
+ });
+ },
+ updateData: function(val) {
+ val = val || this.color.toString(this.format);
+ this.element.data('color', val);
+ return val;
+ },
+ updateInput: function(val) {
+ val = val || this.color.toString(this.format);
+ if (this.input !== false) {
+ this.input.prop('value', val);
+ }
+ return val;
+ },
+ updatePicker: function(val) {
+ if (val !== undefined) {
+ this.color = new Color(val);
+ }
+ var sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;
+ var icns = this.picker.find('i');
+ if (icns.length === 0) {
+ return;
+ }
+ if (this.options.horizontal === false) {
+ sl = this.options.sliders;
+ icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()
+ .eq(2).css('top', sl.alpha.maxTop * (1 - this.color.value.a));
+ } else {
+ sl = this.options.slidersHorz;
+ icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()
+ .eq(2).css('left', sl.alpha.maxLeft * (1 - this.color.value.a));
+ }
+ icns.eq(0).css({
+ 'top': sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,
+ 'left': this.color.value.s * sl.saturation.maxLeft
+ });
+ this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));
+ this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex());
+ this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format));
+ return val;
+ },
+ updateComponent: function(val) {
+ val = val || this.color.toString(this.format);
+ if (this.component !== false) {
+ var icn = this.component.find('i').eq(0);
+ if (icn.length > 0) {
+ icn.css({
+ 'backgroundColor': val
+ });
+ } else {
+ this.component.css({
+ 'backgroundColor': val
+ });
+ }
+ }
+ return val;
+ },
+ update: function(force) {
+ var val = this.updateComponent();
+ if ((this.getValue(false) !== false) || (force === true)) {
+ // Update input/data only if the current value is not blank
+ this.updateInput(val);
+ this.updateData(val);
+ }
+ this.updatePicker();
+ return val;
+
+ },
+ setValue: function(val) { // set color manually
+ this.color = new Color(val);
+ this.update();
+ this.element.trigger({
+ type: 'changeColor',
+ color: this.color,
+ value: val
+ });
+ },
+ getValue: function(defaultValue) {
+ defaultValue = (defaultValue === undefined) ? '#000000' : defaultValue;
+ var val;
+ if (this.hasInput()) {
+ val = this.input.val();
+ } else {
+ val = this.element.data('color');
+ }
+ if ((val === undefined) || (val === '') || (val === null)) {
+ // if not defined or empty, return default
+ val = defaultValue;
+ }
+ return val;
+ },
+ hasInput: function() {
+ return (this.input !== false);
+ },
+ isDisabled: function() {
+ if (this.hasInput()) {
+ return (this.input.prop('disabled') === true);
+ }
+ return false;
+ },
+ disable: function() {
+ if (this.hasInput()) {
+ this.input.prop('disabled', true);
+ return true;
+ }
+ return false;
+ },
+ enable: function() {
+ if (this.hasInput()) {
+ this.input.prop('disabled', false);
+ return true;
+ }
+ return false;
+ },
+ currentSlider: null,
+ mousePointer: {
+ left: 0,
+ top: 0
+ },
+ mousedown: function(e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ var target = $(e.target);
+
+ //detect the slider and set the limits and callbacks
+ var zone = target.closest('div');
+ var sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;
+ if (!zone.is('.colorpicker')) {
+ if (zone.is('.colorpicker-saturation')) {
+ this.currentSlider = $.extend({}, sl.saturation);
+ } else if (zone.is('.colorpicker-hue')) {
+ this.currentSlider = $.extend({}, sl.hue);
+ } else if (zone.is('.colorpicker-alpha')) {
+ this.currentSlider = $.extend({}, sl.alpha);
+ } else {
+ return false;
+ }
+ var offset = zone.offset();
+ //reference to guide's style
+ this.currentSlider.guide = zone.find('i')[0].style;
+ this.currentSlider.left = e.pageX - offset.left;
+ this.currentSlider.top = e.pageY - offset.top;
+ this.mousePointer = {
+ left: e.pageX,
+ top: e.pageY
+ };
+ //trigger mousemove to move the guide to the current position
+ $(document).on({
+ 'mousemove.colorpicker': $.proxy(this.mousemove, this),
+ 'mouseup.colorpicker': $.proxy(this.mouseup, this)
+ }).trigger('mousemove');
+ }
+ return false;
+ },
+ mousemove: function(e) {
+ e.stopPropagation();
+ e.preventDefault();
+ var left = Math.max(
+ 0,
+ Math.min(
+ this.currentSlider.maxLeft,
+ this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)
+ )
+ );
+ var top = Math.max(
+ 0,
+ Math.min(
+ this.currentSlider.maxTop,
+ this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)
+ )
+ );
+ this.currentSlider.guide.left = left + 'px';
+ this.currentSlider.guide.top = top + 'px';
+ if (this.currentSlider.callLeft) {
+ this.color[this.currentSlider.callLeft].call(this.color, left / 100);
+ }
+ if (this.currentSlider.callTop) {
+ this.color[this.currentSlider.callTop].call(this.color, top / 100);
+ }
+ this.update(true);
+
+ this.element.trigger({
+ type: 'changeColor',
+ color: this.color
+ });
+ return false;
+ },
+ mouseup: function(e) {
+ e.stopPropagation();
+ e.preventDefault();
+ $(document).off({
+ 'mousemove.colorpicker': this.mousemove,
+ 'mouseup.colorpicker': this.mouseup
+ });
+ return false;
+ },
+ keyup: function(e) {
+ if ((e.keyCode === 38)) {
+ if (this.color.value.a < 1) {
+ this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;
+ }
+ this.update(true);
+ } else if ((e.keyCode === 40)) {
+ if (this.color.value.a > 0) {
+ this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;
+ }
+ this.update(true);
+ } else {
+ var val = this.input.val();
+ this.color = new Color(val);
+ if (this.getValue(false) !== false) {
+ this.updateData();
+ this.updateComponent();
+ this.updatePicker();
+ }
+ }
+ this.element.trigger({
+ type: 'changeColor',
+ color: this.color,
+ value: val
+ });
+ }
+ };
+
+ $.colorpicker = Colorpicker;
+
+ $.fn.colorpicker = function(option) {
+ var pickerArgs = arguments;
+
+ return this.each(function() {
+ var $this = $(this),
+ inst = $this.data('colorpicker'),
+ options = ((typeof option === 'object') ? option : {});
+ if ((!inst) && (typeof option !== 'string')) {
+ $this.data('colorpicker', new Colorpicker(this, options));
+ } else {
+ if (typeof option === 'string') {
+ inst[option].apply(inst, Array.prototype.slice.call(pickerArgs, 1));
+ }
+ }
+ });
+ };
+
+ $.fn.colorpicker.constructor = Colorpicker;
+
+})(window.jQuery);
diff --git a/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js b/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js
new file mode 100644
index 00000000..16802aee
--- /dev/null
+++ b/src/assets/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js
@@ -0,0 +1 @@
+!function(a){"use strict";var b=function(a){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,a&&(void 0!==a.toLowerCase?this.setColor(a):void 0!==a.h&&(this.value=a))};b.prototype={constructor:b,_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:void 0!==a.toLowerCase?parseFloat(a):1},setColor:function(a){a=a.toLowerCase(),this.value=this.stringToHSB(a)||{h:0,s:0,b:0,a:1}},stringToHSB:function(b){b=b.toLowerCase();var c=this,d=!1;return a.each(this.stringParsers,function(a,e){var f=e.re.exec(b),g=f&&e.parse.apply(c,[f]),h=e.format||"rgba";return g?(d=h.match(/hsla?/)?c.RGBtoHSB.apply(c,c.HSLtoRGB.apply(c,g)):c.RGBtoHSB.apply(c,g),c.origFormat=h,!1):!0}),d},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=parseInt(100*(1-a),10)/100},toRGB:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e,f,g,h,i,j,k,l;switch(a&&void 0===b&&void 0===c&&(b=a.s,c=a.v,a=a.h),h=Math.floor(6*a),i=6*a-h,j=c*(1-b),k=c*(1-i*b),l=c*(1-(1-i)*b),h%6){case 0:e=c,f=l,g=j;break;case 1:e=k,f=c,g=j;break;case 2:e=j,f=c,g=l;break;case 3:e=j,f=k,g=c;break;case 4:e=l,f=j,g=c;break;case 5:e=c,f=j,g=k}return{r:Math.floor(255*e),g:Math.floor(255*f),b:Math.floor(255*g),a:d}},toHex:function(a,b,c,d){var e=this.toRGB(a,b,c,d);return"#"+(1<<24|parseInt(e.r)<<16|parseInt(e.g)<<8|parseInt(e.b)).toString(16).substr(1)},toHSL:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&1>=f?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return 0>c?c+=1:c>1&&(c-=1),1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:function(a,b,c,d){0>b&&(b=0);var e;e=.5>=c?c*(1+b):c+b-c*b;var f=2*c-e,g=a+1/3,h=a,i=a-1/3,j=Math.round(255*this.HueToRGB(f,e,g)),k=Math.round(255*this.HueToRGB(f,e,h)),l=Math.round(255*this.HueToRGB(f,e,i));return[j,k,l,this._sanitizeNumber(d)]},toString:function(a){switch(a=a||"rgba"){case"rgb":var b=this.toRGB();return"rgb("+b.r+","+b.g+","+b.b+")";case"rgba":var b=this.toRGB();return"rgba("+b.r+","+b.g+","+b.b+","+b.a+")";case"hsl":var c=this.toHSL();return"hsl("+Math.round(360*c.h)+","+Math.round(100*c.s)+"%,"+Math.round(100*c.l)+"%)";case"hsla":var c=this.toHSL();return"hsla("+Math.round(360*c.h)+","+Math.round(100*c.s)+"%,"+Math.round(100*c.l)+"%,"+c.a+")";case"hex":return this.toHex();default:return!1}},stringParsers:[{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),1]}},{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(a){return[a[1],a[2],a[3],1]}},{re:/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/^([a-z]{3,})$/,format:"alias",parse:function(a){var b=this.colorNameToHex(a[0])||"#000000",c=this.stringParsers[0].re.exec(b),d=c&&this.stringParsers[0].parse.apply(this,[c]);return d}}],colorNameToHex:function(a){var b={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!=typeof b[a.toLowerCase()]?b[a.toLowerCase()]:!1}};var c={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:''},d=function(d,e){this.element=a(d).addClass("colorpicker-element"),this.options=a.extend({},c,this.element.data(),e),this.component=this.options.component,this.component=this.component!==!1?this.element.find(this.component):!1,this.component&&0===this.component.length&&(this.component=!1),this.container=this.options.container===!0?this.element:this.options.container,this.container=this.container!==!1?a(this.container):!1,this.input=this.element.is("input")?this.element:this.options.input?this.element.find(this.options.input):!1,this.input&&0===this.input.length&&(this.input=!1),this.color=new b(this.options.color!==!1?this.options.color:this.getValue()),this.format=this.options.format!==!1?this.options.format:this.color.origFormat,this.picker=a(this.options.template),this.options.inline?this.picker.addClass("colorpicker-inline colorpicker-visible"):this.picker.addClass("colorpicker-hidden"),this.options.horizontal&&this.picker.addClass("colorpicker-horizontal"),("rgba"===this.format||"hsla"===this.format)&&this.picker.addClass("colorpicker-with-alpha"),this.picker.on("mousedown.colorpicker",a.proxy(this.mousedown,this)),this.picker.appendTo(this.container?this.container:a("body")),this.input!==!1&&(this.input.on({"keyup.colorpicker":a.proxy(this.keyup,this)}),this.component===!1&&this.element.on({"focus.colorpicker":a.proxy(this.show,this)}),this.options.inline===!1&&this.element.on({"focusout.colorpicker":a.proxy(this.hide,this)})),this.component!==!1&&this.component.on({"click.colorpicker":a.proxy(this.show,this)}),this.input===!1&&this.component===!1&&this.element.on({"click.colorpicker":a.proxy(this.show,this)}),this.update(),a(a.proxy(function(){this.element.trigger("create")},this))};d.version="2.0.0-beta",d.Color=b,d.prototype={constructor:d,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker").off(".colorpicker"),this.input!==!1&&this.input.off(".colorpicker"),this.component!==!1&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(this.options.inline!==!1)return!1;var a=this.component?this.component.offset():this.element.offset();this.picker.css({top:a.top+(this.component?this.component.outerHeight():this.element.outerHeight()),left:a.left})},show:function(b){return this.isDisabled()?!1:(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),a(window).on("resize.colorpicker",a.proxy(this.reposition,this)),!this.hasInput()&&b&&b.stopPropagation&&b.preventDefault&&(b.stopPropagation(),b.preventDefault()),this.options.inline===!1&&a(window.document).on({"mousedown.colorpicker":a.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}),void 0)},hide:function(){this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),a(window).off("resize.colorpicker",this.reposition),a(document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(a){return a=a||this.color.toString(this.format),this.element.data("color",a),a},updateInput:function(a){return a=a||this.color.toString(this.format),this.input!==!1&&this.input.prop("value",a),a},updatePicker:function(a){void 0!==a&&(this.color=new b(a));var c=this.options.horizontal===!1?this.options.sliders:this.options.slidersHorz,d=this.picker.find("i");return 0!==d.length?(this.options.horizontal===!1?(c=this.options.sliders,d.eq(1).css("top",c.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",c.alpha.maxTop*(1-this.color.value.a))):(c=this.options.slidersHorz,d.eq(1).css("left",c.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",c.alpha.maxLeft*(1-this.color.value.a))),d.eq(0).css({top:c.saturation.maxTop-this.color.value.b*c.saturation.maxTop,left:this.color.value.s*c.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex()),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(this.format)),a):void 0},updateComponent:function(a){if(a=a||this.color.toString(this.format),this.component!==!1){var b=this.component.find("i").eq(0);b.length>0?b.css({backgroundColor:a}):this.component.css({backgroundColor:a})}return a},update:function(a){var b=this.updateComponent();return(this.getValue(!1)!==!1||a===!0)&&(this.updateInput(b),this.updateData(b)),this.updatePicker(),b},setValue:function(a){this.color=new b(a),this.update(),this.element.trigger({type:"changeColor",color:this.color,value:a})},getValue:function(a){a=void 0===a?"#000000":a;var b;return b=this.hasInput()?this.input.val():this.element.data("color"),(void 0===b||""===b||null===b)&&(b=a),b},hasInput:function(){return this.input!==!1},isDisabled:function(){return this.hasInput()?this.input.prop("disabled")===!0:!1},disable:function(){return this.hasInput()?(this.input.prop("disabled",!0),!0):!1},enable:function(){return this.hasInput()?(this.input.prop("disabled",!1),!0):!1},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(b){b.stopPropagation(),b.preventDefault();var c=a(b.target),d=c.closest("div"),e=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!d.is(".colorpicker")){if(d.is(".colorpicker-saturation"))this.currentSlider=a.extend({},e.saturation);else if(d.is(".colorpicker-hue"))this.currentSlider=a.extend({},e.hue);else{if(!d.is(".colorpicker-alpha"))return!1;this.currentSlider=a.extend({},e.alpha)}var f=d.offset();this.currentSlider.guide=d.find("i")[0].style,this.currentSlider.left=b.pageX-f.left,this.currentSlider.top=b.pageY-f.top,this.mousePointer={left:b.pageX,top:b.pageY},a(document).on({"mousemove.colorpicker":a.proxy(this.mousemove,this),"mouseup.colorpicker":a.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(a){a.stopPropagation(),a.preventDefault();var b=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((a.pageX||this.mousePointer.left)-this.mousePointer.left))),c=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((a.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=b+"px",this.currentSlider.guide.top=c+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,b/100),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,c/100),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(b){return b.stopPropagation(),b.preventDefault(),a(document).off({"mousemove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup}),!1},keyup:function(a){if(38===a.keyCode)this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0);else if(40===a.keyCode)this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0);else{var c=this.input.val();this.color=new b(c),this.getValue(!1)!==!1&&(this.updateData(),this.updateComponent(),this.updatePicker())}this.element.trigger({type:"changeColor",color:this.color,value:c})}},a.colorpicker=d,a.fn.colorpicker=function(b){var c=arguments;return this.each(function(){var e=a(this),f=e.data("colorpicker"),g="object"==typeof b?b:{};f||"string"==typeof b?"string"==typeof b&&f[b].apply(f,Array.prototype.slice.call(c,1)):e.data("colorpicker",new d(this,g))})},a.fn.colorpicker.constructor=d}(window.jQuery);
\ No newline at end of file
diff --git a/src/assets/bootstrap-datepicker/README.md b/src/assets/bootstrap-datepicker/README.md
index 5eebd38d..8218e24a 100644
--- a/src/assets/bootstrap-datepicker/README.md
+++ b/src/assets/bootstrap-datepicker/README.md
@@ -1,532 +1,13 @@
-# [bootstrap-datepicker](http://eternicode.github.com/bootstrap-datepicker/) [![Build Status](https://travis-ci.org/eternicode/bootstrap-datepicker.png?branch=master)](https://travis-ci.org/eternicode/bootstrap-datepicker)
+# bootstrap-datepicker
This is a fork of Stefan Petre's [original code](http://www.eyecon.ro/bootstrap-datepicker/);
thanks go to him for getting this thing started!
-Please note that this fork is not used on Stefan's page at this time, nor is it maintained or
-contributed to by him (yet?)
+Please note that this fork is not used on Stefan's page, nor is it maintained or contributed to by him.
Versions are incremented according to [semver](http://semver.org/).
-[Online Demo](http://eternicode.github.com/bootstrap-datepicker/)
-
-# Requirements
-
-* [Bootstrap](http://twitter.github.com/bootstrap/) 2.0.4+
-* [jQuery](http://jquery.com/) 1.7.1+
-
-These are the specific versions bootstrap-datepicker is tested against (`js` files) and built against (`css` files). Use other versions at your own risk.
-
-# Example
-
-Attached to a field with the format specified via options:
-
-```html
-
-```
-```javascript
-$('.datepicker').datepicker({
- format: 'mm-dd-yyyy'
-});
-```
-
-Attached to a field with the format specified via data tag:
-
-```html
-
-```
-```javascript
-$('.datepicker').datepicker();
-```
-
-As component:
-
-```html
-
-
-
-```
-```javascript
-$('.datepicker').datepicker();
-```
-
-Attached to non-field element, using events to work with the date values.
-
-```html
-
- Oh snap!
-
-
-
-
-
- Start date
- Change
-
-
- End date
- Change
-
-
-
-
-
- 2012-02-20
- 2012-02-25
-
-
-
-```
-```javascript
-var startDate = new Date(2012,1,20);
-var endDate = new Date(2012,1,25);
-$('#date-start')
- .datepicker()
- .on('changeDate', function(ev){
- if (ev.date.valueOf() > endDate.valueOf()){
- $('#alert').show().find('strong').text('The start date must be before the end date.');
- } else {
- $('#alert').hide();
- startDate = new Date(ev.date);
- $('#date-start-display').text($('#date-start').data('date'));
- }
- $('#date-start').datepicker('hide');
- });
-$('#date-end')
- .datepicker()
- .on('changeDate', function(ev){
- if (ev.date.valueOf() < startDate.valueOf()){
- $('#alert').show().find('strong').text('The end date must be after the start date.');
- } else {
- $('#alert').hide();
- endDate = new Date(ev.date);
- $('#date-end-display').text($('#date-end').data('date'));
- }
- $('#date-end').datepicker('hide');
- });
-```
-
-As inline datepicker:
-
-```html
-
-```
-```javascript
-$('.datepicker').datepicker();
-```
-
-
-# Using bootstrap-datepicker.js
-
-Call the datepicker via javascript:
-
-```javascript
-$('.datepicker').datepicker()
-```
-
-## Dependencies
-
-Requires bootstrap's dropdown component (`dropdowns.less`) for some styles.
-
-A standalone .css file (including necessary dropdown styles) can be generated by running `build/build_standalone.less` through the `lessc` compiler:
-
-```bash
-$ lessc build/build_standalone.less datepicker.css
-```
-
-## Data API
-
-As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set `data-provide="datepicker"` on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion. For inline datepickers, this can alternatively be `data-provide="datepicker-inline"`; these will be immediately initialized on page load, and cannot be lazily loaded.
-
-You can disable datepicker's data-api in the same way as you would disable other bootstrap plugins:
-
-```javascript
-$(document).off('.datepicker.data-api');
-```
-
-## No Conflict
-
-```javascript
-var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
-$.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality
-```
-
-## Options
-
-All options that take a "Date" can handle a `Date` object; a String formatted according to the given `format`; or a timedelta relative to today, eg '-1d', '+6m +1y', etc, where valid units are 'd' (day), 'w' (week), 'm' (month), and 'y' (year).
-
-Most options can be provided via data-attributes. An option can be converted to a data-attribute by taking its name, replacing each uppercase letter with its lowercase equivalent preceded by a dash, and prepending "data-date-" to the result. For example, `startDate` would be `data-date-start-date`, `format` would be `data-date-format`, and `daysOfWeekDisabled` would be `data-date-days-of-week-disabled`.
-
-### format
-
-String. Default: 'mm/dd/yyyy'
-
-The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy.
-
-* d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
-* D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
-* m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07.
-* M, MM: Abbreviated and full month names, respectively. Eg, Jan, January
-* yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012.
-
-### weekStart
-
-Integer. Default: 0
-
-Day of the week start. 0 (Sunday) to 6 (Saturday)
-
-### calendarWeeks
-
-Boolean. Default: false
-
-Whether or not to show week numbers to the left of week rows.
-
-### startDate
-
-Date. Default: Beginning of time
-
-The earliest date that may be selected; all earlier dates will be disabled.
-
-### endDate
-
-Date. Default: End of time
-
-The latest date that may be selected; all later dates will be disabled.
-
-### daysOfWeekDisabled
-
-String, Array. Default: '', []
-
-Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: `'0,6'` or `[0,6]`.
-
-### autoclose
-
-Boolean. Default: false
-
-Whether or not to close the datepicker immediately when a date is selected.
-
-### startView
-
-Number, String. Default: 0, 'month'
-
-The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers.
-
-### minViewMode
-
-Number, String. Default: 0, 'days'
-
-Set a limit for the view mode. Accepts: 'days' or 0, 'months' or 1, and 'years' or 2.
-Gives the ability to pick only a month or an year. The day is set to the 1st for 'months', and the month is set to January for 'years'.
-
-### todayBtn
-
-Boolean, "linked". Default: false
-
-If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected.
-
-### todayHighlight
-
-Boolean. Default: false
-
-If true, highlights the current date.
-
-### clearBtn
-
-Boolean. Default: false
-
-If true, displays a "Clear" button at the bottom of the datepicker to clear the input value. If "autoclose" is also set to true, this button will also close the datepicker.
-
-### keyboardNavigation
-
-Boolean. Default: true
-
-Whether or not to allow date navigation by arrow keys.
-
-### language
-
-String. Default: 'en'
-
-The IETF code (eg "en" for English, "pt-BR" for Brazilian Portuguese) of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). If a full code (eg "de-DE") is supplied the picker will first check for an "de-DE" language and if not found will fallback and check for a "de" language. If an unknown language code is given, English will be used. See I18N below.
-
-### forceParse
-
-Boolean. Default: true
-
-Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given `format`.
-
-### inputs
-
-Array. Default: None
-
-A list of inputs to be used in a range picker, which will be attached to the selected element. Allows for explicitly creating a range picker on a non-standard element.
-
-### beforeShowDay
-
-Function(Date). Default: $.noop
-
-A function that takes a date as a parameter and returns one of the following values:
-
- * undefined to have no effect
- * A Boolean, indicating whether or not this date is selectable
- * A String representing additional CSS classes to apply to the date's cell
- * An object with the following properties:
- * `enabled`: same as the Boolean value above
- * `classes`: same as the String value above
- * `tooltip`: a tooltip to apply to this date, via the `title` HTML attribute
-
-### orientation
-
-String. Default: "auto"
-
-A space-separated string consisting of one or two of "left" or "right", "top" or "bottom", and "auto" (may be omitted); for example, "top left", "bottom" (horizontal orientation will default to "auto"), "right" (vertical orientation will default to "auto"), "auto top". Allows for fixed placement of the picker popup.
-
-"orientation" refers to the location of the picker popup's "anchor"; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker.
-
-"auto" triggers "smart orientation" of the picker. Horizontal orientation will default to "left" and left offset will be tweaked to keep the picker inside the browser viewport; vertical orientation will simply choose "top" or "bottom", whichever will show more of the picker in the viewport.
-
-## Markup
-
-Format a component.
-
-```html
-
-
-
-```
-
-Create a date-range picker:
-
-```html
-
-
- to
-
-
-```
-
-## Methods
-
-### .datepicker(options)
-
-Initializes an datepicker.
-
-### remove
-
-Arguments: None
-
-Remove the datepicker. Removes attached events, internal attached objects, and
-added HTML elements.
-
-```javascript
-$('.datepicker').datepicker('remove');
-```
-
-### show
-
-Arguments: None
-
-Show the datepicker.
-
-```javascript
-$('.datepicker').datepicker('show');
-```
-
-### hide
-
-Arguments: None
-
-Hide the datepicker.
-
-```javascript
-$('.datepicker').datepicker('hide');
-```
-
-### update
-
-Arguments:
-
-* date (String|Date)
-
-Update the datepicker with given argument or the current input value.
-
-If `date` is provided and is a Date objects, it is assumed to be a "local" date object, and will be converted to UTC for internal use.
-
-```javascript
-$('.datepicker').datepicker('update');
-$('.datepicker').datepicker('update', '2011-03-05');
-$('.datepicker').datepicker('update', new Date(2011, 2, 5));
-```
-
-### setDate
-
-Arguments:
-
-* date (Date)
-
-Sets the internal date. `date` is assumed to be a "local" date object, and will be converted to UTC for internal use.
-
-### setUTCDate
-
-Arguments:
-
-* date (Date)
-
-Sets the internal date. `date` is assumed to be a UTC date object, and will not be converted.
-
-### getDate
-
-Arguments: None
-
-Returns a localized date object representing the internal date object of the first datepicker in the selection.
-
-### setUTCDate
-
-Arguments: None
-
-Returns the internal UTC date object, as-is and unconverted to local time, of the first datepicker in the selection.
-
-### setStartDate
-
-Arguments:
-
-* startDate (Date)
-
-Sets a new lower date limit on the datepicker.
-
-```javascript
-$('.datepicker').datepicker('setStartDate', '2012-01-01');
-```
-
-Omit startDate (or provide an otherwise falsey value) to unset the limit.
-
-```javascript
-$('.datepicker').datepicker('setStartDate');
-$('.datepicker').datepicker('setStartDate', null);
-```
-
-### setEndDate
-
-Arguments:
-
-* endDate (Date)
-
-Sets a new upper date limit on the datepicker.
-
-```javascript
-$('.datepicker').datepicker('setEndDate', '2012-12-31');
-```
-
-Omit endDate (or provide an otherwise falsey value) to unset the limit.
-
-```javascript
-$('.datepicker').datepicker('setEndDate');
-$('.datepicker').datepicker('setEndDate', null);
-```
-
-### setDaysOfWeekDisabled
-
-Arguments:
-
-* daysOfWeekDisabled (String|Array)
-
-Sets the days of week that should be disabled.
-
-```javascript
-$('.datepicker').datepicker('setDaysOfWeekDisabled', [0,6]);
-```
-
-Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days.
-
-```javascript
-$('.datepicker').datepicker('setDaysOfWeekDisabled');
-$('.datepicker').datepicker('setDaysOfWeekDisabled', null);
-```
-
-## Events
-
-Datepicker triggers a number of events in certain circumstances. All events have extra data attached to the event object that is passed to any event handlers:
-
-```javascript
-$('.datepicker').datepicker()
- .on(picker_event, function(e){
- # `e` here contains the extra attributes
- });
-```
-
-* `date`: the relevant Date object, in local timezone.
-* `format([format])`: a function to make formatting `date` easier. `format` can be any format string that datepicker supports. If `format` is not given, the format set on the datepicker will be used.
-
-### show
-
-Fired when the date picker is displayed.
-
-### hide
-
-Fired when the date picker is hidden.
-
-### clearDate
-
-Fired when the date is cleared, normally when the "clear" button (enabled with the `clearBtn` option) is pressed.
-
-### changeDate
-
-Fired when the date is changed.
-
-### changeYear
-
-Fired when the *view* year is changed from decade view.
-
-### changeMonth
-
-Fired when the *view* month is changed from year view.
-
-## Keyboard support
-
-The datepicker includes some keyboard navigation:
-
-### up, down, left, right arrow keys
-
-By themselves, left/right will move backward/forward one day, up/down will move back/forward one week.
-
-With the shift key, up/left will move backward one month, down/right will move forward one month.
-
-With the ctrl key, up/left will move backward one year, down/right will move forward oone year.
-
-Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year.
-
-### escape
-
-The escape key can be used to hide and re-show the datepicker; this is necessary if the user wants to manually edit the value.
-
-### enter
-
-When the picker is visible, enter will simply hide it. When the picker is not visible, enter will have normal effects -- submitting the current form, etc.
-
-## I18N
-
-The plugin supports i18n for the month and weekday names and the `weekStart` option. The default is English ('en'); other available translations are avilable in the `js/locales/` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to `$.fn.datepicker.dates`, before calling `.datepicker()`. Example:
-
-```javascript
-$.fn.datepicker.dates['en'] = {
- days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
- daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
- daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
- 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"
-};
-```
-
-Right-to-left languages may also include `rtl: true` to make the calendar display appropriately.
-
-If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add `charset="UTF-8"` to your `script` tag:
-
-```html
-
-```
-
-```javascript
-$('.datepicker').datepicker({
- language: XX //as you defined in bootstrap-datepicker.XX.js
-});
-```
+* [Online Demo](http://eternicode.github.io/bootstrap-datepicker/)
+* [Online Docs](http://bootstrap-datepicker.readthedocs.org/) (ReadTheDocs.com)
+* [Google Group](https://groups.google.com/group/bootstrap-datepicker/)
+* [Travis CI ![Build Status](https://travis-ci.org/eternicode/bootstrap-datepicker.png?branch=master)](https://travis-ci.org/eternicode/bootstrap-datepicker)
diff --git a/src/assets/bootstrap-datepicker/css/datepicker.css b/src/assets/bootstrap-datepicker/css/datepicker.css
index 03bd90d4..7134641b 100644
--- a/src/assets/bootstrap-datepicker/css/datepicker.css
+++ b/src/assets/bootstrap-datepicker/css/datepicker.css
@@ -16,7 +16,6 @@
/*.dow {
border-top: 1px solid #ddd !important;
}*/
-
}
.datepicker-inline {
width: 220px;
@@ -113,7 +112,8 @@
.table-striped .datepicker table tr th {
background-color: transparent;
}
-.datepicker table tr td.day:hover {
+.datepicker table tr td.day:hover,
+.datepicker table tr td.day.focused {
background: #eeeeee;
cursor: pointer;
}
@@ -445,7 +445,6 @@
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
- display: block;
cursor: pointer;
width: 16px;
height: 16px;
@@ -467,10 +466,10 @@
display: inline-block;
width: auto;
min-width: 16px;
- height: 18px;
+ height: 20px;
padding: 4px 5px;
font-weight: normal;
- line-height: 18px;
+ line-height: 20px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
@@ -479,3 +478,35 @@
margin-left: -5px;
margin-right: -5px;
}
+.datepicker.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ list-style: none;
+ background-color: #ffffff;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+ color: #333333;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 20px;
+}
+.datepicker.dropdown-menu th,
+.datepicker.dropdown-menu td {
+ padding: 4px 5px;
+}
diff --git a/src/assets/bootstrap-datepicker/css/datepicker3.css b/src/assets/bootstrap-datepicker/css/datepicker3.css
new file mode 100644
index 00000000..aa78b1d4
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/css/datepicker3.css
@@ -0,0 +1,790 @@
+/*!
+ * Datepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+.datepicker {
+ padding: 4px;
+ border-radius: 4px;
+ direction: ltr;
+ /*.dow {
+ border-top: 1px solid #ddd !important;
+ }*/
+}
+.datepicker-inline {
+ width: 220px;
+}
+.datepicker.datepicker-rtl {
+ direction: rtl;
+}
+.datepicker.datepicker-rtl table tr td span {
+ float: right;
+}
+.datepicker-dropdown {
+ top: 0;
+ left: 0;
+}
+.datepicker-dropdown:before {
+ content: '';
+ display: inline-block;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-top: 0;
+ border-bottom-color: rgba(0, 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-top:before {
+ top: -7px;
+}
+.datepicker-dropdown.datepicker-orient-top:after {
+ top: -6px;
+}
+.datepicker-dropdown.datepicker-orient-bottom:before {
+ bottom: -7px;
+ border-bottom: 0;
+ border-top: 7px solid #999;
+}
+.datepicker-dropdown.datepicker-orient-bottom:after {
+ bottom: -6px;
+ border-bottom: 0;
+ border-top: 6px solid #fff;
+}
+.datepicker > div {
+ display: none;
+}
+.datepicker.days div.datepicker-days {
+ display: block;
+}
+.datepicker.months div.datepicker-months {
+ display: block;
+}
+.datepicker.years div.datepicker-years {
+ display: block;
+}
+.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.day:hover,
+.datepicker table tr td.day.focused {
+ background: #eeeeee;
+ cursor: pointer;
+}
+.datepicker table tr td.old,
+.datepicker table tr td.new {
+ color: #999999;
+}
+.datepicker table tr td.disabled,
+.datepicker table tr td.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+.datepicker table tr td.today,
+.datepicker table tr td.today:hover,
+.datepicker table tr td.today.disabled,
+.datepicker table tr td.today.disabled:hover {
+ color: #000000;
+ background-color: #ffdb99;
+ border-color: #ffb733;
+}
+.datepicker table tr td.today:hover,
+.datepicker table tr td.today:hover:hover,
+.datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today.disabled:hover:hover,
+.datepicker table tr td.today:focus,
+.datepicker table tr td.today:hover:focus,
+.datepicker table tr td.today.disabled:focus,
+.datepicker table tr td.today.disabled:hover:focus,
+.datepicker table tr td.today:active,
+.datepicker table tr td.today:hover:active,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.active,
+.datepicker table tr td.today:hover.active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.today,
+.open .dropdown-toggle.datepicker table tr td.today:hover,
+.open .dropdown-toggle.datepicker table tr td.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
+ color: #000000;
+ background-color: #ffcd70;
+ border-color: #f59e00;
+}
+.datepicker table tr td.today:active,
+.datepicker table tr td.today:hover:active,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.active,
+.datepicker table tr td.today:hover.active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.today,
+.open .dropdown-toggle.datepicker table tr td.today:hover,
+.open .dropdown-toggle.datepicker table tr td.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.today.disabled,
+.datepicker table tr td.today:hover.disabled,
+.datepicker table tr td.today.disabled.disabled,
+.datepicker table tr td.today.disabled:hover.disabled,
+.datepicker table tr td.today[disabled],
+.datepicker table tr td.today:hover[disabled],
+.datepicker table tr td.today.disabled[disabled],
+.datepicker table tr td.today.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.today,
+fieldset[disabled] .datepicker table tr td.today:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today:hover.disabled:hover,
+.datepicker table tr td.today.disabled.disabled:hover,
+.datepicker table tr td.today.disabled:hover.disabled:hover,
+.datepicker table tr td.today[disabled]:hover,
+.datepicker table tr td.today:hover[disabled]:hover,
+.datepicker table tr td.today.disabled[disabled]:hover,
+.datepicker table tr td.today.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.today:hover,
+fieldset[disabled] .datepicker table tr td.today:hover:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover,
+.datepicker table tr td.today.disabled:focus,
+.datepicker table tr td.today:hover.disabled:focus,
+.datepicker table tr td.today.disabled.disabled:focus,
+.datepicker table tr td.today.disabled:hover.disabled:focus,
+.datepicker table tr td.today[disabled]:focus,
+.datepicker table tr td.today:hover[disabled]:focus,
+.datepicker table tr td.today.disabled[disabled]:focus,
+.datepicker table tr td.today.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.today:focus,
+fieldset[disabled] .datepicker table tr td.today:hover:focus,
+fieldset[disabled] .datepicker table tr td.today.disabled:focus,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today:hover.disabled:active,
+.datepicker table tr td.today.disabled.disabled:active,
+.datepicker table tr td.today.disabled:hover.disabled:active,
+.datepicker table tr td.today[disabled]:active,
+.datepicker table tr td.today:hover[disabled]:active,
+.datepicker table tr td.today.disabled[disabled]:active,
+.datepicker table tr td.today.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.today:active,
+fieldset[disabled] .datepicker table tr td.today:hover:active,
+fieldset[disabled] .datepicker table tr td.today.disabled:active,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today:hover.disabled.active,
+.datepicker table tr td.today.disabled.disabled.active,
+.datepicker table tr td.today.disabled:hover.disabled.active,
+.datepicker table tr td.today[disabled].active,
+.datepicker table tr td.today:hover[disabled].active,
+.datepicker table tr td.today.disabled[disabled].active,
+.datepicker table tr td.today.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.today.active,
+fieldset[disabled] .datepicker table tr td.today:hover.active,
+fieldset[disabled] .datepicker table tr td.today.disabled.active,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
+ background-color: #ffdb99;
+ border-color: #ffb733;
+}
+.datepicker table tr td.today:hover:hover {
+ color: #000;
+}
+.datepicker table tr td.today.active:hover {
+ color: #fff;
+}
+.datepicker table tr td.range,
+.datepicker table tr td.range:hover,
+.datepicker table tr td.range.disabled,
+.datepicker table tr td.range.disabled:hover {
+ background: #eeeeee;
+ border-radius: 0;
+}
+.datepicker table tr td.range.today,
+.datepicker table tr td.range.today:hover,
+.datepicker table tr td.range.today.disabled,
+.datepicker table tr td.range.today.disabled:hover {
+ color: #000000;
+ background-color: #f7ca77;
+ border-color: #f1a417;
+ border-radius: 0;
+}
+.datepicker table tr td.range.today:hover,
+.datepicker table tr td.range.today:hover:hover,
+.datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover:hover,
+.datepicker table tr td.range.today:focus,
+.datepicker table tr td.range.today:hover:focus,
+.datepicker table tr td.range.today.disabled:focus,
+.datepicker table tr td.range.today.disabled:hover:focus,
+.datepicker table tr td.range.today:active,
+.datepicker table tr td.range.today:hover:active,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.active,
+.datepicker table tr td.range.today:hover.active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.range.today,
+.open .dropdown-toggle.datepicker table tr td.range.today:hover,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
+ color: #000000;
+ background-color: #f4bb51;
+ border-color: #bf800c;
+}
+.datepicker table tr td.range.today:active,
+.datepicker table tr td.range.today:hover:active,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.active,
+.datepicker table tr td.range.today:hover.active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.range.today,
+.open .dropdown-toggle.datepicker table tr td.range.today:hover,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.range.today.disabled,
+.datepicker table tr td.range.today:hover.disabled,
+.datepicker table tr td.range.today.disabled.disabled,
+.datepicker table tr td.range.today.disabled:hover.disabled,
+.datepicker table tr td.range.today[disabled],
+.datepicker table tr td.range.today:hover[disabled],
+.datepicker table tr td.range.today.disabled[disabled],
+.datepicker table tr td.range.today.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.range.today,
+fieldset[disabled] .datepicker table tr td.range.today:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today:hover.disabled:hover,
+.datepicker table tr td.range.today.disabled.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover.disabled:hover,
+.datepicker table tr td.range.today[disabled]:hover,
+.datepicker table tr td.range.today:hover[disabled]:hover,
+.datepicker table tr td.range.today.disabled[disabled]:hover,
+.datepicker table tr td.range.today.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.range.today:hover,
+fieldset[disabled] .datepicker table tr td.range.today:hover:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover,
+.datepicker table tr td.range.today.disabled:focus,
+.datepicker table tr td.range.today:hover.disabled:focus,
+.datepicker table tr td.range.today.disabled.disabled:focus,
+.datepicker table tr td.range.today.disabled:hover.disabled:focus,
+.datepicker table tr td.range.today[disabled]:focus,
+.datepicker table tr td.range.today:hover[disabled]:focus,
+.datepicker table tr td.range.today.disabled[disabled]:focus,
+.datepicker table tr td.range.today.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.range.today:focus,
+fieldset[disabled] .datepicker table tr td.range.today:hover:focus,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:focus,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today:hover.disabled:active,
+.datepicker table tr td.range.today.disabled.disabled:active,
+.datepicker table tr td.range.today.disabled:hover.disabled:active,
+.datepicker table tr td.range.today[disabled]:active,
+.datepicker table tr td.range.today:hover[disabled]:active,
+.datepicker table tr td.range.today.disabled[disabled]:active,
+.datepicker table tr td.range.today.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.range.today:active,
+fieldset[disabled] .datepicker table tr td.range.today:hover:active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today:hover.disabled.active,
+.datepicker table tr td.range.today.disabled.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.disabled.active,
+.datepicker table tr td.range.today[disabled].active,
+.datepicker table tr td.range.today:hover[disabled].active,
+.datepicker table tr td.range.today.disabled[disabled].active,
+.datepicker table tr td.range.today.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.range.today.active,
+fieldset[disabled] .datepicker table tr td.range.today:hover.active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
+ background-color: #f7ca77;
+ border-color: #f1a417;
+}
+.datepicker table tr td.selected,
+.datepicker table tr td.selected:hover,
+.datepicker table tr td.selected.disabled,
+.datepicker table tr td.selected.disabled:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #555555;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td.selected:hover,
+.datepicker table tr td.selected:hover:hover,
+.datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected.disabled:hover:hover,
+.datepicker table tr td.selected:focus,
+.datepicker table tr td.selected:hover:focus,
+.datepicker table tr td.selected.disabled:focus,
+.datepicker table tr td.selected.disabled:hover:focus,
+.datepicker table tr td.selected:active,
+.datepicker table tr td.selected:hover:active,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.active,
+.datepicker table tr td.selected:hover.active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.selected,
+.open .dropdown-toggle.datepicker table tr td.selected:hover,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
+ color: #ffffff;
+ background-color: #858585;
+ border-color: #373737;
+}
+.datepicker table tr td.selected:active,
+.datepicker table tr td.selected:hover:active,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.active,
+.datepicker table tr td.selected:hover.active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.selected,
+.open .dropdown-toggle.datepicker table tr td.selected:hover,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.selected.disabled,
+.datepicker table tr td.selected:hover.disabled,
+.datepicker table tr td.selected.disabled.disabled,
+.datepicker table tr td.selected.disabled:hover.disabled,
+.datepicker table tr td.selected[disabled],
+.datepicker table tr td.selected:hover[disabled],
+.datepicker table tr td.selected.disabled[disabled],
+.datepicker table tr td.selected.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.selected,
+fieldset[disabled] .datepicker table tr td.selected:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected:hover.disabled:hover,
+.datepicker table tr td.selected.disabled.disabled:hover,
+.datepicker table tr td.selected.disabled:hover.disabled:hover,
+.datepicker table tr td.selected[disabled]:hover,
+.datepicker table tr td.selected:hover[disabled]:hover,
+.datepicker table tr td.selected.disabled[disabled]:hover,
+.datepicker table tr td.selected.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.selected:hover,
+fieldset[disabled] .datepicker table tr td.selected:hover:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover,
+.datepicker table tr td.selected.disabled:focus,
+.datepicker table tr td.selected:hover.disabled:focus,
+.datepicker table tr td.selected.disabled.disabled:focus,
+.datepicker table tr td.selected.disabled:hover.disabled:focus,
+.datepicker table tr td.selected[disabled]:focus,
+.datepicker table tr td.selected:hover[disabled]:focus,
+.datepicker table tr td.selected.disabled[disabled]:focus,
+.datepicker table tr td.selected.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.selected:focus,
+fieldset[disabled] .datepicker table tr td.selected:hover:focus,
+fieldset[disabled] .datepicker table tr td.selected.disabled:focus,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected:hover.disabled:active,
+.datepicker table tr td.selected.disabled.disabled:active,
+.datepicker table tr td.selected.disabled:hover.disabled:active,
+.datepicker table tr td.selected[disabled]:active,
+.datepicker table tr td.selected:hover[disabled]:active,
+.datepicker table tr td.selected.disabled[disabled]:active,
+.datepicker table tr td.selected.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.selected:active,
+fieldset[disabled] .datepicker table tr td.selected:hover:active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected:hover.disabled.active,
+.datepicker table tr td.selected.disabled.disabled.active,
+.datepicker table tr td.selected.disabled:hover.disabled.active,
+.datepicker table tr td.selected[disabled].active,
+.datepicker table tr td.selected:hover[disabled].active,
+.datepicker table tr td.selected.disabled[disabled].active,
+.datepicker table tr td.selected.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.selected.active,
+fieldset[disabled] .datepicker table tr td.selected:hover.active,
+fieldset[disabled] .datepicker table tr td.selected.disabled.active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
+ background-color: #999999;
+ border-color: #555555;
+}
+.datepicker table tr td.active,
+.datepicker table tr td.active:hover,
+.datepicker table tr td.active.disabled,
+.datepicker table tr td.active.disabled:hover {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td.active:hover,
+.datepicker table tr td.active:hover:hover,
+.datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active.disabled:hover:hover,
+.datepicker table tr td.active:focus,
+.datepicker table tr td.active:hover:focus,
+.datepicker table tr td.active.disabled:focus,
+.datepicker table tr td.active.disabled:hover:focus,
+.datepicker table tr td.active:active,
+.datepicker table tr td.active:hover:active,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.active,
+.datepicker table tr td.active:hover.active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.active,
+.open .dropdown-toggle.datepicker table tr td.active:hover,
+.open .dropdown-toggle.datepicker table tr td.active.disabled,
+.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.datepicker table tr td.active:active,
+.datepicker table tr td.active:hover:active,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.active,
+.datepicker table tr td.active:hover.active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.active,
+.open .dropdown-toggle.datepicker table tr td.active:hover,
+.open .dropdown-toggle.datepicker table tr td.active.disabled,
+.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.active.disabled,
+.datepicker table tr td.active:hover.disabled,
+.datepicker table tr td.active.disabled.disabled,
+.datepicker table tr td.active.disabled:hover.disabled,
+.datepicker table tr td.active[disabled],
+.datepicker table tr td.active:hover[disabled],
+.datepicker table tr td.active.disabled[disabled],
+.datepicker table tr td.active.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.active,
+fieldset[disabled] .datepicker table tr td.active:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active:hover.disabled:hover,
+.datepicker table tr td.active.disabled.disabled:hover,
+.datepicker table tr td.active.disabled:hover.disabled:hover,
+.datepicker table tr td.active[disabled]:hover,
+.datepicker table tr td.active:hover[disabled]:hover,
+.datepicker table tr td.active.disabled[disabled]:hover,
+.datepicker table tr td.active.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.active:hover,
+fieldset[disabled] .datepicker table tr td.active:hover:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover,
+.datepicker table tr td.active.disabled:focus,
+.datepicker table tr td.active:hover.disabled:focus,
+.datepicker table tr td.active.disabled.disabled:focus,
+.datepicker table tr td.active.disabled:hover.disabled:focus,
+.datepicker table tr td.active[disabled]:focus,
+.datepicker table tr td.active:hover[disabled]:focus,
+.datepicker table tr td.active.disabled[disabled]:focus,
+.datepicker table tr td.active.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.active:focus,
+fieldset[disabled] .datepicker table tr td.active:hover:focus,
+fieldset[disabled] .datepicker table tr td.active.disabled:focus,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active:hover.disabled:active,
+.datepicker table tr td.active.disabled.disabled:active,
+.datepicker table tr td.active.disabled:hover.disabled:active,
+.datepicker table tr td.active[disabled]:active,
+.datepicker table tr td.active:hover[disabled]:active,
+.datepicker table tr td.active.disabled[disabled]:active,
+.datepicker table tr td.active.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.active:active,
+fieldset[disabled] .datepicker table tr td.active:hover:active,
+fieldset[disabled] .datepicker table tr td.active.disabled:active,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active:hover.disabled.active,
+.datepicker table tr td.active.disabled.disabled.active,
+.datepicker table tr td.active.disabled:hover.disabled.active,
+.datepicker table tr td.active[disabled].active,
+.datepicker table tr td.active:hover[disabled].active,
+.datepicker table tr td.active.disabled[disabled].active,
+.datepicker table tr td.active.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.active.active,
+fieldset[disabled] .datepicker table tr td.active:hover.active,
+fieldset[disabled] .datepicker table tr td.active.disabled.active,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.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:hover {
+ background: #eeeeee;
+}
+.datepicker table tr td span.disabled,
+.datepicker table tr td span.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+.datepicker table tr td span.active,
+.datepicker table tr td span.active:hover,
+.datepicker table tr td span.active.disabled,
+.datepicker table tr td span.active.disabled:hover {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td span.active:hover,
+.datepicker table tr td span.active:hover:hover,
+.datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active.disabled:hover:hover,
+.datepicker table tr td span.active:focus,
+.datepicker table tr td span.active:hover:focus,
+.datepicker table tr td span.active.disabled:focus,
+.datepicker table tr td span.active.disabled:hover:focus,
+.datepicker table tr td span.active:active,
+.datepicker table tr td span.active:hover:active,
+.datepicker table tr td span.active.disabled: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.disabled.active,
+.datepicker table tr td span.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td span.active,
+.open .dropdown-toggle.datepicker table tr td span.active:hover,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.datepicker table tr td span.active:active,
+.datepicker table tr td span.active:hover:active,
+.datepicker table tr td span.active.disabled: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.disabled.active,
+.datepicker table tr td span.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td span.active,
+.open .dropdown-toggle.datepicker table tr td span.active:hover,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td span.active.disabled,
+.datepicker table tr td span.active:hover.disabled,
+.datepicker table tr td span.active.disabled.disabled,
+.datepicker table tr td span.active.disabled:hover.disabled,
+.datepicker table tr td span.active[disabled],
+.datepicker table tr td span.active:hover[disabled],
+.datepicker table tr td span.active.disabled[disabled],
+.datepicker table tr td span.active.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td span.active,
+fieldset[disabled] .datepicker table tr td span.active:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active:hover.disabled:hover,
+.datepicker table tr td span.active.disabled.disabled:hover,
+.datepicker table tr td span.active.disabled:hover.disabled:hover,
+.datepicker table tr td span.active[disabled]:hover,
+.datepicker table tr td span.active:hover[disabled]:hover,
+.datepicker table tr td span.active.disabled[disabled]:hover,
+.datepicker table tr td span.active.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td span.active:hover,
+fieldset[disabled] .datepicker table tr td span.active:hover:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,
+.datepicker table tr td span.active.disabled:focus,
+.datepicker table tr td span.active:hover.disabled:focus,
+.datepicker table tr td span.active.disabled.disabled:focus,
+.datepicker table tr td span.active.disabled:hover.disabled:focus,
+.datepicker table tr td span.active[disabled]:focus,
+.datepicker table tr td span.active:hover[disabled]:focus,
+.datepicker table tr td span.active.disabled[disabled]:focus,
+.datepicker table tr td span.active.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td span.active:focus,
+fieldset[disabled] .datepicker table tr td span.active:hover:focus,
+fieldset[disabled] .datepicker table tr td span.active.disabled:focus,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,
+.datepicker table tr td span.active.disabled:active,
+.datepicker table tr td span.active:hover.disabled:active,
+.datepicker table tr td span.active.disabled.disabled:active,
+.datepicker table tr td span.active.disabled:hover.disabled:active,
+.datepicker table tr td span.active[disabled]:active,
+.datepicker table tr td span.active:hover[disabled]:active,
+.datepicker table tr td span.active.disabled[disabled]:active,
+.datepicker table tr td span.active.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td span.active:active,
+fieldset[disabled] .datepicker table tr td span.active:hover:active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active,
+.datepicker table tr td span.active.disabled.active,
+.datepicker table tr td span.active:hover.disabled.active,
+.datepicker table tr td span.active.disabled.disabled.active,
+.datepicker table tr td span.active.disabled:hover.disabled.active,
+.datepicker table tr td span.active[disabled].active,
+.datepicker table tr td span.active:hover[disabled].active,
+.datepicker table tr td span.active.disabled[disabled].active,
+.datepicker table tr td span.active.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td span.active.active,
+fieldset[disabled] .datepicker table tr td span.active:hover.active,
+fieldset[disabled] .datepicker table tr td span.active.disabled.active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.datepicker table tr td span.old,
+.datepicker table tr td span.new {
+ color: #999999;
+}
+.datepicker th.datepicker-switch {
+ width: 145px;
+}
+.datepicker thead tr:first-child th,
+.datepicker tfoot tr th {
+ cursor: pointer;
+}
+.datepicker thead tr:first-child th:hover,
+.datepicker tfoot tr th:hover {
+ background: #eeeeee;
+}
+.datepicker .cw {
+ font-size: 10px;
+ width: 12px;
+ padding: 0 2px 0 5px;
+ vertical-align: middle;
+}
+.datepicker thead tr:first-child th.cw {
+ cursor: default;
+ background-color: transparent;
+}
+.input-group.date .input-group-addon i {
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+}
+.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;
+ font-weight: normal;
+ line-height: 1.428571429;
+ text-align: center;
+ text-shadow: 0 1px 0 #fff;
+ vertical-align: middle;
+ background-color: #eeeeee;
+ border: solid #cccccc;
+ border-width: 1px 0;
+ margin-left: -5px;
+ margin-right: -5px;
+}
+.datepicker.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ list-style: none;
+ background-color: #ffffff;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+ color: #333333;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 1.428571429;
+}
+.datepicker.dropdown-menu th,
+.datepicker.dropdown-menu td {
+ padding: 4px 5px;
+}
diff --git a/src/assets/bootstrap-datepicker/js/bootstrap-datepicker.js b/src/assets/bootstrap-datepicker/js/bootstrap-datepicker.js
index 78c346c9..f17de6d1 100644
--- a/src/assets/bootstrap-datepicker/js/bootstrap-datepicker.js
+++ b/src/assets/bootstrap-datepicker/js/bootstrap-datepicker.js
@@ -1,9 +1,11 @@
/* =========================================================
* bootstrap-datepicker.js
- * http://www.eyecon.ro/bootstrap-datepicker
+ * Repo: https://github.com/eternicode/bootstrap-datepicker/
+ * Demo: http://eternicode.github.io/bootstrap-datepicker/
+ * Docs: http://bootstrap-datepicker.readthedocs.org/
+ * Forked from http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
- * Copyright 2012 Stefan Petre
- * Improvements by Andrew Rowls
+ * Started by Stefan Petre; improvements by Andrew Rowls + contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +20,7 @@
* limitations under the License.
* ========================================================= */
-(function( $ ) {
+(function($, undefined){
var $window = $(window);
@@ -27,42 +29,90 @@
}
function UTCToday(){
var today = new Date();
- return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate());
+ return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
}
+ function alias(method){
+ return function(){
+ return this[method].apply(this, arguments);
+ };
+ }
+
+ var DateArray = (function(){
+ var extras = {
+ get: function(i){
+ return this.slice(i)[0];
+ },
+ contains: function(d){
+ // Array.indexOf is not cross-browser;
+ // $.inArray doesn't work with Dates
+ var val = d && d.valueOf();
+ for (var i=0, l=this.length; i < l; i++)
+ if (this[i].valueOf() === val)
+ return i;
+ return -1;
+ },
+ remove: function(i){
+ this.splice(i,1);
+ },
+ replace: function(new_array){
+ if (!new_array)
+ return;
+ if (!$.isArray(new_array))
+ new_array = [new_array];
+ this.clear();
+ this.push.apply(this, new_array);
+ },
+ clear: function(){
+ this.splice(0);
+ },
+ copy: function(){
+ var a = new DateArray();
+ a.replace(this);
+ return a;
+ }
+ };
+
+ return function(){
+ var a = [];
+ a.push.apply(a, arguments);
+ $.extend(a, extras);
+ return a;
+ };
+ })();
// Picker object
- var Datepicker = function(element, options) {
- var that = this;
+ var Datepicker = function(element, options){
+ this.dates = new DateArray();
+ this.viewDate = UTCToday();
+ this.focusDate = null;
this._process_options(options);
this.element = $(element);
this.isInline = false;
this.isInput = this.element.is('input');
- this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false;
+ this.component = this.element.is('.date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
this.hasInput = this.component && this.element.find('input').length;
- if(this.component && this.component.length === 0)
+ if (this.component && this.component.length === 0)
this.component = false;
this.picker = $(DPGlobal.template);
this._buildEvents();
this._attachEvents();
- if(this.isInline) {
+ if (this.isInline){
this.picker.addClass('datepicker-inline').appendTo(this.element);
- } else {
+ }
+ else {
this.picker.addClass('datepicker-dropdown dropdown-menu');
}
if (this.o.rtl){
this.picker.addClass('datepicker-rtl');
- this.picker.find('.prev i, .next i')
- .toggleClass('icon-arrow-left icon-arrow-right');
}
-
this.viewMode = this.o.startView;
if (this.o.calendarWeeks)
@@ -85,7 +135,7 @@
this.update();
this.showMode();
- if(this.isInline) {
+ if (this.isInline){
this.show();
}
};
@@ -102,14 +152,14 @@
// Check if "de-DE" style date is available, if not language should
// fallback to 2 letter code eg "de"
var lang = o.language;
- if (!dates[lang]) {
+ if (!dates[lang]){
lang = lang.split('-')[0];
if (!dates[lang])
lang = defaults.language;
}
o.language = lang;
- switch(o.startView){
+ switch (o.startView){
case 2:
case 'decade':
o.startView = 2;
@@ -122,7 +172,7 @@
o.startView = 0;
}
- switch (o.minViewMode) {
+ switch (o.minViewMode){
case 1:
case 'months':
o.minViewMode = 1;
@@ -137,27 +187,39 @@
o.startView = Math.max(o.startView, o.minViewMode);
+ // true, false, or Number > 0
+ if (o.multidate !== true){
+ o.multidate = Number(o.multidate) || false;
+ if (o.multidate !== false)
+ o.multidate = Math.max(0, o.multidate);
+ else
+ o.multidate = 1;
+ }
+ o.multidateSeparator = String(o.multidateSeparator);
+
o.weekStart %= 7;
o.weekEnd = ((o.weekStart + 6) % 7);
var format = DPGlobal.parseFormat(o.format);
- if (o.startDate !== -Infinity) {
- if (!!o.startDate) {
+ if (o.startDate !== -Infinity){
+ if (!!o.startDate){
if (o.startDate instanceof Date)
o.startDate = this._local_to_utc(this._zero_time(o.startDate));
else
o.startDate = DPGlobal.parseDate(o.startDate, format, o.language);
- } else {
+ }
+ else {
o.startDate = -Infinity;
}
}
- if (o.endDate !== Infinity) {
- if (!!o.endDate) {
+ if (o.endDate !== Infinity){
+ if (!!o.endDate){
if (o.endDate instanceof Date)
o.endDate = this._local_to_utc(this._zero_time(o.endDate));
else
o.endDate = DPGlobal.parseDate(o.endDate, format, o.language);
- } else {
+ }
+ else {
o.endDate = Infinity;
}
}
@@ -165,7 +227,7 @@
o.daysOfWeekDisabled = o.daysOfWeekDisabled||[];
if (!$.isArray(o.daysOfWeekDisabled))
o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/);
- o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function (d) {
+ o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){
return parseInt(d, 10);
});
@@ -178,7 +240,7 @@
if (!_plc || _plc === 'auto')
; // no action
else if (plc.length === 1){
- switch(plc[0]){
+ switch (plc[0]){
case 'top':
case 'bottom':
o.orientation.y = plc[0];
@@ -204,25 +266,42 @@
_events: [],
_secondaryEvents: [],
_applyEvents: function(evs){
- for (var i=0, el, ev; i this.o.endDate ||
+ !date
+ );
+ }, this), true);
+ this.dates.replace(dates);
+
+ if (this.dates.length)
+ this.viewDate = new Date(this.dates.get(-1));
+ else if (this.viewDate < this.o.startDate)
+ this.viewDate = new Date(this.o.startDate);
+ else if (this.viewDate > this.o.endDate)
+ this.viewDate = new Date(this.o.endDate);
- if (fromArgs) {
+ if (fromArgs){
// setting date by clicking
this.setValue();
- } else if (date) {
+ }
+ else if (dates.length){
// setting date by typing
- if (oldDate.getTime() !== this.date.getTime())
+ if (String(oldDates) !== String(this.dates))
this._trigger('changeDate');
- } else {
- // clearing date
- this._trigger('clearDate');
}
+ if (!this.dates.length && oldDates.length)
+ this._trigger('clearDate');
- if (this.date < this.o.startDate) {
- this.viewDate = new Date(this.o.startDate);
- this.date = new Date(this.o.startDate);
- } else if (this.date > this.o.endDate) {
- this.viewDate = new Date(this.o.endDate);
- this.date = new Date(this.o.endDate);
- } else {
- this.viewDate = new Date(this.date);
- this.date = new Date(this.date);
- }
this.fill();
},
fillDow: function(){
var dowCnt = this.o.weekStart,
- html = '';
- if(this.o.calendarWeeks){
+ html = ' ';
+ if (this.o.calendarWeeks){
var cell = ' ';
html += cell;
this.picker.find('.datepicker-days thead tr:first-child').prepend(cell);
}
- while (dowCnt < this.o.weekStart + 7) {
+ while (dowCnt < this.o.weekStart + 7){
html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+' ';
}
html += ' ';
@@ -534,7 +681,7 @@
fillMonths: function(){
var html = '',
i = 0;
- while (i < 12) {
+ while (i < 12){
html += ''+dates[this.o.language].monthsShort[i++]+' ';
}
this.picker.find('.datepicker-months td').html(html);
@@ -544,7 +691,9 @@
if (!range || !range.length)
delete this.range;
else
- this.range = $.map(range, function(d){ return d.valueOf(); });
+ this.range = $.map(range, function(d){
+ return d.valueOf();
+ });
this.fill();
},
@@ -552,39 +701,40 @@
var cls = [],
year = this.viewDate.getUTCFullYear(),
month = this.viewDate.getUTCMonth(),
- currentDate = this.date.valueOf(),
today = new Date();
- if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) {
+ if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){
cls.push('old');
- } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) {
+ }
+ else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){
cls.push('new');
}
+ if (this.focusDate && date.valueOf() === this.focusDate.valueOf())
+ cls.push('focused');
// Compare internal UTC date with local today, not UTC today
if (this.o.todayHighlight &&
- date.getUTCFullYear() == today.getFullYear() &&
- date.getUTCMonth() == today.getMonth() &&
- date.getUTCDate() == today.getDate()) {
+ date.getUTCFullYear() === today.getFullYear() &&
+ date.getUTCMonth() === today.getMonth() &&
+ date.getUTCDate() === today.getDate()){
cls.push('today');
}
- if (currentDate && date.valueOf() == currentDate) {
+ if (this.dates.contains(date) !== -1)
cls.push('active');
- }
if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||
- $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) {
+ $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){
cls.push('disabled');
}
if (this.range){
if (date > this.range[0] && date < this.range[this.range.length-1]){
cls.push('range');
}
- if ($.inArray(date.valueOf(), this.range) != -1){
+ if ($.inArray(date.valueOf(), this.range) !== -1){
cls.push('selected');
}
}
return cls;
},
- fill: function() {
+ fill: function(){
var d = new Date(this.viewDate),
year = d.getUTCFullYear(),
month = d.getUTCMonth(),
@@ -592,19 +742,20 @@
startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
- currentDate = this.date && this.date.valueOf(),
+ todaytxt = dates[this.o.language].today || dates['en'].today || '',
+ cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
tooltip;
this.picker.find('.datepicker-days thead th.datepicker-switch')
.text(dates[this.o.language].months[month]+' '+year);
this.picker.find('tfoot th.today')
- .text(dates[this.o.language].today)
+ .text(todaytxt)
.toggle(this.o.todayBtn !== false);
this.picker.find('tfoot th.clear')
- .text(dates[this.o.language].clear)
+ .text(cleartxt)
.toggle(this.o.clearBtn !== false);
this.updateNavArrows();
this.fillMonths();
- var prevMonth = UTCDate(year, month-1, 28,0,0,0,0),
+ var prevMonth = UTCDate(year, month-1, 28),
day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
prevMonth.setUTCDate(day);
prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);
@@ -613,19 +764,19 @@
nextMonth = nextMonth.valueOf();
var html = [];
var clsName;
- while(prevMonth.valueOf() < nextMonth) {
- if (prevMonth.getUTCDay() == this.o.weekStart) {
+ while (prevMonth.valueOf() < nextMonth){
+ if (prevMonth.getUTCDay() === this.o.weekStart){
html.push('');
- if(this.o.calendarWeeks){
+ if (this.o.calendarWeeks){
// ISO 8601: First week contains first thursday.
// ISO also states week starts on Monday, but we can be more abstract here.
var
// Start of current week: based on weekstart/current date
ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),
// Thursday of this week
- th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
+ th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
// First Thursday of year, year from thursday
- yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),
+ yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),
// Calendar week: ms between thursdays, div ms per day, div 7 days
calWeek = (th - yth) / 864e5 / 7 + 1;
html.push(''+ calWeek +' ');
@@ -653,29 +804,31 @@
clsName = $.unique(clsName);
html.push(''+prevMonth.getUTCDate() + ' ');
- if (prevMonth.getUTCDay() == this.o.weekEnd) {
+ if (prevMonth.getUTCDay() === this.o.weekEnd){
html.push(' ');
}
prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
- var currentYear = this.date && this.date.getUTCFullYear();
var months = this.picker.find('.datepicker-months')
.find('th:eq(1)')
.text(year)
.end()
.find('span').removeClass('active');
- if (currentYear && currentYear == year) {
- months.eq(this.date.getUTCMonth()).addClass('active');
- }
- if (year < startYear || year > endYear) {
+
+ $.each(this.dates, function(i, d){
+ if (d.getUTCFullYear() === year)
+ months.eq(d.getUTCMonth()).addClass('active');
+ });
+
+ if (year < startYear || year > endYear){
months.addClass('disabled');
}
- if (year == startYear) {
+ if (year === startYear){
months.slice(0, startMonth).addClass('disabled');
}
- if (year == endYear) {
+ if (year === endYear){
months.slice(endMonth+1).addClass('disabled');
}
@@ -687,62 +840,81 @@
.end()
.find('td');
year -= 1;
- for (var i = -1; i < 11; i++) {
- html += ''+year+' ';
+ var years = $.map(this.dates, function(d){
+ return d.getUTCFullYear();
+ }),
+ classes;
+ for (var i = -1; i < 11; i++){
+ classes = ['year'];
+ if (i === -1)
+ classes.push('old');
+ else if (i === 10)
+ classes.push('new');
+ if ($.inArray(year, years) !== -1)
+ classes.push('active');
+ if (year < startYear || year > endYear)
+ classes.push('disabled');
+ html += ''+year+' ';
year += 1;
}
yearCont.html(html);
},
- updateNavArrows: function() {
- if (!this._allow_update) return;
+ updateNavArrows: function(){
+ if (!this._allow_update)
+ return;
var d = new Date(this.viewDate),
year = d.getUTCFullYear(),
month = d.getUTCMonth();
- switch (this.viewMode) {
+ switch (this.viewMode){
case 0:
- if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()) {
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){
this.picker.find('.prev').css({visibility: 'hidden'});
- } else {
+ }
+ else {
this.picker.find('.prev').css({visibility: 'visible'});
}
- if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()) {
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){
this.picker.find('.next').css({visibility: 'hidden'});
- } else {
+ }
+ else {
this.picker.find('.next').css({visibility: 'visible'});
}
break;
case 1:
case 2:
- if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()) {
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){
this.picker.find('.prev').css({visibility: 'hidden'});
- } else {
+ }
+ else {
this.picker.find('.prev').css({visibility: 'visible'});
}
- if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()) {
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){
this.picker.find('.next').css({visibility: 'hidden'});
- } else {
+ }
+ else {
this.picker.find('.next').css({visibility: 'visible'});
}
break;
}
},
- click: function(e) {
+ click: function(e){
e.preventDefault();
- var target = $(e.target).closest('span, td, th');
- if (target.length == 1) {
- switch(target[0].nodeName.toLowerCase()) {
+ var target = $(e.target).closest('span, td, th'),
+ year, month, day;
+ if (target.length === 1){
+ switch (target[0].nodeName.toLowerCase()){
case 'th':
- switch(target[0].className) {
+ switch (target[0].className){
case 'datepicker-switch':
this.showMode(1);
break;
case 'prev':
case 'next':
- var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1);
- switch(this.viewMode){
+ var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);
+ switch (this.viewMode){
case 0:
this.viewDate = this.moveMonth(this.viewDate, dir);
this._trigger('changeMonth', this.viewDate);
@@ -761,7 +933,7 @@
date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
this.showMode(-2);
- var which = this.o.todayBtn == 'linked' ? null : 'view';
+ var which = this.o.todayBtn === 'linked' ? null : 'view';
this._setDate(date, which);
break;
case 'clear':
@@ -772,33 +944,34 @@
element = this.element.find('input');
if (element)
element.val("").change();
- this._trigger('changeDate');
this.update();
+ this._trigger('changeDate');
if (this.o.autoclose)
this.hide();
break;
}
break;
case 'span':
- if (!target.is('.disabled')) {
+ if (!target.is('.disabled')){
this.viewDate.setUTCDate(1);
- if (target.is('.month')) {
- var day = 1;
- var month = target.parent().find('span').index(target);
- var year = this.viewDate.getUTCFullYear();
+ if (target.is('.month')){
+ day = 1;
+ month = target.parent().find('span').index(target);
+ year = this.viewDate.getUTCFullYear();
this.viewDate.setUTCMonth(month);
this._trigger('changeMonth', this.viewDate);
- if (this.o.minViewMode === 1) {
- this._setDate(UTCDate(year, month, day,0,0,0,0));
+ if (this.o.minViewMode === 1){
+ this._setDate(UTCDate(year, month, day));
}
- } else {
- var year = parseInt(target.text(), 10)||0;
- var day = 1;
- var month = 0;
+ }
+ else {
+ day = 1;
+ month = 0;
+ year = parseInt(target.text(), 10)||0;
this.viewDate.setUTCFullYear(year);
this._trigger('changeYear', this.viewDate);
- if (this.o.minViewMode === 2) {
- this._setDate(UTCDate(year, month, day,0,0,0,0));
+ if (this.o.minViewMode === 2){
+ this._setDate(UTCDate(year, month, day));
}
}
this.showMode(-1);
@@ -807,83 +980,118 @@
break;
case 'td':
if (target.is('.day') && !target.is('.disabled')){
- var day = parseInt(target.text(), 10)||1;
- var year = this.viewDate.getUTCFullYear(),
- month = this.viewDate.getUTCMonth();
- if (target.is('.old')) {
- if (month === 0) {
+ day = parseInt(target.text(), 10)||1;
+ year = this.viewDate.getUTCFullYear();
+ month = this.viewDate.getUTCMonth();
+ if (target.is('.old')){
+ if (month === 0){
month = 11;
year -= 1;
- } else {
+ }
+ else {
month -= 1;
}
- } else if (target.is('.new')) {
- if (month == 11) {
+ }
+ else if (target.is('.new')){
+ if (month === 11){
month = 0;
year += 1;
- } else {
+ }
+ else {
month += 1;
}
}
- this._setDate(UTCDate(year, month, day,0,0,0,0));
+ this._setDate(UTCDate(year, month, day));
}
break;
}
}
+ if (this.picker.is(':visible') && this._focused_from){
+ $(this._focused_from).focus();
+ }
+ delete this._focused_from;
+ },
+
+ _toggle_multidate: function(date){
+ var ix = this.dates.contains(date);
+ if (!date){
+ this.dates.clear();
+ }
+ else if (ix !== -1){
+ this.dates.remove(ix);
+ }
+ else {
+ this.dates.push(date);
+ }
+ if (typeof this.o.multidate === 'number')
+ while (this.dates.length > this.o.multidate)
+ this.dates.remove(0);
},
_setDate: function(date, which){
- if (!which || which == 'date')
- this.date = new Date(date);
- if (!which || which == 'view')
- this.viewDate = new Date(date);
+ if (!which || which === 'date')
+ this._toggle_multidate(date && new Date(date));
+ if (!which || which === 'view')
+ this.viewDate = date && new Date(date);
+
this.fill();
this.setValue();
this._trigger('changeDate');
var element;
- if (this.isInput) {
+ if (this.isInput){
element = this.element;
- } else if (this.component){
+ }
+ else if (this.component){
element = this.element.find('input');
}
- if (element) {
+ if (element){
element.change();
}
- if (this.o.autoclose && (!which || which == 'date')) {
+ if (this.o.autoclose && (!which || which === 'date')){
this.hide();
}
},
moveMonth: function(date, dir){
- if (!dir) return date;
+ if (!date)
+ return undefined;
+ if (!dir)
+ return date;
var new_date = new Date(date.valueOf()),
day = new_date.getUTCDate(),
month = new_date.getUTCMonth(),
mag = Math.abs(dir),
new_month, test;
dir = dir > 0 ? 1 : -1;
- if (mag == 1){
- test = dir == -1
+ if (mag === 1){
+ test = dir === -1
// If going back one month, make sure month is not current month
// (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
- ? function(){ return new_date.getUTCMonth() == month; }
+ ? function(){
+ return new_date.getUTCMonth() === month;
+ }
// If going forward one month, make sure month is as expected
// (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
- : function(){ return new_date.getUTCMonth() != new_month; };
+ : function(){
+ return new_date.getUTCMonth() !== new_month;
+ };
new_month = month + dir;
new_date.setUTCMonth(new_month);
// Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
if (new_month < 0 || new_month > 11)
new_month = (new_month + 12) % 12;
- } else {
+ }
+ else {
// For magnitudes >1, move one month at a time...
- for (var i=0; idiv').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
- this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
+ this.picker
+ .find('>div')
+ .hide()
+ .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName)
+ .css('display', 'block');
this.updateNavArrows();
}
};
var DateRangePicker = function(element, options){
this.element = $(element);
- this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; });
+ this.inputs = $.map(options.inputs, function(i){
+ return i.jquery ? i[0] : i;
+ });
delete options.inputs;
$(this.inputs)
.datepicker(options)
.bind('changeDate', $.proxy(this.dateUpdated, this));
- this.pickers = $.map(this.inputs, function(i){ return $(i).data('datepicker'); });
+ this.pickers = $.map(this.inputs, function(i){
+ return $(i).data('datepicker');
+ });
this.updateDates();
};
DateRangePicker.prototype = {
updateDates: function(){
- this.dates = $.map(this.pickers, function(i){ return i.date; });
+ this.dates = $.map(this.pickers, function(i){
+ return i.getUTCDate();
+ });
this.updateRanges();
},
updateRanges: function(){
- var range = $.map(this.dates, function(d){ return d.valueOf(); });
+ var range = $.map(this.dates, function(d){
+ return d.valueOf();
+ });
$.each(this.pickers, function(i, p){
p.setRange(range);
});
},
dateUpdated: function(e){
+ // `this.updating` is a workaround for preventing infinite recursion
+ // between `changeDate` triggering and `setUTCDate` calling. Until
+ // there is a better mechanism.
+ if (this.updating)
+ return;
+ this.updating = true;
+
var dp = $(e.target).data('datepicker'),
new_date = dp.getUTCDate(),
i = $.inArray(e.target, this.inputs),
l = this.inputs.length;
- if (i == -1) return;
+ if (i === -1)
+ return;
+
+ $.each(this.pickers, function(i, p){
+ if (!p.getUTCDate())
+ p.setUTCDate(new_date);
+ });
if (new_date < this.dates[i]){
// Date being moved earlier/left
- while (i>=0 && new_date < this.dates[i]){
+ while (i >= 0 && new_date < this.dates[i]){
this.pickers[i--].setUTCDate(new_date);
}
}
else if (new_date > this.dates[i]){
// Date being moved later/right
- while (i this.dates[i]){
+ while (i < l && new_date > this.dates[i]){
this.pickers[i++].setUTCDate(new_date);
}
}
this.updateDates();
+
+ delete this.updating;
},
remove: function(){
$.map(this.pickers, function(p){ p.remove(); });
@@ -1065,11 +1319,14 @@
// Derive options from element data-attrs
var data = $(el).data(),
out = {}, inkey,
- replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'),
- prefix = new RegExp('^' + prefix.toLowerCase());
+ replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
+ prefix = new RegExp('^' + prefix.toLowerCase());
+ function re_lower(_,a){
+ return a.toLowerCase();
+ }
for (var key in data)
if (prefix.test(key)){
- inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); });
+ inkey = key.replace(replace, re_lower);
out[inkey] = data[key];
}
return out;
@@ -1080,8 +1337,8 @@
var out = {};
// Check if "de-DE" style date is available, if not language should
// fallback to 2 letter code eg "de"
- if (!dates[lang]) {
- lang = lang.split('-')[0]
+ if (!dates[lang]){
+ lang = lang.split('-')[0];
if (!dates[lang])
return;
}
@@ -1094,16 +1351,15 @@
}
var old = $.fn.datepicker;
- $.fn.datepicker = function ( option ) {
+ $.fn.datepicker = function(option){
var args = Array.apply(null, arguments);
args.shift();
- var internal_return,
- this_return;
- this.each(function () {
+ var internal_return;
+ this.each(function(){
var $this = $(this),
data = $this.data('datepicker'),
- options = typeof option == 'object' && option;
- if (!data) {
+ options = typeof option === 'object' && option;
+ if (!data){
var elopts = opts_from_el(this, 'date'),
// Preliminary otions
xopts = $.extend({}, defaults, elopts, options),
@@ -1116,11 +1372,11 @@
};
$this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts))));
}
- else{
+ else {
$this.data('datepicker', (data = new Datepicker(this, opts)));
}
}
- if (typeof option == 'string' && typeof data[option] == 'function') {
+ if (typeof option === 'string' && typeof data[option] === 'function'){
internal_return = data[option].apply(data, args);
if (internal_return !== undefined)
return false;
@@ -1144,6 +1400,8 @@
keyboardNavigation: true,
language: 'en',
minViewMode: 0,
+ multidate: false,
+ multidateSeparator: ',',
orientation: "auto",
rtl: false,
startDate: -Infinity,
@@ -1187,10 +1445,10 @@
navFnc: 'FullYear',
navStep: 10
}],
- isLeapYear: function (year) {
+ isLeapYear: function(year){
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));
},
- getDaysInMonth: function (year, month) {
+ getDaysInMonth: function(year, month){
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
},
validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
@@ -1205,19 +1463,22 @@
}
return {separators: separators, parts: parts};
},
- parseDate: function(date, format, language) {
- if (date instanceof Date) return date;
+ parseDate: function(date, format, language){
+ if (!date)
+ return undefined;
+ if (date instanceof Date)
+ return date;
if (typeof format === 'string')
format = DPGlobal.parseFormat(format);
- if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) {
- var part_re = /([\-+]\d+)([dmwy])/,
- parts = date.match(/([\-+]\d+)([dmwy])/g),
- part, dir;
+ var part_re = /([\-+]\d+)([dmwy])/,
+ parts = date.match(/([\-+]\d+)([dmwy])/g),
+ part, dir, i;
+ if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){
date = new Date();
- for (var i=0; i'+
'',
contTemplate: ' ',
- footTemplate: ' '
+ footTemplate: ''+
+ ''+
+ ' '+
+ ' '+
+ ''+
+ ' '+
+ ' '+
+ ' '
};
DPGlobal.template = ''+
'
'+
@@ -1382,7 +1657,8 @@
'[data-provide="datepicker"]',
function(e){
var $this = $(this);
- if ($this.data('datepicker')) return;
+ if ($this.data('datepicker'))
+ return;
e.preventDefault();
// component click requires us to explicitly show it
$this.datepicker('show');
@@ -1392,4 +1668,4 @@
$('[data-provide="datepicker-inline"]').datepicker();
});
-}( window.jQuery ));
+}(window.jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js
new file mode 100644
index 00000000..0285341c
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js
@@ -0,0 +1,12 @@
+// Azerbaijani
+;(function($){
+ $.fn.datepicker.dates['az'] = {
+ days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə", "Bazar"],
+ daysShort: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş.", "B."],
+ daysMin: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş.", "B."],
+ months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"],
+ monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"],
+ today: "Bu gün",
+ weekStart: 1
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js
new file mode 100644
index 00000000..7e1136ab
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js
@@ -0,0 +1,14 @@
+/**
+ * Welsh translation for bootstrap-datepicker
+ * S. Morris
+ */
+;(function($){
+ $.fn.datepicker.dates['cy'] = {
+ days: ["Sul", "Llun", "Mawrth", "Mercher", "Iau", "Gwener", "Sadwrn", "Sul"],
+ daysShort: ["Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad", "Sul"],
+ daysMin: ["Su", "Ll", "Ma", "Me", "Ia", "Gwe", "Sa", "Su"],
+ months: ["Ionawr", "Chewfror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorfennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"],
+ monthsShort: ["Ion", "Chw", "Maw", "Ebr", "Mai", "Meh", "Gor", "Aws", "Med", "Hyd", "Tach", "Rha"],
+ today: "Heddiw"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js
index 6307be5f..c3d702d4 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js
@@ -9,6 +9,7 @@
daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"],
months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
- today: "I Dag"
+ today: "I Dag",
+ clear: "Nulstil"
};
-}(jQuery));
\ No newline at end of file
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js
index 3d491a27..a27ba578 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js
@@ -10,6 +10,7 @@
months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
today: "Heute",
+ clear: "Löschen",
weekStart: 1,
format: "dd.mm.yyyy"
};
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js
index 551ce050..3b630f38 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js
@@ -1,13 +1,13 @@
-/**
-* Greek translation for bootstrap-datepicker
-*/
-;(function($){
- $.fn.datepicker.dates['el'] = {
- days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"],
- daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"],
- daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"],
- months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"],
- monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"],
- today: "Σήμερα"
- };
-}(jQuery));
\ No newline at end of file
+/**
+ * Greek translation for bootstrap-datepicker
+ */
+;(function($){
+ $.fn.datepicker.dates['el'] = {
+ days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"],
+ daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"],
+ daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"],
+ months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"],
+ monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"],
+ today: "Σήμερα"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js
index a052861c..87c812ed 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js
@@ -1,14 +1,18 @@
/**
* Estonian translation for bootstrap-datepicker
* Ando Roots
+ * Fixes by Illimar Tambek <
*/
;(function($){
$.fn.datepicker.dates['et'] = {
days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev", "Pühapäev"],
- daysShort: ["Püh", "Esm", "Tei", "Kol", "Nel", "Ree", "Lau", "Sun"],
+ daysShort: ["Pühap", "Esmasp", "Teisip", "Kolmap", "Neljap", "Reede", "Laup", "Pühap"],
daysMin: ["P", "E", "T", "K", "N", "R", "L", "P"],
months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"],
- monthsShort: ["Jaan", "Veeb", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"],
- today: "Täna"
+ monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"],
+ today: "Täna",
+ clear: "Tühjenda",
+ weekStart: 1,
+ format: "dd.mm.yyyy"
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js
new file mode 100644
index 00000000..6503c85d
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js
@@ -0,0 +1,17 @@
+/**
+ * Persian translation for bootstrap-datepicker
+ * Mostafa Rokooie
+ */
+;(function($){
+ $.fn.datepicker.dates['fa'] = {
+ days: ["یکشنبه", "دوشنبه", "سهشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه", "یکشنبه"],
+ daysShort: ["یک", "دو", "سه", "چهار", "پنج", "جمعه", "شنبه", "یک"],
+ daysMin: ["ی", "د", "س", "چ", "پ", "ج", "ش", "ی"],
+ months: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"],
+ monthsShort: ["ژان", "فور", "مار", "آور", "مه", "ژون", "ژوی", "اوت", "سپت", "اکت", "نوا", "دسا"],
+ today: "امروز",
+ clear: "پاک کن",
+ weekStart: 1,
+ format: "yyyy/mm/dd"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js
index 1bef0171..eff07aa6 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js
@@ -8,7 +8,7 @@
daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"],
daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"],
months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
- monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"],
+ monthsShort: ["Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc"],
today: "Aujourd'hui",
clear: "Effacer",
weekStart: 1,
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js
new file mode 100644
index 00000000..538fd5e3
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js
@@ -0,0 +1,11 @@
+;(function($){
+ $.fn.datepicker.dates['gl'] = {
+ days: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado", "Domingo"],
+ daysShort: ["Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb", "Dom"],
+ daysMin: ["Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa", "Do"],
+ months: ["Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"],
+ monthsShort: ["Xan", "Feb", "Mar", "Abr", "Mai", "Xun", "Xul", "Ago", "Sep", "Out", "Nov", "Dec"],
+ today: "Hoxe",
+ clear: "Limpar"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js
index 8d13d11c..655ea54b 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js
@@ -3,11 +3,11 @@
*/
;(function($){
$.fn.datepicker.dates['hr'] = {
- days: ["Nedjelja", "Ponedjelja", "Utorak", "Srijeda", "Četrtak", "Petak", "Subota", "Nedjelja"],
- daysShort: ["Ned", "Pon", "Uto", "Srr", "Čet", "Pet", "Sub", "Ned"],
+ days: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota", "Nedjelja"],
+ daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub", "Ned"],
daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"],
months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"],
- monthsShort: ["Sije", "Velj", "Ožu", "Tra", "Svi", "Lip", "Jul", "Kol", "Ruj", "Lis", "Stu", "Pro"],
+ monthsShort: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"],
today: "Danas"
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js
index 8209f2a2..9f476fa2 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js
@@ -10,6 +10,7 @@
months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
today: "Oggi",
+ clear: "Cancella",
weekStart: 1,
format: "dd/mm/yyyy"
};
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js
index 35804941..54344549 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js
@@ -10,6 +10,8 @@
months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომები", "ნოემბერი", "დეკემბერი"],
monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"],
today: "დღეს",
- clear: "გასუფთავება"
+ clear: "გასუფთავება",
+ weekStart: 1,
+ format: "dd.mm.yyyy"
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js
new file mode 100644
index 00000000..94dd6b8f
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js
@@ -0,0 +1,15 @@
+/**
+ * Kazakh translation for bootstrap-datepicker
+ * Yerzhan Tolekov
+ */
+;(function($){
+ $.fn.datepicker.dates['kk'] = {
+ days: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі", "Жексенбі"],
+ daysShort: ["Жек", "Дүй", "Сей", "Сәр", "Бей", "Жұм", "Сен", "Жек"],
+ daysMin: ["Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сн", "Жк"],
+ months: ["Қаңтар", "Ақпан", "Наурыз", "Сәуір", "Мамыр", "Маусым", "Шілде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"],
+ monthsShort: ["Қаң", "Ақп", "Нау", "Сәу", "Мамыр", "Мау", "Шлд", "Тмз", "Қыр", "Қзн", "Қар", "Жел"],
+ today: "Бүгін",
+ weekStart: 1
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js
index cc75fe0b..76d0f3a6 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js
@@ -7,10 +7,10 @@
$.fn.datepicker.dates['lv'] = {
days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"],
daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"],
- daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"],
+ daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se", "Sv"],
months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"],
- monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."],
+ monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"],
today: "Šodien",
weekStart: 1
};
-}(jQuery));
\ No newline at end of file
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js
index da020188..0ab8cf68 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js
@@ -9,6 +9,7 @@
daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са", "Не"],
months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"],
monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"],
- today: "Денес"
+ today: "Денес",
+ format: "dd.mm.yyyy"
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js
index fb9fe2a1..7b28e84f 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js
@@ -11,4 +11,4 @@
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"],
today: "I Dag"
};
-}(jQuery));
\ No newline at end of file
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js
new file mode 100644
index 00000000..ee4201a6
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js
@@ -0,0 +1,17 @@
+/**
+ * Belgium-Dutch translation for bootstrap-datepicker
+ * Julien Poulin
+ */
+;(function($){
+ $.fn.datepicker.dates['nl-BE'] = {
+ days: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"],
+ daysShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"],
+ daysMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"],
+ months: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"],
+ monthsShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ today: "Vandaag",
+ clear: "Leegmaken",
+ weekStart: 1,
+ format: "dd/mm/yyyy"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js
index 7d104d40..c29ec83b 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js
@@ -10,6 +10,7 @@
monthsShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'],
today: 'I dag',
clear: 'Nullstill',
- weekStart: 0
+ weekStart: 1,
+ format: 'dd.mm.yyyy'
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js
index 03c1a472..e1e65df2 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js
@@ -10,6 +10,7 @@
months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"],
monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"],
today: "Astăzi",
+ clear: "Șterge",
weekStart: 1
};
}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js
index 3462a39f..029cea00 100644
--- a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js
@@ -9,7 +9,7 @@
daysMin: ["Sö", "Må", "Ti", "On", "To", "Fr", "Lö", "Sö"],
months: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
- today: "I Dag",
+ today: "Idag",
format: "yyyy-mm-dd",
weekStart: 1
};
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ua.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ua.js
new file mode 100644
index 00000000..d4bb0f02
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.ua.js
@@ -0,0 +1,15 @@
+/**
+ * Ukrainian translation for bootstrap-datepicker
+ * Igor Polynets
+ */
+;(function($){
+ $.fn.datepicker.dates['ua'] = {
+ days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятница", "Субота", "Неділя"],
+ daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"],
+ daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"],
+ months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"],
+ monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"],
+ today: "Сьогодні",
+ weekStart: 1
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js
new file mode 100644
index 00000000..a8cc52ee
--- /dev/null
+++ b/src/assets/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js
@@ -0,0 +1,16 @@
+/**
+ * Vietnamese translation for bootstrap-datepicker
+ * An Vo
+ */
+;(function($){
+ $.fn.datepicker.dates['vi'] = {
+ days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy", "Chủ nhật"],
+ daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7", "CN"],
+ daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7", "CN"],
+ months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"],
+ monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"],
+ today: "Hôm nay",
+ clear: "Xóa",
+ format: "dd/mm/yyyy"
+ };
+}(jQuery));
diff --git a/src/assets/bootstrap-timepicker/LICENSE b/src/assets/bootstrap-timepicker/LICENSE
new file mode 100644
index 00000000..a43ecdcf
--- /dev/null
+++ b/src/assets/bootstrap-timepicker/LICENSE
@@ -0,0 +1,20 @@
+The MIT license
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/src/assets/bootstrap-timepicker/README.md b/src/assets/bootstrap-timepicker/README.md
new file mode 100644
index 00000000..c17dfd42
--- /dev/null
+++ b/src/assets/bootstrap-timepicker/README.md
@@ -0,0 +1,59 @@
+Timepicker for Twitter Bootstrap 2.x
+=======
+
+Timepicker for Twitter Bootstrap 2.x [![Build Status](https://secure.travis-ci.org/jdewit/bootstrap-timepicker.png)](http://travis-ci.org/jdewit/bootstrap-timepicker)
+------------------------------------
+
+A simple timepicker component for Twitter Bootstrap.
+
+Demos & Documentation
+=====================
+
+View demos & documentation .
+
+Support
+=======
+
+If you make money using this timepicker, please consider
+supporting its development.
+
+
+
+Contributing
+============
+
+1. Install NodeJS and Node Package Manager .
+
+2. Install packages
+
+``` bash
+ npm install
+```
+
+3. Use Bower to get the dev dependencies.
+
+``` bash
+$ bower install
+```
+
+4. Use Grunt to run tests, compress assets, etc.
+
+``` bash
+$ grunt test // run jshint and jasmine tests
+$ grunt watch // run jsHint and Jasmine tests whenever a file is changed
+$ grunt compile // minify the js and css files
+$ grunt gh-pages // push updates to gh-pages
+$ grunt bump:[patch/minor/major] // bump the version
+```
+
+- Please make it easy on me by covering any new features or issues
+with Jasmine tests.
+- If your changes need documentation, please take the time to update the docs.
+
+Acknowledgements
+================
+
+Thanks to everyone who have given feedback and submitted pull requests. A
+list of all the contributors can be found here .
+
+Special thanks to @eternicode and his Twitter Datepicker for inspiration.
diff --git a/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.css b/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.css
index fa347523..712f4ca0 100644
--- a/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.css
+++ b/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.css
@@ -23,10 +23,10 @@
left: auto;
right: 13px;
}
-.bootstrap-timepicker .add-on {
+.bootstrap-timepicker .input-group-addon {
cursor: pointer;
}
-.bootstrap-timepicker .add-on i {
+.bootstrap-timepicker .input-group-addon i {
display: inline-block;
width: 16px;
height: 16px;
@@ -123,8 +123,9 @@
font-size: 18px;
}
.bootstrap-timepicker-widget table td input {
- width: 25px;
+ width: 40px;
margin: 0;
+ padding: 6px;
text-align: center;
}
.bootstrap-timepicker-widget .modal-content {
diff --git a/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.min.css b/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.min.css
index 2de349d0..889dcee5 100644
--- a/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.min.css
+++ b/src/assets/bootstrap-timepicker/css/bootstrap-timepicker.min.css
@@ -7,4 +7,4 @@
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
- */.bootstrap-timepicker{position:relative}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu{left:auto;right:0}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before{left:auto;right:12px}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after{left:auto;right:13px}.bootstrap-timepicker .add-on{cursor:pointer}.bootstrap-timepicker .add-on i{display:inline-block;width:16px;height:16px}.bootstrap-timepicker-widget.dropdown-menu{padding:2px 3px 2px 2px}.bootstrap-timepicker-widget.dropdown-menu.open{display:inline-block}.bootstrap-timepicker-widget.dropdown-menu:before{border-bottom:7px solid rgba(0,0,0,0.2);border-left:7px solid transparent;border-right:7px solid transparent;content:"";display:inline-block;left:9px;position:absolute;top:-7px}.bootstrap-timepicker-widget.dropdown-menu:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:"";display:inline-block;left:10px;position:absolute;top:-6px}.bootstrap-timepicker-widget.timepicker-orient-left:before{left:6px}.bootstrap-timepicker-widget.timepicker-orient-left:after{left:7px}.bootstrap-timepicker-widget.timepicker-orient-right:before{right:6px}.bootstrap-timepicker-widget.timepicker-orient-right:after{right:7px}.bootstrap-timepicker-widget.timepicker-orient-top:before{top:-7px}.bootstrap-timepicker-widget.timepicker-orient-top:after{top:-6px}.bootstrap-timepicker-widget.timepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.bootstrap-timepicker-widget.timepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.bootstrap-timepicker-widget a.btn,.bootstrap-timepicker-widget input{border-radius:4px}.bootstrap-timepicker-widget table{width:100%;margin:0}.bootstrap-timepicker-widget table td{text-align:center;height:30px;margin:0;padding:2px}.bootstrap-timepicker-widget table td:not(.separator){min-width:30px}.bootstrap-timepicker-widget table td span{width:100%}.bootstrap-timepicker-widget table td a{border:1px transparent solid;width:100%;display:inline-block;margin:0;padding:8px 0;outline:0;color:#333}.bootstrap-timepicker-widget table td a:hover{text-decoration:none;background-color:#eee;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border-color:#ddd}.bootstrap-timepicker-widget table td a i{margin-top:2px;font-size:18px}.bootstrap-timepicker-widget table td input{width:25px;margin:0;text-align:center}.bootstrap-timepicker-widget .modal-content{padding:4px}@media(min-width:767px){.bootstrap-timepicker-widget.modal{width:200px;margin-left:-100px}}@media(max-width:767px){.bootstrap-timepicker{width:100%}.bootstrap-timepicker .dropdown-menu{width:100%}}
\ No newline at end of file
+ */.bootstrap-timepicker{position:relative}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu{left:auto;right:0}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before{left:auto;right:12px}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after{left:auto;right:13px}.bootstrap-timepicker .input-group-addon{cursor:pointer}.bootstrap-timepicker .input-group-addon i{display:inline-block;width:16px;height:16px}.bootstrap-timepicker-widget.dropdown-menu{padding:2px 3px 2px 2px}.bootstrap-timepicker-widget.dropdown-menu.open{display:inline-block}.bootstrap-timepicker-widget.dropdown-menu:before{border-bottom:7px solid rgba(0,0,0,0.2);border-left:7px solid transparent;border-right:7px solid transparent;content:"";display:inline-block;left:9px;position:absolute;top:-7px}.bootstrap-timepicker-widget.dropdown-menu:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:"";display:inline-block;left:10px;position:absolute;top:-6px}.bootstrap-timepicker-widget.timepicker-orient-left:before{left:6px}.bootstrap-timepicker-widget.timepicker-orient-left:after{left:7px}.bootstrap-timepicker-widget.timepicker-orient-right:before{right:6px}.bootstrap-timepicker-widget.timepicker-orient-right:after{right:7px}.bootstrap-timepicker-widget.timepicker-orient-top:before{top:-7px}.bootstrap-timepicker-widget.timepicker-orient-top:after{top:-6px}.bootstrap-timepicker-widget.timepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.bootstrap-timepicker-widget.timepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.bootstrap-timepicker-widget a.btn,.bootstrap-timepicker-widget input{border-radius:4px}.bootstrap-timepicker-widget table{width:100%;margin:0}.bootstrap-timepicker-widget table td{text-align:center;height:30px;margin:0;padding:2px}.bootstrap-timepicker-widget table td:not(.separator){min-width:30px}.bootstrap-timepicker-widget table td span{width:100%}.bootstrap-timepicker-widget table td a{border:1px transparent solid;width:100%;display:inline-block;margin:0;padding:8px 0;outline:0;color:#333}.bootstrap-timepicker-widget table td a:hover{text-decoration:none;background-color:#eee;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border-color:#ddd}.bootstrap-timepicker-widget table td a i{margin-top:2px;font-size:18px}.bootstrap-timepicker-widget table td input{width:40px;margin:0;padding:6px;text-align:center}.bootstrap-timepicker-widget .modal-content{padding:4px}@media(min-width:767px){.bootstrap-timepicker-widget.modal{width:200px;margin-left:-100px}}@media(max-width:767px){.bootstrap-timepicker{width:100%}.bootstrap-timepicker .dropdown-menu{width:100%}}
\ No newline at end of file
diff --git a/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.js b/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.js
index 5972e3c8..8c1f4651 100644
--- a/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.js
+++ b/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.js
@@ -39,8 +39,8 @@
_init: function() {
var self = this;
- if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-append') || this.$element.parent().hasClass('input-prepend'))) {
- this.$element.parent('.input-append, .input-prepend').find('.add-on').on({
+ if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-group') || this.$element.parent().hasClass('input-prepend'))) {
+ this.$element.parent('.input-group').find('.input-group-addon').on({
'click.timepicker': $.proxy(this.showWidget, this)
});
this.$element.on({
@@ -242,10 +242,10 @@
templateContent;
if (this.showInputs) {
- hourTemplate = ' ';
- minuteTemplate = ' ';
- secondTemplate = ' ';
- meridianTemplate = ' ';
+ hourTemplate = ' ';
+ minuteTemplate = ' ';
+ secondTemplate = ' ';
+ meridianTemplate = ' ';
} else {
hourTemplate = ' ';
minuteTemplate = ' ';
@@ -255,16 +255,16 @@
templateContent = ''+
''+
- ' '+
+ ' '+
' '+
- ' '+
+ ' '+
(this.showSeconds ?
' '+
- ' '
+ ' '
: '') +
(this.showMeridian ?
' '+
- ' '
+ ' '
: '') +
' '+
''+
@@ -281,16 +281,16 @@
: '') +
' '+
''+
- ' '+
+ ' '+
' '+
- ' '+
+ ' '+
(this.showSeconds ?
' '+
- ' '
+ ' '
: '') +
(this.showMeridian ?
' '+
- ' '
+ ' '
: '') +
' '+
'
';
diff --git a/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.min.js b/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.min.js
index d88c9e68..f45c2ac9 100644
--- a/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.min.js
+++ b/src/assets/bootstrap-timepicker/js/bootstrap-timepicker.min.js
@@ -2,4 +2,4 @@
* http://jdewit.github.com/bootstrap-timepicker
* Copyright (c) 2013 Joris de Wit
* MIT License
-*/!function(a,b,c){"use strict";var d=function(b,c){this.widget="",this.$element=a(b),this.defaultTime=c.defaultTime,this.disableFocus=c.disableFocus,this.disableMousewheel=c.disableMousewheel,this.isOpen=c.isOpen,this.minuteStep=c.minuteStep,this.modalBackdrop=c.modalBackdrop,this.orientation=c.orientation,this.secondStep=c.secondStep,this.showInputs=c.showInputs,this.showMeridian=c.showMeridian,this.showSeconds=c.showSeconds,this.template=c.template,this.appendWidgetTo=c.appendWidgetTo,this.showWidgetOnAddonClick=c.showWidgetOnAddonClick,this._init()};d.prototype={constructor:d,_init:function(){var b=this;this.showWidgetOnAddonClick&&(this.$element.parent().hasClass("input-append")||this.$element.parent().hasClass("input-prepend"))?(this.$element.parent(".input-append, .input-prepend").find(".add-on").on({"click.timepicker":a.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":a.proxy(this.showWidget,this),"click.timepicker":a.proxy(this.showWidget,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}),this.$widget=this.template!==!1?a(this.getTemplate()).on("click",a.proxy(this.widgetClick,this)):!1,this.showInputs&&this.$widget!==!1&&this.$widget.find("input").each(function(){a(this).on({"click.timepicker":function(){a(this).select()},"keydown.timepicker":a.proxy(b.widgetKeydown,b),"keyup.timepicker":a.proxy(b.widgetKeyup,b)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=23:this.hour--},decrementMinute:function(a){var b;b=a?this.minute-a:this.minute-this.minuteStep,0>b?(this.decrementHour(),this.minute=b+60):this.minute=b},decrementSecond:function(){var a=this.second-this.secondStep;0>a?(this.decrementMinute(!0),this.second=a+60):this.second=a},elementKeydown:function(a){switch(a.keyCode){case 9:case 27:this.updateFromElementVal();break;case 37:a.preventDefault(),this.highlightPrevUnit();break;case 38:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:a.preventDefault(),this.highlightNextUnit();break;case 40:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var a=this.$element.get(0);if("selectionStart"in a)return a.selectionStart;if(c.selection){a.focus();var b=c.selection.createRange(),d=c.selection.createRange().text.length;return b.moveStart("character",-a.value.length),b.text.length-d}},getTemplate:function(){var a,b,c,d,e,f;switch(this.showInputs?(b=' ',c=' ',d=' ',e=' '):(b=' ',c=' ',d=' ',e=' '),f=' '+(this.showSeconds?' ':"")+(this.showMeridian?' ':"")+" "+""+""+b+" "+': '+""+c+" "+(this.showSeconds?': '+d+" ":"")+(this.showMeridian?' '+e+" ":"")+" "+""+' '+' '+' '+(this.showSeconds?' ':"")+(this.showMeridian?' ':"")+" "+"
",this.template){case"modal":a='";break;case"dropdown":a='"}return a},getTime:function(){return this.hour||this.minute||this.second?this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:""):""},hideWidget:function(){this.isOpen!==!1&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),a(c).off("mousedown.timepicker, touchend.timepicker"),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="hour",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(0,1):a.setSelectionRange(0,2)},0)},highlightMinute:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="minute",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(2,4):a.setSelectionRange(3,5)},0)},highlightSecond:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="second",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)},0)},highlightMeridian:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="meridian",a.setSelectionRange&&(this.showSeconds?setTimeout(function(){b.hour<10?a.setSelectionRange(8,10):a.setSelectionRange(9,11)},0):setTimeout(function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return 23===this.hour?(this.hour=0,void 0):(this.hour++,void 0)},incrementMinute:function(a){var b;b=a?this.minute+a:this.minute+this.minuteStep-this.minute%this.minuteStep,b>59?(this.incrementHour(),this.minute=b-60):this.minute=b},incrementSecond:function(){var a=this.second+this.secondStep-this.second%this.secondStep;a>59?(this.incrementMinute(!0),this.second=a-60):this.second=a},mousewheel:function(b){if(!this.disableMousewheel){b.preventDefault(),b.stopPropagation();var c=b.originalEvent.wheelDelta||-b.originalEvent.detail,d=null;switch("mousewheel"===b.type?d=-1*b.originalEvent.wheelDelta:"DOMMouseScroll"===b.type&&(d=40*b.originalEvent.detail),d&&(b.preventDefault(),a(this).scrollTop(d+a(this).scrollTop())),this.highlightedUnit){case"minute":c>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":c>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:c>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},place:function(){if(!this.isInline){var c=this.$widget.outerWidth(),d=this.$widget.outerHeight(),e=10,f=a(b).width(),g=a(b).height(),h=a(b).scrollTop(),i=parseInt(this.$element.parents().filter(function(){}).first().css("z-index"),10)+10,j=this.component?this.component.parent().offset():this.$element.offset(),k=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),m=j.left,n=j.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.picker.addClass("datepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(m-=c-l)):(this.$widget.addClass("timepicker-orient-left"),j.left<0?m-=j.left-e:j.left+c>f&&(m=f-c-e));var o,p,q=this.orientation.y;"auto"===q&&(o=-h+j.top-d,p=h+g-(j.top+k+d),q=Math.max(o,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+q),"top"===q?n+=k:n-=d+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:n,left:m,zIndex:i})}},remove:function(){a("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(a){if(this.$element.val())this.updateFromElementVal();else if("current"===a){var b=new Date,c=b.getHours(),d=b.getMinutes(),e=b.getSeconds(),f="AM";0!==e&&(e=Math.ceil(b.getSeconds()/this.secondStep)*this.secondStep,60===e&&(d+=1,e=0)),0!==d&&(d=Math.ceil(b.getMinutes()/this.minuteStep)*this.minuteStep,60===d&&(c+=1,d=0)),this.showMeridian&&(0===c?c=12:c>=12?(c>12&&(c-=12),f="PM"):f="AM"),this.hour=c,this.minute=d,this.second=e,this.meridian=f,this.update()}else a===!1?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(a)},setTime:function(a,b){if(!a)return this.clear(),void 0;var c,d,e,f,g;"object"==typeof a&&a.getMonth?(d=a.getHours(),e=a.getMinutes(),f=a.getSeconds(),this.showMeridian&&(g="AM",d>12&&(g="PM",d%=12),12===d&&(g="PM"))):(g=null!==a.match(/p/i)?"PM":"AM",a=a.replace(/[^0-9\:]/g,""),c=a.split(":"),d=c[0]?c[0].toString():c.toString(),e=c[1]?c[1].toString():"",f=c[2]?c[2].toString():"",d.length>4&&(f=d.substr(4,2)),d.length>2&&(e=d.substr(2,2),d=d.substr(0,2)),e.length>2&&(f=e.substr(2,2),e=e.substr(0,2)),f.length>2&&(f=f.substr(2,2)),d=parseInt(d,10),e=parseInt(e,10),f=parseInt(f,10),isNaN(d)&&(d=0),isNaN(e)&&(e=0),isNaN(f)&&(f=0),this.showMeridian?1>d?d=1:d>12&&(d=12):(d>=24?d=23:0>d&&(d=0),13>d&&"PM"===g&&(d+=12)),0>e?e=0:e>=60&&(e=59),this.showSeconds&&(isNaN(f)?f=0:0>f?f=0:f>=60&&(f=59))),this.hour=d,this.minute=e,this.second=f,this.meridian=g,this.update(b)},showWidget:function(){if(!this.isOpen&&!this.$element.is(":disabled")){this.$widget.appendTo(this.appendWidgetTo);var b=this;a(c).on("mousedown.timepicker, touchend.timepicker",function(a){b.$element.parent().find(a.target).length||b.$widget.is(a.target)||b.$widget.find(a.target).length||b.hideWidget()}),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),this.hour||(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",a.proxy(this.hideWidget,this)):this.isOpen===!1&&this.$widget.addClass("open"),this.isOpen=!0}},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(a){this.updateElement(),a||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(this.$widget!==!1){var a=this.hour,b=1===this.minute.toString().length?"0"+this.minute:this.minute,c=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(a),this.$widget.find("input.bootstrap-timepicker-minute").val(b),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(c),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(a),this.$widget.find("span.bootstrap-timepicker-minute").text(b),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(c),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(this.$widget!==!1){var a=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(a,!0)}},widgetClick:function(b){b.stopPropagation(),b.preventDefault();var c=a(b.target),d=c.closest("a").data("action");d&&this[d](),this.update(),c.is("input")&&c.get(0).setSelectionRange(0,2)},widgetKeydown:function(b){var c=a(b.target),d=c.attr("class").replace("bootstrap-timepicker-","");switch(b.keyCode){case 9:if(this.showMeridian&&"meridian"===d||this.showSeconds&&"second"===d||!this.showMeridian&&!this.showSeconds&&"minute"===d)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(b.preventDefault(),d){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2);break;case 40:switch(b.preventDefault(),d){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2)}},widgetKeyup:function(a){(65===a.keyCode||77===a.keyCode||80===a.keyCode||46===a.keyCode||8===a.keyCode||a.keyCode>=46&&a.keyCode<=57)&&this.updateFromWidgetInputs()}},a.fn.timepicker=function(b){var c=Array.apply(null,arguments);return c.shift(),this.each(function(){var e=a(this),f=e.data("timepicker"),g="object"==typeof b&&b;f||e.data("timepicker",f=new d(this,a.extend({},a.fn.timepicker.defaults,g,a(this).data()))),"string"==typeof b&&f[b].apply(f,c)})},a.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0},a.fn.timepicker.Constructor=d}(jQuery,window,document);
\ No newline at end of file
+*/!function(a,b,c){"use strict";var d=function(b,c){this.widget="",this.$element=a(b),this.defaultTime=c.defaultTime,this.disableFocus=c.disableFocus,this.disableMousewheel=c.disableMousewheel,this.isOpen=c.isOpen,this.minuteStep=c.minuteStep,this.modalBackdrop=c.modalBackdrop,this.orientation=c.orientation,this.secondStep=c.secondStep,this.showInputs=c.showInputs,this.showMeridian=c.showMeridian,this.showSeconds=c.showSeconds,this.template=c.template,this.appendWidgetTo=c.appendWidgetTo,this.showWidgetOnAddonClick=c.showWidgetOnAddonClick,this._init()};d.prototype={constructor:d,_init:function(){var b=this;this.showWidgetOnAddonClick&&(this.$element.parent().hasClass("input-group")||this.$element.parent().hasClass("input-prepend"))?(this.$element.parent(".input-group").find(".input-group-addon").on({"click.timepicker":a.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":a.proxy(this.showWidget,this),"click.timepicker":a.proxy(this.showWidget,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":a.proxy(this.mousewheel,this)}),this.$widget=this.template!==!1?a(this.getTemplate()).on("click",a.proxy(this.widgetClick,this)):!1,this.showInputs&&this.$widget!==!1&&this.$widget.find("input").each(function(){a(this).on({"click.timepicker":function(){a(this).select()},"keydown.timepicker":a.proxy(b.widgetKeydown,b),"keyup.timepicker":a.proxy(b.widgetKeyup,b)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=23:this.hour--},decrementMinute:function(a){var b;b=a?this.minute-a:this.minute-this.minuteStep,0>b?(this.decrementHour(),this.minute=b+60):this.minute=b},decrementSecond:function(){var a=this.second-this.secondStep;0>a?(this.decrementMinute(!0),this.second=a+60):this.second=a},elementKeydown:function(a){switch(a.keyCode){case 9:case 27:this.updateFromElementVal();break;case 37:a.preventDefault(),this.highlightPrevUnit();break;case 38:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:a.preventDefault(),this.highlightNextUnit();break;case 40:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var a=this.$element.get(0);if("selectionStart"in a)return a.selectionStart;if(c.selection){a.focus();var b=c.selection.createRange(),d=c.selection.createRange().text.length;return b.moveStart("character",-a.value.length),b.text.length-d}},getTemplate:function(){var a,b,c,d,e,f;switch(this.showInputs?(b=' ',c=' ',d=' ',e=' '):(b=' ',c=' ',d=' ',e=' '),f=' '+(this.showSeconds?' ':"")+(this.showMeridian?' ':"")+" "+""+""+b+" "+': '+""+c+" "+(this.showSeconds?': '+d+" ":"")+(this.showMeridian?' '+e+" ":"")+" "+""+' '+' '+' '+(this.showSeconds?' ':"")+(this.showMeridian?' ':"")+" "+"
",this.template){case"modal":a='";break;case"dropdown":a='"}return a},getTime:function(){return this.hour||this.minute||this.second?this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:""):""},hideWidget:function(){this.isOpen!==!1&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),a(c).off("mousedown.timepicker, touchend.timepicker"),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="hour",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(0,1):a.setSelectionRange(0,2)},0)},highlightMinute:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="minute",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(2,4):a.setSelectionRange(3,5)},0)},highlightSecond:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="second",a.setSelectionRange&&setTimeout(function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)},0)},highlightMeridian:function(){var a=this.$element.get(0),b=this;this.highlightedUnit="meridian",a.setSelectionRange&&(this.showSeconds?setTimeout(function(){b.hour<10?a.setSelectionRange(8,10):a.setSelectionRange(9,11)},0):setTimeout(function(){b.hour<10?a.setSelectionRange(5,7):a.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return 23===this.hour?(this.hour=0,void 0):(this.hour++,void 0)},incrementMinute:function(a){var b;b=a?this.minute+a:this.minute+this.minuteStep-this.minute%this.minuteStep,b>59?(this.incrementHour(),this.minute=b-60):this.minute=b},incrementSecond:function(){var a=this.second+this.secondStep-this.second%this.secondStep;a>59?(this.incrementMinute(!0),this.second=a-60):this.second=a},mousewheel:function(b){if(!this.disableMousewheel){b.preventDefault(),b.stopPropagation();var c=b.originalEvent.wheelDelta||-b.originalEvent.detail,d=null;switch("mousewheel"===b.type?d=-1*b.originalEvent.wheelDelta:"DOMMouseScroll"===b.type&&(d=40*b.originalEvent.detail),d&&(b.preventDefault(),a(this).scrollTop(d+a(this).scrollTop())),this.highlightedUnit){case"minute":c>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":c>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:c>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},place:function(){if(!this.isInline){var c=this.$widget.outerWidth(),d=this.$widget.outerHeight(),e=10,f=a(b).width(),g=a(b).height(),h=a(b).scrollTop(),i=parseInt(this.$element.parents().filter(function(){}).first().css("z-index"),10)+10,j=this.component?this.component.parent().offset():this.$element.offset(),k=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),m=j.left,n=j.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.picker.addClass("datepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(m-=c-l)):(this.$widget.addClass("timepicker-orient-left"),j.left<0?m-=j.left-e:j.left+c>f&&(m=f-c-e));var o,p,q=this.orientation.y;"auto"===q&&(o=-h+j.top-d,p=h+g-(j.top+k+d),q=Math.max(o,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+q),"top"===q?n+=k:n-=d+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:n,left:m,zIndex:i})}},remove:function(){a("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(a){if(this.$element.val())this.updateFromElementVal();else if("current"===a){var b=new Date,c=b.getHours(),d=b.getMinutes(),e=b.getSeconds(),f="AM";0!==e&&(e=Math.ceil(b.getSeconds()/this.secondStep)*this.secondStep,60===e&&(d+=1,e=0)),0!==d&&(d=Math.ceil(b.getMinutes()/this.minuteStep)*this.minuteStep,60===d&&(c+=1,d=0)),this.showMeridian&&(0===c?c=12:c>=12?(c>12&&(c-=12),f="PM"):f="AM"),this.hour=c,this.minute=d,this.second=e,this.meridian=f,this.update()}else a===!1?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(a)},setTime:function(a,b){if(!a)return this.clear(),void 0;var c,d,e,f,g;"object"==typeof a&&a.getMonth?(d=a.getHours(),e=a.getMinutes(),f=a.getSeconds(),this.showMeridian&&(g="AM",d>12&&(g="PM",d%=12),12===d&&(g="PM"))):(g=null!==a.match(/p/i)?"PM":"AM",a=a.replace(/[^0-9\:]/g,""),c=a.split(":"),d=c[0]?c[0].toString():c.toString(),e=c[1]?c[1].toString():"",f=c[2]?c[2].toString():"",d.length>4&&(f=d.substr(4,2)),d.length>2&&(e=d.substr(2,2),d=d.substr(0,2)),e.length>2&&(f=e.substr(2,2),e=e.substr(0,2)),f.length>2&&(f=f.substr(2,2)),d=parseInt(d,10),e=parseInt(e,10),f=parseInt(f,10),isNaN(d)&&(d=0),isNaN(e)&&(e=0),isNaN(f)&&(f=0),this.showMeridian?1>d?d=1:d>12&&(d=12):(d>=24?d=23:0>d&&(d=0),13>d&&"PM"===g&&(d+=12)),0>e?e=0:e>=60&&(e=59),this.showSeconds&&(isNaN(f)?f=0:0>f?f=0:f>=60&&(f=59))),this.hour=d,this.minute=e,this.second=f,this.meridian=g,this.update(b)},showWidget:function(){if(!this.isOpen&&!this.$element.is(":disabled")){this.$widget.appendTo(this.appendWidgetTo);var b=this;a(c).on("mousedown.timepicker, touchend.timepicker",function(a){b.$element.parent().find(a.target).length||b.$widget.is(a.target)||b.$widget.find(a.target).length||b.hideWidget()}),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),this.hour||(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",a.proxy(this.hideWidget,this)):this.isOpen===!1&&this.$widget.addClass("open"),this.isOpen=!0}},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(a){this.updateElement(),a||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(this.$widget!==!1){var a=this.hour,b=1===this.minute.toString().length?"0"+this.minute:this.minute,c=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(a),this.$widget.find("input.bootstrap-timepicker-minute").val(b),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(c),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(a),this.$widget.find("span.bootstrap-timepicker-minute").text(b),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(c),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(this.$widget!==!1){var a=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(a,!0)}},widgetClick:function(b){b.stopPropagation(),b.preventDefault();var c=a(b.target),d=c.closest("a").data("action");d&&this[d](),this.update(),c.is("input")&&c.get(0).setSelectionRange(0,2)},widgetKeydown:function(b){var c=a(b.target),d=c.attr("class").replace("bootstrap-timepicker-","");switch(b.keyCode){case 9:if(this.showMeridian&&"meridian"===d||this.showSeconds&&"second"===d||!this.showMeridian&&!this.showSeconds&&"minute"===d)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(b.preventDefault(),d){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2);break;case 40:switch(b.preventDefault(),d){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),c.get(0).setSelectionRange(0,2)}},widgetKeyup:function(a){(65===a.keyCode||77===a.keyCode||80===a.keyCode||46===a.keyCode||8===a.keyCode||a.keyCode>=46&&a.keyCode<=57)&&this.updateFromWidgetInputs()}},a.fn.timepicker=function(b){var c=Array.apply(null,arguments);return c.shift(),this.each(function(){var e=a(this),f=e.data("timepicker"),g="object"==typeof b&&b;f||e.data("timepicker",f=new d(this,a.extend({},a.fn.timepicker.defaults,g,a(this).data()))),"string"==typeof b&&f[b].apply(f,c)})},a.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0},a.fn.timepicker.Constructor=d}(jQuery,window,document);
\ No newline at end of file
diff --git a/src/assets/css/bootstrap-daterangepicker.css b/src/assets/css/bootstrap-daterangepicker.css
index 94eed243..90f9b7e1 100644
--- a/src/assets/css/bootstrap-daterangepicker.css
+++ b/src/assets/css/bootstrap-daterangepicker.css
@@ -1,5 +1,5 @@
/*!
- * Stylesheet for the Date Range Picker, for use with Bootstrap 2.x
+ * Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
*
* Copyright 2013 Dan Grossman ( http://www.dangrossman.info )
* Licensed under the Apache License v2.0
@@ -8,8 +8,9 @@
* Built for http://www.improvely.com
*/
-.daterangepicker.dropdown-menu {
+ .daterangepicker.dropdown-menu {
max-width: none;
+ z-index: 3000;
}
.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
@@ -37,27 +38,57 @@
.daterangepicker .calendar {
display: none;
- max-width: 250px;
+ max-width: 270px;
+}
+
+.daterangepicker.show-calendar .calendar {
+ display: block;
+}
+
+.daterangepicker .calendar.single .calendar-date {
+ border: none;
}
.daterangepicker .calendar th, .daterangepicker .calendar td {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
white-space: nowrap;
text-align: center;
+ min-width: 32px;
}
-.daterangepicker .ranges label {
+.daterangepicker .daterangepicker_start_input label,
+.daterangepicker .daterangepicker_end_input label {
color: #333;
+ display: block;
font-size: 11px;
+ font-weight: normal;
+ height: 20px;
+ line-height: 20px;
margin-bottom: 2px;
+ text-shadow: #fff 1px 1px 0px;
text-transform: uppercase;
- text-shadow: 1px 1px 0 #fff;
+ width: 74px;
}
.daterangepicker .ranges input {
font-size: 11px;
}
+.daterangepicker .ranges .input-mini {
+ background-color: #eee;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #555;
+ display: block;
+ font-size: 11px;
+ height: 30px;
+ line-height: 30px;
+ vertical-align: middle;
+ margin: 0 0 10px 0;
+ padding: 0 6px;
+ width: 74px;
+}
+
.daterangepicker .ranges ul {
list-style: none;
margin: 0;
@@ -190,20 +221,9 @@
}
.daterangepicker td.active, .daterangepicker td.active:hover {
- background-color: #006dcc;
- background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
- background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
- background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
- background-image: -o-linear-gradient(top, #0088cc, #0044cc);
- background-image: linear-gradient(top, #0088cc, #0044cc);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
- border-color: #0044cc #0044cc #002a80;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-color: #357ebd;
+ border-color: #3071a9;
color: #fff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.daterangepicker td.week, .daterangepicker th.week {
@@ -229,6 +249,19 @@
}
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect {
- width: 60px;
+ width: 50px;
margin-bottom: 0;
-}
\ No newline at end of file
+}
+
+.daterangepicker_start_input {
+ float: left;
+}
+
+.daterangepicker_end_input {
+ float: left;
+ padding-left: 11px
+}
+
+.daterangepicker th.month {
+ width: auto;
+}
diff --git a/src/assets/js/bootstrap.daterangepicker.js b/src/assets/js/bootstrap.daterangepicker.js
index fedf1b71..6a654b73 100644
--- a/src/assets/js/bootstrap.daterangepicker.js
+++ b/src/assets/js/bootstrap.daterangepicker.js
@@ -1,53 +1,14 @@
/**
-* @version: 1.2
+* @version: 1.3.6
* @author: Dan Grossman http://www.dangrossman.info/
-* @date: 2013-07-25
-* @copyright: Copyright (c) 2012-2013 Dan Grossman. All rights reserved.
+* @date: 2014-04-29
+* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
* @website: http://www.improvely.com/
*/
-!function ($) {
+!function ($, moment) {
var DateRangePicker = function (element, options, cb) {
- var hasOptions = typeof options == 'object';
- var localeObject;
-
- //option defaults
-
- this.startDate = moment().startOf('day');
- this.endDate = moment().startOf('day');
- this.minDate = false;
- this.maxDate = false;
- this.dateLimit = false;
-
- this.showDropdowns = false;
- this.showWeekNumbers = false;
- this.timePicker = false;
- this.timePickerIncrement = 30;
- this.timePicker12Hour = true;
- this.ranges = {};
- this.opens = 'right';
-
- this.buttonClasses = ['btn', 'btn-small'];
- this.applyClass = 'btn-success';
- this.cancelClass = 'btn-default';
-
- this.format = 'MM/DD/YYYY';
- this.separator = ' - ';
-
- this.locale = {
- applyLabel: 'Apply',
- cancelLabel: 'Cancel',
- fromLabel: 'From',
- toLabel: 'To',
- weekLabel: 'W',
- customRangeLabel: 'Custom Range',
- daysOfWeek: moment()._lang._weekdaysMin.slice(),
- monthNames: moment()._lang._monthsShort.slice(),
- firstDay: 0
- };
-
- this.cb = function () { };
// by default, the daterangepicker element is placed at the bottom of HTML body
this.parentEl = 'body';
@@ -55,131 +16,179 @@
//element that triggered the date range picker
this.element = $(element);
- if (this.element.hasClass('pull-right'))
- this.opens = 'left';
-
- if (this.element.is('input')) {
- this.element.on({
- click: $.proxy(this.show, this),
- focus: $.proxy(this.show, this)
- });
- } else {
- this.element.on('click', $.proxy(this.show, this));
- }
-
- localeObject = this.locale;
-
- if (hasOptions) {
- if (typeof options.locale == 'object') {
- $.each(localeObject, function (property, value) {
- localeObject[property] = options.locale[property] || value;
- });
- }
-
- if (options.applyClass) {
- this.applyClass = options.applyClass;
- }
-
- if (options.cancelClass) {
- this.cancelClass = options.cancelClass;
- }
- }
-
+ //create the picker HTML object
var DRPTemplate = '