From 235eac55b0765fbfc6df1d620c324ce6697c9dea Mon Sep 17 00:00:00 2001 From: ThomasJ Date: Sun, 20 Mar 2016 22:58:45 +0900 Subject: [PATCH] ax5mask 0.6.1 --- bower.json | 2 +- dist/ax5mask.js | 2 ++ dist/ax5mask.min.js | 2 +- package.json | 2 +- src/ax5mask.js | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 00d16f9..8c38a33 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ax5ui-mask", - "version": "0.6.0", + "version": "0.6.1", "authors": [ "ThomasJ " ], diff --git a/dist/ax5mask.js b/dist/ax5mask.js index 194c07a..abd8ddb 100644 --- a/dist/ax5mask.js +++ b/dist/ax5mask.js @@ -139,6 +139,7 @@ } if (config.onStateChanged) { that = { + self: this, state: "open" }; config.onStateChanged.call(that, that); @@ -162,6 +163,7 @@ this.$target.removeClass("ax-masking"); if (config && config.onStateChanged) { that = { + self: this, state: "close" }; config.onStateChanged.call(that, that); diff --git a/dist/ax5mask.min.js b/dist/ax5mask.min.js index f6f50b1..106c66f 100644 --- a/dist/ax5mask.min.js +++ b/dist/ax5mask.min.js @@ -1 +1 @@ -"use strict";!function(t,s){var n=ax5.util,i=function(){var t=this;s&&s.call(this),this.maskContent="",this.status="off",this.config={theme:"",target:jQuery(document.body).get(0)};this.config;this.init=function(){this.config.content&&this.setBody(this.config.content)},this.setBody=function(t){this.maskContent=t},this.getBody=function(){return this.maskContent},this.open=function(s){"on"===this.status&&this.close(),s&&s.content&&this.setBody(s.content),t.maskConfig={},jQuery.extend(!0,t.maskConfig,this.config),jQuery.extend(!0,t.maskConfig,s);var n,i,s=t.maskConfig,e=s.target,o=jQuery(e),a=[],h="ax-mask-"+ax5.getGuid(),n={},u={};return a.push('
'),a.push('
'),a.push('
'),a.push('
'),a.push(t.getBody()),a.push("
"),a.push("
"),a.push("
"),jQuery(document.body).append(a.join("")),e!==document.body&&(n={position:s.position||"absolute",left:o.offset().left,top:o.offset().top,width:o.outerWidth(),height:o.outerHeight()},"undefined"!=typeof t.maskConfig.zIndex&&(n["z-index"]=t.maskConfig.zIndex),o.addClass("ax-masking")),this.$mask=i=jQuery("#"+h),this.$target=o,this.status="on",i.css(n),s.onClick&&i.click(function(){u={state:"open",type:"click"},s.onClick.call(u,u)}),s.onStateChanged&&(u={state:"open"},s.onStateChanged.call(u,u)),this},this.close=function(){var t,s=this.maskConfig;return this.$mask.remove(),this.$target.removeClass("ax-masking"),s&&s.onStateChanged&&(t={state:"close"},s.onStateChanged.call(t,t)),this},this.main=function(){arguments&&n.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};t.mask=function(){return n.isFunction(s)&&(i.prototype=new s),i}()}(ax5.ui,ax5.ui.root); \ No newline at end of file +"use strict";!function(t,s){var i=ax5.util,n=function(){var t=this;s&&s.call(this),this.maskContent="",this.status="off",this.config={theme:"",target:jQuery(document.body).get(0)};this.config;this.init=function(){this.config.content&&this.setBody(this.config.content)},this.setBody=function(t){this.maskContent=t},this.getBody=function(){return this.maskContent},this.open=function(s){"on"===this.status&&this.close(),s&&s.content&&this.setBody(s.content),t.maskConfig={},jQuery.extend(!0,t.maskConfig,this.config),jQuery.extend(!0,t.maskConfig,s);var i,n,s=t.maskConfig,e=s.target,o=jQuery(e),a=[],h="ax-mask-"+ax5.getGuid(),i={},u={};return a.push('
'),a.push('
'),a.push('
'),a.push('
'),a.push(t.getBody()),a.push("
"),a.push("
"),a.push("
"),jQuery(document.body).append(a.join("")),e!==document.body&&(i={position:s.position||"absolute",left:o.offset().left,top:o.offset().top,width:o.outerWidth(),height:o.outerHeight()},"undefined"!=typeof t.maskConfig.zIndex&&(i["z-index"]=t.maskConfig.zIndex),o.addClass("ax-masking")),this.$mask=n=jQuery("#"+h),this.$target=o,this.status="on",n.css(i),s.onClick&&n.click(function(){u={state:"open",type:"click"},s.onClick.call(u,u)}),s.onStateChanged&&(u={self:this,state:"open"},s.onStateChanged.call(u,u)),this},this.close=function(){var t,s=this.maskConfig;return this.$mask.remove(),this.$target.removeClass("ax-masking"),s&&s.onStateChanged&&(t={self:this,state:"close"},s.onStateChanged.call(t,t)),this},this.main=function(){arguments&&i.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};t.mask=function(){return i.isFunction(s)&&(n.prototype=new s),n}()}(ax5.ui,ax5.ui.root); \ No newline at end of file diff --git a/package.json b/package.json index 6262ea7..e975c88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ax5ui-mask", - "version": "0.6.0", + "version": "0.6.1", "description": "A mask plugin that works with Bootstrap & jQuery", "license": "MIT", "repository": { diff --git a/src/ax5mask.js b/src/ax5mask.js index 7b9005f..086d0bd 100644 --- a/src/ax5mask.js +++ b/src/ax5mask.js @@ -134,6 +134,7 @@ } if (config.onStateChanged) { that = { + self: this, state: "open" }; config.onStateChanged.call(that, that); @@ -156,6 +157,7 @@ this.$target.removeClass("ax-masking"); if (config && config.onStateChanged) { that = { + self: this, state: "close" }; config.onStateChanged.call(that, that);