From fb318274e7bc1b38b4ddaa1e804e06a76db22f34 Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 14 Nov 2014 20:00:45 +0800 Subject: [PATCH] * datatable sorter support storage. --- dist/js/zui.js | 2 ++ dist/js/zui.min.js | 2 +- dist/lib/datatable/zui.datatable.js | 2 ++ dist/lib/datatable/zui.datatable.min.js | 2 +- docs/js/zui.js | 4 ++++ docs/js/zui.min.js | 2 +- src/js/datatable.js | 2 ++ 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dist/js/zui.js b/dist/js/zui.js index 394488287..d26ce7d4e 100644 --- a/dist/js/zui.js +++ b/dist/js/zui.js @@ -6690,6 +6690,8 @@ if ($datatable.hasClass('size-changing')) return; that.sortTable($(this)); }); + + if(options.storage) that.sortTable(); } }; diff --git a/dist/js/zui.min.js b/dist/js/zui.min.js index fd4de82bf..b2106f715 100644 --- a/dist/js/zui.min.js +++ b/dist/js/zui.min.js @@ -9,4 +9,4 @@ !function(a,b,c){"use strict";if("undefined"==typeof a)throw new Error("ZUI requires jQuery");a.extend({uuid:function(){for(var a=(new Date).getTime();1e16>a;)a*=10;return a+c.floor(9999*c.random())},getPropertyCount:function(a){return"object"!=typeof a||null===a?0:Object.getOwnPropertyNames(a).length},callEvent:function(b,c,d){return a.isFunction(b)?("undefined"!=typeof d&&(b=a.proxy(b,d)),c.result=b(c),!(void 0!==c.result&&!c.result)):1},clientLang:function(){var c;if("undefined"!=typeof b.config&&b.config.clientLang)c=b.config.clientLang;else{var d=a("html").attr("lang");c=d?d:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return c.replace("-","_").toLowerCase()}}),a.fn.callEvent=function(b,c,d){var e=a(this),f=b.indexOf(".zui."),g=b;0>f&&d&&d.name?b+="."+d.name:g=b.substring(0,f);var h=a.Event(b,c);if("undefined"==typeof d&&f>0&&(d=e.data(b.substring(f+1))),d&&d.options){var i=d.options[g];a.isFunction(i)&&a.callEvent(d.options[g],h,d)}return h}}(jQuery,window,Math),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),function(a,b){"use strict";var c=1200,d=992,e=768,f={desktop:"screen-desktop",desktopLg:"screen-desktop-wide",tablet:"screen-tablet",phone:"screen-phone",isMobile:"device-mobile",isDesktop:"device-desktop"},g=b(a),h=function(){var a=g.width();b("html").toggleClass(f.desktop,a>=d&&c>a).toggleClass(f.desktopLg,a>=c).toggleClass(f.tablet,a>=e&&d>a).toggleClass(f.phone,e>a).toggleClass(f.isMobile,d>a).toggleClass(f.isDesktop,a>=d)};g.resize(h),h()}(window,jQuery),function(a,b){"use strict";var c={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},d=function(){var a=this.isIE,b=a();if(b)for(var c=10;c>5;c--)if(a(c)){b=c;break}this.ie=b,this.cssHelper()};d.prototype.cssHelper=function(){var a=this.ie,c=b("html");c.toggleClass("ie",a).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),a&&c.addClass("ie-"+a).toggleClass("gt-ie-7 gte-ie-8 support-ie",a>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>a).toggleClass("gt-ie-8 gte-ie-9",a>=9).toggleClass("lte-ie-8 lt-ie-9",9>a).toggleClass("gt-ie-9 gte-ie-10",a>=10).toggleClass("lte-ie-9 lt-ie-10",10>a)},d.prototype.tip=function(){if(this.ie&&this.ie<8){var a=b("#browseHappyTip");a.length||(a=b('
'),a.prependTo("body")),a.find(".content").html(this.browseHappyTip||c[b.clientLang()||"zh_cn"])}},d.prototype.isIE=function(a){var b=document.createElement("b");return b.innerHTML="",1===b.getElementsByTagName("i").length},d.prototype.isIE10=function(){return!1},a.browser=new d,b(function(){b("body").hasClass("disabled-browser-tip")||a.browser.tip()})}(window,jQuery),function(){"use strict";Date.ONEDAY_TICKS=864e5,Date.prototype.format=function(a){var b={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};/(y+)/i.test(a)&&(a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var c in b)new RegExp("("+c+")").test(a)&&(a=a.replace(RegExp.$1,1==RegExp.$1.length?b[c]:("00"+b[c]).substr((""+b[c]).length)));return a},Date.prototype.addMilliseconds=function(a){return this.setTime(this.getTime()+a),this},Date.prototype.addDays=function(a){return this.addMilliseconds(a*Date.ONEDAY_TICKS),this},Date.prototype.clone=function(){var a=new Date;return a.setTime(this.getTime()),a},Date.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0},Date.getDaysInMonth=function(a,b){return[31,Date.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},Date.prototype.isLeapYear=function(){return Date.isLeapYear(this.getFullYear())},Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())},Date.prototype.addMonths=function(a){var b=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+a),this.setDate(Math.min(b,this.getDaysInMonth())),this},Date.prototype.getLastWeekday=function(a){a=a||1;for(var b=this.clone();b.getDay()!=a;)b.addDays(-1);return b.clearTime(),b},Date.prototype.isSameDay=function(a){return a.toDateString()===this.toDateString()},Date.prototype.isSameWeek=function(a){var b=this.getLastWeekday(),c=b.clone().addDays(7);return a>=b&&c>a},Date.prototype.isSameYear=function(a){return this.getFullYear()===a.getFullYear()}}(),function(){"use strict";String.prototype.format=function(a){var b=this;if(arguments.length>0){var c;if(1==arguments.length&&"object"==typeof a)for(var d in a)void 0!==a[d]&&(c=new RegExp("({"+d+"})","g"),b=b.replace(c,a[d]));else for(var e=0;e a"),this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),function(a,b){"use strict";var c="localStorage",d=a[c],e=a.store,f="page_"+a.location.pathname+a.location.search,g=function(){this.slience=!0,this.enable=c in a&&a[c]&&a[c].setItem,this.storage=d,this.page=this.get(f,{})};g.prototype.pageSave=function(){if(b.isEmptyObject(this.page))this.remove(f);else{var a,c=[];for(a in this.page){var d=this.page[a];null===d&&c.push(a)}for(a=c.length-1;a>=0;a--)delete this.page[c[a]];this.set(f,this.page)}},g.prototype.pageRemove=function(a){"undefined"!=typeof this.page[a]&&(this.page[a]=null,this.pageSave())},g.prototype.pageClear=function(){this.page={},this.pageSave()},g.prototype.pageGet=function(a,b){var c=this.page[a];return void 0===b||null!==c&&void 0!==c?c:b},g.prototype.pageSet=function(a,c){b.isPlainObject(a)?b.extend(!0,this.page,a):this.page[this.serialize(a)]=c,this.pageSave()},g.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},g.prototype.length=function(){return this.check()?d.getLength?d.getLength():d.length:0},g.prototype.removeItem=function(a){return d.removeItem(a),this},g.prototype.remove=function(a){return this.removeItem(a)},g.prototype.getItem=function(a){return d.getItem(a)},g.prototype.get=function(a,b){var c=this.deserialize(this.getItem(a));return void 0===b||"undefined"!=typeof c&&null!==c&&void 0!==c?c:b},g.prototype.key=function(a){return d.key(a)},g.prototype.setItem=function(a,b){return d.setItem(a,b),this},g.prototype.set=function(a,b){return void 0===b?this.remove(a):(this.setItem(a,this.serialize(b)),this)},g.prototype.clear=function(){return d.clear(),this},g.prototype.forEach=function(a){for(var b=d.length-1;b>=0;b--){var c=d.key(b);a(c,this.get(c))}return this},g.prototype.getAll=function(){var a={};return this.forEach(function(b,c){a[b]=c}),a},g.prototype.serialize=function(a){return"string"==typeof a?a:JSON.stringify(a)},g.prototype.deserialize=function(a){if("string"!=typeof a)return void 0;try{return JSON.parse(a)}catch(b){return a||void 0}};var h=new g;a.store=h,a.store.noConflict=function(){return a.store=e,h}}(window,jQuery),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={container:"body",move:!0},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){this.handleMouseEvents()},b.prototype.handleMouseEvents=function(){var b=this.$,c="before",d="drag",e="finish",f=this.options;b.mousedown(function(g){function h(c){q=!0;var e=c.pageX,g=c.pageY,h={left:e-o.x,top:g-o.y};b.removeClass("drag-ready").addClass("dragging"),f.move&&b.css(h),f.hasOwnProperty(d)&&a.isFunction(f[d])&&f[d]({event:c,element:b,startOffset:o,pos:h,offset:{x:e-n.x,y:g-n.y},smallOffset:{x:e-p.x,y:g-p.y}}),p.x=e,p.y=g,f.stopPropagation&&c.stopPropagation()}function i(c){if(a(document).unbind("mousemove",h).unbind("mouseup",i),!q)return void b.removeClass("drag-ready");var d={left:c.pageX-o.x,top:c.pageY-o.y};b.removeClass("drag-ready").removeClass("dragging"),f.move&&b.css(d),f.hasOwnProperty(e)&&a.isFunction(f[e])&&f[e]({event:c,element:b,pos:d,offset:{x:c.pageX-n.x,y:c.pageY-n.y},smallOffset:{x:c.pageX-p.x,y:c.pageY-p.y}}),c.preventDefault(),f.stopPropagation&&c.stopPropagation()}if(f.hasOwnProperty(c)&&a.isFunction(f[c])){var j=f[c]({event:g,element:b});if(void 0!==j&&!j)return}var k=a(f.container),l=b.offset(),m=k.offset(),n={x:g.pageX,y:g.pageY},o={x:g.pageX-l.left+m.left,y:g.pageY-l.top+m.top},p=a.extend({},n),q=!1;b.addClass("drag-ready"),a(document).bind("mousemove",h).bind("mouseup",i),g.preventDefault(),f.stopPropagation&&g.stopPropagation()})},a.fn.draggable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.draggable"),f="object"==typeof c&&c;e||d.data("zui.draggable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.draggable.Constructor=b}(jQuery),function(a,b,c){"use strict";var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={container:"body",flex:!1,deviation:5,sensorOffsetX:0,sensorOffsetY:0,nested:!1},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.callEvent=function(b,c){return a.callEvent(this.options[b],c,this)},d.prototype.init=function(){this.handleMouseEvents()},d.prototype.handleMouseEvents=function(){var d=this.$,e=this,f=this.options,g="before";this.$triggerTarget=f.trigger?(a.isFunction(f.trigger)?f.trigger(d):d.find(f.trigger)).first():d,this.$triggerTarget.on("mousedown",function(h){function i(b){var g={left:b.pageX,top:b.pageY};if(!(c.abs(g.left-t.left)h&&g.top>i&&g.lefti?g.before(f):g.after(f);var j=d.children(e.selector);c(j),a.callEvent(e.order,{list:j,element:f})}},finish:function(b){e.dragCssClass&&b.element.removeClass(e.dragCssClass),a.callEvent(e.finish,{list:d.children(e.selector),element:b.element})}})},a.fn.sortable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.sortable"),f="object"==typeof c&&c;e?"object"==typeof c&&e.reset():d.data("zui.sortable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.sortable.Constructor=b}(jQuery,window,document,Math),+function(a){"use strict";function b(b,d,e){return this.each(function(){var f=a(this),g=f.data("zui.modal"),h=a.extend({},c.DEFAULTS,f.data(),"object"==typeof b&&b);g||f.data("zui.modal",g=new c(this,h)),"string"==typeof b?g[b](d,e):h.show&&g.show(d,e)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.zui.modal")},this))};c.VERSION="3.2.0",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},c.prototype.toggle=function(a,b){return this.isShown?this.hide():this.show(a,b)},c.prototype.ajustPosition=function(b){if("undefined"==typeof b&&(b=this.options.position),"undefined"!=typeof b){var c=this.$element.find(".modal-dialog"),d=Math.max(0,(a(window).height()-c.outerHeight())/2),e="fit"==b?2*d/3:"center"==b?d:b;c.css("margin-top",e)}},c.prototype.show=function(b,d){var e=this,f=a.Event("show.zui.modal",{relatedTarget:b});this.$element.trigger(f),this.isShown||f.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.zui.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var f=a.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(e.$body),e.$element.show().scrollTop(0),f&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.ajustPosition(d),e.enforceFocus();var g=a.Event("shown.zui.modal",{relatedTarget:b});f?e.$element.find(".modal-dialog").one("bsTransitionEnd",function(){e.$element.trigger("focus").trigger(g)}).emulateTransitionEnd(c.TRANSITION_DURATION):e.$element.trigger("focus").trigger(g)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.zui.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.zui.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.zui.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.zui.modal").on("focusin.zui.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?a(document).on("keydown.dismiss.zui.modal",a.proxy(function(b){if(27==b.which){var c=a.Event("escaping.bs.modal"),d=this.$element.triggerHandler(c,"esc");if(void 0!=d&&!d)return;this.hide()}},this)):this.isShown||a(document).off("keydown.dismiss.zui.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.zui.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('