diff --git a/plist b/plist index e71669608..c1a7e1a4d 100644 --- a/plist +++ b/plist @@ -1401,7 +1401,6 @@ /usr/local/opnsense/www/js/qrcode.js /usr/local/opnsense/www/js/theme.js /usr/local/opnsense/www/js/tokenize2.js -/usr/local/opnsense/www/js/tokenize2.min.js /usr/local/opnsense/www/themes/opnsense/LICENSE /usr/local/opnsense/www/themes/opnsense/assets/fonts/SourceSansPro-Bold/SourceSansPro-Bold.eot /usr/local/opnsense/www/themes/opnsense/assets/fonts/SourceSansPro-Bold/SourceSansPro-Bold.otf diff --git a/src/opnsense/mvc/app/views/layouts/default.volt b/src/opnsense/mvc/app/views/layouts/default.volt index 58943d5e9..92c0b7788 100644 --- a/src/opnsense/mvc/app/views/layouts/default.volt +++ b/src/opnsense/mvc/app/views/layouts/default.volt @@ -165,7 +165,7 @@ - + diff --git a/src/opnsense/www/js/tokenize2.min.js b/src/opnsense/www/js/tokenize2.min.js deleted file mode 100644 index a2c1ecff0..000000000 --- a/src/opnsense/www/js/tokenize2.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof module&&module.exports?module.exports=function(t,e){return void 0===e&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(t)),o(e),e}:o(jQuery)}(function(r){var s=function(t,e){this.control=!1,this.element=r(t),this.options=r.extend({},s.DEFAULTS,e),this.options.tabIndex=-1===this.options.tabIndex?0:this.options.tabIndex,this.options.sortable=1!==this.options.tokensMaxItems&&this.options.sortable,this.bind(),this.trigger("tokenize:load")},o=8,i=9,n=13,a=27,h=38,d=40,p=17,e=16;s.VERSION="1.0",s.DEBOUNCE=null,s.DEFAULTS={tokensMaxItems:0,tokensAllowCustom:!1,dropdownMaxItems:10,searchMinLength:0,searchFromStart:!0,searchHighlight:!0,displayNoResultsMessage:!1,noResultsMessageText:'No results mached "%s"',delimiter:",",dataSource:"select",debounce:0,placeholder:!1,sortable:!1,allowEmptyValues:!1,zIndexMargin:500,tabIndex:0},s.prototype.trigger=function(t,e,o,i){this.element.trigger(t,e,o,i)},s.prototype.bind=function(){this.element.on("tokenize:load",{},r.proxy(function(){this.init()},this)).on("tokenize:clear",{},r.proxy(function(){this.clear()},this)).on("tokenize:remap",{},r.proxy(function(){this.remap()},this)).on("tokenize:select",{},r.proxy(function(t,e){this.focus(e)},this)).on("tokenize:deselect",{},r.proxy(function(){this.blur()},this)).on("tokenize:search",{},r.proxy(function(t,e){this.find(e)},this)).on("tokenize:paste",{},r.proxy(function(){this.paste()},this)).on("tokenize:dropdown:up",{},r.proxy(function(){this.dropdownSelectionMove(-1)},this)).on("tokenize:dropdown:down",{},r.proxy(function(){this.dropdownSelectionMove(1)},this)).on("tokenize:dropdown:clear",{},r.proxy(function(){this.dropdownClear()},this)).on("tokenize:dropdown:show",{},r.proxy(function(){this.dropdownShow()},this)).on("tokenize:dropdown:hide",{},r.proxy(function(){this.dropdownHide()},this)).on("tokenize:dropdown:fill",{},r.proxy(function(t,e){this.dropdownFill(e)},this)).on("tokenize:dropdown:itemAdd",{},r.proxy(function(t,e){this.dropdownAddItem(e)},this)).on("tokenize:keypress",{},r.proxy(function(t,e){this.keypress(e)},this)).on("tokenize:keydown",{},r.proxy(function(t,e){this.keydown(e)},this)).on("tokenize:keyup",{},r.proxy(function(t,e){this.keyup(e)},this)).on("tokenize:tokens:reorder",{},r.proxy(function(){this.reorder()},this)).on("tokenize:tokens:add",{},r.proxy(function(t,e,o,i){this.tokenAdd(e,o,i)},this)).on("tokenize:tokens:remove",{},r.proxy(function(t,e){this.tokenRemove(e)},this))},s.prototype.init=function(){this.id=this.guid(),this.element.hide(),this.element.attr("multiple")||console.error("Attribute multiple is missing, tokenize2 can be buggy !"),this.dropdown=void 0,this.searchContainer=r('
  • ').html(this.options.placeholder),this.tokensContainer.prepend(this.placeholder),this.element.on("tokenize:tokens:add tokenize:remap tokenize:select tokenize:deselect tokenize:tokens:remove",r.proxy(function(){this.container.hasClass("focus")||0').attr("id",this.id),this.container.append(this.tokensContainer).insertAfter(this.element),this.container.focusin(r.proxy(function(t){this.trigger("tokenize:select",[r(t.target)[0]===this.tokensContainer[0]])},this)).focusout(r.proxy(function(){this.trigger("tokenize:deselect")},this)),1===this.options.tokensMaxItems&&this.container.addClass("single"),this.options.sortable&&(void 0!==r.ui?(this.container.addClass("sortable"),this.tokensContainer.sortable({items:"li.token",cursor:"move",placeholder:"token shadow",forcePlaceholderSize:!0,update:r.proxy(function(){this.trigger("tokenize:tokens:reorder")},this),start:r.proxy(function(){this.searchContainer.hide()},this),stop:r.proxy(function(){this.searchContainer.show()},this)})):(this.options.sortable=!1,console.error("jQuery UI is not loaded, sortable option has been disabled"))),this.element.on("tokenize:tokens:add tokenize:tokens:remove",r.proxy(function(){0=this.options.tokensMaxItems?this.searchContainer.hide():this.searchContainer.show()},this)).on("tokenize:keydown tokenize:keyup tokenize:loaded",r.proxy(function(){this.scaleInput()},this)),this.trigger("tokenize:remap"),this.trigger("tokenize:tokens:reorder"),this.trigger("tokenize:loaded"),this.element.is(":disabled")&&this.disable()},s.prototype.reorder=function(){var o,i;this.options.sortable&&r.each(this.tokensContainer.sortable("toArray",{attribute:"data-value"}),r.proxy(function(t,e){i=r('option[value="'+r.escapeSelector(e)+'"]',this.element),void 0===o?i.prependTo(this.element):o.after(i),o=i},this))},s.prototype.paste=function(){var t=new RegExp(this.escapeRegex(Array.isArray(this.options.delimiter)?this.options.delimiter.join("|"):this.options.delimiter),"ig");t.test(this.input.val())&&r.each(this.input.val().split(t),r.proxy(function(t,e){this.trigger("tokenize:tokens:add",[e,null,!0])},this))},s.prototype.tokenAdd=function(e,t,o){if(e=this.escape(e),t=t||e,o=o||!1,this.resetInput(),void 0===e||!this.options.allowEmptyValues&&""===e)return this.trigger("tokenize:tokens:error:empty"),this;if(0=this.options.tokensMaxItems)return this.trigger("tokenize:tokens:error:max"),this;if(0").val(e).html(t));else{if(!this.options.tokensAllowCustom)return this.trigger("tokenize:tokens:error:notokensAllowCustom"),this;this.element.append(r('
  • ').attr("data-value",e).append(""+t+"").prepend(r('').on("mousedown touchstart",{},r.proxy(function(t){t.preventDefault(),this.trigger("tokenize:tokens:remove",[e])},this))).insertBefore(this.searchContainer),this.trigger("tokenize:dropdown:hide"),this},s.prototype.tokenRemove=function(t){var e=r('option[value="'+r.escapeSelector(t)+'"]',this.element);return"custom"===e.attr("data-type")?e.remove():e.removeAttr("selected").prop("selected",!1),r('li.token[data-value="'+r.escapeSelector(t)+'"]',this.tokensContainer).remove(),this.trigger("tokenize:tokens:reorder"),this},s.prototype.remap=function(){return r("option:selected",this.element).each(r.proxy(function(t,e){this.trigger("tokenize:tokens:add",[r(e).val(),r(e).html(),!1])},this)),this},s.prototype.disable=function(){return this.tokensContainer.addClass("disabled"),this.searchContainer.hide(),this},s.prototype.enable=function(){return this.tokensContainer.removeClass("disabled"),this.searchContainer.show(),this},s.prototype.focus=function(t){this.element.is(":disabled")?this.tokensContainer.blur():(t&&this.input.focus(),this.container.addClass("focus"))},s.prototype.blur=function(){this.isDropdownOpen()&&this.trigger("tokenize:dropdown:hide"),this.container.removeClass("focus"),this.resetPending(),this.tokensContainer.attr("tabindex")||this.tokensContainer.attr("tabindex",this.options.tabIndex)},s.prototype.keydown=function(t){if("keydown"===t.type)switch(t.keyCode){case o:if(this.input.val().length<1){if(t.preventDefault(),0=this.options.searchMinLength&&0