templates/jquery/jquery.layout.min.js in compass-jquery-plugin-0.3.2.pre.2 vs templates/jquery/jquery.layout.min.js in compass-jquery-plugin-0.3.2.0
- old
+ new
@@ -10,11 +10,11 @@
b.defaults||b.north||b.south||b.west||b.east||b.center)c=i.extend(c,b);else i.each(b,function(d,e){a=d.split("__");c[a[1]?a[0]:"defaults"][a[1]?a[1]:a[0]]=e});return c},ha=function(b,c,d){function e(k){g=l[k];if(g.doCallback){cpPane=g.callback.split(",")[1];cpPane!=k&&cpPane!=c&&e(cpPane,true)}else{g.doCallback=true;g.callback=f}}var f=b+","+c+","+(d?1:0),g;i.each(l.borderPanes.split(","),function(k,h){if(l[h].isMoving){e(h);return false}})},ia=function(b){b=l[b];l.isLayoutBusy=false;delete b.isMoving;
if(b.doCallback&&b.callback){b.doCallback=false;var c=b.callback.split(","),d=c[2]>0?true:false;if(c[0]=="open")K(c[1],d);else c[0]=="close"&&I(c[1],d);if(!b.doCallback)b.callback=null}},y=function(b,c){if(c){var d;try{if(typeof c=="function")d=c;else if(typeof c!="string")return;else if(c.indexOf(",")>0){var e=c.split(",");d=eval(e[0]);if(typeof d=="function"&&e.length>1)return d(e[1])}else d=eval(c);if(typeof d=="function")return d(b,s[b],i.extend({},t[b]),i.extend({},p[b]),p.name)}catch(f){}}},
D=function(b,c){var d=0,e=false,f="";if(!i.browser.msie)if(i.curCSS(b[0],"display",true)=="none"){e=true;f=i.curCSS(b[0],"visibility",true);b.css({display:"block",visibility:"hidden"})}d=parseInt(i.curCSS(b[0],c,true),10)||0;if(e){b.css({display:"none"});f&&f!="hidden"&&b.css({visibility:f})}return d},E=function(b,c){var d;if(M(b)){b=G(b);d=s[b]}else d=i(b);if(c<=0)return 0;else c>0||(c=M(b)?H(b):d.outerWidth());return i.boxModel?c-D(d,"paddingLeft")-D(d,"paddingRight")-(i.curCSS(d[0],"borderLeftStyle",
true)=="none"?0:D(d,"borderLeftWidth"))-(i.curCSS(d[0],"borderRightStyle",true)=="none"?0:D(d,"borderRightWidth")):c},A=function(b,c){var d;if(M(b)){b=G(b);d=s[b]}else d=i(b);if(c<=0)return 0;else c>0||(c=M(b)?H(b):d.outerHeight());return i.boxModel?c-D(d,"paddingTop")-D(d,"paddingBottom")-(i.curCSS(d[0],"borderTopStyle",true)=="none"?0:D(d,"borderTopWidth"))-(i.curCSS(d[0],"borderBottomStyle",true)=="none"?0:D(d,"borderBottomWidth")):c},H=function(b,c){var d=s[b],e=p[b],f=t[b],g=c?e.spacing_open:
0;e=c?e.spacing_closed:0;return!d||f.isHidden?0:f.isClosed||f.isSliding&&c?e:l[b].dir=="horz"?d.outerHeight()+g:d.outerWidth()+g},U=function(b){var c=q,d=l[b].dir,e=t[b],f=s[ga[b]],g=p[b].spacing_open,k=p[ga[b]].spacing_open,h=!f?0:d=="horz"?f.outerHeight():f.outerWidth();f=e.minSize||0;d=Math.min(e.maxSize||9999,(d=="horz"?c.innerHeight:c.innerWidth)-g-h-k);var m,j;switch(b){case "north":m=c.offsetTop+f;j=c.offsetTop+d;break;case "west":m=c.offsetLeft+f;j=c.offsetLeft+d;break;case "south":m=c.offsetTop+
-c.innerHeight-d;j=c.offsetTop+c.innerHeight-f;break;case "east":m=c.offsetLeft+c.innerWidth-d;j=c.offsetLeft+c.innerWidth-f}i.extend(e,{minSize:f,maxSize:d,minPosition:m,maxPosition:j})},ja=function(){var b={top:H("north",true),bottom:H("south",true),left:H("west",true),right:H("east",true),width:0,height:0};with(b){width=q.innerWidth-left-right;height=q.innerHeight-bottom-top;top+=q.top;bottom+=q.bottom;left+=q.left;right+=q.right}return b},ka=function(b){var c={},d,e,f;i.each("Left,Right,Top,Bottom".split(","),
+c.innerHeight-d;j=c.offsetTop+c.innerHeight-f;break;case "east":m=c.offsetLeft+c.innerWidth-d;j=c.offsetLeft+c.innerWidth-f}i.extend(e,{minSize:f,maxSize:d,minPosition:m,maxPosition:j})},ja=function(){var b={top:H("north",true),bottom:H("south",true),left:H("west",true),right:H("east",true),width:0,height:0};b.width=q.innerWidth-left-right;b.height=q.innerHeight-bottom-top;b.top+=q.top;b.bottom+=q.bottom;b.left+=q.left;b.right+=q.right;return b},ka=function(b){var c={},d,e,f;i.each("Left,Right,Top,Bottom".split(","),
function(){d=G(this);e=c["border"+d]=D(b,"border"+d+"Width");f=c["padding"+d]=D(b,"padding"+d);c["offset"+d]=e+f;if(b==z)c[d.toLowerCase()]=i.boxModel?f:0});c.innerWidth=c.outerWidth=b.outerWidth();c.innerHeight=c.outerHeight=b.outerHeight();if(i.boxModel){c.innerWidth-=c.offsetLeft+c.offsetRight;c.innerHeight-=c.offsetTop+c.offsetBottom}return c},pa=function(b,c,d,e){var f=window.layout=window.layout||{};f=f.timers=f.timers||{};b="layout_"+t.id+"_"+b+"_"+c;f[b]||(f[b]=setTimeout(d,e))},V=function(b,
c){var d=window.layout=window.layout||{};d=d.timers=d.timers||{};var e="layout_"+t.id+"_"+b+"_"+c;if(d[e]){clearTimeout(d[e]);delete d[e];return true}else return false},qa=function(){try{if(z[0].tagName=="BODY"){i("html").css({height:"100%",overflow:"hidden"});i("body").css({position:"relative",height:"100%",overflow:"hidden",margin:0,padding:0,border:"none"})}else{var b={overflow:"hidden"},c=z.css("position"),d=z.css("height");if(!z.hasClass("ui-layout-pane")){if(!c||"fixed,absolute,relative".indexOf(c)<
0)b.position="relative";if(!d||d=="auto")b.height="100%"}z.css(b)}}catch(e){}q=t.container=ka(z)},ra=function(){i.each(l.borderPanes.split(","),function(b,c){var d=p[c];if(d.enableCursorHotkey||d.customHotkey){i(document).keydown(na);return false}})},sa=function(){u=oa(u);if(u.effects){i.extend(Z,u.effects);delete u.effects}i.each("name,scrollToBookmarkOnLoad".split(","),function(d,e){if(u[e]!==undefined)p[e]=u[e];else if(u.defaults[e]!==undefined){p[e]=u.defaults[e];delete u.defaults[e]}});i.each("paneSelector,resizerCursor,customHotkey".split(","),
function(d,e){delete u.defaults[e]});i.extend(p.defaults,u.defaults);l.center=i.extend(true,{},l.defaults,l.center);i.extend(p.center,u.center);var b=i.extend(true,{},p.defaults,u.defaults,p.center);i.each("paneClass,contentSelector,contentIgnoreSelector,applyDefaultStyles,showOverflowOnHover".split(","),function(d,e){p.center[e]=b[e]});var c=p.defaults;i.each(l.borderPanes.split(","),function(d,e){l[e]=i.extend(true,{},l.defaults,l[e]);o=p[e]=i.extend(true,{},p.defaults,p[e],u.defaults,u[e]);if(!o.paneClass)o.paneClass=
F.paneClass;if(!o.resizerClass)o.resizerClass=F.resizerClass;if(!o.togglerClass)o.togglerClass=F.togglerClass;i.each(["_open","_close",""],function(f,g){var k="fxName"+g,h="fxSpeed"+g,m="fxSettings"+g;o[k]=u[e][k]||u[e].fxName||u.defaults[k]||u.defaults.fxName||o[k]||o.fxName||c[k]||c.fxName||"none";var j=o[k];if(j=="none"||!i.effects||!i.effects[j]||!Z[j]&&!o[m]&&!o.fxSettings)j=o[k]="none";j=Z[j]||{};k=j.all||{};j=j[e]||{};o[m]=i.extend({},k,j,c.fxSettings||{},c[m]||{},o.fxSettings,o[m],u.defaults.fxSettings,
@@ -43,7 +43,8 @@
A(k,d)),left:D(g,"left")})}else{r=g.outerHeight();k.css({height:v(1,A(k,r)),width:v(1,E(k,d)),top:q.top+H("north",true)})}if(h){if(j==0||f.isSliding&&e.hideTogglerOnSlide){h.hide();return}else h.show();if(!(j>0)||j=="100%"||j>r){j=r;g=0}else if(typeof n=="string")switch(n){case "top":case "left":g=0;break;case "bottom":case "right":g=r-j;break;default:g=Math.floor((r-j)/2)}else{g=parseInt(n);g=n>=0?g:r-j+g}r=e.togglerContent_open?h.children(".content-open"):false;var w=e.togglerContent_closed?h.children(".content-closed"):
false;n=f.isClosed?w:r;if(r)r.css("display",f.isClosed?"none":"block");if(w)w.css("display",f.isClosed?"block":"none");if(m=="horz"){f=E(h,j);h.css({width:v(0,f),height:v(1,A(h,d)),left:g});n&&n.css("marginLeft",Math.floor((f-n.outerWidth())/2))}else{f=A(h,j);h.css({height:v(0,f),width:v(1,E(h,d)),top:g});n&&n.css("marginTop",Math.floor((f-n.outerHeight())/2))}}if(c&&e.initHidden){k.hide();h&&h.hide()}}}})},ma=function(){var b=q.innerWidth,c=q.innerHeight;q=t.container=ka(z);var d=q.innerHeight<c,
e=q.innerWidth<b,f,g;if(d||e)i.each(["south","north","east","west"],function(k,h){f=t[h];g=l[h].dir;if(!f.isClosed&&(d&&g=="horz"||e&&g=="vert")){U(h);f.size>f.maxSize&&ba(h,f.maxSize)}});L("all");P("all")},z=i(this).css({overflow:"hidden"}),s={},N={},B={},O={},l={allPanes:"north,south,east,west,center",borderPanes:"north,south,east,west",zIndex:{resizer_normal:1,pane_normal:2,mask:4,sliding:100,resizing:1E4,animation:1E4},resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",
overflow:"hidden",zIndex:1},cssDef:{background:"#DDD",border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDef:{background:"#AAA"}},content:{cssReq:{overflow:"auto"},cssDef:{}},defaults:{cssReq:{position:"absolute",margin:0,zIndex:2},cssDef:{padding:"10px",background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{edge:"top",sizeType:"height",dir:"horz",cssReq:{top:0,bottom:"auto",
left:0,right:0,width:"auto"}},south:{edge:"bottom",sizeType:"height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{edge:"right",sizeType:"width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{edge:"left",sizeType:"width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},q=t.container;(function(){sa();
-qa();ta();ua();va();Q("all");if(p.scrollToBookmarkOnLoad)with(self.location)hash&&replace(hash);ra();i(window).resize(function(){var b="timerLayout_"+t.id;window[b]&&clearTimeout(window[b]);window[b]=null;window[b]=setTimeout(ma,100)})})();return{options:p,state:t,panes:s,toggle:R,open:K,close:I,hide:$,show:W,resizeContent:Q,sizePane:ba,resizeAll:ma,addToggleBtn:function(b,c){var d=T(b,c,"toggle");if(d)d.attr("title",t[c].isClosed?"Open":"Close").click(function(e){R(c);e.stopPropagation()})},addOpenBtn:function(b,
-c){var d=T(b,c,"open");d&&d.attr("title","Open").click(function(e){K(c);e.stopPropagation()})},addCloseBtn:function(b,c){var d=T(b,c,"close");d&&d.attr("title","Close").click(function(e){I(c);e.stopPropagation()})},addPinBtn:function(b,c){var d=T(b,c,"pin");if(d){var e=t[c];d.click(function(f){Y(i(this),c,e.isSliding||e.isClosed);e.isSliding||e.isClosed?K(c):I(c);f.stopPropagation()});Y(d,c,!e.isClosed&&!e.isSliding);l[c].pins.push(b)}},allowOverflow:ea,resetOverflow:S,cssWidth:E,cssHeight:A}}})(jQuery);
+qa();ta();ua();va();Q("all");p.scrollToBookmarkOnLoad&&self.location.hash&&replace(self.location.hash);ra();i(window).resize(function(){var b="timerLayout_"+t.id;window[b]&&clearTimeout(window[b]);window[b]=null;window[b]=setTimeout(ma,100)})})();return{options:p,state:t,panes:s,toggle:R,open:K,close:I,hide:$,show:W,resizeContent:Q,sizePane:ba,resizeAll:ma,addToggleBtn:function(b,c){var d=T(b,c,"toggle");if(d)d.attr("title",t[c].isClosed?"Open":"Close").click(function(e){R(c);e.stopPropagation()})},
+addOpenBtn:function(b,c){var d=T(b,c,"open");d&&d.attr("title","Open").click(function(e){K(c);e.stopPropagation()})},addCloseBtn:function(b,c){var d=T(b,c,"close");d&&d.attr("title","Close").click(function(e){I(c);e.stopPropagation()})},addPinBtn:function(b,c){var d=T(b,c,"pin");if(d){var e=t[c];d.click(function(f){Y(i(this),c,e.isSliding||e.isClosed);e.isSliding||e.isClosed?K(c):I(c);f.stopPropagation()});Y(d,c,!e.isClosed&&!e.isSliding);l[c].pins.push(b)}},allowOverflow:ea,resetOverflow:S,cssWidth:E,
+cssHeight:A}}})(jQuery);