1 |
- !function(t){"use strict";t.module("morph.transitions",["morph.assist"]).factory("Transitions",["Modal","Overlay",function(t,i){return{Modal:t,Overlay:i}}])}(angular),function(t){"use strict";t.module("morph.transitions").factory("Modal",[function(){return function(i,n){var e={wrapper:function(t,i){var n=i.ContentBoundingRect,e=i.modal,o="50%",s="50%",r=0;e.position&&"center"!==e.position||(r="-"+n.height/2+"px 0 0 -"+n.width/2+"px"),"object"==typeof e.position&&(o=e.position.top+"",s=e.position.left+"",o.indexOf("%")<0&&o.indexOf("px")<0&&(o+="%"),s.indexOf("%")<0&&s.indexOf("px")<0&&(s+="%")),t.css({"z-index":1900,opacity:1,visibility:"visible","pointer-events":"auto",top:o,left:s,width:n.width+"px",height:n.height+"px",margin:r,"-webkit-transition":"width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s",transition:"width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s"})},content:function(t){t.css({transition:"opacity 0.3s 0.4s ease",visibility:"visible",opacity:"1"})},morphable:function(t){t.css({"z-index":2e3,opacity:0,"-webkit-transition":"opacity 0.1s",transition:"opacity 0.1s"})},fade:function(t){t.css({display:"block"}),setTimeout(function(){t.css({opacity:"1"})},25)}},o={wrapper:function(t,i){var n=i.MorphableBoundingRect;t.css({position:"fixed","z-index":"900",opacity:"0",margin:0,top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px","pointer-events":"none","-webkit-transition":"opacity 0.3s 0.5s, width 0.35s 0.1s, height 0.35s 0.1s, top 0.35s 0.1s, left 0.35s 0.1s, margin 0.35s 0.1s",transition:"opacity 0.3s 0.5s, width 0.35s 0.1s, height 0.35s 0.1s, top 0.35s 0.1s, left 0.35s 0.1s, margin 0.35s 0.1s"})},content:function(t){t.css({transition:"opacity 0.3s 0.4s ease",height:"0",opacity:"0"}),setTimeout(function(){t.css({visibility:"hidden"})},100)},morphable:function(t){t.css({"z-index":900,opacity:1,"-webkit-transition":"opacity 0.1s 0.4s",transition:"opacity 0.1s 0.4s"})},fade:function(t){t.css({opacity:"0"}),setTimeout(function(){t.css({display:"none"})},525)}};return{toggle:function(s){return s?t.forEach(i,function(t,i){o[i](t,n)}):(i.wrapper.css({transition:"none",top:n.MorphableBoundingRect.top+"px",left:n.MorphableBoundingRect.left+"px"}),setTimeout(function(){t.forEach(i,function(t,i){e[i](t,n)})},25)),!s}}}}])}(angular),function(t){"use strict";t.module("morph.transitions").factory("Expand",[function(){}])}(angular),function(t){"use strict";t.module("morph.transitions").factory("Overlay",[function(){return function(i,n){var e={wrapper:function(t,i){t.css({"z-index":1900,opacity:1,visibility:"visible","pointer-events":"auto",top:"0",left:"0",width:"100%",height:"100%","-webkit-transition":"width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s",transition:"width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s"}),console.log(i.overlay.scroll,i),i.overlay.scroll!==!1&&setTimeout(function(){t.css({"overflow-y":"scroll"})},500)},content:function(t){t.css({transition:"opacity 0.3s 0.5s ease",visibility:"visible",opacity:"1"})},morphable:function(t){t.css({"z-index":2e3,opacity:0,"-webkit-transition":"opacity 0.1s",transition:"opacity 0.1s"})}},o={wrapper:function(t,i){var n=i.MorphableBoundingRect;setTimeout(function(){t.css({overflow:"hidden",position:"fixed","z-index":"900",opacity:"0",margin:0,top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px","pointer-events":"none","-webkit-transition":"opacity 0.3s 0.5s, width 0.35s 0.1s, height 0.35s 0.1s, top 0.35s 0.1s, left 0.35s 0.1s, margin 0.35s 0.1s",transition:"opacity 0.3s 0.5s, width 0.35s 0.1s, height 0.35s 0.1s, top 0.35s 0.1s, left 0.35s 0.1s, margin 0.35s 0.1s"})},100)},content:function(t){t.css({transition:"opacity 0.22s ease","-webkit-transition":"opacity 0.22s ease",height:"0",opacity:"0"}),setTimeout(function(){t.css({visibility:"hidden"})},70)},morphable:function(t){t.css({"z-index":900,opacity:1,"-webkit-transition":"opacity 0.1s 0.3s",transition:"opacity 0.1s 0.3s"})}};return{toggle:function(s){return s?t.forEach(i,function(t,i){o[i](t,n)}):(i.wrapper.css({transition:"none",top:n.MorphableBoundingRect.top+"px",left:n.MorphableBoundingRect.left+"px"}),setTimeout(function(){t.forEach(i,function(t,i){e[i](t,n)})},25)),!s}}}}])}(angular),function(t){"use strict";t.module("morph.directives",["morph"])}(angular),function(t){"use strict";t.module("morph.directives").directive("ngMorphModal",["TemplateHandler","$compile","Morph",function(i,n,e){return{restrict:"A",scope:!0,link:function(o,s,r){var a=t.element("<div></div>").css("visibility","hidden"),c=o[r.ngMorphModal],p=!1,l=function(t){var i=t.data?t.data:t;return n(i)(o)},u=function(i){var n=t.element(i[0].querySelector(c.closeEl)),r={morphable:s,wrapper:a,content:i};if(c.modal.fade!==!1){var l=t.element("<div></div>");r.fade=l}a.append(i),s.after(a),l&&a.after(l),a.css("background",getComputedStyle(i[0]).backgroundColor),c.MorphableBoundingRect=s[0].getBoundingClientRect(),c.ContentBoundingRect=i[0].getBoundingClientRect();var u=new e("Modal",r,c);s.bind("click",function(){c.MorphableBoundingRect=s[0].getBoundingClientRect(),p=u.toggle(p)}),n&&n.bind("click",function(){c.MorphableBoundingRect=s[0].getBoundingClientRect(),p=u.toggle(p)}),o.$on("$destroy",function(){s.unbind("click"),n.unbind("click")})};if(c.modal.template)u(l(c.modal.template));else{if(!c.modal.templateUrl)throw new Error("No template found.");i.get(c.modal.templateUrl).then(l).then(u)}}}}])}(angular),function(t){"use strict";t.module("morph.directives").directive("ngMorphOverlay",["$compile","TemplateHandler","Morph",function(i,n,e){return{restrict:"A",scope:!0,link:function(o,s,r){var a=t.element("<div></div>").css("visibility","hidden"),c=o[r.ngMorphOverlay],p=!1,l=function(t){var n=t.data?t.data:t;return i(n)(o)},u=function(i){var n=t.element(i[0].querySelector(c.closeEl)),r={morphable:s,wrapper:a,content:i};a.append(i),s.after(a),a.css("background",getComputedStyle(i[0]).backgroundColor),c.MorphableBoundingRect=s[0].getBoundingClientRect(),c.ContentBoundingRect=i[0].getBoundingClientRect();var l=new e("Overlay",r,c);s.bind("click",function(){c.MorphableBoundingRect=s[0].getBoundingClientRect(),p=l.toggle(p)}),n&&n.bind("click",function(){c.MorphableBoundingRect=s[0].getBoundingClientRect(),p=l.toggle(p)}),o.$on("$destroy",function(){s.unbind("click"),n.unbind("click")})};if(c.overlay.template)u(l(c.overlay.template));else{if(!c.overlay.templateUrl)throw new Error("No template found.");n.get(c.overlay.templateUrl).then(l).then(u)}}}}])}(angular),function(t){"use strict";t.module("morph.assist",[]).factory("Assist",[function(){var t={wrapper:{position:"fixed","z-index":"900",opacity:"0",margin:"0","pointer-events":"none","-webkit-transition":"opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s",transition:"opacity 0.3s 0.5s, width 0.4s 0.1s, height 0.4s 0.1s, top 0.4s 0.1s, left 0.4s 0.1s, margin 0.4s 0.1s"},content:{transition:"opacity 0.3s 0.3s ease","-webkit-transition":"opacity 0.3s 0.3s ease",height:"0",opacity:"0"},morphable:{"z-index":"1000",outline:"none"},fade:{display:"none",opacity:"0",position:"fixed",top:"0",left:"0","z-index":"800",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)","-webkit-transition":"opacity 0.5s",transition:"opacity 0.5s"}};return{setBoundingRect:function(t,i,n){t.css({top:i.top+"px",left:i.left+"px",width:i.width+"px",height:i.height+"px"}),"function"==typeof n&&n(t)},applyDefaultStyles:function(i,n){t[n]&&i.css(t[n])}}}])}(angular),function(t){"use strict";t.module("morph",["morph.transitions","morph.assist"]).factory("Morph",["Transitions","Assist",function(i,n){return function(e,o,s){var r=s.MorphableBoundingRect;return n.setBoundingRect(o.wrapper,r),t.forEach(o,function(t,i){n.applyDefaultStyles(t,i)}),i[e](o,s)}}]).factory("TemplateHandler",["$http","$templateCache",function(t,i){return{get:function(n){return t.get(n,{cache:i})}}}])}(angular),function(t){"use strict";t.module("ngMorph",["morph.directives","morph"])}(angular);
|