1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5893d4487c1d/ Changeset: 5893d4487c1d User: guerler Date: 2014-12-10 08:48:37+00:00 Summary: Scratchbook: Fix renamed resize icon Affected #: 3 files diff -r da7372555da025bdc48c1a00278e282f200b2fc2 -r 5893d4487c1de27edd99fe07427e32b5c28d1ba8 client/galaxy/scripts/mvc/ui/ui-frames.js --- a/client/galaxy/scripts/mvc/ui/ui-frames.js +++ b/client/galaxy/scripts/mvc/ui/ui-frames.js @@ -1003,7 +1003,7 @@ '<div class="f-content">' + '<div class="f-cover"></div>' + '</div>' + - '<span class="f-resize f-icon corner fa fa-resize-full"></span>' + + '<span class="f-resize f-icon corner fa fa-expand"></span>' + '</div>'; }, diff -r da7372555da025bdc48c1a00278e282f200b2fc2 -r 5893d4487c1de27edd99fe07427e32b5c28d1ba8 static/scripts/mvc/ui/ui-frames.js --- a/static/scripts/mvc/ui/ui-frames.js +++ b/static/scripts/mvc/ui/ui-frames.js @@ -1003,7 +1003,7 @@ '<div class="f-content">' + '<div class="f-cover"></div>' + '</div>' + - '<span class="f-resize f-icon corner fa fa-resize-full"></span>' + + '<span class="f-resize f-icon corner fa fa-expand"></span>' + '</div>'; }, diff -r da7372555da025bdc48c1a00278e282f200b2fc2 -r 5893d4487c1de27edd99fe07427e32b5c28d1ba8 static/scripts/packed/mvc/ui/ui-frames.js --- a/static/scripts/packed/mvc/ui/ui-frames.js +++ b/static/scripts/packed/mvc/ui/ui-frames.js @@ -1,1 +1,1 @@ -define([],function(){var a=Backbone.View.extend({options:{frame:{cols:6,rows:3},rows:1000,cell:130,margin:5,scroll:5,top_min:40,frame_max:9,visible:true,onchange:null},cols:0,top:0,top_max:0,frame_z:0,frame_counter:0,frame_counter_id:0,frame_list:[],frame_shadow:null,visible:null,initialize:function(c){var b=this;if(c){this.options=_.defaults(c,this.options)}this.visible=this.options.visible;this.top=this.top_max=this.options.top_min;this.setElement(this._template());$(this.el).append(this._templateBackground());$(this.el).append(this._templateMenu());$(this.el_main).append($(this.el));var d="#frame-shadow";$(this.el).append(this._templateShadow(d.substring(1)));this.frame_shadow={id:d,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};this._frameResize(this.frame_shadow,{width:0,height:0});this.frame_list[d]=this.frame_shadow;this._panelRefresh();if(!this.visible){this.hide()}else{this.show()}var b=this;$(window).resize(function(){if(b.visible){b._panelRefresh()}})},add:function(c){var f={title:"",content:null,target:"",type:null};if(c){c=_.defaults(c,f)}else{c=f}if(!c.content){return}if(this.frame_counter>=this.options.frame_max){alert("You have reached the maximum number of allowed frames ("+this.options.frame_max+").");return}var d="#frame-"+(this.frame_counter_id++);if($(d).length!==0){alert("This frame already exists. This page might contain multiple frame managers.");return}this.top=this.options.top_min;var e=null;if(c.type==="url"){e=$(this._templateFrameUrl(d.substring(1),c.title,c.content))}else{if(c.type==="other"){e=$(this._templateFrame(d.substring(1),c.title));var b=e.find(".f-content");if(_.isFunction(c.content)){c.content(b)}else{b.append(c.content)}}}$(this.el).append(e);var g={id:d,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};c.width=this._toPixelCoord("width",this.options.frame.cols);c.height=this._toPixelCoord("height",this.options.frame.rows);this.frame_z=parseInt($(g.id).css("z-index"));this.frame_list[d]=g;this.frame_counter++;this._frameResize(g,{width:c.width,height:c.height});this._frameInsert(g,{top:0,left:0},true);if(!this.visible){this.show()}},show:function(){this.visible=true;this.$el.find(".frame").fadeIn("fast");this.$el.find(this.frame_shadow.id).hide();this.$el.find(".frame-background").show();this._panelRefresh();this._menuRefresh()},hide:function(){if(this.event.type!==null){return}this.visible=false;this.$el.find(".frame").fadeOut("fast");this.$el.find(".frame-background").hide();this.$el.find(".frame-menu").hide();this._menuRefresh()},length:function(){return this.frame_counter},setOnChange:function(b){this.options.onchange=b},event:{type:null,target:null,xy:null},events:{mousemove:"_eventFrameMouseMove",mouseup:"_eventFrameMouseUp",mouseleave:"_eventFrameMouseUp",mousewheel:"_eventPanelScroll",DOMMouseScroll:"_eventPanelScroll","mousedown .frame":"_eventFrameMouseDown","mousedown .frame-background":"_eventHide","mousedown .frame-scroll-up":"_eventPanelScroll_up","mousedown .frame-scroll-down":"_eventPanelScroll_down","mousedown .f-close":"_eventFrameClose","mousedown .f-pin":"_eventFrameLock"},_eventFrameMouseDown:function(b){if(this.event.type!==null){return}if($(b.target).hasClass("f-header")||$(b.target).hasClass("f-title")){this.event.type="drag"}if($(b.target).hasClass("f-resize")){this.event.type="resize"}if(this.event.type===null){return}b.preventDefault();this.event.target=this._frameIdentify(b.target);if(this.event.target.grid_lock){this.event.type=null;return}this.event.xy={x:b.originalEvent.pageX,y:b.originalEvent.pageY};this._frameDragStart(this.event.target)},_eventFrameMouseMove:function(h){if(this.event.type!="drag"&&this.event.type!="resize"){return}var f={x:h.originalEvent.pageX,y:h.originalEvent.pageY};var c={x:f.x-this.event.xy.x,y:f.y-this.event.xy.y};this.event.xy=f;var g=this._frameScreen(this.event.target);if(this.event.type=="resize"){g.width+=c.x;g.height+=c.y;var d=this.options.cell-this.options.margin-1;g.width=Math.max(g.width,d);g.height=Math.max(g.height,d);this._frameResize(this.event.target,g);g.width=this._toGridCoord("width",g.width)+1;g.height=this._toGridCoord("height",g.height)+1;g.width=this._toPixelCoord("width",g.width);g.height=this._toPixelCoord("height",g.height);this._frameResize(this.frame_shadow,g);this._frameInsert(this.frame_shadow,{top:this._toGridCoord("top",g.top),left:this._toGridCoord("left",g.left)})}if(this.event.type=="drag"){g.left+=c.x;g.top+=c.y;this._frameOffset(this.event.target,g);var b={top:this._toGridCoord("top",g.top),left:this._toGridCoord("left",g.left)};if(b.left!==0){b.left++}this._frameInsert(this.frame_shadow,b)}},_eventFrameMouseUp:function(b){if(this.event.type!="drag"&&this.event.type!="resize"){return}this._frameDragStop(this.event.target);this.event.type=null},_eventFrameClose:function(c){if(this.event.type!==null){return}c.preventDefault();var d=this._frameIdentify(c.target);var b=this;$(d.id).fadeOut("fast",function(){$(d.id).remove();delete b.frame_list[d.id];b.frame_counter--;b._panelRefresh(true);b._panelAnimationComplete();if(b.visible&&b.frame_counter==0){b.hide()}})},_eventFrameLock:function(b){if(this.event.type!==null){return}b.preventDefault();var c=this._frameIdentify(b.target);if(c.grid_lock){c.grid_lock=false;$(c.id).find(".f-pin").removeClass("toggle");$(c.id).find(".f-header").removeClass("f-not-allowed");$(c.id).find(".f-title").removeClass("f-not-allowed");$(c.id).find(".f-resize").show();$(c.id).find(".f-close").show()}else{c.grid_lock=true;$(c.id).find(".f-pin").addClass("toggle");$(c.id).find(".f-header").addClass("f-not-allowed");$(c.id).find(".f-title").addClass("f-not-allowed");$(c.id).find(".f-resize").hide();$(c.id).find(".f-close").hide()}},_eventHide:function(b){if(this.event.type!==null){return}this.hide()},_eventPanelScroll:function(b){if(this.event.type!==null||!this.visible){return}var c=$(b.srcElement).parents(".frame");if(c.length!==0){b.stopPropagation();return}b.preventDefault();var d=b.originalEvent.detail?b.originalEvent.detail:b.originalEvent.wheelDelta/-3;this._panelScroll(d)},_eventPanelScroll_up:function(b){if(this.event.type!==null){return}b.preventDefault();this._panelScroll(-this.options.scroll)},_eventPanelScroll_down:function(b){if(this.event.type!==null){return}b.preventDefault();this._panelScroll(this.options.scroll)},_frameIdentify:function(b){return this.frame_list["#"+$(b).closest(".frame").attr("id")]},_frameDragStart:function(c){this._frameFocus(c,true);var b=this._frameScreen(c);this._frameResize(this.frame_shadow,b);this._frameGrid(this.frame_shadow,c.grid_location);c.grid_location=null;$(this.frame_shadow.id).show();$(".f-cover").show()},_frameDragStop:function(c){this._frameFocus(c,false);var b=this._frameScreen(this.frame_shadow);this._frameResize(c,b);this._frameGrid(c,this.frame_shadow.grid_location,true);this.frame_shadow.grid_location=null;$(this.frame_shadow.id).hide();$(".f-cover").hide();this._panelAnimationComplete()},_toGridCoord:function(d,c){var b=(d=="width"||d=="height")?1:-1;if(d=="top"){c-=this.top}return parseInt((c+b*this.options.margin)/this.options.cell,10)},_toPixelCoord:function(d,e){var b=(d=="width"||d=="height")?1:-1;var c=(e*this.options.cell)-b*this.options.margin;if(d=="top"){c+=this.top}return c},_toGrid:function(b){return{top:this._toGridCoord("top",b.top),left:this._toGridCoord("left",b.left),width:this._toGridCoord("width",b.width),height:this._toGridCoord("height",b.height)}},_toPixel:function(b){return{top:this._toPixelCoord("top",b.top),left:this._toPixelCoord("left",b.left),width:this._toPixelCoord("width",b.width),height:this._toPixelCoord("height",b.height)}},_isCollision:function(d){function b(g,f){return !(g.left>f.left+f.width-1||g.left+g.width-1<f.left||g.top>f.top+f.height-1||g.top+g.height-1<f.top)}for(var c in this.frame_list){var e=this.frame_list[c];if(e.grid_location===null){continue}if(b(d,e.grid_location)){return true}}return false},_locationRank:function(b){return(b.top*this.cols)+b.left},_menuRefresh:function(){if(this.visible){if(this.top==this.options.top_min){$(".frame-scroll-up").hide()}else{$(".frame-scroll-up").show()}if(this.top==this.top_max){$(".frame-scroll-down").hide()}else{$(".frame-scroll-down").show()}}if(this.options.onchange){this.options.onchange()}},_panelAnimationComplete:function(){var b=this;$(".frame").promise().done(function(){b._panelScroll(0,true)})},_panelRefresh:function(b){this.cols=parseInt($(window).width()/this.options.cell,10)+1;this._frameInsert(null,null,b)},_panelScroll:function(g,b){var d=this.top-this.options.scroll*g;d=Math.max(d,this.top_max);d=Math.min(d,this.options.top_min);if(this.top!=d){for(var c in this.frame_list){var f=this.frame_list[c];if(f.grid_location!==null){var e={top:f.screen_location.top-(this.top-d),left:f.screen_location.left};this._frameOffset(f,e,b)}}this.top=d}this._menuRefresh()},_frameInsert:function(h,b,d){var c=[];if(h){h.grid_location=null;c.push([h,this._locationRank(b)])}var e=null;for(e in this.frame_list){var g=this.frame_list[e];if(g.grid_location!==null&&!g.grid_lock){g.grid_location=null;c.push([g,g.grid_rank])}}c.sort(function(k,f){var m=k[1];var l=f[1];return m<l?-1:(m>l?1:0)});for(e=0;e<c.length;e++){this._framePlace(c[e][0],d)}this.top_max=0;for(var e in this.frame_list){var h=this.frame_list[e];if(h.grid_location!==null){this.top_max=Math.max(this.top_max,h.grid_location.top+h.grid_location.height)}}this.top_max=$(window).height()-this.top_max*this.options.cell-2*this.options.margin;this.top_max=Math.min(this.top_max,this.options.top_min);this._menuRefresh()},_framePlace:function(h,c){h.grid_location=null;var f=this._toGrid(this._frameScreen(h));var b=false;for(var e=0;e<this.options.rows;e++){for(var d=0;d<Math.max(1,this.cols-f.width);d++){f.top=e;f.left=d;if(!this._isCollision(f)){b=true;break}}if(b){break}}if(b){this._frameGrid(h,f,c)}else{console.log("Grid dimensions exceeded.")}},_frameFocus:function(d,b){var c=this.frame_z+(b?1:0);$(d.id).css("z-index",c)},_frameOffset:function(e,d,c){e.screen_location.left=d.left;e.screen_location.top=d.top;if(c){this._frameFocus(e,true);var b=this;$(e.id).animate({top:d.top,left:d.left},"fast",function(){b._frameFocus(e,false)})}else{$(e.id).css({top:d.top,left:d.left})}},_frameResize:function(c,b){$(c.id).css({width:b.width,height:b.height});c.screen_location.width=b.width;c.screen_location.height=b.height},_frameGrid:function(d,b,c){d.grid_location=b;this._frameOffset(d,this._toPixel(b),c);d.grid_rank=this._locationRank(b)},_frameScreen:function(c){var b=c.screen_location;return{top:b.top,left:b.left,width:b.width,height:b.height}},_template:function(){return'<div class="galaxy-frame"></div>'},_templateFrame:function(c,b){if(!b){b=""}return'<div id="'+c+'" class="frame corner"><div class="f-header corner"><span class="f-title">'+b+'</span><span class="f-icon f-close fa fa-trash-o"></span><span class="f-icon f-pin fa fa-thumb-tack"></span></div><div class="f-content"><div class="f-cover"></div></div><span class="f-resize f-icon corner fa fa-resize-full"></span></div>'},_templateFrameUrl:function(e,d,b){if(b.indexOf("?")==-1){b+="?"}else{b+="&"}b+="widget=True";var c=$(this._templateFrame(e,d));c.find(".f-content").append('<iframe scrolling="auto" class="f-iframe" src="'+b+'"></iframe>');return c},_templateShadow:function(b){return'<div id="'+b+'" class="frame-shadow corner"></div>'},_templateBackground:function(){return'<div class="frame-background"></div>'},_templateMenu:function(){return'<div class="frame-scroll-up frame-menu fa fa-chevron-up fa-2x"></div><div class="frame-scroll-down frame-menu fa fa-chevron-down fa-2x"></div>'}});return{View:a}}); \ No newline at end of file +define([],function(){var a=Backbone.View.extend({options:{frame:{cols:6,rows:3},rows:1000,cell:130,margin:5,scroll:5,top_min:40,frame_max:9,visible:true,onchange:null},cols:0,top:0,top_max:0,frame_z:0,frame_counter:0,frame_counter_id:0,frame_list:[],frame_shadow:null,visible:null,initialize:function(c){var b=this;if(c){this.options=_.defaults(c,this.options)}this.visible=this.options.visible;this.top=this.top_max=this.options.top_min;this.setElement(this._template());$(this.el).append(this._templateBackground());$(this.el).append(this._templateMenu());$(this.el_main).append($(this.el));var d="#frame-shadow";$(this.el).append(this._templateShadow(d.substring(1)));this.frame_shadow={id:d,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};this._frameResize(this.frame_shadow,{width:0,height:0});this.frame_list[d]=this.frame_shadow;this._panelRefresh();if(!this.visible){this.hide()}else{this.show()}var b=this;$(window).resize(function(){if(b.visible){b._panelRefresh()}})},add:function(c){var f={title:"",content:null,target:"",type:null};if(c){c=_.defaults(c,f)}else{c=f}if(!c.content){return}if(this.frame_counter>=this.options.frame_max){alert("You have reached the maximum number of allowed frames ("+this.options.frame_max+").");return}var d="#frame-"+(this.frame_counter_id++);if($(d).length!==0){alert("This frame already exists. This page might contain multiple frame managers.");return}this.top=this.options.top_min;var e=null;if(c.type==="url"){e=$(this._templateFrameUrl(d.substring(1),c.title,c.content))}else{if(c.type==="other"){e=$(this._templateFrame(d.substring(1),c.title));var b=e.find(".f-content");if(_.isFunction(c.content)){c.content(b)}else{b.append(c.content)}}}$(this.el).append(e);var g={id:d,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};c.width=this._toPixelCoord("width",this.options.frame.cols);c.height=this._toPixelCoord("height",this.options.frame.rows);this.frame_z=parseInt($(g.id).css("z-index"));this.frame_list[d]=g;this.frame_counter++;this._frameResize(g,{width:c.width,height:c.height});this._frameInsert(g,{top:0,left:0},true);if(!this.visible){this.show()}},show:function(){this.visible=true;this.$el.find(".frame").fadeIn("fast");this.$el.find(this.frame_shadow.id).hide();this.$el.find(".frame-background").show();this._panelRefresh();this._menuRefresh()},hide:function(){if(this.event.type!==null){return}this.visible=false;this.$el.find(".frame").fadeOut("fast");this.$el.find(".frame-background").hide();this.$el.find(".frame-menu").hide();this._menuRefresh()},length:function(){return this.frame_counter},setOnChange:function(b){this.options.onchange=b},event:{type:null,target:null,xy:null},events:{mousemove:"_eventFrameMouseMove",mouseup:"_eventFrameMouseUp",mouseleave:"_eventFrameMouseUp",mousewheel:"_eventPanelScroll",DOMMouseScroll:"_eventPanelScroll","mousedown .frame":"_eventFrameMouseDown","mousedown .frame-background":"_eventHide","mousedown .frame-scroll-up":"_eventPanelScroll_up","mousedown .frame-scroll-down":"_eventPanelScroll_down","mousedown .f-close":"_eventFrameClose","mousedown .f-pin":"_eventFrameLock"},_eventFrameMouseDown:function(b){if(this.event.type!==null){return}if($(b.target).hasClass("f-header")||$(b.target).hasClass("f-title")){this.event.type="drag"}if($(b.target).hasClass("f-resize")){this.event.type="resize"}if(this.event.type===null){return}b.preventDefault();this.event.target=this._frameIdentify(b.target);if(this.event.target.grid_lock){this.event.type=null;return}this.event.xy={x:b.originalEvent.pageX,y:b.originalEvent.pageY};this._frameDragStart(this.event.target)},_eventFrameMouseMove:function(h){if(this.event.type!="drag"&&this.event.type!="resize"){return}var f={x:h.originalEvent.pageX,y:h.originalEvent.pageY};var c={x:f.x-this.event.xy.x,y:f.y-this.event.xy.y};this.event.xy=f;var g=this._frameScreen(this.event.target);if(this.event.type=="resize"){g.width+=c.x;g.height+=c.y;var d=this.options.cell-this.options.margin-1;g.width=Math.max(g.width,d);g.height=Math.max(g.height,d);this._frameResize(this.event.target,g);g.width=this._toGridCoord("width",g.width)+1;g.height=this._toGridCoord("height",g.height)+1;g.width=this._toPixelCoord("width",g.width);g.height=this._toPixelCoord("height",g.height);this._frameResize(this.frame_shadow,g);this._frameInsert(this.frame_shadow,{top:this._toGridCoord("top",g.top),left:this._toGridCoord("left",g.left)})}if(this.event.type=="drag"){g.left+=c.x;g.top+=c.y;this._frameOffset(this.event.target,g);var b={top:this._toGridCoord("top",g.top),left:this._toGridCoord("left",g.left)};if(b.left!==0){b.left++}this._frameInsert(this.frame_shadow,b)}},_eventFrameMouseUp:function(b){if(this.event.type!="drag"&&this.event.type!="resize"){return}this._frameDragStop(this.event.target);this.event.type=null},_eventFrameClose:function(c){if(this.event.type!==null){return}c.preventDefault();var d=this._frameIdentify(c.target);var b=this;$(d.id).fadeOut("fast",function(){$(d.id).remove();delete b.frame_list[d.id];b.frame_counter--;b._panelRefresh(true);b._panelAnimationComplete();if(b.visible&&b.frame_counter==0){b.hide()}})},_eventFrameLock:function(b){if(this.event.type!==null){return}b.preventDefault();var c=this._frameIdentify(b.target);if(c.grid_lock){c.grid_lock=false;$(c.id).find(".f-pin").removeClass("toggle");$(c.id).find(".f-header").removeClass("f-not-allowed");$(c.id).find(".f-title").removeClass("f-not-allowed");$(c.id).find(".f-resize").show();$(c.id).find(".f-close").show()}else{c.grid_lock=true;$(c.id).find(".f-pin").addClass("toggle");$(c.id).find(".f-header").addClass("f-not-allowed");$(c.id).find(".f-title").addClass("f-not-allowed");$(c.id).find(".f-resize").hide();$(c.id).find(".f-close").hide()}},_eventHide:function(b){if(this.event.type!==null){return}this.hide()},_eventPanelScroll:function(b){if(this.event.type!==null||!this.visible){return}var c=$(b.srcElement).parents(".frame");if(c.length!==0){b.stopPropagation();return}b.preventDefault();var d=b.originalEvent.detail?b.originalEvent.detail:b.originalEvent.wheelDelta/-3;this._panelScroll(d)},_eventPanelScroll_up:function(b){if(this.event.type!==null){return}b.preventDefault();this._panelScroll(-this.options.scroll)},_eventPanelScroll_down:function(b){if(this.event.type!==null){return}b.preventDefault();this._panelScroll(this.options.scroll)},_frameIdentify:function(b){return this.frame_list["#"+$(b).closest(".frame").attr("id")]},_frameDragStart:function(c){this._frameFocus(c,true);var b=this._frameScreen(c);this._frameResize(this.frame_shadow,b);this._frameGrid(this.frame_shadow,c.grid_location);c.grid_location=null;$(this.frame_shadow.id).show();$(".f-cover").show()},_frameDragStop:function(c){this._frameFocus(c,false);var b=this._frameScreen(this.frame_shadow);this._frameResize(c,b);this._frameGrid(c,this.frame_shadow.grid_location,true);this.frame_shadow.grid_location=null;$(this.frame_shadow.id).hide();$(".f-cover").hide();this._panelAnimationComplete()},_toGridCoord:function(d,c){var b=(d=="width"||d=="height")?1:-1;if(d=="top"){c-=this.top}return parseInt((c+b*this.options.margin)/this.options.cell,10)},_toPixelCoord:function(d,e){var b=(d=="width"||d=="height")?1:-1;var c=(e*this.options.cell)-b*this.options.margin;if(d=="top"){c+=this.top}return c},_toGrid:function(b){return{top:this._toGridCoord("top",b.top),left:this._toGridCoord("left",b.left),width:this._toGridCoord("width",b.width),height:this._toGridCoord("height",b.height)}},_toPixel:function(b){return{top:this._toPixelCoord("top",b.top),left:this._toPixelCoord("left",b.left),width:this._toPixelCoord("width",b.width),height:this._toPixelCoord("height",b.height)}},_isCollision:function(d){function b(g,f){return !(g.left>f.left+f.width-1||g.left+g.width-1<f.left||g.top>f.top+f.height-1||g.top+g.height-1<f.top)}for(var c in this.frame_list){var e=this.frame_list[c];if(e.grid_location===null){continue}if(b(d,e.grid_location)){return true}}return false},_locationRank:function(b){return(b.top*this.cols)+b.left},_menuRefresh:function(){if(this.visible){if(this.top==this.options.top_min){$(".frame-scroll-up").hide()}else{$(".frame-scroll-up").show()}if(this.top==this.top_max){$(".frame-scroll-down").hide()}else{$(".frame-scroll-down").show()}}if(this.options.onchange){this.options.onchange()}},_panelAnimationComplete:function(){var b=this;$(".frame").promise().done(function(){b._panelScroll(0,true)})},_panelRefresh:function(b){this.cols=parseInt($(window).width()/this.options.cell,10)+1;this._frameInsert(null,null,b)},_panelScroll:function(g,b){var d=this.top-this.options.scroll*g;d=Math.max(d,this.top_max);d=Math.min(d,this.options.top_min);if(this.top!=d){for(var c in this.frame_list){var f=this.frame_list[c];if(f.grid_location!==null){var e={top:f.screen_location.top-(this.top-d),left:f.screen_location.left};this._frameOffset(f,e,b)}}this.top=d}this._menuRefresh()},_frameInsert:function(h,b,d){var c=[];if(h){h.grid_location=null;c.push([h,this._locationRank(b)])}var e=null;for(e in this.frame_list){var g=this.frame_list[e];if(g.grid_location!==null&&!g.grid_lock){g.grid_location=null;c.push([g,g.grid_rank])}}c.sort(function(k,f){var m=k[1];var l=f[1];return m<l?-1:(m>l?1:0)});for(e=0;e<c.length;e++){this._framePlace(c[e][0],d)}this.top_max=0;for(var e in this.frame_list){var h=this.frame_list[e];if(h.grid_location!==null){this.top_max=Math.max(this.top_max,h.grid_location.top+h.grid_location.height)}}this.top_max=$(window).height()-this.top_max*this.options.cell-2*this.options.margin;this.top_max=Math.min(this.top_max,this.options.top_min);this._menuRefresh()},_framePlace:function(h,c){h.grid_location=null;var f=this._toGrid(this._frameScreen(h));var b=false;for(var e=0;e<this.options.rows;e++){for(var d=0;d<Math.max(1,this.cols-f.width);d++){f.top=e;f.left=d;if(!this._isCollision(f)){b=true;break}}if(b){break}}if(b){this._frameGrid(h,f,c)}else{console.log("Grid dimensions exceeded.")}},_frameFocus:function(d,b){var c=this.frame_z+(b?1:0);$(d.id).css("z-index",c)},_frameOffset:function(e,d,c){e.screen_location.left=d.left;e.screen_location.top=d.top;if(c){this._frameFocus(e,true);var b=this;$(e.id).animate({top:d.top,left:d.left},"fast",function(){b._frameFocus(e,false)})}else{$(e.id).css({top:d.top,left:d.left})}},_frameResize:function(c,b){$(c.id).css({width:b.width,height:b.height});c.screen_location.width=b.width;c.screen_location.height=b.height},_frameGrid:function(d,b,c){d.grid_location=b;this._frameOffset(d,this._toPixel(b),c);d.grid_rank=this._locationRank(b)},_frameScreen:function(c){var b=c.screen_location;return{top:b.top,left:b.left,width:b.width,height:b.height}},_template:function(){return'<div class="galaxy-frame"></div>'},_templateFrame:function(c,b){if(!b){b=""}return'<div id="'+c+'" class="frame corner"><div class="f-header corner"><span class="f-title">'+b+'</span><span class="f-icon f-close fa fa-trash-o"></span><span class="f-icon f-pin fa fa-thumb-tack"></span></div><div class="f-content"><div class="f-cover"></div></div><span class="f-resize f-icon corner fa fa-expand"></span></div>'},_templateFrameUrl:function(e,d,b){if(b.indexOf("?")==-1){b+="?"}else{b+="&"}b+="widget=True";var c=$(this._templateFrame(e,d));c.find(".f-content").append('<iframe scrolling="auto" class="f-iframe" src="'+b+'"></iframe>');return c},_templateShadow:function(b){return'<div id="'+b+'" class="frame-shadow corner"></div>'},_templateBackground:function(){return'<div class="frame-background"></div>'},_templateMenu:function(){return'<div class="frame-scroll-up frame-menu fa fa-chevron-up fa-2x"></div><div class="frame-scroll-down frame-menu fa fa-chevron-down fa-2x"></div>'}});return{View:a}}); \ No newline at end of file Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.