BarterDEX/gui/js/fuelux.min.js

7 lines
131 KiB
JavaScript
Raw Normal View History

/*!
* Fuel UX v3.16.1
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery","bootstrap"],e):e(jQuery)}(function(e){if(void 0===e)throw new Error("Fuel UX's JavaScript requires jQuery");if(void 0===e.fn.dropdown||void 0===e.fn.collapse)throw new Error("Fuel UX's JavaScript requires Bootstrap");!function(e){var t=e.fn.checkbox,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){this.options=e.extend({},e.fn.checkbox.defaults,s);var n=e(t);if("label"===t.tagName.toLowerCase()){this.$label=n,this.$chk=this.$label.find('input[type="checkbox"]'),this.$container=n.parent(".checkbox"),!this.options.ignoreVisibilityCheck&&this.$chk.css("visibility").match(/hidden|collapse/)&&i("For accessibility reasons, in order for tab and space to function on checkbox, checkbox `<input />`'s `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.");var a=this.$chk.attr("data-toggle");this.$toggleContainer=e(a),this.$chk.on("change",e.proxy(this.itemchecked,this)),this.setInitialState()}else i("Checkbox must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/checkbox.html for example of proper markup. Call `.checkbox()` on the `<label>` not the `<input>`")};(s.prototype={constructor:s,setInitialState:function(){var e=this.$chk,t=e.prop("checked"),i=e.prop("disabled");this.setCheckedState(e,t),this.setDisabledState(e,i)},setCheckedState:function(e,t){var i=e,s=this.$label,n=this.$toggleContainer;t?(i.prop("checked",!0),s.addClass("checked"),n.removeClass("hide hidden"),s.trigger("checked.fu.checkbox")):(i.prop("checked",!1),s.removeClass("checked"),n.addClass("hidden"),s.trigger("unchecked.fu.checkbox")),s.trigger("changed.fu.checkbox",t)},setDisabledState:function(t,i){var s=e(t),n=this.$label;return i?(s.prop("disabled",!0),n.addClass("disabled"),n.trigger("disabled.fu.checkbox")):(s.prop("disabled",!1),n.removeClass("disabled"),n.trigger("enabled.fu.checkbox")),s},itemchecked:function(t){var i=e(t.target),s=i.prop("checked");this.setCheckedState(i,s)},toggle:function(){this.isChecked()?this.uncheck():this.check()},check:function(){this.setCheckedState(this.$chk,!0)},uncheck:function(){this.setCheckedState(this.$chk,!1)},isChecked:function(){return this.$chk.prop("checked")},enable:function(){this.setDisabledState(this.$chk,!1)},disable:function(){this.setDisabledState(this.$chk,!0)},destroy:function(){return this.$label.remove(),this.$label[0].outerHTML}}).getValue=s.prototype.isChecked,e.fn.checkbox=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.checkbox"),l="object"==typeof t&&t;r||a.data("fu.checkbox",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.checkbox.defaults={ignoreVisibilityCheck:!1},e.fn.checkbox.Constructor=s,e.fn.checkbox.noConflict=function(){return e.fn.checkbox=t,this},e(document).on("mouseover.fu.checkbox.data-api","[data-initialize=checkbox]",function(t){var i=e(t.target);i.data("fu.checkbox")||i.checkbox(i.data())}),e(function(){e("[data-initialize=checkbox]").each(function(){var t=e(this);t.data("fu.checkbox")||t.checkbox(t.data())})})}(e),function(e){var t=e.fn.combobox,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.combobox.defaults,i),this.$dropMenu=this.$element.find(".dropdown-menu"),this.$input=this.$element.find("input"),this.$button=this.$element.find(".btn"),this.$inputGroupBtn=this.$element.find(".input-group-btn"),this.$element.on("click.fu.combobox","a",e.proxy(this.itemclicked,this)),this.$element.on("change.fu.combobox","input",e.proxy(this.inputchanged,this)),this.$element.on("shown.bs.dropdown",e.proxy(this.menuShown,this)),this.$input.on("keyup.fu.combobox",e.proxy(this.keypress,this)),this.setDefaultSelection(),0===this.$dropMenu.children("li").length&&this.$button.addClass("disabled"),this.options.filterOnKeypress&&this.options.filter(this.$dropMenu.find("li"),this.$input.val(),this)};(i.protot