From b8ab41ed975f7ff0a2d530bbb4dc02a09d666c6e Mon Sep 17 00:00:00 2001 From: Patrick Tsai Date: Mon, 25 Sep 2017 17:45:58 -0400 Subject: [PATCH] Release version 2.4.0 --- dist/jquery.tree-multiselect.js | 2 +- dist/jquery.tree-multiselect.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/jquery.tree-multiselect.js b/dist/jquery.tree-multiselect.js index 3f4b7ce..3607d86 100644 --- a/dist/jquery.tree-multiselect.js +++ b/dist/jquery.tree-multiselect.js @@ -423,7 +423,7 @@ Tree.prototype.createAst = function (options) { description: option.getAttribute('data-description'), initialIndex: option.getAttribute('data-index'), section: option.getAttribute('data-section'), - disabled: option.hasAttribute('disabled'), + disabled: option.hasAttribute('readonly'), selected: option.hasAttribute('selected') }); diff --git a/dist/jquery.tree-multiselect.min.js b/dist/jquery.tree-multiselect.min.js index dfe305b..74eedc7 100644 --- a/dist/jquery.tree-multiselect.min.js +++ b/dist/jquery.tree-multiselect.min.js @@ -1,2 +1,2 @@ /* jQuery Tree Multiselect v2.4.0 | (c) Patrick Tsai | MIT Licensed */ -!function e(t,i,s){function n(a,o){if(!i[a]){if(!t[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[a]={exports:{}};t[a][0].call(d.exports,function(e){var i=t[a][1][e];return n(i||e)},d,d.exports,e,t,i,s)}return i[a].exports}for(var r="function"==typeof require&&require,a=0;a0?c.split(n.params.sectionDelimiter):[],h=0;h span.description",function(){var e=jQuery(this).parent(),t=e.attr("data-description"),i=document.createElement("div");i.className="temp-description-popup",i.innerHTML=t,i.style.position="absolute",e.append(i)}),this.$selectionContainer.on("mouseleave","div.item > span.description",function(){jQuery(this).parent().find("div.temp-description-popup").remove()})},n.prototype.handleSectionCheckboxMarkings=function(){var e=this;this.$selectionContainer.on("click","input.section[type=checkbox]",function(){var t=jQuery(this).closest("div.section").find("div.item").map(function(t,i){var s=c.getKey(i);if(!e.astItems[s].disabled)return s}).get();if(this.checked){var i;(i=e.keysToAdd).push.apply(i,s(t)),c.array.uniq(e.keysToAdd)}else{var n;(n=e.keysToRemove).push.apply(n,s(t)),c.array.uniq(e.keysToRemove)}e.render()})},n.prototype.redrawSectionCheckboxes=function(e){var t=3,i=this;if((e=e||this.$selectionContainer).find("> div.section").each(function(){var e=i.redrawSectionCheckboxes(jQuery(this));t&=e}),t)for(var s=e.find("> div.item > input[type=checkbox]"),n=0;n div.title > input[type=checkbox]");return r.length&&(r=r[0],1&t?(r.checked=!0,r.indeterminate=!1):2&t?(r.checked=!1,r.indeterminate=!1):(r.checked=!1,r.indeterminate=!0)),t},n.prototype.addCollapsibility=function(){var e=this.$selectionContainer.find("div.title"),t=c.dom.createNode("span",{class:"collapse-section"});e.prepend(t);var i=this.$selectionContainer.find("div.section");this.params.startCollapsed&&i.addClass("collapsed"),this.$selectionContainer.on("click","div.title",function(e){"INPUT"!==e.target.nodeName&&(jQuery(this).parent().toggleClass("collapsed"),e.stopPropagation())})},n.prototype.createSearchBar=function(e){var t=new a(this.astItems,this.astSections,this.params.searchParams),i=c.dom.createNode("input",{class:"search",placeholder:"Search..."});e.appendChild(i),this.$selectionContainer.on("input","input.search",function(){var e=this.value;t.search(e)})},n.prototype.createSelectAllButtons=function(e){var t=c.dom.createNode("span",{class:"select-all",text:this.params.selectAllText}),i=c.dom.createNode("span",{class:"unselect-all",text:this.params.unselectAllText}),n=c.dom.createNode("div",{class:"select-all-container"});n.appendChild(t),n.appendChild(i),e.appendChild(n);var r=this;this.$selectionContainer.on("click","span.select-all",function(){r.keysToAdd=Object.keys(r.astItems),r.render()}),this.$selectionContainer.on("click","span.unselect-all",function(){var e;(e=r.keysToRemove).push.apply(e,s(r.selectedKeys)),r.render()})},n.prototype.armRemoveSelectedOnClick=function(){var e=this;this.$selectedContainer.on("click","span.remove-selected",function(){var t=this.parentNode,i=c.getKey(t);e.keysToRemove.push(i),e.render()})},n.prototype.updateSelectedAndOnChange=function(){var e=this;if(this.$selectionContainer.on("click","input.option[type=checkbox]",function(){var t=this,i=t.parentNode,s=c.getKey(i);c.assert(s||0===s),t.checked?e.keysToAdd.push(s):e.keysToRemove.push(s),e.render()}),this.params.sortable&&!this.params.freeze){var t=null,i=null;this.$selectedContainer.sortable({start:function(e,i){t=i.item.index()},stop:function(s,n){i=n.item.index(),t!==i&&(c.array.moveEl(e.selectedKeys,t,i),e.render())}})}},n.prototype.render=function(e){var t,i=this;c.array.uniq(this.keysToAdd),c.array.uniq(this.keysToRemove),c.array.subtract(this.keysToAdd,this.selectedKeys),c.array.intersect(this.keysToRemove,this.selectedKeys);for(var n=0;n'),s=jQuery('
');t&&s.addClass("no-border"),i.append(s);var n=jQuery('
');t||i.append(n),this.$el=e,this.$treeContainer=i,this.$selectionContainer=s,this.$selectedContainer=n}s.prototype.attach=function(){this.$el.after(this.$treeContainer)},s.prototype.remove=function(){this.$treeContainer.remove()},t.exports=s},{}],7:[function(e,t,i){"use strict";function s(e,t){for(var i=0,s=0;s0&&t[0]<=i[0];++t[0]){for(var n=!1,r=1;ri[r]){n=!0;break}}if(n)break;for(var a=!0,o=1;o0?c.split(n.params.sectionDelimiter):[],h=0;h span.description",function(){var e=jQuery(this).parent(),t=e.attr("data-description"),i=document.createElement("div");i.className="temp-description-popup",i.innerHTML=t,i.style.position="absolute",e.append(i)}),this.$selectionContainer.on("mouseleave","div.item > span.description",function(){jQuery(this).parent().find("div.temp-description-popup").remove()})},n.prototype.handleSectionCheckboxMarkings=function(){var e=this;this.$selectionContainer.on("click","input.section[type=checkbox]",function(){var t=jQuery(this).closest("div.section").find("div.item").map(function(t,i){var s=c.getKey(i);if(!e.astItems[s].disabled)return s}).get();if(this.checked){var i;(i=e.keysToAdd).push.apply(i,s(t)),c.array.uniq(e.keysToAdd)}else{var n;(n=e.keysToRemove).push.apply(n,s(t)),c.array.uniq(e.keysToRemove)}e.render()})},n.prototype.redrawSectionCheckboxes=function(e){var t=3,i=this;if((e=e||this.$selectionContainer).find("> div.section").each(function(){var e=i.redrawSectionCheckboxes(jQuery(this));t&=e}),t)for(var s=e.find("> div.item > input[type=checkbox]"),n=0;n div.title > input[type=checkbox]");return r.length&&(r=r[0],1&t?(r.checked=!0,r.indeterminate=!1):2&t?(r.checked=!1,r.indeterminate=!1):(r.checked=!1,r.indeterminate=!0)),t},n.prototype.addCollapsibility=function(){var e=this.$selectionContainer.find("div.title"),t=c.dom.createNode("span",{class:"collapse-section"});e.prepend(t);var i=this.$selectionContainer.find("div.section");this.params.startCollapsed&&i.addClass("collapsed"),this.$selectionContainer.on("click","div.title",function(e){"INPUT"!==e.target.nodeName&&(jQuery(this).parent().toggleClass("collapsed"),e.stopPropagation())})},n.prototype.createSearchBar=function(e){var t=new a(this.astItems,this.astSections,this.params.searchParams),i=c.dom.createNode("input",{class:"search",placeholder:"Search..."});e.appendChild(i),this.$selectionContainer.on("input","input.search",function(){var e=this.value;t.search(e)})},n.prototype.createSelectAllButtons=function(e){var t=c.dom.createNode("span",{class:"select-all",text:this.params.selectAllText}),i=c.dom.createNode("span",{class:"unselect-all",text:this.params.unselectAllText}),n=c.dom.createNode("div",{class:"select-all-container"});n.appendChild(t),n.appendChild(i),e.appendChild(n);var r=this;this.$selectionContainer.on("click","span.select-all",function(){r.keysToAdd=Object.keys(r.astItems),r.render()}),this.$selectionContainer.on("click","span.unselect-all",function(){var e;(e=r.keysToRemove).push.apply(e,s(r.selectedKeys)),r.render()})},n.prototype.armRemoveSelectedOnClick=function(){var e=this;this.$selectedContainer.on("click","span.remove-selected",function(){var t=this.parentNode,i=c.getKey(t);e.keysToRemove.push(i),e.render()})},n.prototype.updateSelectedAndOnChange=function(){var e=this;if(this.$selectionContainer.on("click","input.option[type=checkbox]",function(){var t=this,i=t.parentNode,s=c.getKey(i);c.assert(s||0===s),t.checked?e.keysToAdd.push(s):e.keysToRemove.push(s),e.render()}),this.params.sortable&&!this.params.freeze){var t=null,i=null;this.$selectedContainer.sortable({start:function(e,i){t=i.item.index()},stop:function(s,n){i=n.item.index(),t!==i&&(c.array.moveEl(e.selectedKeys,t,i),e.render())}})}},n.prototype.render=function(e){var t,i=this;c.array.uniq(this.keysToAdd),c.array.uniq(this.keysToRemove),c.array.subtract(this.keysToAdd,this.selectedKeys),c.array.intersect(this.keysToRemove,this.selectedKeys);for(var n=0;n'),s=jQuery('
');t&&s.addClass("no-border"),i.append(s);var n=jQuery('
');t||i.append(n),this.$el=e,this.$treeContainer=i,this.$selectionContainer=s,this.$selectedContainer=n}s.prototype.attach=function(){this.$el.after(this.$treeContainer)},s.prototype.remove=function(){this.$treeContainer.remove()},t.exports=s},{}],7:[function(e,t,i){"use strict";function s(e,t){for(var i=0,s=0;s0&&t[0]<=i[0];++t[0]){for(var n=!1,r=1;ri[r]){n=!0;break}}if(n)break;for(var a=!0,o=1;o