From 91c4c36b5646b8c8617327478d266142e866ff1f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 31 May 2023 12:08:27 +0000 Subject: [PATCH] Bug 33868: Upgrade the Multiple Select plugin in the staff interface This patch upgrades the Multiple Select plugin in the staff interface and adds some minor adjustments to system preferences CSS to accommodate the change. The listing on the about page is updated with current information. To test, apply the patch and clear your browser cache if necessary. - Go to Administration -> System preferences. - Test some preferences which use the plugin, e.g. - ApplyFrameworkDefaults - CoceProviders - OpacHiddenItemsExceptions - OPACAllowUserToChangeBranch - Confirm that the menus look correct and work correctly. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fa809812be0bc6a3a524350b27785f65ff3533fa) Signed-off-by: Martin Renvoize --- .../multiple-select/jquery.multiple.select.js | 589 ------------------ .../multiple-select/multiple-select.css | 191 ------ .../multiple-select/multiple-select.min.css | 10 + .../multiple-select/multiple-select.min.js | 10 + .../multiple-select/multiple-select.png | Bin 3342 -> 0 bytes .../intranet-tmpl/prog/css/preferences.css | 8 + .../intranet-tmpl/prog/en/modules/about.tt | 4 +- .../prog/en/modules/admin/preferences.tt | 4 +- 8 files changed, 32 insertions(+), 784 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/jquery.multiple.select.js delete mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/multiple-select.css create mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/multiple-select.min.css create mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/multiple-select.min.js delete mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/multiple-select.png diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/jquery.multiple.select.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/jquery.multiple.select.js deleted file mode 100644 index c55fa32d66..0000000000 --- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/multiple-select/jquery.multiple.select.js +++ /dev/null @@ -1,589 +0,0 @@ -/** - * @author zhixin wen - * @version 1.1.0 - * - * http://wenzhixin.net.cn/p/multiple-select/ - */ - -(function ($) { - - 'use strict'; - - function MultipleSelect($el, options) { - var that = this, - name = $el.attr('name') || options.name || '' - - $el.parent().hide(); - var elWidth = $el.css("width"); - $el.parent().show(); - if (elWidth=="0px") {elWidth = $el.outerWidth()+20} - - this.$el = $el.hide(); - this.options = options; - this.$parent = $(''); - this.$choice = $(''); - this.$drop = $('
'); - this.$el.after(this.$parent); - this.$parent.append(this.$choice); - this.$parent.append(this.$drop); - - if (this.$el.prop('disabled')) { - this.$choice.addClass('disabled'); - } - this.$parent.css('width', options.width || elWidth); - - if (!this.options.keepOpen) { - $('body').click(function (e) { - if ($(e.target)[0] === that.$choice[0] || - $(e.target).parents('.ms-choice')[0] === that.$choice[0]) { - return; - } - if (($(e.target)[0] === that.$drop[0] || - $(e.target).parents('.ms-drop')[0] !== that.$drop[0]) && - that.options.isOpen) { - that.close(); - } - }); - } - - this.selectAllName = 'name="selectAll' + name + '"'; - this.selectGroupName = 'name="selectGroup' + name + '"'; - this.selectItemName = 'name="selectItem' + name + '"'; - } - - MultipleSelect.prototype = { - constructor: MultipleSelect, - - init: function () { - var that = this, - html = []; - if (this.options.filter) { - html.push( - '' - ); - } - html.push('
    '); - if (this.options.selectAll && !this.options.single) { - html.push( - '
  • ', - '', - '
  • ' - ); - } - $.each(this.$el.children(), function (i, elm) { - html.push(that.optionToHtml(i, elm)); - }); - html.push('
  • ' + this.options.noMatchesFound + '
  • '); - html.push('
'); - this.$drop.html(html.join('')); - - this.$drop.find('ul').css('max-height', this.options.maxHeight + 'px'); - this.$drop.find('.multiple').css('width', this.options.multipleWidth + 'px'); - - this.$searchInput = this.$drop.find('.ms-search input'); - this.$selectAll = this.$drop.find('input[' + this.selectAllName + ']'); - this.$selectGroups = this.$drop.find('input[' + this.selectGroupName + ']'); - this.$selectItems = this.$drop.find('input[' + this.selectItemName + ']:enabled'); - this.$disableItems = this.$drop.find('input[' + this.selectItemName + ']:disabled'); - this.$noResults = this.$drop.find('.ms-no-results'); - this.events(); - this.updateSelectAll(true); - this.update(true); - - if (this.options.isOpen) { - this.open(); - } - }, - - optionToHtml: function (i, elm, group, groupDisabled) { - var that = this, - $elm = $(elm), - html = [], - multiple = this.options.multiple, - optAttributesToCopy = ['class', 'title'], - clss = $.map(optAttributesToCopy, function (att, i) { - var isMultiple = att === 'class' && multiple; - var attValue = $elm.attr(att) || ''; - return (isMultiple || attValue) ? - (' ' + att + '="' + (isMultiple ? ('multiple' + (attValue ? ' ' : '')) : '') + attValue + '"') : - ''; - }).join(''), - disabled, - type = this.options.single ? 'radio' : 'checkbox'; - - if ($elm.is('option')) { - var value = $elm.val(), - text = that.options.textTemplate($elm), - selected = (that.$el.attr('multiple') != undefined) ? $elm.prop('selected') : ($elm.attr('selected') == 'selected'), - style = this.options.styler(value) ? ' style="' + this.options.styler(value) + '"' : ''; - - disabled = groupDisabled || $elm.prop('disabled'); - if ((this.options.blockSeparator > "") && (this.options.blockSeparator == $elm.val())) { - html.push( - '', - '', - '' - ); - } else { - html.push( - '', - '', - ' ', - text, - '', - '' - ); - } - } else if (!group && $elm.is('optgroup')) { - var _group = 'group_' + i, - label = $elm.attr('label'); - - disabled = $elm.prop('disabled'); - html.push( - '
  • ', - '', - '
  • '); - $.each($elm.children(), function (i, elm) { - html.push(that.optionToHtml(i, elm, _group, disabled)); - }); - } - return html.join(''); - }, - - events: function () { - var that = this; - - function toggleOpen(e) { - e.preventDefault(); - that[that.options.isOpen ? 'close' : 'open'](); - } - - var label = this.$el.parent().closest('label')[0] || $('label[for=' + this.$el.attr('id') + ']')[0]; - if (label) { - $(label).off('click').on('click', function (e) { - if (e.target.nodeName.toLowerCase() !== 'label' || e.target !== this) { - return; - } - toggleOpen(e); - if (!that.options.filter || !that.options.isOpen) { - that.focus(); - } - e.stopPropagation(); // Causes lost focus otherwise - }); - } - this.$choice.off('click').on('click', toggleOpen) - .off('focus').on('focus', this.options.onFocus) - .off('blur').on('blur', this.options.onBlur); - - this.$parent.off('keydown').on('keydown', function (e) { - switch (e.which) { - case 27: // esc key - that.close(); - that.$choice.focus(); - break; - } - }); - this.$searchInput.off('keydown').on('keydown',function (e) { - if (e.keyCode === 9 && e.shiftKey) { // Ensure shift-tab causes lost focus from filter as with clicking away - that.close(); - } - }).off('keyup').on('keyup', function (e) { - if (that.options.filterAcceptOnEnter && - (e.which === 13 || e.which == 32) && // enter or space - that.$searchInput.val() // Avoid selecting/deselecting if no choices made - ) { - that.$selectAll.click(); - that.close(); - that.focus(); - return; - } - that.filter(); - }); - this.$selectAll.off('click').on('click', function () { - var checked = $(this).prop('checked'), - $items = that.$selectItems.filter(':visible'); - if ($items.length === that.$selectItems.length) { - that[checked ? 'checkAll' : 'uncheckAll'](); - } else { // when the filter option is true - that.$selectGroups.prop('checked', checked); - $items.prop('checked', checked); - that.options[checked ? 'onCheckAll' : 'onUncheckAll'](); - that.update(); - } - }); - this.$selectGroups.off('click').on('click', function () { - var group = $(this).parent().attr('data-group'), - $items = that.$selectItems.filter(':visible'), - $children = $items.filter('[data-group="' + group + '"]'), - checked = $children.length !== $children.filter(':checked').length; - $children.prop('checked', checked); - that.updateSelectAll(); - that.update(); - that.options.onOptgroupClick({ - label: $(this).parent().text(), - checked: checked, - children: $children.get() - }); - }); - this.$selectItems.off('click').on('click', function () { - that.updateSelectAll(); - that.update(); - that.updateOptGroupSelect(); - that.options.onClick({ - label: $(this).parent().text(), - value: $(this).val(), - checked: $(this).prop('checked') - }); - - if (that.options.single && that.options.isOpen && !that.options.keepOpen) { - that.close(); - } - }); - }, - - open: function () { - if (this.$choice.hasClass('disabled')) { - return; - } - this.options.isOpen = true; - this.$choice.find('>div').addClass('open'); - this.$drop.show(); - - // fix filter bug: no results show - this.$selectAll.parent().show(); - this.$noResults.hide(); - - // Fix #77: 'All selected' when no options - if (this.$el.children().length === 0) { - this.$selectAll.parent().hide(); - this.$noResults.show(); - } - - if (this.options.container) { - var offset = this.$drop.offset(); - this.$drop.appendTo($(this.options.container)); - this.$drop.offset({ top: offset.top, left: offset.left }); - } - if (this.options.filter) { - this.$searchInput.val(''); - this.$searchInput.focus(); - this.filter(); - } - this.options.onOpen(); - }, - - close: function () { - this.options.isOpen = false; - this.$choice.find('>div').removeClass('open'); - this.$drop.hide(); - if (this.options.container) { - this.$parent.append(this.$drop); - this.$drop.css({ - 'top': 'auto', - 'left': 'auto' - }); - } - this.options.onClose(); - }, - - update: function (isInit) { - var selects = this.getSelects(), - $span = this.$choice.find('>span'); - - if (selects.length === 0) { - $span.addClass('placeholder').html(this.options.placeholder); - } else if (this.options.countSelected && selects.length < this.options.minumimCountSelected) { - $span.removeClass('placeholder').html( - (this.options.displayValues ? selects : this.getSelects('text')) - .join(this.options.delimiter)); - } else if (this.options.allSelected && - selects.length === this.$selectItems.length + this.$disableItems.length) { - $span.removeClass('placeholder').html(this.options.allSelected); - } else if ((this.options.countSelected || this.options.etcaetera) && selects.length > this.options.minumimCountSelected) { - if (this.options.etcaetera) { - $span.removeClass('placeholder').html((this.options.displayValues ? selects : this.getSelects('text').slice(0, this.options.minumimCountSelected)).join(this.options.delimiter) + '...'); - } - else { - $span.removeClass('placeholder').html(this.options.countSelected - .replace('#', selects.length) - .replace('%', this.$selectItems.length + this.$disableItems.length)); - } - } else { - $span.removeClass('placeholder').html( - (this.options.displayValues ? selects : this.getSelects('text')) - .join(this.options.delimiter)); - } - // set selects to select - this.$el.val(this.getSelects()); - - // add selected class to selected li - this.$drop.find('li').removeClass('selected'); - this.$drop.find('input[' + this.selectItemName + ']:checked').each(function () { - $(this).parents('li').first().addClass('selected'); - }); - - // trigger \n \n ')),t.push("
      "),this.$drop.html(t.join("")),this.$ul=this.$drop.find(">ul"),this.initListItems()}},{key:"initListItems",value:function(){var t=this,e=this.getListRows(),n=0;if(this.options.selectAll&&!this.options.single&&(n=-1),e.length>Gs.BLOCK_ROWS*Gs.CLUSTER_BLOCKS){this.virtualScroll&&this.virtualScroll.destroy();var i=this.$drop.is(":visible");i||this.$drop.css("left",-1e4).show();var u=function(){t.updateDataStart=t.virtualScroll.dataStart+n,t.updateDataEnd=t.virtualScroll.dataEnd+n,t.updateDataStart<0&&(t.updateDataStart=0),t.updateDataEnd>t.data.length&&(t.updateDataEnd=t.data.length)};this.virtualScroll=new ac({rows:e,scrollEl:this.$ul[0],contentEl:this.$ul[0],callback:function(){u(),t.events()}}),u(),i||this.$drop.css("left",0).hide()}else this.$ul.html(e.join("")),this.updateDataStart=0,this.updateDataEnd=this.updateData.length,this.virtualScroll=null;this.events()}},{key:"getListRows",value:function(){var t=this,e=[];return this.options.selectAll&&!this.options.single&&e.push('\n
    • \n \n
    • \n ")),this.updateData=[],this.data.forEach((function(n){e.push.apply(e,o(t.initListItem(n)))})),e.push('
    • '.concat(this.options.formatNoMatchesFound(),"
    • ")),e}},{key:"initListItem",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t.title?'title="'.concat(t.title,'"'):"",u=this.options.multiple?"multiple":"",r=this.options.single?"radio":"checkbox",s="";if(!t.visible)return[];if(this.updateData.push(t),this.options.single&&!this.options.singleRadio&&(s="hide-radio "),t.selected&&(s+="selected "),"optgroup"===t.type){var a=this.options.styler(t),l=a?'style="'.concat(a,'"'):"",c=[],h=this.options.hideOptgroupCheckboxes||this.options.single?"'):'");return s.includes("hide-radio")||!this.options.hideOptgroupCheckboxes&&!this.options.single||(s+="hide-radio "),c.push('\n
    • \n \n
    • \n ")),t.children.forEach((function(t){c.push.apply(c,o(e.initListItem(t,1)))})),c}var f=this.options.styler(t),d=f?'style="'.concat(f,'"'):"";return s+=t.classes||"",n&&this.options.single&&(s+="option-level-".concat(n," ")),t.divider?'
    • ':['\n
    • \n \n
    • \n ")]}},{key:"events",value:function(){var e=this;this.$searchInput=this.$drop.find(".ms-search input"),this.$selectAll=this.$drop.find("input[".concat(this.selectAllName,"]")),this.$selectGroups=this.$drop.find("input[".concat(this.selectGroupName,"],span[").concat(this.selectGroupName,"]")),this.$selectItems=this.$drop.find("input[".concat(this.selectItemName,"]:enabled")),this.$disableItems=this.$drop.find("input[".concat(this.selectItemName,"]:disabled")),this.$noResults=this.$drop.find(".ms-no-results");var n=function(n){n.preventDefault(),t(n.target).hasClass("icon-close")||e[e.options.isOpen?"close":"open"]()};this.$label&&this.$label.length&&this.$label.off("click").on("click",(function(t){"label"===t.target.nodeName.toLowerCase()&&(n(t),e.options.filter&&e.options.isOpen||e.focus(),t.stopPropagation())})),this.$choice.off("click").on("click",n).off("focus").on("focus",this.options.onFocus).off("blur").on("blur",this.options.onBlur),this.$parent.off("keydown").on("keydown",(function(t){27!==t.which||e.options.keepOpen||(e.close(),e.$choice.focus())})),this.$close.off("click").on("click",(function(t){t.preventDefault(),e._checkAll(!1,!0),e.initSelected(!1),e.updateSelected(),e.update(),e.options.onClear()})),this.$searchInput.off("keydown").on("keydown",(function(t){9===t.keyCode&&t.shiftKey&&e.close()})).off("keyup").on("keyup",(function(t){if(e.options.filterAcceptOnEnter&&[13,32].includes(t.which)&&e.$searchInput.val()){if(e.options.single){var n=e.$selectItems.closest("li").filter(":visible");n.length&&e.setSelects([n.first().find("input[".concat(e.selectItemName,"]")).val()])}else e.$selectAll.click();return e.close(),void e.focus()}e.filter()})),this.$selectAll.off("click").on("click",(function(n){e._checkAll(t(n.currentTarget).prop("checked"))})),this.$selectGroups.off("click").on("click",(function(n){var i=t(n.currentTarget),u=i.prop("checked"),r=Zc(e.data,"_key",i.data("key"));e._checkGroup(r,u),e.options.onOptgroupClick(Qc({label:r.label,selected:r.selected,data:r._data,children:r.children.map((function(t){return Qc({text:t.text,value:t.value,selected:t.selected,disabled:t.disabled,data:t._data})}))}))})),this.$selectItems.off("click").on("click",(function(n){var i=t(n.currentTarget),u=i.prop("checked"),r=Zc(e.data,"_key",i.data("key"));e._check(r,u),e.options.onClick(Qc({text:r.text,value:r.value,selected:r.selected,data:r._data})),e.options.single&&e.options.isOpen&&!e.options.keepOpen&&e.close()}))}},{key:"initView",value:function(){var t;window.getComputedStyle?"auto"===(t=window.getComputedStyle(this.$el[0]).width)&&(t=this.$drop.outerWidth()+20):t=this.$el.outerWidth()+20,this.$parent.css("width",this.options.width||t),this.$el.show().addClass("ms-offscreen")}},{key:"open",value:function(){if(!this.$choice.hasClass("disabled")){if(this.options.isOpen=!0,this.$parent.addClass("ms-parent-open"),this.$choice.find(">div").addClass("open"),this.$drop[this.animateMethod("show")](),this.$selectAll.parent().show(),this.$noResults.hide(),this.data.length||(this.$selectAll.parent().hide(),this.$noResults.show()),this.options.container){var e=this.$drop.offset();this.$drop.appendTo(t(this.options.container)),this.$drop.offset({top:e.top,left:e.left}).css("min-width","auto").outerWidth(this.$parent.outerWidth())}var n=this.options.maxHeight;"row"===this.options.maxHeightUnit&&(n=this.$drop.find(">ul>li").first().outerHeight()*this.options.maxHeight),this.$drop.find(">ul").css("max-height","".concat(n,"px")),this.$drop.find(".multiple").css("width","".concat(this.options.multipleWidth,"px")),this.data.length&&this.options.filter&&(this.$searchInput.val(""),this.$searchInput.focus(),this.filter(!0)),this.options.onOpen()}}},{key:"close",value:function(){this.options.isOpen=!1,this.$parent.removeClass("ms-parent-open"),this.$choice.find(">div").removeClass("open"),this.$drop[this.animateMethod("hide")](),this.options.container&&(this.$parent.append(this.$drop),this.$drop.css({top:"auto",left:"auto"})),this.options.onClose()}},{key:"animateMethod",value:function(t){return{show:{fade:"fadeIn",slide:"slideDown"},hide:{fade:"fadeOut",slide:"slideUp"}}[t][this.options.animate]||t}},{key:"update",value:function(t){var e=this.getSelects(),n=this.getSelects("text");this.options.displayValues&&(n=e);var i=this.$choice.find(">span"),u=e.length,r="";0===u?i.addClass("placeholder").html(this.options.placeholder):r=uthis.options.minimumCountSelected?"".concat(n.slice(0,this.options.minimumCountSelected).join(this.options.displayDelimiter),"..."):this.options.formatCountSelected()&&u>this.options.minimumCountSelected?this.options.formatCountSelected(u,this.dataTotal):n.join(this.options.displayDelimiter),r&&i.removeClass("placeholder").html(r),this.options.displayTitle&&i.prop("title",this.getSelects("text")),this.$el.val(this.getSelects()),t||this.$el.trigger("change")}},{key:"updateSelected",value:function(){for(var t=this.updateDataStart;t0&&void 0!==arguments[0]?arguments[0]:"value",n=[],i=l(this.data);try{for(i.s();!(t=i.n()).done;){var u=t.value;if("optgroup"===u.type){var r=u.children.filter((function(t){return t.selected}));if(!r.length)continue;if("value"===e||this.options.single)n.push.apply(n,o(r.map((function(t){return"value"===e&&t._value||t[e]}))));else{var s=[];s.push("["),s.push(u.label),s.push(": ".concat(r.map((function(t){return t[e]})).join(", "))),s.push("]"),n.push(s.join(""))}}else u.selected&&n.push("value"===e&&u._value||u[e])}}catch(t){i.e(t)}finally{i.f()}return n}},{key:"setSelects",value:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,o=function(n){var u,o=l(n);try{for(o.s();!(u=o.n()).done;){var s=u.value,a=!1;"text"===i?a=e.includes(t("
      ").html(s.text).text().trim()):(a=e.includes(s._value||s.value))||s.value!=="".concat(+s.value)||(a=e.includes(+s.value)),s.selected!==a&&(r=!0),s.selected=a}}catch(t){o.e(t)}finally{o.f()}},s=l(this.data);try{for(s.s();!(n=s.n()).done;){var a=n.value;"optgroup"===a.type?o(a.children):o([a])}}catch(t){s.e(t)}finally{s.f()}r&&(this.initSelected(u),this.updateSelected(),this.update(u))}},{key:"enable",value:function(){this.$choice.removeClass("disabled")}},{key:"disable",value:function(){this.$choice.addClass("disabled")}},{key:"check",value:function(t){var e=Zc(this.data,"value",t);e&&this._check(e,!0)}},{key:"uncheck",value:function(t){var e=Zc(this.data,"value",t);e&&this._check(e,!1)}},{key:"_check",value:function(t,e){this.options.single&&this._checkAll(!1,!0),t.selected=e,this.initSelected(),this.updateSelected(),this.update()}},{key:"checkAll",value:function(){this._checkAll(!0)}},{key:"uncheckAll",value:function(){this._checkAll(!1)}},{key:"_checkAll",value:function(t,e){var n,i=l(this.data);try{for(i.s();!(n=i.n()).done;){var u=n.value;"optgroup"===u.type?this._checkGroup(u,t,!0):u.disabled||u.divider||!e&&!u.visible||(u.selected=t)}}catch(t){i.e(t)}finally{i.f()}e||(this.initSelected(),this.updateSelected(),this.update())}},{key:"_checkGroup",value:function(t,e,n){t.selected=e,t.children.forEach((function(t){t.disabled||t.divider||!n&&!t.visible||(t.selected=e)})),n||(this.initSelected(),this.updateSelected(),this.update())}},{key:"checkInvert",value:function(){if(!this.options.single){var t,e=l(this.data);try{for(e.s();!(t=e.n()).done;){var n=t.value;if("optgroup"===n.type){var i,u=l(n.children);try{for(u.s();!(i=u.n()).done;){var r=i.value;r.divider||(r.selected=!r.selected)}}catch(t){u.e(t)}finally{u.f()}}else n.divider||(n.selected=!n.selected)}}catch(t){e.e(t)}finally{e.f()}this.initSelected(),this.updateSelected(),this.update()}}},{key:"focus",value:function(){this.$choice.focus(),this.options.onFocus()}},{key:"blur",value:function(){this.$choice.blur(),this.options.onBlur()}},{key:"refresh",value:function(){this.destroy(),this.init()}},{key:"filter",value:function(e){var n=t.trim(this.$searchInput.val()),i=n.toLowerCase();if(this.filterText!==i){this.filterText=i;var u,r=l(this.data);try{for(r.s();!(u=r.n()).done;){var o=u.value;if("optgroup"===o.type)if(this.options.filterGroup){var s=this.options.customFilter({label:Jc(o.label.toLowerCase()),search:Jc(i),originalLabel:o.label,originalSearch:n,row:o});o.visible=s;var a,c=l(o.children);try{for(c.s();!(a=c.n()).done;){a.value.visible=s}}catch(t){c.e(t)}finally{c.f()}}else{var h,f=l(o.children);try{for(f.s();!(h=f.n()).done;){var d=h.value;d.visible=this.options.customFilter({text:Jc(d.text.toLowerCase()),search:Jc(i),originalText:d.text,originalSearch:n,row:d,parent:o})}}catch(t){f.e(t)}finally{f.f()}o.visible=o.children.filter((function(t){return t.visible})).length>0}else o.visible=this.options.customFilter({text:Jc(o.text.toLowerCase()),search:Jc(i),originalText:o.text,originalSearch:n,row:o})}}catch(t){r.e(t)}finally{r.f()}this.initListItems(),this.initSelected(e),this.updateSelected(),e||this.options.onFilter(i)}}},{key:"destroy",value:function(){this.$parent&&(this.$el.before(this.$parent).removeClass("ms-offscreen"),null!==this.tabIndex&&this.$el.attr("tabindex",this.tabIndex),this.$parent.remove(),this.fromHtml&&(delete this.options.data,this.fromHtml=!1))}}]),i}();t.fn.multipleSelect=function(n){for(var i=arguments.length,u=new Array(i>1?i-1:0),r=1;rKLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)p@E5RI61Ft6o-prbbn>P~)iy)E2AN zsU20jsWz_8Qg>31P|s0cqrPALg8E|(vWA65poU1JRAaZs8I2(p#xiB`SVGovRs-uS zYnV-9TeA7=Om+qP8+I>yOjAR1s%ETak!GFdam@h^# z)@rS0t$wXH+Irf)+G6c;?H29p+V6F6oj{!|o%K3xI`?%6x;DB|x`n#ibhIR?(H}Q3Gzd138Ei2)WAMz7W9Vy`X}HnwgyEn!VS)>mv$8&{hQn>w4zwy3R}t;BYlZQm5)6pty=DfLrs+A-|>>;~;Q z_F?uV_HFjh9n2gO9o9Q^JA86v({H5aB!kjoO6 zc9$1ZZKsN-Zl8L~mE{`ly3)1N^`o1+o7}D0ZPeY&J;i;i`%NyJ8_8Y6J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z0y{}WK~#9!?3X)e6j2n0zq1=3V01+ht#msfAc%-)BQ`$3M$p2DVk2n`SooN;yTn4- znLC26k0PjzjfjYam81}?ZDM1QLXiY*OtV`=*er8w?n2Nty0V*DWDXo=?t^>3IhX&Q zGh${8vgH_X%K$UL3@`)ix0%^5-fIhjpb&=P=0EM*$%i^E7)8-&k|Y8oOS)G#8jV+R z9M`)AEEEd&MPwUrv?oVwX1nwG{L_3s|E%q~Tuz(KX0zK3s@3Wq5jiI!N2=B8;hq4N z%jLk#UMvA#Op@eGtycTq^#-|IO+>`M-yItpTh$Yhv|6o_nJsw02bD_YeYbE?6kQdO zgYCA6j1-GS*Au{riHVQEq?tA9_4;!_@CybTASs_%eXz$RdCnkwD^ESlL&hp}n@T$?7~EU-pIj&~Rv_0j#7nn>a} z9sxc8^T1hEopR0%1LHsh%&O{+)I{P{d>(k>yJmomz*gT*fZM8iEj2)|+Wo*KV3&t_ z2@C^Q{M0+DdO0<~WiId#DEa0+pd19j!ocKWRV@S8fkhwT0|QqqsOnANtv~v&Kac+y Y016sCsn^Dnga7~l07*qoM6N<$f>N -

      jquery.multiple.select.js

      +

      jQuery Multiple Select Plugin

      - The jQuery multiple select plugin by Zhixin Wen is licensed under the MIT license. + The jQuery Multiple Select plugin by Zhixin Wen is licensed under the MIT license.

      Javascript Diff Algorithm

      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index e0a330ba21..114502f404 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -7,8 +7,8 @@ [% INCLUDE 'doc-head-open.inc' %] System preferences › Administration › Koha [% INCLUDE 'doc-head-close.inc' %] +[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %] [% Asset.css("css/preferences.css") | $raw %] -[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") | $raw %] [% Asset.css("css/humanmsg.css") | $raw %] [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %] [% Asset.css("lib/codemirror/lint.min.css") | $raw %] @@ -239,7 +239,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/hc-sticky.js") | $raw %] - [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %] + [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %] [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %] [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %] -- 2.39.5