Upgraded Bootstrap to 3.3.7 and upgraded its related js dependencies.

Upgraded the following JavaScript libraries dependencies :
 - bootstrap-switch to 3.3.2
 - html5shiv to 3.7.3 and switched to minified version
 - typeahead to 0.10.5
 - jQuery to 1.12.4

Removed unused bootstratp-rtl.css and bootstrap-rtl.min.css.

Tested non regressions on the following systems :
 - Debian Jessie : 
  - Firefox 45.4.0

 - MS Windows 10 :
  - Chrome 54.0.2840.99 
  - Firefox 50.0
  - Edge
  - Emulated IE 11, 10 and 9
pull/93/head
luccioman 8 years ago
parent 0806de8fdc
commit fd22d8c08b

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.0.0
* bootstrap-switch - v3.3.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
@ -21,6 +21,7 @@
.bootstrap-switch {
display: inline-block;
direction: ltr;
cursor: pointer;
border-radius: 4px;
border: 1px solid;
@ -29,89 +30,18 @@
text-align: left;
overflow: hidden;
line-height: 8px;
z-index: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
vertical-align: middle;
min-width: 100px;
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.bootstrap-switch.bootstrap-switch-mini {
min-width: 71px;
}
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
padding-bottom: 4px;
padding-top: 4px;
font-size: 10px;
line-height: 9px;
}
.bootstrap-switch.bootstrap-switch-small {
min-width: 79px;
}
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
padding-bottom: 3px;
padding-top: 3px;
font-size: 12px;
line-height: 18px;
}
.bootstrap-switch.bootstrap-switch-large {
min-width: 120px;
}
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
padding-bottom: 9px;
padding-top: 9px;
font-size: 16px;
line-height: normal;
}
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
-webkit-transition: margin-left 0.5s;
transition: margin-left 0.5s;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container {
margin-left: 0%;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container {
margin-left: -50%;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-disabled,
.bootstrap-switch.bootstrap-switch-readonly {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label {
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-focused {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.bootstrap-switch .bootstrap-switch-container {
display: inline-block;
width: 150%;
top: 0;
border-radius: 4px;
-webkit-transform: translate3d(0, 0, 0);
@ -126,8 +56,7 @@
cursor: pointer;
display: inline-block !important;
height: 100%;
padding-bottom: 4px;
padding-top: 4px;
padding: 6px 12px;
font-size: 14px;
line-height: 20px;
}
@ -135,12 +64,11 @@
.bootstrap-switch .bootstrap-switch-handle-off {
text-align: center;
z-index: 1;
width: 33.333333333%;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
color: #fff;
background: #428bca;
background: #337ab7;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
@ -167,29 +95,101 @@
color: #000;
background: #eeeeee;
}
.bootstrap-switch .bootstrap-switch-handle-on {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-handle-off {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-label {
text-align: center;
margin-top: -1px;
margin-bottom: -1px;
z-index: 100;
width: 33.333333333%;
color: #333333;
background: #ffffff;
}
.bootstrap-switch .bootstrap-switch-handle-on {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-handle-off {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch input[type='radio'],
.bootstrap-switch input[type='checkbox'] {
position: absolute !important;
top: 0;
left: 0;
margin: 0;
z-index: -1;
opacity: 0;
filter: alpha(opacity=0);
z-index: -1;
}
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
}
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
}
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
padding: 6px 16px;
font-size: 18px;
line-height: 1.3333333;
}
.bootstrap-switch.bootstrap-switch-disabled,
.bootstrap-switch.bootstrap-switch-readonly,
.bootstrap-switch.bootstrap-switch-indeterminate {
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
-webkit-transition: margin-left 0.5s;
-o-transition: margin-left 0.5s;
transition: margin-left 0.5s;
}
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-focused {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
@ -1106,7 +1106,6 @@ a:focus {
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
@ -2537,7 +2536,6 @@ select[size] {
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
@ -3029,7 +3027,6 @@ select[multiple].input-lg {
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.0.0
* bootstrap-switch - v3.3.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
@ -20,106 +20,117 @@
*/
(function() {
var __slice = [].slice;
var slice = [].slice;
(function($, window) {
"use strict";
var BootstrapSwitch;
BootstrapSwitch = (function() {
BootstrapSwitch.prototype.name = "bootstrap-switch";
function BootstrapSwitch(element, options) {
var addClasses;
if (options == null) {
options = {};
}
this.$element = $(element);
this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, options, {
this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, {
state: this.$element.is(":checked"),
size: this.$element.data("size"),
animate: this.$element.data("animate"),
disabled: this.$element.is(":disabled"),
readonly: this.$element.is("[readonly]"),
indeterminate: this.$element.data("indeterminate"),
inverse: this.$element.data("inverse"),
radioAllOff: this.$element.data("radio-all-off"),
onColor: this.$element.data("on-color"),
offColor: this.$element.data("off-color"),
onText: this.$element.data("on-text"),
offText: this.$element.data("off-text"),
labelText: this.$element.data("label-text")
labelText: this.$element.data("label-text"),
handleWidth: this.$element.data("handle-width"),
labelWidth: this.$element.data("label-width"),
baseClass: this.$element.data("base-class"),
wrapperClass: this.$element.data("wrapper-class")
}, options);
this.prevOptions = {};
this.$wrapper = $("<div>", {
"class": (function(_this) {
return function() {
var classes;
classes = ["" + _this.options.baseClass].concat(_this._getClasses(_this.options.wrapperClass));
classes.push(_this.options.state ? _this.options.baseClass + "-on" : _this.options.baseClass + "-off");
if (_this.options.size != null) {
classes.push(_this.options.baseClass + "-" + _this.options.size);
}
if (_this.options.disabled) {
classes.push(_this.options.baseClass + "-disabled");
}
if (_this.options.readonly) {
classes.push(_this.options.baseClass + "-readonly");
}
if (_this.options.indeterminate) {
classes.push(_this.options.baseClass + "-indeterminate");
}
if (_this.options.inverse) {
classes.push(_this.options.baseClass + "-inverse");
}
if (_this.$element.attr("id")) {
classes.push(_this.options.baseClass + "-id-" + (_this.$element.attr("id")));
}
return classes.join(" ");
};
})(this)()
});
this.$container = $("<div>", {
"class": this.options.baseClass + "-container"
});
this.$wrapper = $("<div>");
this.$container = $("<div>");
this.$on = $("<span>", {
html: this.options.onText
html: this.options.onText,
"class": this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
});
this.$off = $("<span>", {
html: this.options.offText
html: this.options.offText,
"class": this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
});
this.$label = $("<label>", {
"for": this.$element.attr("id"),
html: this.options.labelText
this.$label = $("<span>", {
html: this.options.labelText,
"class": this.options.baseClass + "-label"
});
addClasses = (function(_this) {
return function(cls) {
var c, classes, _i, _len;
if (!$.isArray(cls)) {
return "" + _this.options.baseClass + "-" + cls;
}
classes = [];
for (_i = 0, _len = cls.length; _i < _len; _i++) {
c = cls[_i];
classes.push("" + _this.options.baseClass + "-" + c);
}
return classes.join(" ");
};
})(this);
this.$wrapper.addClass((function(_this) {
return function() {
var classes;
classes = ["" + _this.options.baseClass, "" + _this.options.baseClass + "-" + _this.options.wrapperClass];
classes.push(_this.options.state ? "" + _this.options.baseClass + "-" + _this.options.onModifierClass : "" + _this.options.baseClass + "-" + _this.options.offModifierClass);
if (_this.options.size != null) {
classes.push("" + _this.options.baseClass + "-" + _this.options.size);
}
if (_this.options.animate) {
classes.push("" + _this.options.baseClass + "-" + _this.options.animateModifierClass);
}
if (_this.options.disabled) {
classes.push("" + _this.options.baseClass + "-" + _this.options.disabledModifierClass);
}
if (_this.options.readonly) {
classes.push("" + _this.options.baseClass + "-" + _this.options.readonlyModifierClass);
}
if (_this.$element.attr("id")) {
classes.push("" + _this.options.baseClass + "-id-" + (_this.$element.attr("id")));
}
return classes.join(" ");
};
})(this));
this.$container.addClass(addClasses(this.options.containerClass));
this.$on.addClass("" + (addClasses(this.options.handleOnClass)) + " " + this.options.baseClass + "-" + this.options.onColor);
this.$off.addClass("" + (addClasses(this.options.handleOffClass)) + " " + this.options.baseClass + "-" + this.options.offColor);
this.$label.addClass(addClasses(this.options.labelClass));
this.$element.on("init.bootstrapSwitch", (function(_this) {
return function() {
return _this.options.onInit.apply(element, arguments);
};
})(this));
this.$element.on("switchChange.bootstrapSwitch", (function(_this) {
return function() {
return _this.options.onSwitchChange.apply(element, arguments);
return function(e) {
if (false === _this.options.onSwitchChange.apply(element, arguments)) {
if (_this.$element.is(":radio")) {
return $("[name='" + (_this.$element.attr('name')) + "']").trigger("previousState.bootstrapSwitch", true);
} else {
return _this.$element.trigger("previousState.bootstrapSwitch", true);
}
}
};
})(this));
this.$container = this.$element.wrap(this.$container).parent();
this.$wrapper = this.$container.wrap(this.$wrapper).parent();
this.$element.before(this.$on).before(this.$label).before(this.$off).trigger("init.bootstrapSwitch");
this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off);
if (this.options.indeterminate) {
this.$element.prop("indeterminate", true);
}
this._init();
this._elementHandlers();
this._handleHandlers();
this._labelHandlers();
this._formHandler();
this._externalLabelHandler();
this.$element.trigger("init.bootstrapSwitch", this.options.state);
}
BootstrapSwitch.prototype._constructor = BootstrapSwitch;
BootstrapSwitch.prototype.setPrevOptions = function() {
return this.prevOptions = $.extend(true, {}, this.options);
};
BootstrapSwitch.prototype.state = function(value, skip) {
if (typeof value === "undefined") {
return this.options.state;
@ -127,6 +138,17 @@
if (this.options.disabled || this.options.readonly) {
return this.$element;
}
if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) {
return this.$element;
}
if (this.$element.is(":radio")) {
$("[name='" + (this.$element.attr('name')) + "']").trigger("setPreviousOptions.bootstrapSwitch");
} else {
this.$element.trigger("setPreviousOptions.bootstrapSwitch");
}
if (this.options.indeterminate) {
this.indeterminate(false);
}
value = !!value;
this.$element.prop("checked", value).trigger("change.bootstrapSwitch", skip);
return this.$element;
@ -136,7 +158,12 @@
if (this.options.disabled || this.options.readonly) {
return this.$element;
}
return this.$element.prop("checked", !this.options.state).trigger("change.bootstrapSwitch", skip);
if (this.options.indeterminate) {
this.indeterminate(false);
return this.state(true);
} else {
return this.$element.prop("checked", !this.options.state).trigger("change.bootstrapSwitch", skip);
}
};
BootstrapSwitch.prototype.size = function(value) {
@ -144,9 +171,13 @@
return this.options.size;
}
if (this.options.size != null) {
this.$wrapper.removeClass("" + this.options.baseClass + "-" + this.options.size);
this.$wrapper.removeClass(this.options.baseClass + "-" + this.options.size);
}
if (value) {
this.$wrapper.addClass(this.options.baseClass + "-" + value);
}
this.$wrapper.addClass("" + this.options.baseClass + "-" + value);
this._width();
this._containerPosition();
this.options.size = value;
return this.$element;
};
@ -156,8 +187,15 @@
return this.options.animate;
}
value = !!value;
this.$wrapper[value ? "addClass" : "removeClass"]("" + this.options.baseClass + "-" + this.options.animateModifierClass);
this.options.animate = value;
if (value === this.options.animate) {
return this.$element;
}
return this.toggleAnimate();
};
BootstrapSwitch.prototype.toggleAnimate = function() {
this.options.animate = !this.options.animate;
this.$wrapper.toggleClass(this.options.baseClass + "-animate");
return this.$element;
};
@ -166,16 +204,16 @@
return this.options.disabled;
}
value = !!value;
this.$wrapper[value ? "addClass" : "removeClass"]("" + this.options.baseClass + "-" + this.options.disabledModifierClass);
this.$element.prop("disabled", value);
this.options.disabled = value;
return this.$element;
if (value === this.options.disabled) {
return this.$element;
}
return this.toggleDisabled();
};
BootstrapSwitch.prototype.toggleDisabled = function() {
this.$element.prop("disabled", !this.options.disabled);
this.$wrapper.toggleClass("" + this.options.baseClass + "-" + this.options.disabledModifierClass);
this.options.disabled = !this.options.disabled;
this.$element.prop("disabled", this.options.disabled);
this.$wrapper.toggleClass(this.options.baseClass + "-disabled");
return this.$element;
};
@ -184,16 +222,59 @@
return this.options.readonly;
}
value = !!value;
this.$wrapper[value ? "addClass" : "removeClass"]("" + this.options.baseClass + "-" + this.options.readonlyModifierClass);
this.$element.prop("readonly", value);
this.options.readonly = value;
return this.$element;
if (value === this.options.readonly) {
return this.$element;
}
return this.toggleReadonly();
};
BootstrapSwitch.prototype.toggleReadonly = function() {
this.$element.prop("readonly", !this.options.readonly);
this.$wrapper.toggleClass("" + this.options.baseClass + "-" + this.options.readonlyModifierClass);
this.options.readonly = !this.options.readonly;
this.$element.prop("readonly", this.options.readonly);
this.$wrapper.toggleClass(this.options.baseClass + "-readonly");
return this.$element;
};
BootstrapSwitch.prototype.indeterminate = function(value) {
if (typeof value === "undefined") {
return this.options.indeterminate;
}
value = !!value;
if (value === this.options.indeterminate) {
return this.$element;
}
return this.toggleIndeterminate();
};
BootstrapSwitch.prototype.toggleIndeterminate = function() {
this.options.indeterminate = !this.options.indeterminate;
this.$element.prop("indeterminate", this.options.indeterminate);
this.$wrapper.toggleClass(this.options.baseClass + "-indeterminate");
this._containerPosition();
return this.$element;
};
BootstrapSwitch.prototype.inverse = function(value) {
if (typeof value === "undefined") {
return this.options.inverse;
}
value = !!value;
if (value === this.options.inverse) {
return this.$element;
}
return this.toggleInverse();
};
BootstrapSwitch.prototype.toggleInverse = function() {
var $off, $on;
this.$wrapper.toggleClass(this.options.baseClass + "-inverse");
$on = this.$on.clone(true);
$off = this.$off.clone(true);
this.$on.replaceWith($off);
this.$off.replaceWith($on);
this.$on = $off;
this.$off = $on;
this.options.inverse = !this.options.inverse;
return this.$element;
};
@ -204,9 +285,9 @@
return color;
}
if (color != null) {
this.$on.removeClass("" + this.options.baseClass + "-" + color);
this.$on.removeClass(this.options.baseClass + "-" + color);
}
this.$on.addClass("" + this.options.baseClass + "-" + value);
this.$on.addClass(this.options.baseClass + "-" + value);
this.options.onColor = value;
return this.$element;
};
@ -218,9 +299,9 @@
return color;
}
if (color != null) {
this.$off.removeClass("" + this.options.baseClass + "-" + color);
this.$off.removeClass(this.options.baseClass + "-" + color);
}
this.$off.addClass("" + this.options.baseClass + "-" + value);
this.$off.addClass(this.options.baseClass + "-" + value);
this.options.offColor = value;
return this.$element;
};
@ -230,6 +311,8 @@
return this.options.onText;
}
this.$on.html(value);
this._width();
this._containerPosition();
this.options.onText = value;
return this.$element;
};
@ -239,6 +322,8 @@
return this.options.offText;
}
this.$off.html(value);
this._width();
this._containerPosition();
this.options.offText = value;
return this.$element;
};
@ -248,10 +333,82 @@
return this.options.labelText;
}
this.$label.html(value);
this._width();
this.options.labelText = value;
return this.$element;
};
BootstrapSwitch.prototype.handleWidth = function(value) {
if (typeof value === "undefined") {
return this.options.handleWidth;
}
this.options.handleWidth = value;
this._width();
this._containerPosition();
return this.$element;
};
BootstrapSwitch.prototype.labelWidth = function(value) {
if (typeof value === "undefined") {
return this.options.labelWidth;
}
this.options.labelWidth = value;
this._width();
this._containerPosition();
return this.$element;
};
BootstrapSwitch.prototype.baseClass = function(value) {
return this.options.baseClass;
};
BootstrapSwitch.prototype.wrapperClass = function(value) {
if (typeof value === "undefined") {
return this.options.wrapperClass;
}
if (!value) {
value = $.fn.bootstrapSwitch.defaults.wrapperClass;
}
this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" "));
this.$wrapper.addClass(this._getClasses(value).join(" "));
this.options.wrapperClass = value;
return this.$element;
};
BootstrapSwitch.prototype.radioAllOff = function(value) {
if (typeof value === "undefined") {
return this.options.radioAllOff;
}
value = !!value;
if (value === this.options.radioAllOff) {
return this.$element;
}
this.options.radioAllOff = value;
return this.$element;
};
BootstrapSwitch.prototype.onInit = function(value) {
if (typeof value === "undefined") {
return this.options.onInit;
}
if (!value) {
value = $.fn.bootstrapSwitch.defaults.onInit;
}
this.options.onInit = value;
return this.$element;
};
BootstrapSwitch.prototype.onSwitchChange = function(value) {
if (typeof value === "undefined") {
return this.options.onSwitchChange;
}
if (!value) {
value = $.fn.bootstrapSwitch.defaults.onSwitchChange;
}
this.options.onSwitchChange = value;
return this.$element;
};
BootstrapSwitch.prototype.destroy = function() {
var $form;
$form = this.$element.closest("form");
@ -263,42 +420,136 @@
return this.$element;
};
BootstrapSwitch.prototype._width = function() {
var $handles, handleWidth;
$handles = this.$on.add(this.$off);
$handles.add(this.$label).css("width", "");
handleWidth = this.options.handleWidth === "auto" ? Math.max(this.$on.width(), this.$off.width()) : this.options.handleWidth;
$handles.width(handleWidth);
this.$label.width((function(_this) {
return function(index, width) {
if (_this.options.labelWidth !== "auto") {
return _this.options.labelWidth;
}
if (width < handleWidth) {
return handleWidth;
} else {
return width;
}
};
})(this));
this._handleWidth = this.$on.outerWidth();
this._labelWidth = this.$label.outerWidth();
this.$container.width((this._handleWidth * 2) + this._labelWidth);
return this.$wrapper.width(this._handleWidth + this._labelWidth);
};
BootstrapSwitch.prototype._containerPosition = function(state, callback) {
if (state == null) {
state = this.options.state;
}
this.$container.css("margin-left", (function(_this) {
return function() {
var values;
values = [0, "-" + _this._handleWidth + "px"];
if (_this.options.indeterminate) {
return "-" + (_this._handleWidth / 2) + "px";
}
if (state) {
if (_this.options.inverse) {
return values[1];
} else {
return values[0];
}
} else {
if (_this.options.inverse) {
return values[0];
} else {
return values[1];
}
}
};
})(this));
if (!callback) {
return;
}
return setTimeout(function() {
return callback();
}, 50);
};
BootstrapSwitch.prototype._init = function() {
var init, initInterval;
init = (function(_this) {
return function() {
_this.setPrevOptions();
_this._width();
return _this._containerPosition(null, function() {
if (_this.options.animate) {
return _this.$wrapper.addClass(_this.options.baseClass + "-animate");
}
});
};
})(this);
if (this.$wrapper.is(":visible")) {
return init();
}
return initInterval = window.setInterval((function(_this) {
return function() {
if (_this.$wrapper.is(":visible")) {
init();
return window.clearInterval(initInterval);
}
};
})(this), 50);
};
BootstrapSwitch.prototype._elementHandlers = function() {
return this.$element.on({
"setPreviousOptions.bootstrapSwitch": (function(_this) {
return function(e) {
return _this.setPrevOptions();
};
})(this),
"previousState.bootstrapSwitch": (function(_this) {
return function(e) {
_this.options = _this.prevOptions;
if (_this.options.indeterminate) {
_this.$wrapper.addClass(_this.options.baseClass + "-indeterminate");
}
return _this.$element.prop("checked", _this.options.state).trigger("change.bootstrapSwitch", true);
};
})(this),
"change.bootstrapSwitch": (function(_this) {
return function(e, skip) {
var checked;
var state;
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checked = _this.$element.is(":checked");
if (checked === _this.options.state) {
state = _this.$element.is(":checked");
_this._containerPosition(state);
if (state === _this.options.state) {
return;
}
_this.options.state = checked;
_this.$wrapper.removeClass(checked ? "" + _this.options.baseClass + "-" + _this.options.offModifierClass : "" + _this.options.baseClass + "-" + _this.options.onModifierClass).addClass(checked ? "" + _this.options.baseClass + "-" + _this.options.onModifierClass : "" + _this.options.baseClass + "-" + _this.options.offModifierClass);
_this.options.state = state;
_this.$wrapper.toggleClass(_this.options.baseClass + "-off").toggleClass(_this.options.baseClass + "-on");
if (!skip) {
if (_this.$element.is(":radio")) {
$("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
}
return _this.$element.trigger("switchChange.bootstrapSwitch", [checked]);
return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
}
};
})(this),
"focus.bootstrapSwitch": (function(_this) {
return function(e) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return _this.$wrapper.addClass("" + _this.options.baseClass + "-" + _this.options.focusedModifierClass);
return _this.$wrapper.addClass(_this.options.baseClass + "-focused");
};
})(this),
"blur.bootstrapSwitch": (function(_this) {
return function(e) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return _this.$wrapper.removeClass("" + _this.options.baseClass + "-" + _this.options.focusedModifierClass);
return _this.$wrapper.removeClass(_this.options.baseClass + "-focused");
};
})(this),
"keydown.bootstrapSwitch": (function(_this) {
@ -307,19 +558,12 @@
return;
}
switch (e.which) {
case 32:
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return _this.toggleState();
case 37:
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return _this.state(false);
case 39:
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return _this.state(true);
}
@ -330,13 +574,17 @@
BootstrapSwitch.prototype._handleHandlers = function() {
this.$on.on("click.bootstrapSwitch", (function(_this) {
return function(e) {
return function(event) {
event.preventDefault();
event.stopPropagation();
_this.state(false);
return _this.$element.trigger("focus.bootstrapSwitch");
};
})(this));
return this.$off.on("click.bootstrapSwitch", (function(_this) {
return function(e) {
return function(event) {
event.preventDefault();
event.stopPropagation();
_this.state(true);
return _this.$element.trigger("focus.bootstrapSwitch");
};
@ -345,50 +593,56 @@
BootstrapSwitch.prototype._labelHandlers = function() {
return this.$label.on({
"mousemove.bootstrapSwitch touchmove.bootstrapSwitch": (function(_this) {
"click": function(e) {
return e.stopPropagation();
},
"mousedown.bootstrapSwitch touchstart.bootstrapSwitch": (function(_this) {
return function(e) {
var left, percent, right;
if (!_this.drag) {
if (_this._dragStart || _this.options.disabled || _this.options.readonly) {
return;
}
e.preventDefault();
percent = (((e.pageX || e.originalEvent.touches[0].pageX) - _this.$wrapper.offset().left) / _this.$wrapper.width()) * 100;
left = 25;
right = 75;
if (percent < left) {
percent = left;
} else if (percent > right) {
percent = right;
e.stopPropagation();
_this._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(_this.$container.css("margin-left"), 10);
if (_this.options.animate) {
_this.$wrapper.removeClass(_this.options.baseClass + "-animate");
}
_this.$container.css("margin-left", "" + (percent - right) + "%");
return _this.$element.trigger("focus.bootstrapSwitch");
};
})(this),
"mousedown.bootstrapSwitch touchstart.bootstrapSwitch": (function(_this) {
"mousemove.bootstrapSwitch touchmove.bootstrapSwitch": (function(_this) {
return function(e) {
if (_this.drag || _this.options.disabled || _this.options.readonly) {
var difference;
if (_this._dragStart == null) {
return;
}
e.preventDefault();
_this.drag = true;
if (_this.options.animate) {
_this.$wrapper.removeClass("" + _this.options.baseClass + "-" + _this.options.animateModifierClass);
difference = (e.pageX || e.originalEvent.touches[0].pageX) - _this._dragStart;
if (difference < -_this._handleWidth || difference > 0) {
return;
}
return _this.$element.trigger("focus.bootstrapSwitch");
_this._dragEnd = difference;
return _this.$container.css("margin-left", _this._dragEnd + "px");
};
})(this),
"mouseup.bootstrapSwitch touchend.bootstrapSwitch": (function(_this) {
return function(e) {
if (!_this.drag) {
var state;
if (!_this._dragStart) {
return;
}
e.preventDefault();
_this.drag = false;
_this.$element.prop("checked", parseInt(_this.$container.css("margin-left"), 10) > -(_this.$container.width() / 6)).trigger("change.bootstrapSwitch");
_this.$container.css("margin-left", "");
if (_this.options.animate) {
return _this.$wrapper.addClass("" + _this.options.baseClass + "-" + _this.options.animateModifierClass);
_this.$wrapper.addClass(_this.options.baseClass + "-animate");
}
if (_this._dragEnd) {
state = _this._dragEnd > -(_this._handleWidth / 2);
_this._dragEnd = false;
_this.state(_this.options.inverse ? !state : state);
} else {
_this.state(!_this.options.state);
}
return _this._dragStart = false;
};
})(this),
"mouseleave.bootstrapSwitch": (function(_this) {
@ -399,6 +653,20 @@
});
};
BootstrapSwitch.prototype._externalLabelHandler = function() {
var $externalLabel;
$externalLabel = this.$element.closest("label");
return $externalLabel.on("click", (function(_this) {
return function(event) {
event.preventDefault();
event.stopImmediatePropagation();
if (event.target === $externalLabel[0]) {
return _this.toggleState();
}
};
})(this));
};
BootstrapSwitch.prototype._formHandler = function() {
var $form;
$form = this.$element.closest("form");
@ -410,18 +678,31 @@
return $form.find("input").filter(function() {
return $(this).data("bootstrap-switch");
}).each(function() {
return $(this).bootstrapSwitch("state", false);
return $(this).bootstrapSwitch("state", this.checked);
});
}, 1);
}).data("bootstrap-switch", true);
};
BootstrapSwitch.prototype._getClasses = function(classes) {
var c, cls, i, len;
if (!$.isArray(classes)) {
return [this.options.baseClass + "-" + classes];
}
cls = [];
for (i = 0, len = classes.length; i < len; i++) {
c = classes[i];
cls.push(this.options.baseClass + "-" + c);
}
return cls;
};
return BootstrapSwitch;
})();
$.fn.bootstrapSwitch = function() {
var args, option, ret;
option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
option = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
ret = this;
this.each(function() {
var $this, data;
@ -443,23 +724,18 @@
animate: true,
disabled: false,
readonly: false,
indeterminate: false,
inverse: false,
radioAllOff: false,
onColor: "primary",
offColor: "default",
onText: "ON",
offText: "OFF",
labelText: "&nbsp;",
handleWidth: "auto",
labelWidth: "auto",
baseClass: "bootstrap-switch",
wrapperClass: "wrapper",
containerClass: "container",
handleOnClass: "handle-on",
handleOffClass: "handle-off",
labelClass: "label",
onModifierClass: "on",
offModifierClass: "off",
focusedModifierClass: "focused",
animateModifierClass: "animate",
disabledModifierClass: "disabled",
readonlyModifierClass: "readonly",
onInit: function() {},
onSwitchChange: function() {}
};

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
@ -11,16 +11,16 @@ if (typeof jQuery === 'undefined') {
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.3.6
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -77,10 +77,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.6
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.6'
Alert.VERSION = '3.3.7'
Alert.TRANSITION_DURATION = 150
@ -109,7 +109,7 @@ if (typeof jQuery === 'undefined') {
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector)
var $parent = $(selector === '#' ? [] : selector)
if (e) e.preventDefault()
@ -172,10 +172,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.3.6
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
Button.VERSION = '3.3.6'
Button.VERSION = '3.3.7'
Button.DEFAULTS = {
loadingText: 'loading...'
@ -214,10 +214,10 @@ if (typeof jQuery === 'undefined') {
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
$el.addClass(d).attr(d, d).prop(d, true)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d).prop(d, false)
}
}, this), 0)
}
@ -281,10 +281,15 @@ if (typeof jQuery === 'undefined') {
$(document)
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
var $btn = $(e.target).closest('.btn')
Plugin.call($btn, 'toggle')
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
e.preventDefault()
// The target component still receive the focus
if ($btn.is('input,button')) $btn.trigger('focus')
else $btn.find('input:visible,button:visible').first().trigger('focus')
}
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@ -293,10 +298,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.3.6
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -324,7 +329,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.6'
Carousel.VERSION = '3.3.7'
Carousel.TRANSITION_DURATION = 600
@ -531,13 +536,14 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.6
* Bootstrap: collapse.js v3.3.7
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
/* jshint latedef: false */
+function ($) {
'use strict';
@ -561,7 +567,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.6'
Collapse.VERSION = '3.3.7'
Collapse.TRANSITION_DURATION = 350
@ -743,10 +749,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.3.6
* Bootstrap: dropdown.js v3.3.7
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -763,7 +769,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.6'
Dropdown.VERSION = '3.3.7'
function getParent($this) {
var selector = $this.attr('data-target')
@ -909,10 +915,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.6
* Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -943,7 +949,7 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.VERSION = '3.3.6'
Modal.VERSION = '3.3.7'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@ -1050,7 +1056,9 @@ if (typeof jQuery === 'undefined') {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
if (document !== e.target &&
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
@ -1247,11 +1255,11 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.6
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1274,7 +1282,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.6'
Tooltip.VERSION = '3.3.7'
Tooltip.TRANSITION_DURATION = 150
@ -1565,9 +1573,11 @@ if (typeof jQuery === 'undefined') {
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
}
callback && callback()
}
@ -1610,7 +1620,10 @@ if (typeof jQuery === 'undefined') {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var isSvg = window.SVGElement && el instanceof window.SVGElement
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
// See https://github.com/twbs/bootstrap/issues/20280
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
@ -1726,6 +1739,7 @@ if (typeof jQuery === 'undefined') {
that.$tip = null
that.$arrow = null
that.$viewport = null
that.$element = null
})
}
@ -1762,10 +1776,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.3.6
* Bootstrap: popover.js v3.3.7
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1782,7 +1796,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.6'
Popover.VERSION = '3.3.7'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@ -1871,10 +1885,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.6
* Bootstrap: scrollspy.js v3.3.7
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1900,7 +1914,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
ScrollSpy.VERSION = '3.3.6'
ScrollSpy.VERSION = '3.3.7'
ScrollSpy.DEFAULTS = {
offset: 10
@ -2044,10 +2058,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.3.6
* Bootstrap: tab.js v3.3.7
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -2064,7 +2078,7 @@ if (typeof jQuery === 'undefined') {
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.6'
Tab.VERSION = '3.3.7'
Tab.TRANSITION_DURATION = 150
@ -2200,10 +2214,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.3.6
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -2229,7 +2243,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
Affix.VERSION = '3.3.6'
Affix.VERSION = '3.3.7'
Affix.RESET = 'affix affix-top affix-bottom'

File diff suppressed because one or more lines are too long

@ -1,8 +1,326 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.3';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Extends the built-in list of html5 elements
* @memberOf html5
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
* @param {Document} ownerDocument The context document.
*/
function addElements(newElements, ownerDocument) {
var elements = html5.elements;
if(typeof elements != 'string'){
elements = elements.join(' ');
}
if(typeof newElements != 'string'){
newElements = newElements.join(' ');
}
html5.elements = elements +' '+ newElements;
shivDocument(ownerDocument);
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document|DocumentFragment} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment,
//extends list of elements
addElements: addElements
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
if(typeof module == 'object' && module.exports){
module.exports = html5;
}
}(typeof window !== "undefined" ? window : this, document));

@ -0,0 +1,4 @@
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,190 +1,204 @@
/*!
* typeahead.js 0.10.2
* typeahead.js 0.10.5
* https://github.com/twitter/typeahead.js
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
*/
(function($) {
var _ = {
isMsie: function() {
return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
},
isBlankString: function(str) {
return !str || /^\s*$/.test(str);
},
escapeRegExChars: function(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
},
isString: function(obj) {
return typeof obj === "string";
},
isNumber: function(obj) {
return typeof obj === "number";
},
isArray: $.isArray,
isFunction: $.isFunction,
isObject: $.isPlainObject,
isUndefined: function(obj) {
return typeof obj === "undefined";
},
bind: $.proxy,
each: function(collection, cb) {
$.each(collection, reverseArgs);
function reverseArgs(index, value) {
return cb(value, index);
}
},
map: $.map,
filter: $.grep,
every: function(obj, test) {
var result = true;
if (!obj) {
return result;
}
$.each(obj, function(key, val) {
if (!(result = test.call(null, val, key, obj))) {
return false;
var _ = function() {
"use strict";
return {
isMsie: function() {
return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
},
isBlankString: function(str) {
return !str || /^\s*$/.test(str);
},
escapeRegExChars: function(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
},
isString: function(obj) {
return typeof obj === "string";
},
isNumber: function(obj) {
return typeof obj === "number";
},
isArray: $.isArray,
isFunction: $.isFunction,
isObject: $.isPlainObject,
isUndefined: function(obj) {
return typeof obj === "undefined";
},
toStr: function toStr(s) {
return _.isUndefined(s) || s === null ? "" : s + "";
},
bind: $.proxy,
each: function(collection, cb) {
$.each(collection, reverseArgs);
function reverseArgs(index, value) {
return cb(value, index);
}
});
return !!result;
},
some: function(obj, test) {
var result = false;
if (!obj) {
return result;
}
$.each(obj, function(key, val) {
if (result = test.call(null, val, key, obj)) {
return false;
},
map: $.map,
filter: $.grep,
every: function(obj, test) {
var result = true;
if (!obj) {
return result;
}
});
return !!result;
},
mixin: $.extend,
getUniqueId: function() {
var counter = 0;
return function() {
return counter++;
};
}(),
templatify: function templatify(obj) {
return $.isFunction(obj) ? obj : template;
function template() {
return String(obj);
}
},
defer: function(fn) {
setTimeout(fn, 0);
},
debounce: function(func, wait, immediate) {
var timeout, result;
return function() {
var context = this, args = arguments, later, callNow;
later = function() {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
$.each(obj, function(key, val) {
if (!(result = test.call(null, val, key, obj))) {
return false;
}
});
return !!result;
},
some: function(obj, test) {
var result = false;
if (!obj) {
return result;
}
$.each(obj, function(key, val) {
if (result = test.call(null, val, key, obj)) {
return false;
}
});
return !!result;
},
mixin: $.extend,
getUniqueId: function() {
var counter = 0;
return function() {
return counter++;
};
callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
}(),
templatify: function templatify(obj) {
return $.isFunction(obj) ? obj : template;
function template() {
return String(obj);
}
return result;
};
},
throttle: function(func, wait) {
var context, args, timeout, result, previous, later;
previous = 0;
later = function() {
previous = new Date();
timeout = null;
result = func.apply(context, args);
};
return function() {
var now = new Date(), remaining = wait - (now - previous);
context = this;
args = arguments;
if (remaining <= 0) {
},
defer: function(fn) {
setTimeout(fn, 0);
},
debounce: function(func, wait, immediate) {
var timeout, result;
return function() {
var context = this, args = arguments, later, callNow;
later = function() {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
}
};
callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
}
return result;
};
},
throttle: function(func, wait) {
var context, args, timeout, result, previous, later;
previous = 0;
later = function() {
previous = new Date();
timeout = null;
previous = now;
result = func.apply(context, args);
} else if (!timeout) {
timeout = setTimeout(later, remaining);
}
return result;
};
},
noop: function() {}
};
var html = {
wrapper: '<span class="twitter-typeahead"></span>',
dropdown: '<span class="tt-dropdown-menu"></span>',
dataset: '<div class="tt-dataset-%CLASS%"></div>',
suggestions: '<span class="tt-suggestions"></span>',
suggestion: '<div class="tt-suggestion"></div>'
};
var css = {
wrapper: {
position: "relative",
display: "inline-block"
},
hint: {
position: "absolute",
top: "0",
left: "0",
borderColor: "transparent",
boxShadow: "none"
},
input: {
position: "relative",
verticalAlign: "top",
backgroundColor: "transparent"
},
inputWithNoHint: {
position: "relative",
verticalAlign: "top"
},
dropdown: {
position: "absolute",
top: "100%",
left: "0",
zIndex: "100",
display: "none"
},
suggestions: {
display: "block"
},
suggestion: {
whiteSpace: "nowrap",
cursor: "pointer"
},
suggestionChild: {
whiteSpace: "normal"
},
ltr: {
left: "0",
right: "auto"
},
rtl: {
left: "auto",
right: " 0"
};
return function() {
var now = new Date(), remaining = wait - (now - previous);
context = this;
args = arguments;
if (remaining <= 0) {
clearTimeout(timeout);
timeout = null;
previous = now;
result = func.apply(context, args);
} else if (!timeout) {
timeout = setTimeout(later, remaining);
}
return result;
};
},
noop: function() {}
};
}();
var html = function() {
return {
wrapper: '<span class="twitter-typeahead"></span>',
dropdown: '<span class="tt-dropdown-menu"></span>',
dataset: '<div class="tt-dataset-%CLASS%"></div>',
suggestions: '<span class="tt-suggestions"></span>',
suggestion: '<div class="tt-suggestion"></div>'
};
}();
var css = function() {
"use strict";
var css = {
wrapper: {
position: "relative",
display: "inline-block"
},
hint: {
position: "absolute",
top: "0",
left: "0",
borderColor: "transparent",
boxShadow: "none",
opacity: "1"
},
input: {
position: "relative",
verticalAlign: "top",
backgroundColor: "transparent"
},
inputWithNoHint: {
position: "relative",
verticalAlign: "top"
},
dropdown: {
position: "absolute",
top: "100%",
left: "0",
zIndex: "100",
display: "none"
},
suggestions: {
display: "block"
},
suggestion: {
whiteSpace: "nowrap",
cursor: "pointer"
},
suggestionChild: {
whiteSpace: "normal"
},
ltr: {
left: "0",
right: "auto"
},
rtl: {
left: "auto",
right: " 0"
}
};
if (_.isMsie()) {
_.mixin(css.input, {
backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
});
}
};
if (_.isMsie()) {
_.mixin(css.input, {
backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
});
}
if (_.isMsie() && _.isMsie() <= 7) {
_.mixin(css.input, {
marginTop: "-1px"
});
}
if (_.isMsie() && _.isMsie() <= 7) {
_.mixin(css.input, {
marginTop: "-1px"
});
}
return css;
}();
var EventBus = function() {
"use strict";
var namespace = "typeahead:";
function EventBus(o) {
if (!o || !o.el) {
@ -201,6 +215,7 @@
return EventBus;
}();
var EventEmitter = function() {
"use strict";
var splitter = /\s+/, nextTick = getNextTick();
return {
onSync: onSync,
@ -260,7 +275,7 @@
return flush;
function flush() {
var cancelled;
for (var i = 0; !cancelled && i < callbacks.length; i += 1) {
for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
cancelled = callbacks[i].apply(context, args) === false;
}
return !cancelled;
@ -290,6 +305,7 @@
}
}();
var highlight = function(doc) {
"use strict";
var defaults = {
node: null,
pattern: null,
@ -308,7 +324,7 @@
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
traverse(o.node, hightlightTextNode);
function hightlightTextNode(textNode) {
var match, patternNode;
var match, patternNode, wrapperNode;
if (match = regex.exec(textNode.data)) {
wrapperNode = doc.createElement(o.tagName);
o.className && (wrapperNode.className = o.className);
@ -333,7 +349,7 @@
};
function getRegex(patterns, caseSensitive, wordsOnly) {
var escapedPatterns = [], regexStr;
for (var i = 0; i < patterns.length; i++) {
for (var i = 0, len = patterns.length; i < len; i++) {
escapedPatterns.push(_.escapeRegExChars(patterns[i]));
}
regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
@ -341,6 +357,7 @@
}
}(window.document);
var Input = function() {
"use strict";
var specialKeyCodeMap;
specialKeyCodeMap = {
9: "tab",
@ -436,8 +453,9 @@
inputValue = this.getInputValue();
areEquivalent = areQueriesEquivalent(inputValue, this.query);
hasDifferentWhitespace = areEquivalent ? this.query.length !== inputValue.length : false;
this.query = inputValue;
if (!areEquivalent) {
this.trigger("queryChanged", this.query = inputValue);
this.trigger("queryChanged", this.query);
} else if (hasDifferentWhitespace) {
this.trigger("whitespaceChanged", this.query);
}
@ -534,6 +552,7 @@
}
}();
var Dataset = function() {
"use strict";
var datasetKey = "ttDataset", valueKey = "ttValue", datumKey = "ttDatum";
function Dataset(o) {
o = o || {};
@ -587,6 +606,7 @@
nodes = _.map(suggestions, getSuggestionNode);
$suggestions.append.apply($suggestions, nodes);
that.highlight && highlight({
className: "tt-highlight",
node: $suggestions[0],
pattern: query
});
@ -666,6 +686,7 @@
}
}();
var Dropdown = function() {
"use strict";
function Dropdown(o) {
var that = this, onSuggestionClick, onSuggestionMouseEnter, onSuggestionMouseLeave;
o = o || {};
@ -825,6 +846,7 @@
}
}();
var Typeahead = function() {
"use strict";
var attrsKey = "ttAttrs";
function Typeahead(o) {
var $menu, $input, $hint;
@ -835,7 +857,7 @@
this.isActivated = false;
this.autoselect = !!o.autoselect;
this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
this.$node = buildDomStructure(o.input, o.withHint);
this.$node = buildDom(o.input, o.withHint);
$menu = this.$node.find(".tt-dropdown-menu");
$input = this.$node.find(".tt-input");
$hint = this.$node.find(".tt-hint");
@ -1003,6 +1025,7 @@
this.dropdown.close();
},
setVal: function setVal(val) {
val = _.toStr(val);
if (this.isActivated) {
this.input.setInputValue(val);
} else {
@ -1022,15 +1045,16 @@
}
});
return Typeahead;
function buildDomStructure(input, withHint) {
function buildDom(input, withHint) {
var $input, $wrapper, $dropdown, $hint;
$input = $(input);
$wrapper = $(html.wrapper).css(css.wrapper);
$dropdown = $(html.dropdown).css(css.dropdown);
$hint = $input.clone().css(css.hint).css(getBackgroundStyles($input));
$hint.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder").prop("disabled", true).attr({
$hint.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly", true).attr({
autocomplete: "off",
spellcheck: "false"
spellcheck: "false",
tabindex: -1
});
$input.data(attrsKey, {
dir: $input.attr("dir"),
@ -1069,6 +1093,7 @@
}
}();
(function() {
"use strict";
var old, typeaheadKey, methods;
old = $.fn.typeahead;
typeaheadKey = "ttTypeahead";
@ -1141,8 +1166,12 @@
}
};
$.fn.typeahead = function(method) {
if (methods[method]) {
return methods[method].apply(this, [].slice.call(arguments, 1));
var tts;
if (methods[method] && method !== "initialize") {
tts = this.filter(function() {
return !!$(this).data(typeaheadKey);
});
return methods[method].apply(tts, [].slice.call(arguments, 1));
} else {
return methods.initialize.apply(this, arguments);
}

File diff suppressed because one or more lines are too long

@ -49,7 +49,7 @@ for the JavaScript code in this page.
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="#[relativeBase]#env/bootstrap/js/html5shiv.js"></script>
<script src="#[relativeBase]#env/bootstrap/js/html5shiv.min.js"></script>
<script src="#[relativeBase]#env/bootstrap/js/respond.min.js"></script>
<![endif]-->

@ -16,22 +16,22 @@
<tr>
<td><a href="env/bootstrap/js/jquery.min.js">jquery.min.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="https://code.jquery.com/jquery-1.11.0.js">jquery-1.11.0.js</a></td>
<td><a href="env/bootstrap/js/jquery.js">jquery.js</a> (1.12.4)</td>
</tr>
<tr>
<td><a href="env/bootstrap/js/bootstrap.min.js">bootstrap.min.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="env/bootstrap/js/bootstrap.js">bootstrap.js</a> (3.3.6)</td>
<td><a href="env/bootstrap/js/bootstrap.js">bootstrap.js</a> (3.3.7)</td>
</tr>
<tr>
<td><a href="env/bootstrap/js/bootstrap-switch.min.js">bootstrap-switch.min.js</a></td>
<td><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a></td>
<td><a href="env/bootstrap/js/bootstrap-switch.js">bootstrap-switch.js</a> (3.0.0)</td>
<td><a href="env/bootstrap/js/bootstrap-switch.js">bootstrap-switch.js</a> (3.3.2)</td>
</tr>
<tr>
<td><a href="env/bootstrap/js/html5shiv.js">html5shiv.js</a></td>
<td><a href="env/bootstrap/js/html5shiv.min.js">html5shiv.min.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="https://raw.githubusercontent.com/aFarkas/html5shiv/3.7.0/src/html5shiv.js">html5shiv.js</a> (3.7.0)</td>
<td><a href="env/bootstrap/js/html5shiv.js">html5shiv.js</a> (3.7.3)</td>
</tr>
<tr>
<td><a href="env/bootstrap/js/respond.min.js">respond.min.js</a></td>
@ -41,7 +41,7 @@
<tr>
<td><a href="env/bootstrap/js/typeahead.jquery.min.js">typeahead.jquery.min.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="https://github.com/twitter/typeahead.js/blob/v0.10.2/dist/typeahead.jquery.js">typeahead.jquery.js</a> (0.10.2)</td>
<td><a href="env/bootstrap/js/typeahead.jquery.js">typeahead.jquery.js</a> (0.10.5)</td>
</tr>
<tr>
<td><a href="jquery/flexigrid/js/flexigrid.pack.js">flexigrid.pack.js</a></td>

@ -18,11 +18,11 @@
<!-- Custom styles for this template -->
<link href="env/bootstrap-base.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="env/bootstrap/js/html5shiv.min.js"></script>
<script src="env/bootstrap/js/respond.min.js"></script>
<![endif]-->
<!-- style for hypertree -->
<link href="env/hypertree.css" rel="stylesheet">

Loading…
Cancel
Save