All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
META-INF.resources.butterfaces-dist-bundle-js.butterfaces-js-bundle.min.js Maven / Gradle / Ivy
!function(){var s=!1,u=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(t){var o=this.prototype;s=!0;var e=new this;for(var n in s=!1,t)e[n]="function"==typeof t[n]&&"function"==typeof o[n]&&u.test(t[n])?function(n,i){return function(){var t=this._super;this._super=o[n];var e=i.apply(this,arguments);return this._super=t,e}}(n,t[n]):t[n];function i(){!s&&this.init&&this.init.apply(this,arguments)}return((i.prototype=e).constructor=i).extend=arguments.callee,i}}(),function(i){i.fn._butterAutoCompleteInit=function(){return this.each(function(){new t(this)})};var t=Class.extend({init:function(t){this.SEARCH_REQUEST_DELAY=300;var e=i(t);this.$input=e.prev(),this.$input.parent().css({position:"relative"}),this.autocompleteId=e.attr("id"),this.$selectedOption=null,this.ignoreKeyupEvent=!1,this.requestDelayTimerId=null,this.isRequestRunning=!1,this.areChangesMadeWhileRequestWasRunning=!1,this._keyCodes={tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,caps_lock:20,escape:27,page_up:33,page_down:34,end:35,home:36,arrow_left:37,arrow_up:38,arrow_right:39,arrow_down:40,insert:45,delete_key:46,left_window_key:91,right_window_key:92,select_key:93,num_lock:144,scroll_lock:145};var n=this;n.$input.on("keydown",function(t){t.which===n._keyCodes.enter?n._handleEnterKeyDown(t):t.which===n._keyCodes.arrow_up||t.which===n._keyCodes.arrow_down?n._handleArrowUpAndDownKeyDown(t):t.which===n._keyCodes.escape&&n._handleEscapeKeyDown(t)}).on("keyup",function(t){for(keyName in n._keyCodes)if(n._keyCodes[keyName]===t.which)return void n._stopEvent(t);return n.ignoreKeyupEvent?(n._stopEvent(t),void(n.ignoreKeyupEvent=!1)):0===n.$input.val().length?(n._stopEvent(t),void n._hideAutocompleteResultList()):void n._trySendJsfAjaxRequest()}).on("blur",function(t){window.setTimeout(function(){n._hideAutocompleteResultList()},100)})},_handleEnterKeyDown:function(t){null!==this.$selectedOption&&(this._stopEvent(t),this._setSelectedValue())},_handleArrowUpAndDownKeyDown:function(t){this._stopEvent(t);var e=this._getAutocompleteElement();!e.is(":visible")&&0
').appendTo(this.$input.parent())},_hideLoadingSpinner:function(){this.$input.parent().find(".butter-dropdownlist-spinner").remove()},_initAndShowAutocompleteResultList:function(){var t=this,e=t._getAutocompleteElement();e.show().css({width:t.$input.innerWidth()}).highlight(t.$input.val()),e.find("ul").on("mouseleave",function(){t._clearResultOptionSelection()}),e.find("li").on("mousedown",function(){t._setSelectedValue()}).on("mouseenter",function(){t._selectResultOptionElement(this)})},_selectResultOptionElement:function(t){this._clearResultOptionSelection();var e=i(t);e.addClass("butter-dropdownlist-resultItem-selected"),this.$selectedOption=e},_clearResultOptionSelection:function(){this.$selectedOption=null,this._getAutocompleteElement().find(".butter-dropdownlist-resultItem-selected").removeClass("butter-dropdownlist-resultItem-selected")},_moveResultOptionElementSelectionCursor:function(t,e){var n,i,o;0