galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
August 2013
- 1 participants
- 149 discussions
commit/galaxy-central: guerler: Fix by adding jquery-ui to viz template
by commits-noreply@bitbucket.org 08 Aug '13
by commits-noreply@bitbucket.org 08 Aug '13
08 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ba8330a9fdef/
Changeset: ba8330a9fdef
User: guerler
Date: 2013-08-08 09:44:34
Summary: Fix by adding jquery-ui to viz template
Affected #: 1 file
diff -r f06d793860c40c59200c1441374ca4993854e94a -r ba8330a9fdefe0431ee1869e3a60c55caebc937c templates/webapps/galaxy/galaxy.panels.mako
--- a/templates/webapps/galaxy/galaxy.panels.mako
+++ b/templates/webapps/galaxy/galaxy.panels.mako
@@ -30,6 +30,7 @@
## load jscript libraries
${h.js(
'libs/jquery/jquery',
+ 'libs/jquery/jquery-ui',
'libs/bootstrap',
'libs/underscore',
'libs/backbone/backbone',
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.
1
0
commit/galaxy-central: guerler: Remove new_browser.mako and instead use js-template and api function
by commits-noreply@bitbucket.org 08 Aug '13
by commits-noreply@bitbucket.org 08 Aug '13
08 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f06d793860c4/
Changeset: f06d793860c4
User: guerler
Date: 2013-08-08 07:15:49
Summary: Remove new_browser.mako and instead use js-template and api function
Affected #: 7 files
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a lib/galaxy/webapps/galaxy/api/genomes.py
--- a/lib/galaxy/webapps/galaxy/api/genomes.py
+++ b/lib/galaxy/webapps/galaxy/api/genomes.py
@@ -20,7 +20,7 @@
GET /api/genomes: returns a list of installed genomes
"""
- return self.app.genomes.get_dbkeys( trans )
+ return self.app.genomes.get_dbkeys( trans, **kwd )
@web.json
def show( self, trans, id, num=None, chrom=None, low=None, high=None, **kwd ):
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -684,16 +684,6 @@
#
# Visualizations.
#
-
- @web.expose
- @web.require_login()
- def new_browser( self, trans, **kwargs ):
- """
- Provide info necessary for creating a new trackster browser.
- """
- return trans.fill_template( "tracks/new_browser.mako",
- dbkeys=trans.app.genomes.get_dbkeys( trans, chrom_info=True ),
- default_dbkey=kwargs.get("default_dbkey", None) )
@web.expose
@web.require_login( "use Galaxy visualizations", use_panels=True )
@@ -769,9 +759,6 @@
# save database key
app['default_dbkey'] = dbkey
-
- # add url
- app['new_browser'] = web.url_for( controller='visualization', action='new_browser', default_dbkey=dbkey )
else:
# load saved visualization
vis = self.get_visualization( trans, id, check_ownership=False, check_accessible=True )
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a static/scripts/packed/viz/trackster.js
--- a/static/scripts/packed/viz/trackster.js
+++ b/static/scripts/packed/viz/trackster.js
@@ -1,1 +1,1 @@
-var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.css","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/jquery-ui-combobox","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.load_file("/static/style/jquery.rating.css");a.load_file("/static/style/history.css");a.load_file("/static/style/autocomplete_tagging.css");a.load_file("/static/style/jquery-ui/smoothness/jquery-ui.css");a.load_file("/static/style/library.css");a.load_file("/static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:config.app.new_browser,data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){show_modal("New Visualization",f,{Cancel:function(){window.location=config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val())}});$("#new-title").focus();$("select[name='dbkey']").combobox({appendTo:$("#overlay"),size:40});$("#overlay").css("overflow","auto")}})},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},config.app.gene_region);this.init_editor();view.editor=true;hide_modal()},init_editor:function(){$("#center .unified-panel-title").text(view.name+" ("+view.dbkey+")");if(config.app.add_dataset){$.ajax({url:config.root+"api/datasets/"+config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
+var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.css","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/jquery-ui-combobox","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.load_file("/static/style/jquery.rating.css");a.load_file("/static/style/history.css");a.load_file("/static/style/autocomplete_tagging.css");a.load_file("/static/style/jquery-ui/smoothness/jquery-ui.css");a.load_file("/static/style/library.css");a.load_file("/static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:config.root+"api/genomes?chrom_info=True",data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){show_modal("New Visualization",e.template_view_new(f),{Cancel:function(){window.location=config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val())}});if(config.app.default_dbkey){$("#new-dbkey option[value='"+config.default_dbkey+"']").attr("selected",true)}$("#new-title").focus();$("select[name='dbkey']").combobox({appendTo:$("#overlay"),size:40});$("#overlay").css("overflow","auto")}})},template_view_new:function(e){var g='<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;"><div class="form-row"><label for="new-title">Browser name:</label><div class="form-row-input"><input type="text" name="title" id="new-title" value="Unnamed"></input></div><div style="clear: both;"></div></div><div class="form-row"><label for="new-dbkey">Reference genome build (dbkey): </label><div class="form-row-input"><select name="dbkey" id="new-dbkey">';for(var f in e){g+='<option value="'+e[f][1]+'">'+e[f][0]+"</option>"}g+='</select></div><div style="clear: both;"></div></div><div class="form-row">Is the build not listed here?<br><a href="'+config.root+'user/dbkeys?use_panels=True">Add a Custom Build</a></div></form>';return g},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},config.app.gene_region);this.init_editor();view.editor=true;hide_modal()},init_editor:function(){$("#center .unified-panel-title").text(view.name+" ("+view.dbkey+")");if(config.app.add_dataset){$.ajax({url:config.root+"api/datasets/"+config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a static/scripts/packed/viz/trackster/tracks.js
--- a/static/scripts/packed/viz/trackster/tracks.js
+++ b/static/scripts/packed/viz/trackster/tracks.js
@@ -1,1 +1,1 @@
-define(["libs/underscore","viz/visualization","viz/trackster/util","viz/trackster/slotting","viz/trackster/painters","mvc/data","viz/trackster/filters"],function(ab,w,k,t,L,X,i){var p=ab.extend;var m={};var j=function(ac,ad){m[ac.attr("id")]=ad};var l=function(ac,ae,ag,af){ag=".group";var ad={};m[ac.attr("id")]=af;ac.bind("drag",{handle:"."+ae,relative:true},function(ao,ap){var an=$(this),at=$(this).parent(),ak=at.children(),am=m[$(this).attr("id")],aj,ai,aq,ah,al;ai=$(this).parents(ag);if(ai.length!==0){aq=ai.position().top;ah=aq+ai.outerHeight();if(ap.offsetY<aq){$(this).insertBefore(ai);var ar=m[ai.attr("id")];ar.remove_drawable(am);ar.container.add_drawable_before(am,ar);return}else{if(ap.offsetY>ah){$(this).insertAfter(ai);var ar=m[ai.attr("id")];ar.remove_drawable(am);ar.container.add_drawable(am);return}}}ai=null;for(al=0;al<ak.length;al++){aj=$(ak.get(al));aq=aj.position().top;ah=aq+aj.outerHeight();if(aj.is(ag)&&this!==aj.get(0)&&ap.offsetY>=aq&&ap.offsetY<=ah){if(ap.offsetY-aq<ah-ap.offsetY){aj.find(".content-div").prepend(this)}else{aj.find(".content-div").append(this)}if(am.container){am.container.remove_drawable(am)}m[aj.attr("id")].add_drawable(am);return}}for(al=0;al<ak.length;al++){aj=$(ak.get(al));if(ap.offsetY<aj.position().top&&!(aj.hasClass("reference-track")||aj.hasClass("intro"))){break}}if(al===ak.length){if(this!==ak.get(al-1)){at.append(this);m[at.attr("id")].move_drawable(am,al)}}else{if(this!==ak.get(al)){$(this).insertBefore(ak.get(al));m[at.attr("id")].move_drawable(am,(ap.deltaY>0?al-1:al))}}}).bind("dragstart",function(){ad["border-top"]=ac.css("border-top");ad["border-bottom"]=ac.css("border-bottom");$(this).css({"border-top":"1px solid blue","border-bottom":"1px solid blue"})}).bind("dragend",function(){$(this).css(ad)})};var aa=16,G=9,D=20,z=100,I=12000,S=400,K=5000,v=100,n="Cannot display dataset due to an error. ",J="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",E="No data for this chrom/contig.",u="Preparing data. This can take a while for a large dataset. If the visualization is saved and closed, preparation will continue in the background.",x="Tool cannot be rerun: ",a="Loading data...",U="Ready for display",R=10,H=20,A=["Histogram","Line","Filled","Intensity"];function V(ad,ac){if(!ac){ac=0}var ae=Math.pow(10,ac);return Math.round(ad*ae)/ae}var q=function(ad,ac,af){if(!q.id_counter){q.id_counter=0}this.id=q.id_counter++;this.name=af.name;this.view=ad;this.container=ac;this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name}],saved_values:af.prefs,onchange:function(){this.track.set_name(this.track.config.values.name)}});this.prefs=this.config.values;this.drag_handle_class=af.drag_handle_class;this.is_overview=false;this.action_icons={};this.content_visible=true;this.container_div=this.build_container_div();this.header_div=this.build_header_div();if(this.header_div){this.container_div.append(this.header_div);this.icons_div=$("<div/>").css("float","left").hide().appendTo(this.header_div);this.build_action_icons(this.action_icons_def);this.header_div.append($("<div style='clear: both'/>"));this.header_div.dblclick(function(ag){ag.stopPropagation()});var ae=this;this.container_div.hover(function(){ae.icons_div.show()},function(){ae.icons_div.hide()});$("<div style='clear: both'/>").appendTo(this.container_div)}};q.prototype.action_icons_def=[{name:"toggle_icon",title:"Hide/show content",css_class:"toggle",on_click_fn:function(ac){if(ac.content_visible){ac.action_icons.toggle_icon.addClass("toggle-expand").removeClass("toggle");ac.hide_contents();ac.content_visible=false}else{ac.action_icons.toggle_icon.addClass("toggle").removeClass("toggle-expand");ac.content_visible=true;ac.show_contents()}}},{name:"settings_icon",title:"Edit settings",css_class:"settings-icon",on_click_fn:function(ad){var af=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ac=function(){ad.config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},ae=function(ag){if((ag.keyCode||ag.which)===27){af()}else{if((ag.keyCode||ag.which)===13){ac()}}};$(window).bind("keypress.check_enter_esc",ae);show_modal("Configure",ad.config.build_form(),{Cancel:af,OK:ac})}},{name:"remove_icon",title:"Remove",css_class:"remove-icon",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.remove()}}];p(q.prototype,{init:function(){},changed:function(){this.view.changed()},can_draw:function(){if(this.enabled&&this.content_visible){return true}return false},request_draw:function(){},_draw:function(ac){},to_dict:function(){},set_name:function(ac){this.old_name=this.name;this.name=ac;this.name_div.text(this.name)},revert_name:function(){if(this.old_name){this.name=this.old_name;this.name_div.text(this.name)}},remove:function(){this.changed();this.container.remove_drawable(this);var ac=this.view;this.container_div.hide(0,function(){$(this).remove();ac.update_intro_div()})},build_container_div:function(){},build_header_div:function(){},add_action_icon:function(ad,ai,ah,ag,ac,af){var ae=this;this.action_icons[ad]=$("<a/>").attr("href","javascript:void(0);").attr("title",ai).addClass("icon-button").addClass(ah).tooltip().click(function(){ag(ae)}).appendTo(this.icons_div);if(af){this.action_icons[ad].hide()}},build_action_icons:function(ac){var ae;for(var ad=0;ad<ac.length;ad++){ae=ac[ad];this.add_action_icon(ae.name,ae.title,ae.css_class,ae.on_click_fn,ae.prepend,ae.hide)}},update_icons:function(){},hide_contents:function(){},show_contents:function(){},get_drawables:function(){}});var y=function(ad,ac,ae){q.call(this,ad,ac,ae);this.obj_type=ae.obj_type;this.drawables=[]};p(y.prototype,q.prototype,{unpack_drawables:function(ae){this.drawables=[];var ad;for(var ac=0;ac<ae.length;ac++){ad=o(ae[ac],this.view,this);this.add_drawable(ad)}},init:function(){for(var ac=0;ac<this.drawables.length;ac++){this.drawables[ac].init()}},_draw:function(ac){for(var ad=0;ad<this.drawables.length;ad++){this.drawables[ad]._draw(ac)}},to_dict:function(){var ad=[];for(var ac=0;ac<this.drawables.length;ac++){ad.push(this.drawables[ac].to_dict())}return{name:this.name,prefs:this.prefs,obj_type:this.obj_type,drawables:ad}},add_drawable:function(ac){this.drawables.push(ac);ac.container=this;this.changed()},add_drawable_before:function(ae,ac){this.changed();var ad=this.drawables.indexOf(ac);if(ad!==-1){this.drawables.splice(ad,0,ae);return true}return false},replace_drawable:function(ae,ac,ad){var af=this.drawables.indexOf(ae);if(af!==-1){this.drawables[af]=ac;if(ad){ae.container_div.replaceWith(ac.container_div)}this.changed()}return af},remove_drawable:function(ad){var ac=this.drawables.indexOf(ad);if(ac!==-1){this.drawables.splice(ac,1);ad.container=null;this.changed();return true}return false},move_drawable:function(ad,ae){var ac=this.drawables.indexOf(ad);if(ac!==-1){this.drawables.splice(ac,1);this.drawables.splice(ae,0,ad);this.changed();return true}return false},get_drawables:function(){return this.drawables},get_tracks:function(af){var ac=this.drawables.slice(0),ad=[],ae;while(ac.length!==0){ae=ac.shift();if(ae instanceof af){ad.push(ae)}else{if(ae.drawables){ac=ac.concat(ae.drawables)}}}return ad}});var Q=function(ad,ac,af){p(af,{obj_type:"DrawableGroup",drag_handle_class:"group-handle"});y.call(this,ad,ac,af);this.content_div=$("<div/>").addClass("content-div").attr("id","group_"+this.id+"_content_div").appendTo(this.container_div);j(this.container_div,this);j(this.content_div,this);l(this.container_div,this.drag_handle_class,".group",this);this.filters_manager=new i.FiltersManager(this);this.header_div.after(this.filters_manager.parent_div);this.saved_filters_managers=[];if("drawables" in af){this.unpack_drawables(af.drawables)}if("filters" in af){var ae=this.filters_manager;this.filters_manager=new i.FiltersManager(this,af.filters);ae.parent_div.replaceWith(this.filters_manager.parent_div);if(af.filters.visible){this.setup_multitrack_filtering()}}};p(Q.prototype,q.prototype,y.prototype,{action_icons_def:[q.prototype.action_icons_def[0],q.prototype.action_icons_def[1],{name:"composite_icon",title:"Show composite track",css_class:"layers-stack",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.show_composite_track()}},{name:"filters_icon",title:"Filters",css_class:"filters-icon",on_click_fn:function(ac){if(ac.filters_manager.visible()){ac.filters_manager.clear_filters();ac._restore_filter_managers()}else{ac.setup_multitrack_filtering();ac.request_draw({clear_tile_cache:true})}ac.filters_manager.toggle()}},q.prototype.action_icons_def[2]],build_container_div:function(){var ac=$("<div/>").addClass("group").attr("id","group_"+this.id);if(this.container){this.container.content_div.append(ac)}return ac},build_header_div:function(){var ac=$("<div/>").addClass("track-header");ac.append($("<div/>").addClass(this.drag_handle_class));this.name_div=$("<div/>").addClass("track-name").text(this.name).appendTo(ac);return ac},hide_contents:function(){this.tiles_div.hide()},show_contents:function(){this.tiles_div.show();this.request_draw()},update_icons:function(){var ae=this.drawables.length;if(ae===0){this.action_icons.composite_icon.hide();this.action_icons.filters_icon.hide()}else{if(ae===1){if(this.drawables[0] instanceof f){this.action_icons.composite_icon.show()}this.action_icons.filters_icon.hide()}else{var al,ak,ai,ao=true,ag=this.drawables[0].get_type(),ac=0;for(al=0;al<ae;al++){ai=this.drawables[al];if(ai.get_type()!==ag){can_composite=false;break}if(ai instanceof c){ac++}}if(ao||ac===1){this.action_icons.composite_icon.show()}else{this.action_icons.composite_icon.hide();$(".bs-tooltip").remove()}if(ac>1&&ac===this.drawables.length){var ap={},ad;ai=this.drawables[0];for(ak=0;ak<ai.filters_manager.filters.length;ak++){ad=ai.filters_manager.filters[ak];ap[ad.name]=[ad]}for(al=1;al<this.drawables.length;al++){ai=this.drawables[al];for(ak=0;ak<ai.filters_manager.filters.length;ak++){ad=ai.filters_manager.filters[ak];if(ad.name in ap){ap[ad.name].push(ad)}}}this.filters_manager.remove_all();var af,ah,aj,am;for(var an in ap){af=ap[an];if(af.length===ac){ah=new i.NumberFilter({name:af[0].name,index:af[0].index});this.filters_manager.add_filter(ah)}}if(this.filters_manager.filters.length>0){this.action_icons.filters_icon.show()}else{this.action_icons.filters_icon.hide()}}else{this.action_icons.filters_icon.hide()}}}},_restore_filter_managers:function(){for(var ac=0;ac<this.drawables.length;ac++){this.drawables[ac].filters_manager=this.saved_filters_managers[ac]}this.saved_filters_managers=[]},setup_multitrack_filtering:function(){if(this.filters_manager.filters.length>0){this.saved_filters_managers=[];for(var ac=0;ac<this.drawables.length;ac++){drawable=this.drawables[ac];this.saved_filters_managers.push(drawable.filters_manager);drawable.filters_manager=this.filters_manager}}this.filters_manager.init_filters()},show_composite_track:function(){var ad=new f(this.view,this.view,{name:this.name,drawables:this.drawables});var ac=this.container.replace_drawable(this,ad,true);ad.request_draw()},add_drawable:function(ac){y.prototype.add_drawable.call(this,ac);this.update_icons()},remove_drawable:function(ac){y.prototype.remove_drawable.call(this,ac);this.update_icons()},to_dict:function(){if(this.filters_manager.visible()){this._restore_filter_managers()}var ac=p(y.prototype.to_dict.call(this),{filters:this.filters_manager.to_dict()});if(this.filters_manager.visible()){this.setup_multitrack_filtering()}return ac},request_draw:function(ac){ab.each(this.drawables,function(ad){ad.request_draw(ac)})}});var Y=Backbone.View.extend({initialize:function(ac){p(ac,{obj_type:"View"});y.call(this,"View",ac.container,ac);this.chrom=null;this.vis_id=ac.vis_id;this.dbkey=ac.dbkey;this.label_tracks=[];this.tracks_to_be_redrawn=[];this.max_low=0;this.max_high=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.load_chroms_deferred=null;this.render();this.canvas_manager=new w.CanvasManager(this.container.get(0).ownerDocument);this.reset();this.config=new F({track:this,params:[{key:"a_color",label:"A Color",type:"color",default_value:"#FF0000"},{key:"c_color",label:"C Color",type:"color",default_value:"#00FF00"},{key:"g_color",label:"G Color",type:"color",default_value:"#0000FF"},{key:"t_color",label:"T Color",type:"color",default_value:"#FF00FF"},{key:"n_color",label:"N Color",type:"color",default_value:"#AAAAAA"},],saved_values:ac.prefs,onchange:function(){track.request_redraw({clear_tile_cache:true})}})},render:function(){this.requested_redraw=false;var ae=this.container,ac=this;this.top_container=$("<div/>").addClass("top-container").appendTo(ae);this.browser_content_div=$("<div/>").addClass("content").css("position","relative").appendTo(ae);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(ae);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").attr("id","viewport-container").appendTo(this.browser_content_div);this.content_div=this.viewport_container;j(this.viewport_container,ac);this.intro_div=$("<div/>").addClass("intro").appendTo(this.viewport_container).hide();var af=$("<div/>").text("Add Datasets to Visualization").addClass("action-button").appendTo(this.intro_div).click(function(){w.select_datasets(config.root+"/visualization/list_current_history_datasets",config.root+"/api/datasets",{"f-dbkey":ac.dbkey},function(ag){ab.each(ag,function(ah){ac.add_drawable(o(ah,ac,ac))})})});this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("trackster-nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("trackster-nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a/>").attr("href","javascript:void(0);").attr("title","Close overview").addClass("icon-button overview-close tooltip").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var ad=function(ag){if(ag.type==="focusout"||(ag.keyCode||ag.which)===13||(ag.keyCode||ag.which)===27){if((ag.keyCode||ag.which)!==27){ac.go_to($(this).val())}$(this).hide();$(this).val("");ac.location_span.show();ac.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",ad).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").attr("original-title","Click to change location").tooltip({placement:"bottom"}).appendTo(this.nav_controls);this.location_span.click(function(){ac.location_span.hide();ac.chrom_select.hide();ac.nav_input.val(ac.chrom+":"+ac.low+"-"+ac.high);ac.nav_input.css("display","inline-block");ac.nav_input.select();ac.nav_input.focus();ac.nav_input.autocomplete({source:function(ai,ag){var aj=[],ah=$.map(ac.get_tracks(c),function(ak){return ak.data_manager.search_features(ai.term).success(function(al){aj=aj.concat(al)})});$.when.apply($,ah).done(function(){ag($.map(aj,function(ak){return{label:ak[0],value:ak[1]}}))})}})});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a/>").attr("id","zoom-out").attr("title","Zoom out").tooltip({placement:"bottom"}).click(function(){ac.zoom_out();ac.request_redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a/>").attr("id","zoom-in").attr("title","Zoom in").tooltip({placement:"bottom"}).click(function(){ac.zoom_in();ac.request_redraw()}).appendTo(this.nav_controls);this.load_chroms_deferred=this.load_chroms({low:0});this.chrom_select.bind("change",function(){ac.change_chrom(ac.chrom_select.val())});this.browser_content_div.click(function(ag){$(this).find("input").trigger("blur")});this.browser_content_div.bind("dblclick",function(ag){ac.zoom_in(ag.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(ag,ah){this.current_x=ah.offsetX}).bind("drag",function(ag,ai){var aj=ai.offsetX-this.current_x;this.current_x=ai.offsetX;var ah=Math.round(aj/ac.viewport_container.width()*(ac.max_high-ac.max_low));ac.move_delta(-ah)});this.overview_close.click(function(){ac.reset_overview()});this.viewport_container.bind("draginit",function(ag,ah){if(ag.clientX>ac.viewport_container.width()-16){return false}}).bind("dragstart",function(ag,ah){ah.original_low=ac.low;ah.current_height=ag.clientY;ah.current_x=ah.offsetX}).bind("drag",function(ai,ak){var ag=$(this);var al=ak.offsetX-ak.current_x;var ah=ag.scrollTop()-(ai.clientY-ak.current_height);ag.scrollTop(ah);ak.current_height=ai.clientY;ak.current_x=ak.offsetX;var aj=Math.round(al/ac.viewport_container.width()*(ac.high-ac.low));ac.move_delta(aj)}).bind("mousewheel",function(ai,ak,ah,ag){if(ah){ah*=50;var aj=Math.round(-ah/ac.viewport_container.width()*(ac.high-ac.low));ac.move_delta(aj)}});this.top_labeltrack.bind("dragstart",function(ag,ah){return $("<div />").css({height:ac.browser_content_div.height()+ac.top_labeltrack.height()+ac.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ak,al){$(al.proxy).css({left:Math.min(ak.pageX,al.startX)-ac.container.offset().left,width:Math.abs(ak.pageX-al.startX)});var ah=Math.min(ak.pageX,al.startX)-ac.container.offset().left,ag=Math.max(ak.pageX,al.startX)-ac.container.offset().left,aj=(ac.high-ac.low),ai=ac.viewport_container.width();ac.update_location(Math.round(ah/ai*aj)+ac.low,Math.round(ag/ai*aj)+ac.low)}).bind("dragend",function(al,am){var ah=Math.min(al.pageX,am.startX),ag=Math.max(al.pageX,am.startX),aj=(ac.high-ac.low),ai=ac.viewport_container.width(),ak=ac.low;ac.low=Math.round(ah/ai*aj)+ak;ac.high=Math.round(ag/ai*aj)+ak;$(am.proxy).remove();ac.request_redraw()});this.add_label_track(new W(this,{content_div:this.top_labeltrack}));this.add_label_track(new W(this,{content_div:this.nav_labeltrack}));$(window).bind("resize",function(){if(this.resize_timer){clearTimeout(this.resize_timer)}this.resize_timer=setTimeout(function(){ac.resize_window()},500)});$(document).bind("redraw",function(){ac.redraw()});this.reset();$(window).trigger("resize")},get_base_color:function(ac){return this.config.values[ac.toLowerCase()+"_color"]||this.config.values.n_color}});p(Y.prototype,y.prototype,{changed:function(){this.has_changes=true},update_intro_div:function(){if(this.drawables.length===0){this.intro_div.show()}else{this.intro_div.hide()}},trigger_navigate:function(ad,af,ac,ag){if(this.timer){clearTimeout(this.timer)}if(ag){var ae=this;this.timer=setTimeout(function(){ae.trigger("navigate",ad+":"+af+"-"+ac)},500)}else{view.trigger("navigate",ad+":"+af+"-"+ac)}},update_location:function(ac,ae){this.location_span.text(commatize(ac)+" - "+commatize(ae));this.nav_input.val(this.chrom+":"+commatize(ac)+"-"+commatize(ae));var ad=view.chrom_select.val();if(ad!==""){this.trigger_navigate(ad,view.low,view.high,true)}},load_chroms:function(ae){ae.num=v;var ac=this,ad=$.Deferred();$.ajax({url:config.root+"api/genomes/"+this.dbkey,data:ae,dataType:"json",success:function(ag){if(ag.chrom_info.length===0){return}if(ag.reference){ac.add_label_track(new B(ac))}ac.chrom_data=ag.chrom_info;var aj='<option value="">Select Chrom/Contig</option>';for(var ai=0,af=ac.chrom_data.length;ai<af;ai++){var ah=ac.chrom_data[ai].chrom;aj+='<option value="'+ah+'">'+ah+"</option>"}if(ag.prev_chroms){aj+='<option value="previous">Previous '+v+"</option>"}if(ag.next_chroms){aj+='<option value="next">Next '+v+"</option>"}ac.chrom_select.html(aj);ac.chrom_start_index=ag.start_index;ad.resolve(ag.chrom_info)},error:function(){alert("Could not load chroms for this dbkey:",ac.dbkey)}});return ad},change_chrom:function(ah,ad,aj){var ae=this;if(!ae.chrom_data){ae.load_chroms_deferred.then(function(){ae.change_chrom(ah,ad,aj)});return}if(!ah||ah==="None"){return}if(ah==="previous"){ae.load_chroms({low:this.chrom_start_index-v});return}if(ah==="next"){ae.load_chroms({low:this.chrom_start_index+v});return}var ai=$.grep(ae.chrom_data,function(ak,al){return ak.chrom===ah})[0];if(ai===undefined){ae.load_chroms({chrom:ah},function(){ae.change_chrom(ah,ad,aj)});return}else{if(ah!==ae.chrom){ae.chrom=ah;ae.chrom_select.val(ae.chrom);ae.max_high=ai.len-1;ae.reset();for(var ag=0,ac=ae.drawables.length;ag<ac;ag++){var af=ae.drawables[ag];if(af.init){af.init()}}if(ae.reference_track){ae.reference_track.init()}}if(ad&&aj){ae.low=Math.max(ad,0);ae.high=Math.min(aj,ae.max_high)}else{ae.low=0;ae.high=ae.max_high}ae.reset_overview();ae.request_redraw()}},go_to:function(ag){ag=ag.replace(/,/g,"");ag=ag.replace(/:|\-/g," ");var ad=ag.split(/\s+/),af=ad[0],ae=(ad[1]?parseInt(ad[1],10):null),ac=(ad[2]?parseInt(ad[2],10):null);if(!ac){ae=ae-15;ac=ae+15}this.change_chrom(af,ae,ac)},move_fraction:function(ae){var ac=this;var ad=ac.high-ac.low;this.move_delta(ae*ad)},move_delta:function(af){var ac=this;var ae=ac.high-ac.low;if(ac.low-af<ac.max_low){ac.low=ac.max_low;ac.high=ac.max_low+ae}else{if(ac.high-af>ac.max_high){ac.high=ac.max_high;ac.low=ac.max_high-ae}else{ac.high-=af;ac.low-=af}}ac.request_redraw({data_fetch:false});if(this.redraw_on_move_fn){clearTimeout(this.redraw_on_move_fn)}this.redraw_on_move_fn=setTimeout(function(){ac.request_redraw()},200);var ad=ac.chrom_select.val();this.trigger_navigate(ad,ac.low,ac.high,true)},add_drawable:function(ac){y.prototype.add_drawable.call(this,ac);ac.init();this.changed();this.update_intro_div()},add_label_track:function(ac){ac.view=this;ac.init();this.label_tracks.push(ac)},remove_drawable:function(ae,ad){y.prototype.remove_drawable.call(this,ae);if(ad){var ac=this;ae.container_div.hide(0,function(){$(this).remove();ac.update_intro_div()})}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},request_redraw:function(ad,ae){var ac=this,af=(ae?[ae]:ac.drawables);ab.each(af,function(ag){var ah=ab.find(ac.tracks_to_be_redrawn,function(ai){return ai[0]===ag});if(ah){ah[1]=ad}else{ac.tracks_to_be_redrawn.push([ag,ad])}});if(!this.requested_redraw){requestAnimationFrame(function(){ac._redraw()});this.requested_redraw=true}},_redraw:function(){this.requested_redraw=false;var ac=this.low,ag=this.high;if(ac<this.max_low){ac=this.max_low}if(ag>this.max_high){ag=this.max_high}var ad=this.high-this.low;if(this.high!==0&&ad<this.min_separation){ag=ac+this.min_separation}this.low=Math.floor(ac);this.high=Math.ceil(ag);this.update_location(this.low,this.high);this.resolution_b_px=(this.high-this.low)/this.viewport_container.width();this.resolution_px_b=1/this.resolution_b_px;var af=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ah=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ae=13;this.overview_box.css({left:af,width:Math.max(ae,ah)}).show();if(ah<ae){this.overview_box.css("left",af-(ae-ah)/2)}if(this.overview_highlight){this.overview_highlight.css({left:af,width:ah})}ab.each(this.tracks_to_be_redrawn,function(ak){var ai=ak[0],aj=ak[1];if(ai){ai._draw(aj)}});this.tracks_to_be_redrawn=[];ab.each(this.label_tracks,function(ai){ai._draw()})},zoom_in:function(ad,ae){if(this.max_high===0||this.high-this.low<=this.min_separation){return}var af=this.high-this.low,ag=af/2+this.low,ac=(af/this.zoom_factor)/2;if(ad){ag=ad/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(ag-ac);this.high=Math.round(ag+ac);this.changed();this.request_redraw()},zoom_out:function(){if(this.max_high===0){return}var ad=this.high-this.low,ae=ad/2+this.low,ac=(ad*this.zoom_factor)/2;this.low=Math.round(ae-ac);this.high=Math.round(ae+ac);this.changed();this.request_redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.request_redraw()},set_overview:function(ae){if(this.overview_drawable){if(this.overview_drawable.dataset.id===ae.dataset.id){return}this.overview_viewport.find(".track").remove()}var ad=ae.copy({content_div:this.overview_viewport}),ac=this;ad.header_div.hide();ad.is_overview=true;ac.overview_drawable=ad;this.overview_drawable.postdraw_actions=function(){ac.overview_highlight.show().height(ac.overview_drawable.content_div.height());ac.overview_viewport.height(ac.overview_drawable.content_div.height()+ac.overview_box.outerHeight());ac.overview_close.show();ac.resize_window()};ac.overview_drawable.request_draw();this.changed()},reset_overview:function(){$(".bs-tooltip").remove();this.overview_viewport.find(".track-tile").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide();view.resize_window();view.overview_drawable=null}});var r=function(ae,aj,af){this.track=ae;this.id=aj.id;this.name=aj.name;this.params=[];var aq=aj.params;for(var ag=0;ag<aq.length;ag++){var al=aq[ag],ad=al.name,ap=al.label,ah=unescape(al.html),ar=al.value,an=al.type;if(an==="number"){this.params.push(new e(ad,ap,ah,(ad in af?af[ad]:ar),al.min,al.max))}else{if(an==="select"){this.params.push(new O(ad,ap,ah,(ad in af?af[ad]:ar)))}else{console.log("WARNING: unrecognized tool parameter type:",ad,an)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(au){au.stopPropagation()}).click(function(au){au.stopPropagation()}).bind("dblclick",function(au){au.stopPropagation()});var ao=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var am=this.params;var ak=this;$.each(this.params,function(av,ay){var ax=$("<div>").addClass("param-row").appendTo(ak.parent_div);var au=$("<div>").addClass("param-label").text(ay.label).appendTo(ax);var aw=$("<div/>").addClass("param-input").html(ay.html).appendTo(ax);aw.find(":input").val(ay.value);$("<div style='clear: both;'/>").appendTo(ax)});this.parent_div.find("input").click(function(){$(this).select()});var at=$("<div>").addClass("param-row").appendTo(this.parent_div);var ai=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(at);var ac=$("<input type='submit'>").attr("value","Run on visible region").css("margin-left","3em").appendTo(at);ac.click(function(){ak.run_on_region()});ai.click(function(){ak.run_on_dataset()});if("visible" in af&&af.visible){this.parent_div.show()}};p(r.prototype,{update_params:function(){for(var ac=0;ac<this.params.length;ac++){this.params[ac].update_value()}},state_dict:function(){var ad={};for(var ac=0;ac<this.params.length;ac++){ad[this.params[ac].name]=this.params[ac].value}ad.visible=this.parent_div.is(":visible");return ad},get_param_values_dict:function(){var ac={};this.parent_div.find(":input").each(function(){var ad=$(this).attr("name"),ae=$(this).val();ac[ad]=ae});return ac},get_param_values:function(){var ac=[];this.parent_div.find(":input").each(function(){var ad=$(this).attr("name"),ae=$(this).val();if(ad){ac[ac.length]=ae}});return ac},run_on_dataset:function(){var ac=this;ac.run({target_dataset_id:this.track.dataset.id,action:"rerun",tool_id:ac.id},null,function(ad){show_modal(ac.name+" is Running",ac.name+" is running on the complete dataset. Tool outputs are in dataset's history.",{Close:hide_modal})})},run_on_region:function(){var ai=new w.GenomeRegion({chrom:this.track.view.chrom,start:this.track.view.low,end:this.track.view.high}),ad={target_dataset_id:this.track.dataset.id,action:"rerun",tool_id:this.id,regions:[ai.toJSON()]},ah=this.track,ae=ad.tool_id+ah.tool_region_and_parameters_str(ai),ac;if(ah.container===view){var ag=new Q(view,view,{name:this.name});var af=ah.container.replace_drawable(ah,ag,false);ag.container_div.insertBefore(ah.view.content_div.children()[af]);ag.add_drawable(ah);ah.container_div.appendTo(ag.content_div);ac=ag}else{ac=ah.container}var aj=new ah.constructor(view,ac,{name:ae,hda_ldda:"hda"});aj.init_for_tool_data();aj.change_mode(ah.mode);aj.set_filters_manager(ah.filters_manager.copy(aj));aj.update_icons();ac.add_drawable(aj);aj.tiles_div.text("Starting job.");this.update_params();this.run(ad,aj,function(ak){aj.set_dataset(new X.Dataset(ak));aj.tiles_div.text("Running job.");aj.init()})},run:function(ac,ae,af){ac.inputs=this.get_param_values_dict();var ad=new k.ServerStateDeferred({ajax_settings:{url:config.root+"/api/tools",data:JSON.stringify(ac),dataType:"json",contentType:"application/json",type:"POST"},interval:2000,success_fn:function(ag){return ag!=="pending"}});$.when(ad.go()).then(function(ag){if(ag==="no converter"){ae.container_div.addClass("error");ae.content_div.text(J)}else{if(ag.error){ae.container_div.addClass("error");ae.content_div.text(x+ag.message)}else{af(ag)}}})}});var O=function(ad,ac,ae,af){this.name=ad;this.label=ac;this.html=$(ae);this.value=af};p(O.prototype,{update_value:function(){this.value=$(this.html).val()}});var e=function(ae,ad,ag,ah,af,ac){O.call(this,ae,ad,ag,ah);this.min=af;this.max=ac};p(e.prototype,O.prototype,{update_value:function(){O.prototype.update_value.call(this);this.value=parseFloat(this.value)}});var C=function(ac,ad){L.Scaler.call(this,ad);this.filter=ac};C.prototype.gen_val=function(ac){if(this.filter.high===Number.MAX_VALUE||this.filter.low===-Number.MAX_VALUE||this.filter.low===this.filter.high){return this.default_val}return((parseFloat(ac[this.filter.index])-this.filter.low)/(this.filter.high-this.filter.low))};var F=function(ac){this.track=ac.track;this.params=ac.params;this.values={};this.restore_values((ac.saved_values?ac.saved_values:{}));this.onchange=ac.onchange};p(F.prototype,{set_param_default_value:function(ad,ac){var ae=ab.find(this.params,function(af){return af.key===ad});if(ae){ae.default_value=ac}},set_param_value:function(ac,ad){var ae=ab.find(this.params,function(af){return af.key===ac});if(ae){if(typeof ad==="string"||ad instanceof String){if(ad.trim()===""){ad=ae.default_value}else{if(ae.type==="float"){ad=parseFloat(ad)}else{if(ae.type==="int"){ad=parseInt(ad,10)}}}}}if(this.values[ac]!==ad){this.values[ac]=ad;return true}else{return false}},restore_values:function(ac){var ad=this;$.each(this.params,function(ae,af){if(ac[af.key]!==undefined){ad.values[af.key]=ac[af.key]}else{ad.values[af.key]=af.default_value}})},build_form:function(){var af=this;var ac=$("<div />");var ae;function ad(ak,ag){for(var ao=0;ao<ak.length;ao++){ae=ak[ao];if(ae.hidden){continue}var ai="param_"+ao;var at=af.values[ae.key];var av=$("<div class='form-row' />").appendTo(ag);av.append($("<label />").attr("for",ai).text(ae.label+":"));if(ae.type==="bool"){av.append($('<input type="checkbox" />').attr("id",ai).attr("name",ai).attr("checked",at))}else{if(ae.type==="text"){av.append($('<input type="text"/>').attr("id",ai).val(at).click(function(){$(this).select()}))}else{if(ae.type==="select"){var aq=$("<select />").attr("id",ai);for(var am=0;am<ae.options.length;am++){$("<option/>").text(ae.options[am].label).attr("value",ae.options[am].value).appendTo(aq)}aq.val(at);av.append(aq)}else{if(ae.type==="color"){var au=$("<div/>").appendTo(av),ap=$("<input />").attr("id",ai).attr("name",ai).val(at).css("float","left").appendTo(au).click(function(ax){$(".bs-tooltip").removeClass("in");var aw=$(this).siblings(".bs-tooltip").addClass("in");aw.css({left:$(this).position().left+$(this).width()+5,top:$(this).position().top-($(aw).height()/2)+($(this).height()/2)}).show();aw.click(function(ay){ay.stopPropagation()});$(document).bind("click.color-picker",function(){aw.hide();$(document).unbind("click.color-picker")});ax.stopPropagation()}),an=$("<a href='javascript:void(0)'/>").addClass("icon-button arrow-circle").appendTo(au).attr("title","Set new random color").tooltip(),ar=$("<div class='bs-tooltip right' style='position: absolute;' />").appendTo(au).hide(),aj=$("<div class='tooltip-inner' style='text-align: inherit'></div>").appendTo(ar),ah=$("<div class='tooltip-arrow'></div>").appendTo(ar),al=$.farbtastic(aj,{width:100,height:100,callback:ap,color:at});au.append($("<div/>").css("clear","both"));(function(aw){an.click(function(){aw.setColor(k.get_random_color())})})(al)}else{av.append($("<input />").attr("id",ai).attr("name",ai).val(at))}}}}if(ae.help){av.append($("<div class='help'/>").text(ae.help))}}}ad(this.params,ac);return ac},update_from_form:function(ac){var ae=this;var ad=false;$.each(this.params,function(af,ah){if(!ah.hidden){var ai="param_"+af;var ag=ac.find("#"+ai).val();if(ah.type==="bool"){ag=ac.find("#"+ai).is(":checked")}ad=ae.set_param_value(ah.key,ag)||ad}});if(ad){this.onchange();this.track.changed()}}});var b=function(ac,ag,ae,ad,af){this.track=ac;this.region=ag;this.low=ag.get("start");this.high=ag.get("end");this.resolution=ae;this.html_elt=$("<div class='track-tile'/>").append(ad).height($(ad).attr("height"));this.data=af;this.stale=false};b.prototype.predisplay_actions=function(){};var M=function(ac,ag,ae,ad,af){b.call(this,ac,ag,ae,ad,af)};M.prototype.predisplay_actions=function(){};var P=function(af,an,ag,ae,ai,ap,aj,aq,ad,am){b.call(this,af,an,ag,ae,ai);this.mode=aj;this.all_slotted=ad;this.feature_mapper=am;this.has_icons=false;if(aq){this.has_icons=true;var ak=this;ae=this.html_elt.children()[0],message_div=$("<div/>").addClass("tile-message").css({height:D-1,width:ae.width}).prependTo(this.html_elt);var al=new w.GenomeRegion({chrom:af.view.chrom,start:this.low,end:this.high}),ao=ai.length,ah=$("<a href='javascript:void(0);'/>").addClass("icon more-down").attr("title","For speed, only the first "+ao+" features in this region were obtained from server. Click to get more data including depth").tooltip().appendTo(message_div),ac=$("<a href='javascript:void(0);'/>").addClass("icon more-across").attr("title","For speed, only the first "+ao+" features in this region were obtained from server. Click to get more data excluding depth").tooltip().appendTo(message_div);ah.click(function(){ak.stale=true;af.data_manager.get_more_data(al,af.mode,ak.resolution,{},af.data_manager.DEEP_DATA_REQ);$(".bs-tooltip").hide();af.request_draw()}).dblclick(function(ar){ar.stopPropagation()});ac.click(function(){ak.stale=true;af.data_manager.get_more_data(al,af.mode,ak.resolution,{},af.data_manager.BROAD_DATA_REQ);$(".bs-tooltip").hide();af.request_draw()}).dblclick(function(ar){ar.stopPropagation()})}};p(P.prototype,b.prototype);P.prototype.predisplay_actions=function(){var ad=this,ac={};if(ad.mode!=="Pack"){return}$(this.html_elt).hover(function(){this.hovered=true;$(this).mousemove()},function(){this.hovered=false;$(this).parents(".track-content").children(".overlay").children(".feature-popup").remove()}).mousemove(function(ao){if(!this.hovered){return}var aj=$(this).offset(),an=ao.pageX-aj.left,am=ao.pageY-aj.top,at=ad.feature_mapper.get_feature_data(an,am),ak=(at?at[0]:null);$(this).parents(".track-content").children(".overlay").children(".feature-popup").each(function(){if(!ak||$(this).attr("id")!==ak.toString()){$(this).remove()}});if(at){var af=ac[ak];if(!af){var ak=at[0],ap={name:at[3],start:at[1],end:at[2],strand:at[4]},ai=ad.track.filters_manager.filters,ah;for(var al=0;al<ai.length;al++){ah=ai[al];ap[ah.name]=at[ah.index]}var af=$("<div/>").attr("id",ak).addClass("feature-popup"),au=$("<table/>"),ar,aq,av;for(ar in ap){aq=ap[ar];av=$("<tr/>").appendTo(au);$("<th/>").appendTo(av).text(ar);$("<td/>").attr("align","left").appendTo(av).text(typeof(aq)==="number"?V(aq,2):aq)}af.append($("<div class='feature-popup-inner'>").append(au));ac[ak]=af}af.appendTo($(this).parents(".track-content").children(".overlay"));var ag=an+parseInt(ad.html_elt.css("left"))-af.width()/2,ae=am+parseInt(ad.html_elt.css("top"))+7;af.css("left",ag+"px").css("top",ae+"px")}else{if(!ao.isPropagationStopped()){ao.stopPropagation();$(this).siblings().each(function(){$(this).trigger(ao)})}}}).mouseleave(function(){$(this).parents(".track-content").children(".overlay").children(".feature-popup").remove()})};var g=function(ad,ac,ae){p(ae,{drag_handle_class:"draghandle"});q.call(this,ad,ac,ae);this.dataset=new X.Dataset(ae.dataset);this.dataset_check_type="converted_datasets_state";this.data_url_extra_params={};this.data_query_wait=("data_query_wait" in ae?ae.data_query_wait:K);this.data_manager=("data_manager" in ae?ae.data_manager:new w.GenomeDataManager({dataset:this.dataset,genome:new w.Genome({key:ad.dbkey,chroms_info:{chrom_info:ad.chrom_data}}),data_mode_compatible:this.data_and_mode_compatible,can_subset:this.can_subset}));this.min_height_px=16;this.max_height_px=800;this.visible_height_px=0;this.content_div=$("<div class='track-content'>").appendTo(this.container_div);if(this.container){this.container.content_div.append(this.container_div);if(!("resize" in ae)||ae.resize){this.add_resize_handle()}}};p(g.prototype,q.prototype,{action_icons_def:[{name:"mode_icon",title:"Set display mode",css_class:"chevron-expand",on_click_fn:function(){}},q.prototype.action_icons_def[0],{name:"overview_icon",title:"Set as overview",css_class:"overview-icon",on_click_fn:function(ac){ac.view.set_overview(ac)}},q.prototype.action_icons_def[1],{name:"filters_icon",title:"Filters",css_class:"filters-icon",on_click_fn:function(ac){if(ac.filters_manager.visible()){ac.filters_manager.clear_filters()}else{ac.filters_manager.init_filters()}ac.filters_manager.toggle()}},{name:"tools_icon",title:"Tool",css_class:"hammer",on_click_fn:function(ac){ac.dynamic_tool_div.toggle();if(ac.dynamic_tool_div.is(":visible")){ac.set_name(ac.name+ac.tool_region_and_parameters_str())}else{ac.revert_name()}$(".bs-tooltip").remove()}},{name:"param_space_viz_icon",title:"Tool parameter space visualization",css_class:"arrow-split",on_click_fn:function(ac){var af='<strong>Tool</strong>: <%= track.tool.name %><br/><strong>Dataset</strong>: <%= track.name %><br/><strong>Region(s)</strong>: <select name="regions"><option value="cur">current viewing area</option><option value="bookmarks">bookmarks</option><option value="both">current viewing area and bookmarks</option></select>',ae=ab.template(af,{track:ac});var ah=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ad=function(){var aj=$('select[name="regions"] option:selected').val(),al,ai=new w.GenomeRegion({chrom:view.chrom,start:view.low,end:view.high}),ak=ab.map($(".bookmark"),function(am){return new w.GenomeRegion({from_str:$(am).children(".position").text()})});if(aj==="cur"){al=[ai]}else{if(aj==="bookmarks"){al=ak}else{al=[ai].concat(ak)}}hide_modal();window.location.href=config.root+"visualization/sweepster?"+$.param({dataset_id:ac.dataset.id,hda_ldda:ac.dataset.get("hda_ldda"),regions:JSON.stringify(new Backbone.Collection(al).toJSON())})},ag=function(ai){if((ai.keyCode||ai.which)===27){ah()}else{if((ai.keyCode||ai.which)===13){ad()}}};show_modal("Visualize tool parameter space and output from different parameter settings?",ae,{No:ah,Yes:ad})}},q.prototype.action_icons_def[2]],can_draw:function(){if(this.dataset.id&&q.prototype.can_draw.call(this)){return true}return false},build_container_div:function(){return $("<div/>").addClass("track").attr("id","track_"+this.id).css("position","relative")},build_header_div:function(){var ac=$("<div class='track-header'/>");if(this.view.editor){this.drag_div=$("<div/>").addClass(this.drag_handle_class).appendTo(ac)}this.name_div=$("<div/>").addClass("track-name").appendTo(ac).text(this.name).attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase());return ac},set_dataset:function(ac){this.dataset=ac;this.data_manager.set("dataset",ac)},on_resize:function(){this.request_draw({clear_tile_cache:true})},add_resize_handle:function(){var ac=this;var af=false;var ae=false;var ad=$("<div class='track-resize'>");$(ac.container_div).hover(function(){if(ac.content_visible){af=true;ad.show()}},function(){af=false;if(!ae){ad.hide()}});ad.hide().bind("dragstart",function(ag,ah){ae=true;ah.original_height=$(ac.content_div).height()}).bind("drag",function(ah,ai){var ag=Math.min(Math.max(ai.original_height+ai.deltaY,ac.min_height_px),ac.max_height_px);$(ac.tiles_div).css("height",ag);ac.visible_height_px=(ac.max_height_px===ag?0:ag);ac.on_resize()}).bind("dragend",function(ag,ah){ac.tile_cache.clear();ae=false;if(!af){ad.hide()}ac.config.values.height=ac.visible_height_px;ac.changed()}).appendTo(ac.container_div)},set_display_modes:function(af,ai){this.display_modes=af;this.mode=(ai?ai:(this.config&&this.config.values.mode?this.config.values.mode:this.display_modes[0]));this.action_icons.mode_icon.attr("title","Set display mode (now: "+this.mode+")");var ad=this,ag={};for(var ae=0,ac=ad.display_modes.length;ae<ac;ae++){var ah=ad.display_modes[ae];ag[ah]=function(aj){return function(){ad.change_mode(aj);ad.icons_div.show();ad.container_div.mouseleave(function(){ad.icons_div.hide()})}}(ah)}make_popupmenu(this.action_icons.mode_icon,ag)},build_action_icons:function(){q.prototype.build_action_icons.call(this,this.action_icons_def);if(this.display_modes!==undefined){this.set_display_modes(this.display_modes)}},hide_contents:function(){this.tiles_div.hide();this.container_div.find(".yaxislabel, .track-resize").hide()},show_contents:function(){this.tiles_div.show();this.container_div.find(".yaxislabel, .track-resize").show();this.request_draw()},get_type:function(){if(this instanceof W){return"LabelTrack"}else{if(this instanceof B){return"ReferenceTrack"}else{if(this instanceof h){return"LineTrack"}else{if(this instanceof T){return"ReadTrack"}else{if(this instanceof Z){return"VariantTrack"}else{if(this instanceof f){return"CompositeTrack"}else{if(this instanceof c){return"FeatureTrack"}}}}}}}return""},init:function(ae){var ad=this;ad.enabled=false;ad.tile_cache.clear();ad.data_manager.clear();ad.tiles_div.css("height","auto");ad.tiles_div.text("").children().remove();ad.container_div.removeClass("nodata error pending");if(!ad.dataset.id){return}var ac=$.Deferred(),af={hda_ldda:ad.dataset.get("hda_ldda"),data_type:this.dataset_check_type,chrom:ad.view.chrom,retry:ae};$.getJSON(this.dataset.url(),af,function(ag){if(!ag||ag==="error"||ag.kind==="error"){ad.container_div.addClass("error");ad.tiles_div.text(n);if(ag.message){ad.tiles_div.append($("<a href='javascript:void(0);'></a>").text("View error").click(function(){show_modal("Trackster Error","<pre>"+ag.message+"</pre>",{Close:hide_modal})}));ad.tiles_div.append($("<span/>").text(" "));ad.tiles_div.append($("<a href='javascript:void(0);'></a>").text("Try again").click(function(){ad.init(true)}))}}else{if(ag==="no converter"){ad.container_div.addClass("error");ad.tiles_div.text(J)}else{if(ag==="no data"||(ag.data!==undefined&&(ag.data===null||ag.data.length===0))){ad.container_div.addClass("nodata");ad.tiles_div.text(E)}else{if(ag==="pending"){ad.container_div.addClass("pending");ad.tiles_div.html(u);setTimeout(function(){ad.init()},ad.data_query_wait)}else{if(ag==="data"||ag.status==="data"){if(ag.valid_chroms){ad.valid_chroms=ag.valid_chroms;ad.update_icons()}ad.tiles_div.text(U);if(ad.view.chrom){ad.tiles_div.text("");ad.tiles_div.css("height",ad.visible_height_px+"px");ad.enabled=true;$.when.apply($,ad.predraw_init()).done(function(){ac.resolve();ad.container_div.removeClass("nodata error pending");ad.request_draw()})}else{ac.resolve()}}}}}}});this.update_icons();return ac},predraw_init:function(){var ac=this;return $.getJSON(ac.dataset.url(),{data_type:"data",stats:true,chrom:ac.view.chrom,low:0,high:ac.view.max_high,hda_ldda:ac.dataset.get("hda_ldda")},function(ad){ac.container_div.addClass("line-track");var af=ad.data;if(af&&af.min&&af.max){var ae=af.min,ag=af.max;ae=Math.floor(Math.min(0,Math.max(ae,af.mean-2*af.sd)));ag=Math.ceil(Math.max(0,Math.min(ag,af.mean+2*af.sd)));ac.config.set_param_default_value("min_value",ae);ac.config.set_param_default_value("max_value",ag);ac.prefs.min_value=ae;ac.prefs.max_value=ag}})},get_drawables:function(){return this}});var N=function(ae,ad,af){g.call(this,ae,ad,af);var ac=this;l(ac.container_div,ac.drag_handle_class,".group",ac);this.filters_manager=new i.FiltersManager(this,("filters" in af?af.filters:null));this.data_manager.set("filters_manager",this.filters_manager);this.filters_available=false;this.tool=("tool" in af&&af.tool?new r(this,af.tool,af.tool_state):null);this.tile_cache=new w.Cache(R);this.left_offset=0;if(this.header_div){this.set_filters_manager(this.filters_manager);if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}}this.tiles_div=$("<div/>").addClass("tiles").appendTo(this.content_div);this.overlay_div=$("<div/>").addClass("overlay").appendTo(this.content_div);if(af.mode){this.change_mode(af.mode)}};p(N.prototype,q.prototype,g.prototype,{action_icons_def:g.prototype.action_icons_def.concat([{name:"show_more_rows_icon",title:"To minimize track height, not all feature rows are displayed. Click to display more rows.",css_class:"exclamation",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.slotters[ac.view.resolution_px_b].max_rows*=2;ac.request_draw({clear_tile_cache:true})},hide:true}]),copy:function(ac){var ad=this.to_dict();p(ad,{data_manager:this.data_manager});var ae=new this.constructor(this.view,ac,ad);ae.change_mode(this.mode);ae.enabled=this.enabled;return ae},set_filters_manager:function(ac){this.filters_manager=ac;this.header_div.after(this.filters_manager.parent_div)},to_dict:function(){return{track_type:this.get_type(),name:this.name,dataset:{id:this.dataset.id,hda_ldda:this.dataset.get("hda_ldda")},prefs:this.prefs,mode:this.mode,filters:this.filters_manager.to_dict(),tool_state:(this.tool?this.tool.state_dict():{})}},set_min_max:function(){var ac=this;return $.getJSON(ac.dataset.url(),{data_type:"data",stats:true,chrom:ac.view.chrom,low:0,high:ac.view.max_high,hda_ldda:ac.dataset.get("hda_ldda")},function(ad){var af=ad.data;if(isNaN(parseFloat(ac.prefs.min_value))||isNaN(parseFloat(ac.prefs.max_value))){var ae=af.min,ag=af.max;ae=Math.floor(Math.min(0,Math.max(ae,af.mean-2*af.sd)));ag=Math.ceil(Math.max(0,Math.min(ag,af.mean+2*af.sd)));ac.prefs.min_value=ae;ac.prefs.max_value=ag}})},change_mode:function(ad){var ac=this;ac.mode=ad;ac.config.values.mode=ad;if(ad==="Auto"){this.data_manager.clear()}ac.request_draw({clear_tile_cache:true});this.action_icons.mode_icon.attr("title","Set display mode (now: "+ac.mode+")");return ac},update_icons:function(){var ac=this;if(ac.filters_available){ac.action_icons.filters_icon.show()}else{ac.action_icons.filters_icon.hide()}if(ac.tool){ac.action_icons.tools_icon.show();ac.action_icons.param_space_viz_icon.show()}else{ac.action_icons.tools_icon.hide();ac.action_icons.param_space_viz_icon.hide()}},_gen_tile_cache_key:function(ad,ac){return ad+"_"+ac},request_draw:function(ac){if(ac&&ac.clear_tile_cache){this.tile_cache.clear()}this.view.request_redraw(ac,this)},before_draw:function(){this.max_height_px=0},_draw:function(ap){if(!this.can_draw()){return}var am=ap&&ap.clear_after,ak=this.view.low,ag=this.view.high,aj=ag-ak,ad=this.view.container.width(),ao=this.view.resolution_px_b,af=this.view.resolution_b_px;if(this.is_overview){ak=this.view.max_low;ag=this.view.max_high;af=(view.max_high-view.max_low)/ad;ao=1/af}this.before_draw();this.tiles_div.children().addClass("remove");var ac=Math.floor(ak/(af*S)),al,ah,ai=[],an=[];while((ac*S*af)<ag){al=this._get_tile_bounds(ac,af);ah=this.draw_helper(al,af,ao,ap);ai.push(ah);$.when(ah).then(function(aq){an.push(aq)});ac+=1}if(!am){this.tiles_div.children(".remove").removeClass("remove").remove()}var ae=this;$.when.apply($,ai).then(function(){ae.tiles_div.children(".remove").remove();an=ab.filter(an,function(aq){return aq!==null});if(an.length!==0){ae.postdraw_actions(an,ad,ao,am)}})},_add_yaxis_label:function(af,ah){var ad=this,ag=(af==="max"?"top":"bottom"),ai=(af==="max"?"max":"min"),ac=(af==="max"?"max_value":"min_value"),ah=ah||function(){ad.request_draw({clear_tile_cache:true})},ae=this.container_div.find(".yaxislabel."+ag);if(ae.length!==0){ae.text(ad.prefs[ac])}else{ae=$("<div/>").text(ad.prefs[ac]).make_text_editable({num_cols:12,on_finish:function(aj){$(".bs-tooltip").remove();ad.config.set_param_value(ac,aj);ah()},help_text:"Set "+ai+" value"}).addClass("yaxislabel "+ag).css("color",this.prefs.label_color);this.container_div.prepend(ae)}},postdraw_actions:function(af,ag,ai,ac){var ae=ab.filter(af,function(aj){return(aj instanceof M)});if(ae.length>0){this.max_height_px=0;var ad=this;ab.each(af,function(aj){if(!(aj instanceof M)){aj.html_elt.remove();ad.draw_helper(aj.region,aj.resolution,ai,{force:true,mode:"Coverage"})}});ad._add_yaxis_label("max")}else{this.container_div.find(".yaxislabel").remove();var ah=ab.find(af,function(aj){return aj.has_icons});if(ah){ab.each(af,function(aj){if(!aj.has_icons){aj.html_elt.css("padding-top",D)}})}}},get_mode:function(ac){return this.mode},update_auto_mode:function(ac){},_get_drawables:function(){return[this]},draw_helper:function(al,af,ao,ap){if(!ap){ap={}}var ad=ap.force,an=!(ap.data_fetch===false),ai=ap.mode||this.mode,ae=this,ag=this._get_drawables(),am=this._gen_tile_cache_key(ao,al),ah=function(aq){return(aq&&"track" in aq)};var aj=(ad?undefined:ae.tile_cache.get_elt(am));if(aj){if(ah(aj)){ae.show_tile(aj,ao)}return aj}if(!an){return null}var ak=function(){var aq=(ab.find(A,function(at){return at===ai})?"Coverage":ai);var ar=ab.map(ag,function(at){return at.data_manager.get_data(al,aq,af,ae.data_url_extra_params)});if(view.reference_track){ar.push(view.reference_track.data_manager.get_data(al,ai,af,view.reference_track.data_url_extra_params))}return ar};var ac=$.Deferred();ae.tile_cache.set_elt(am,ac);$.when.apply($,ak()).then(function(){var aq=ak(),aw=aq,aC;if(view.reference_track){aC=view.reference_track.data_manager.subset_entry(aq.pop(),al)}var ax=[],au=[];ab.each(ag,function(aH,aE){var aG=aH.mode,aF=aw[aE];if(aG==="Auto"){aG=aH.get_mode(aF);aH.update_auto_mode(aG)}ax.push(aG);au.push(aH.get_canvas_height(aF,aG,ao,ar))});var av=ae.view.canvas_manager.new_canvas(),ay=al.get("start"),aD=al.get("end"),at=0,ar=Math.ceil((aD-ay)*ao)+ae.left_offset,aA=ab.max(au),az;av.width=ar;av.height=(ap.height||aA);var aB=av.getContext("2d");aB.translate(ae.left_offset,0);if(ag.length>1){aB.globalAlpha=0.5;aB.globalCompositeOperation="source-over"}ab.each(ag,function(aF,aE){az=aF.draw_tile(aw[aE],aB,ax[aE],af,al,ao,aC)});if(az!==undefined){ae.tile_cache.set_elt(am,az);ae.show_tile(az,ao)}ac.resolve(az)});return ac},get_canvas_height:function(ac,ae,af,ad){return this.visible_height_px},_draw_line_track_tile:function(ac,ae,ai,ag,ah,aj){var af=ae.canvas,ad=new L.LinePainter(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai);ad.draw(ae,af.width,af.height,aj);return new M(this,ah,ag,af,ac.data)},draw_tile:function(ac,ad,ah,af,ag,ai,ae){console.log("Warning: TiledTrack.draw_tile() not implemented.")},show_tile:function(ae,ah){var ad=this,ac=ae.html_elt;ae.predisplay_actions();var ag=(ae.low-(this.is_overview?this.view.max_low:this.view.low))*ah;if(this.left_offset){ag-=this.left_offset}ac.css({position:"absolute",top:0,left:ag});if(ac.hasClass("remove")){ac.removeClass("remove")}else{this.tiles_div.append(ac)}ae.html_elt.height("auto");this.max_height_px=Math.max(this.max_height_px,ae.html_elt.height());ae.html_elt.parent().children().css("height",this.max_height_px+"px");var af=this.max_height_px;if(this.visible_height_px!==0){af=Math.min(this.max_height_px,this.visible_height_px)}this.tiles_div.css("height",af+"px")},_get_tile_bounds:function(ac,ad){var af=Math.floor(ac*S*ad),ag=Math.ceil(S*ad),ae=(af+ag<=this.view.max_high?af+ag:this.view.max_high);return new w.GenomeRegion({chrom:this.view.chrom,start:af,end:ae})},tool_region_and_parameters_str:function(ae){var ac=this,ad=(ae!==undefined?ae.toString():"all");return" - region=["+ad+"], parameters=["+ac.tool.get_param_values().join(", ")+"]"},data_and_mode_compatible:function(ac,ad){if(ad==="Auto"){return true}else{if(ad==="Coverage"){return ac.dataset_type==="bigwig"}else{if(ac.extra_info==="no_detail"){return false}else{return true}}}},can_subset:function(ac){if(ac.dataset_type==="bigwig"||ac.message||ac.extra_info==="no_detail"){return false}return true},init_for_tool_data:function(){this.data_manager.set("data_type","raw_data");this.data_query_wait=1000;this.dataset_check_type="state";this.normal_postdraw_actions=this.postdraw_actions;this.postdraw_actions=function(ae,af,ah,ac){var ad=this;ad.normal_postdraw_actions(ae,af,ah,ac);ad.dataset_check_type="converted_datasets_state";ad.data_query_wait=K;var ag=new k.ServerStateDeferred({url:ad.dataset_state_url,url_params:{dataset_id:ad.dataset.id,hda_ldda:ad.dataset.get("hda_ldda")},interval:ad.data_query_wait,success_fn:function(ai){return ai!=="pending"}});$.when(ag.go()).then(function(){ad.data_manager.set("data_type","data")});ad.postdraw_actions=ad.normal_postdraw_actions}}});var W=function(ad,ac){var ae={resize:false};g.call(this,ad,ac,ae);this.container_div.addClass("label-track")};p(W.prototype,g.prototype,{build_header_div:function(){},init:function(){this.enabled=true},predraw_init:function(){},_draw:function(ag){var ae=this.view,af=ae.high-ae.low,aj=Math.floor(Math.pow(10,Math.floor(Math.log(af)/Math.log(10)))),ac=Math.floor(ae.low/aj)*aj,ah=this.view.container.width(),ad=$("<div style='position: relative; height: 1.3em;'></div>");while(ac<ae.high){var ai=(ac-ae.low)/af*ah;ad.append($("<div class='label'>"+commatize(ac)+"</div>").css({position:"absolute",left:ai-1}));ac+=aj}this.content_div.children(":first").remove();this.content_div.append(ad)}});var f=function(ad,ac,ag){this.display_modes=A;N.call(this,ad,ac,ag);this.drawables=[];if("drawables" in ag){var af;for(var ae=0;ae<ag.drawables.length;ae++){af=ag.drawables[ae];this.drawables[ae]=o(af,ad,null);if(af.left_offset>this.left_offset){this.left_offset=af.left_offset}}this.enabled=true}ab.each(this.drawables,function(ah){if(ah instanceof c||ah instanceof T){ah.change_mode("Coverage")}});this.update_icons();this.obj_type="CompositeTrack"};p(f.prototype,N.prototype,{action_icons_def:[{name:"composite_icon",title:"Show individual tracks",css_class:"layers-stack",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.show_group()}}].concat(N.prototype.action_icons_def),to_dict:y.prototype.to_dict,add_drawable:y.prototype.add_drawable,unpack_drawables:y.prototype.unpack_drawables,change_mode:function(ac){N.prototype.change_mode.call(this,ac);for(var ad=0;ad<this.drawables.length;ad++){this.drawables[ad].change_mode(ac)}},init:function(){var ae=[];for(var ad=0;ad<this.drawables.length;ad++){ae.push(this.drawables[ad].init())}var ac=this;$.when.apply($,ae).then(function(){ac.enabled=true;ac.request_draw()})},update_icons:function(){this.action_icons.filters_icon.hide();this.action_icons.tools_icon.hide();this.action_icons.param_space_viz_icon.hide()},can_draw:q.prototype.can_draw,_get_drawables:function(){return this.drawables},show_group:function(){var af=new Q(this.view,this.container,{name:this.name}),ac;for(var ae=0;ae<this.drawables.length;ae++){ac=this.drawables[ae];ac.update_icons();af.add_drawable(ac);ac.container=af;af.content_div.append(ac.container_div)}var ad=this.container.replace_drawable(this,af,true);af.request_draw({clear_tile_cache:true})},before_draw:function(){N.prototype.before_draw.call(this);var ad=ab.min(ab.map(this.drawables,function(ae){return ae.prefs.min_value})),ac=ab.max(ab.map(this.drawables,function(ae){return ae.prefs.max_value}));this.prefs.min_value=ad;this.prefs.max_value=ac;ab.each(this.drawables,function(ae){ae.prefs.min_value=ad;ae.prefs.max_value=ac})},update_all_min_max:function(){var ac=this;ab.each(this.drawables,function(ad){ad.prefs.min_value=ac.prefs.min_value;ad.prefs.max_value=ac.prefs.max_value});this.request_draw({clear_tile_cache:true})},postdraw_actions:function(ai,ac,al,ah){N.prototype.postdraw_actions.call(this,ai,ac,al,ah);var ag=-1;for(var ae=0;ae<ai.length;ae++){var aj=ai[ae].html_elt.find("canvas").height();if(aj>ag){ag=aj}}for(var ae=0;ae<ai.length;ae++){var af=ai[ae];if(af.html_elt.find("canvas").height()!==ag){this.draw_helper(af.region,af.resolution,al,{force:true,height:ag});af.html_elt.remove()}}var ad=this,ak=function(){ad.update_all_min_max()};this._add_yaxis_label("min",ak);this._add_yaxis_label("max",ak)}});var B=function(ac){N.call(this,ac,{content_div:ac.top_labeltrack},{resize:false});ac.reference_track=this;this.left_offset=200;this.visible_height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=config.root+"api/genomes//"+this.view.dbkey;this.data_url_extra_params={reference:true};this.data_manager=new w.GenomeReferenceDataManager({data_url:this.data_url,can_subset:this.can_subset});this.hide_contents()};p(B.prototype,q.prototype,N.prototype,{build_header_div:function(){},init:function(){this.data_manager.clear();this.enabled=true},predraw_init:function(){},can_draw:q.prototype.can_draw,draw_helper:function(ae,ad,af,ac){if(af>this.view.canvas_manager.char_width_px){this.tiles_div.show();return N.prototype.draw_helper.call(this,ae,ad,af,ac)}else{this.tiles_div.hide();return null}},can_subset:function(ac){return true},draw_tile:function(af,al,ag,ad,ai,am){var ae=this.data_manager.subset_entry(af,ai),ak=ae.data;var ac=al.canvas;al.font=al.canvas.manager.default_font;al.textAlign="center";for(var ah=0,aj=ak.length;ah<aj;ah++){al.fillStyle=this.view.get_base_color(ak[ah]);al.fillText(ak[ah],Math.floor(ah*am),10)}return new b(this,ai,ad,ac,ae)}});var h=function(ae,ad,af){var ac=this;this.display_modes=A;this.mode="Histogram";N.call(this,ae,ad,af);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"color",label:"Color",type:"color",default_value:k.get_random_color()},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:32,hidden:true}],saved_values:af.prefs,onchange:function(){ac.set_name(ac.prefs.name);ac.request_redraw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height};p(h.prototype,q.prototype,N.prototype,{before_draw:function(){},draw_tile:function(ac,ad,ag,ae,af,ah){return this._draw_line_track_tile(ac,ad,ag,ae,af,ah)},can_subset:function(ac){return(ac.data[1][0]-ac.data[0][0]===1)},postdraw_actions:function(ad,ae,af,ac){this._add_yaxis_label("max");this._add_yaxis_label("min")}});var s=function(ae,ad,af){var ac=this;this.display_modes=["Heatmap"];this.mode="Heatmap";N.call(this,ae,ad,af);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"pos_color",label:"Positive Color",type:"color",default_value:"#FF8C00"},{key:"neg_color",label:"Negative Color",type:"color",default_value:"#4169E1"},{key:"min_value",label:"Min Value",type:"float",default_value:-1},{key:"max_value",label:"Max Value",type:"float",default_value:1},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:500,hidden:true}],saved_values:af.prefs,onchange:function(){ac.set_name(ac.prefs.name);this.request_redraw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height};p(s.prototype,q.prototype,N.prototype,{draw_tile:function(ac,ae,ai,ag,ah,aj){var af=ae.canvas,ad=new L.DiagonalHeatmapPainter(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai);ad.draw(ae,af.width,af.height,aj);return new b(this,ah,ag,af,ac.data)}});var c=function(af,ae,ah){var ad=this;this.display_modes=["Auto","Coverage","Dense","Squish","Pack"];N.call(this,af,ae,ah);var ag=k.get_random_color(),ac=k.get_random_color([ag,"#FFFFFF"]);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"block_color",label:"Block color",type:"color",default_value:ag},{key:"reverse_strand_color",label:"Antisense strand color",type:"color",default_value:ac},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true,help:"Show the number of items in each bin when drawing summary histogram"},{key:"min_value",label:"Histogram minimum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"max_value",label:"Histogram maximum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"connector_style",label:"Connector style",type:"select",default_value:"fishbones",options:[{label:"Line with arrows",value:"fishbone"},{label:"Arcs",value:"arcs"}]},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.visible_height_px,hidden:true}],saved_values:ah.prefs,onchange:function(){ad.set_name(ad.prefs.name);ad.set_painter_from_config();ad.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height;this.container_div.addClass("feature-track");this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.slotters={};this.start_end_dct={};this.left_offset=200;this.set_painter_from_config()};p(c.prototype,q.prototype,N.prototype,{set_painter_from_config:function(){if(this.config.values.connector_style==="arcs"){this.painter=L.ArcLinkedFeaturePainter}else{this.painter=L.LinkedFeaturePainter}},postdraw_actions:function(am,ae,an,al){N.prototype.postdraw_actions.call(this,am,ae,an,al);var ag=this,ah;if(ag.filters_manager){var af=ag.filters_manager.filters;for(var aj=0;aj<af.length;aj++){af[aj].update_ui_elt()}var ai=false,ak,ad;for(ah=0;ah<am.length;ah++){if(am[ah].data.length){ak=am[ah].data[0];for(var aj=0;aj<af.length;aj++){ad=af[aj];if(ad.applies_to(ak)&&ad.min!==ad.max){ai=true;break}}}}if(ag.filters_available!==ai){ag.filters_available=ai;if(!ag.filters_available){ag.filters_manager.hide()}ag.update_icons()}}if(am[0] instanceof P){var ac=true;for(ah=0;ah<am.length;ah++){if(!am[ah].all_slotted){ac=false;break}}if(!ac){this.action_icons.show_more_rows_icon.show()}else{this.action_icons.show_more_rows_icon.hide()}}else{this.action_icons.show_more_rows_icon.hide()}},update_auto_mode:function(ac){var ac;if(this.mode==="Auto"){if(ac==="no_detail"){ac="feature spans"}this.action_icons.mode_icon.attr("title","Set display mode (now: Auto/"+ac+")")}},incremental_slots:function(ag,ac,af){var ad=this.view.canvas_manager.dummy_context,ae=this.slotters[ag];if(!ae||(ae.mode!==af)){ae=new (t.FeatureSlotter)(ag,af,z,function(ah){return ad.measureText(ah)});this.slotters[ag]=ae}return ae.slot_features(ac)},get_mode:function(ac){if(ac.extra_info==="no_detail"||this.is_overview){mode="no_detail"}else{if(this.view.high-this.view.low>I){mode="Squish"}else{mode="Pack"}}return mode},get_canvas_height:function(ac,ag,ah,ad){if(ag==="Coverage"||ac.dataset_type==="bigwig"){return this.summary_draw_height}else{var af=this.incremental_slots(ah,ac.data,ag);var ae=new (this.painter)(null,null,null,this.prefs,ag);return Math.max(aa,ae.get_required_height(af,ad))}},draw_tile:function(am,aq,ao,ar,af,aj,ae){var ap=this,ad=aq.canvas,ay=af.get("start"),ac=af.get("end"),ag=this.left_offset;if(am.dataset_type==="bigwig"){return this._draw_line_track_tile(am,aq,ao,ar,af,aj)}var ai=[],an=this.slotters[aj].slots;all_slotted=true;if(am.data){var ak=this.filters_manager.filters;for(var at=0,av=am.data.length;at<av;at++){var ah=am.data[at];var au=false;var al;for(var ax=0,aC=ak.length;ax<aC;ax++){al=ak[ax];al.update_attrs(ah);if(!al.keep(ah)){au=true;break}}if(!au){ai.push(ah);if(!(ah[0] in an)){all_slotted=false}}}}var aB=(this.filters_manager.alpha_filter?new C(this.filters_manager.alpha_filter):null),az=(this.filters_manager.height_filter?new C(this.filters_manager.height_filter):null),aA=new (this.painter)(ai,ay,ac,this.prefs,ao,aB,az,ae,function(aD){return ap.view.get_base_color(aD)});var aw=null;aq.fillStyle=this.prefs.block_color;aq.font=aq.canvas.manager.default_font;aq.textAlign="right";if(am.data){aw=aA.draw(aq,ad.width,ad.height,aj,an);aw.translation=-ag}return new P(ap,af,ar,ad,am.data,aj,ao,am.message,all_slotted,aw)}});var Z=function(ad,ac,ae){this.display_modes=["Auto","Coverage","Dense","Squish","Pack"];N.call(this,ad,ac,ae);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"color",label:"Histogram color",type:"color",default_value:k.get_random_color()},{key:"show_sample_data",label:"Show sample data",type:"bool",default_value:true},{key:"show_labels",label:"Show summary and sample labels",type:"bool",default_value:true},{key:"summary_height",label:"Locus summary height",type:"float",default_value:20},{key:"mode",type:"string",default_value:this.mode,hidden:true}],saved_values:ae.prefs,onchange:function(){this.track.set_name(this.track.prefs.name);this.track.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.painter=L.VariantPainter;this.summary_draw_height=30;this.left_offset=30};p(Z.prototype,q.prototype,N.prototype,{draw_tile:function(ac,af,ai,ag,ah,aj){if(ac.dataset_type==="bigwig"){return this._draw_line_track_tile(ac,af,"Histogram",ag,ah,aj)}else{var ae=this.view,ad=new (this.painter)(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai,function(ak){return ae.get_base_color(ak)});ad.draw(af,af.canvas.width,af.canvas.height,aj);return new b(this,ah,ag,af.canvas,ac.data)}},get_canvas_height:function(ac,ag,ah,ae){if(ac.dataset_type==="bigwig"){return this.summary_draw_height}else{var af=new (this.painter)(null,null,null,this.prefs,ag);var ad=(this.dataset.get_metadata("sample_names")?this.dataset.get_metadata("sample_names").length:0);if(ad===0&&ac.data.length!==0){ad=ac.data[0][7].match(/,/g);if(ad===null){ad=1}else{ad=ad.length+1}}return af.get_required_height(ad)}},predraw_init:function(){var ac=[g.prototype.predraw_init.call(this)];if(!this.dataset.get_metadata("sample_names")){ac.push(this.dataset.fetch())}return ac},postdraw_actions:function(af,ag,ai,ad){N.prototype.postdraw_actions.call(this,af,ag,ai,ad);var ae=ab.filter(af,function(aj){return(aj instanceof M)});if(ae.length===0&&this.prefs.show_labels){var ac;if(this.container_div.find(".yaxislabel.variant").length===0){ac=this.prefs.summary_height/2;this.tiles_div.prepend($("<div/>").text("Summary").addClass("yaxislabel variant top").css({"font-size":ac+"px",top:(this.prefs.summary_height-ac)/2+"px"}));if(this.prefs.show_sample_data){var ah=this.dataset.get("metadata").get("sample_names").join("<br/>");this.tiles_div.prepend($("<div/>").html(ah).addClass("yaxislabel variant top sample").css({top:this.prefs.summary_height+2,}))}}ac=(this.mode==="Squish"?5:10)+"px";$(this.tiles_div).find(".sample").css({"font-size":ac,"line-height":ac});$(this.tiles_div).find(".yaxislabel").css("color",this.prefs.label_color)}else{this.container_div.find(".yaxislabel.variant").remove()}}});var T=function(ae,ad,ag){c.call(this,ae,ad,ag);var af=k.get_random_color(),ac=k.get_random_color([af,"#ffffff"]);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"block_color",label:"Block and sense strand color",type:"color",default_value:af},{key:"reverse_strand_color",label:"Antisense strand color",type:"color",default_value:ac},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"min_value",label:"Histogram minimum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"max_value",label:"Histogram maximum",type:"float",default_value:null,help:"clear value to set automatically"}],saved_values:ag.prefs,onchange:function(){this.track.set_name(this.track.prefs.name);this.track.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.painter=(ae.reference_track?L.RefBasedReadPainter:L.ReadPainter);this.update_icons()};p(T.prototype,q.prototype,N.prototype,c.prototype);var d={CompositeTrack:f,DrawableGroup:Q,DiagonalHeatmapTrack:s,FeatureTrack:c,LineTrack:h,ReadTrack:T,VariantTrack:Z,VcfTrack:Z};var o=function(ae,ad,ac){if("copy" in ae){return ae.copy(ac)}else{var af=ae.obj_type;if(!af){af=ae.track_type}return new d[af](ad,ac,ae)}};return{TracksterView:Y,DrawableGroup:Q,LineTrack:h,FeatureTrack:c,DiagonalHeatmapTrack:s,ReadTrack:T,VariantTrack:Z,CompositeTrack:f,object_from_template:o}});
\ No newline at end of file
+define(["libs/underscore","viz/visualization","viz/trackster/util","viz/trackster/slotting","viz/trackster/painters","mvc/data","viz/trackster/filters"],function(ab,w,k,t,L,X,i){var p=ab.extend;var m={};var j=function(ac,ad){m[ac.attr("id")]=ad};var l=function(ac,ae,ag,af){ag=".group";var ad={};m[ac.attr("id")]=af;ac.bind("drag",{handle:"."+ae,relative:true},function(ao,ap){var an=$(this),at=$(this).parent(),ak=at.children(),am=m[$(this).attr("id")],aj,ai,aq,ah,al;ai=$(this).parents(ag);if(ai.length!==0){aq=ai.position().top;ah=aq+ai.outerHeight();if(ap.offsetY<aq){$(this).insertBefore(ai);var ar=m[ai.attr("id")];ar.remove_drawable(am);ar.container.add_drawable_before(am,ar);return}else{if(ap.offsetY>ah){$(this).insertAfter(ai);var ar=m[ai.attr("id")];ar.remove_drawable(am);ar.container.add_drawable(am);return}}}ai=null;for(al=0;al<ak.length;al++){aj=$(ak.get(al));aq=aj.position().top;ah=aq+aj.outerHeight();if(aj.is(ag)&&this!==aj.get(0)&&ap.offsetY>=aq&&ap.offsetY<=ah){if(ap.offsetY-aq<ah-ap.offsetY){aj.find(".content-div").prepend(this)}else{aj.find(".content-div").append(this)}if(am.container){am.container.remove_drawable(am)}m[aj.attr("id")].add_drawable(am);return}}for(al=0;al<ak.length;al++){aj=$(ak.get(al));if(ap.offsetY<aj.position().top&&!(aj.hasClass("reference-track")||aj.hasClass("intro"))){break}}if(al===ak.length){if(this!==ak.get(al-1)){at.append(this);m[at.attr("id")].move_drawable(am,al)}}else{if(this!==ak.get(al)){$(this).insertBefore(ak.get(al));m[at.attr("id")].move_drawable(am,(ap.deltaY>0?al-1:al))}}}).bind("dragstart",function(){ad["border-top"]=ac.css("border-top");ad["border-bottom"]=ac.css("border-bottom");$(this).css({"border-top":"1px solid blue","border-bottom":"1px solid blue"})}).bind("dragend",function(){$(this).css(ad)})};var aa=16,G=9,D=20,z=100,I=12000,S=400,K=5000,v=100,n="Cannot display dataset due to an error. ",J="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",E="No data for this chrom/contig.",u="Preparing data. This can take a while for a large dataset. If the visualization is saved and closed, preparation will continue in the background.",x="Tool cannot be rerun: ",a="Loading data...",U="Ready for display",R=10,H=20,A=["Histogram","Line","Filled","Intensity"];function V(ad,ac){if(!ac){ac=0}var ae=Math.pow(10,ac);return Math.round(ad*ae)/ae}var q=function(ad,ac,af){if(!q.id_counter){q.id_counter=0}this.id=q.id_counter++;this.name=af.name;this.view=ad;this.container=ac;this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name}],saved_values:af.prefs,onchange:function(){this.track.set_name(this.track.config.values.name)}});this.prefs=this.config.values;this.drag_handle_class=af.drag_handle_class;this.is_overview=false;this.action_icons={};this.content_visible=true;this.container_div=this.build_container_div();this.header_div=this.build_header_div();if(this.header_div){this.container_div.append(this.header_div);this.icons_div=$("<div/>").css("float","left").hide().appendTo(this.header_div);this.build_action_icons(this.action_icons_def);this.header_div.append($("<div style='clear: both'/>"));this.header_div.dblclick(function(ag){ag.stopPropagation()});var ae=this;this.container_div.hover(function(){ae.icons_div.show()},function(){ae.icons_div.hide()});$("<div style='clear: both'/>").appendTo(this.container_div)}};q.prototype.action_icons_def=[{name:"toggle_icon",title:"Hide/show content",css_class:"toggle",on_click_fn:function(ac){if(ac.content_visible){ac.action_icons.toggle_icon.addClass("toggle-expand").removeClass("toggle");ac.hide_contents();ac.content_visible=false}else{ac.action_icons.toggle_icon.addClass("toggle").removeClass("toggle-expand");ac.content_visible=true;ac.show_contents()}}},{name:"settings_icon",title:"Edit settings",css_class:"settings-icon",on_click_fn:function(ad){var af=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ac=function(){ad.config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},ae=function(ag){if((ag.keyCode||ag.which)===27){af()}else{if((ag.keyCode||ag.which)===13){ac()}}};$(window).bind("keypress.check_enter_esc",ae);show_modal("Configure",ad.config.build_form(),{Cancel:af,OK:ac})}},{name:"remove_icon",title:"Remove",css_class:"remove-icon",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.remove()}}];p(q.prototype,{init:function(){},changed:function(){this.view.changed()},can_draw:function(){if(this.enabled&&this.content_visible){return true}return false},request_draw:function(){},_draw:function(ac){},to_dict:function(){},set_name:function(ac){this.old_name=this.name;this.name=ac;this.name_div.text(this.name)},revert_name:function(){if(this.old_name){this.name=this.old_name;this.name_div.text(this.name)}},remove:function(){this.changed();this.container.remove_drawable(this);var ac=this.view;this.container_div.hide(0,function(){$(this).remove();ac.update_intro_div()})},build_container_div:function(){},build_header_div:function(){},add_action_icon:function(ad,ai,ah,ag,ac,af){var ae=this;this.action_icons[ad]=$("<a/>").attr("href","javascript:void(0);").attr("title",ai).addClass("icon-button").addClass(ah).tooltip().click(function(){ag(ae)}).appendTo(this.icons_div);if(af){this.action_icons[ad].hide()}},build_action_icons:function(ac){var ae;for(var ad=0;ad<ac.length;ad++){ae=ac[ad];this.add_action_icon(ae.name,ae.title,ae.css_class,ae.on_click_fn,ae.prepend,ae.hide)}},update_icons:function(){},hide_contents:function(){},show_contents:function(){},get_drawables:function(){}});var y=function(ad,ac,ae){q.call(this,ad,ac,ae);this.obj_type=ae.obj_type;this.drawables=[]};p(y.prototype,q.prototype,{unpack_drawables:function(ae){this.drawables=[];var ad;for(var ac=0;ac<ae.length;ac++){ad=o(ae[ac],this.view,this);this.add_drawable(ad)}},init:function(){for(var ac=0;ac<this.drawables.length;ac++){this.drawables[ac].init()}},_draw:function(ac){for(var ad=0;ad<this.drawables.length;ad++){this.drawables[ad]._draw(ac)}},to_dict:function(){var ad=[];for(var ac=0;ac<this.drawables.length;ac++){ad.push(this.drawables[ac].to_dict())}return{name:this.name,prefs:this.prefs,obj_type:this.obj_type,drawables:ad}},add_drawable:function(ac){this.drawables.push(ac);ac.container=this;this.changed()},add_drawable_before:function(ae,ac){this.changed();var ad=this.drawables.indexOf(ac);if(ad!==-1){this.drawables.splice(ad,0,ae);return true}return false},replace_drawable:function(ae,ac,ad){var af=this.drawables.indexOf(ae);if(af!==-1){this.drawables[af]=ac;if(ad){ae.container_div.replaceWith(ac.container_div)}this.changed()}return af},remove_drawable:function(ad){var ac=this.drawables.indexOf(ad);if(ac!==-1){this.drawables.splice(ac,1);ad.container=null;this.changed();return true}return false},move_drawable:function(ad,ae){var ac=this.drawables.indexOf(ad);if(ac!==-1){this.drawables.splice(ac,1);this.drawables.splice(ae,0,ad);this.changed();return true}return false},get_drawables:function(){return this.drawables},get_tracks:function(af){var ac=this.drawables.slice(0),ad=[],ae;while(ac.length!==0){ae=ac.shift();if(ae instanceof af){ad.push(ae)}else{if(ae.drawables){ac=ac.concat(ae.drawables)}}}return ad}});var Q=function(ad,ac,af){p(af,{obj_type:"DrawableGroup",drag_handle_class:"group-handle"});y.call(this,ad,ac,af);this.content_div=$("<div/>").addClass("content-div").attr("id","group_"+this.id+"_content_div").appendTo(this.container_div);j(this.container_div,this);j(this.content_div,this);l(this.container_div,this.drag_handle_class,".group",this);this.filters_manager=new i.FiltersManager(this);this.header_div.after(this.filters_manager.parent_div);this.saved_filters_managers=[];if("drawables" in af){this.unpack_drawables(af.drawables)}if("filters" in af){var ae=this.filters_manager;this.filters_manager=new i.FiltersManager(this,af.filters);ae.parent_div.replaceWith(this.filters_manager.parent_div);if(af.filters.visible){this.setup_multitrack_filtering()}}};p(Q.prototype,q.prototype,y.prototype,{action_icons_def:[q.prototype.action_icons_def[0],q.prototype.action_icons_def[1],{name:"composite_icon",title:"Show composite track",css_class:"layers-stack",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.show_composite_track()}},{name:"filters_icon",title:"Filters",css_class:"filters-icon",on_click_fn:function(ac){if(ac.filters_manager.visible()){ac.filters_manager.clear_filters();ac._restore_filter_managers()}else{ac.setup_multitrack_filtering();ac.request_draw({clear_tile_cache:true})}ac.filters_manager.toggle()}},q.prototype.action_icons_def[2]],build_container_div:function(){var ac=$("<div/>").addClass("group").attr("id","group_"+this.id);if(this.container){this.container.content_div.append(ac)}return ac},build_header_div:function(){var ac=$("<div/>").addClass("track-header");ac.append($("<div/>").addClass(this.drag_handle_class));this.name_div=$("<div/>").addClass("track-name").text(this.name).appendTo(ac);return ac},hide_contents:function(){this.tiles_div.hide()},show_contents:function(){this.tiles_div.show();this.request_draw()},update_icons:function(){var ae=this.drawables.length;if(ae===0){this.action_icons.composite_icon.hide();this.action_icons.filters_icon.hide()}else{if(ae===1){if(this.drawables[0] instanceof f){this.action_icons.composite_icon.show()}this.action_icons.filters_icon.hide()}else{var al,ak,ai,ao=true,ag=this.drawables[0].get_type(),ac=0;for(al=0;al<ae;al++){ai=this.drawables[al];if(ai.get_type()!==ag){can_composite=false;break}if(ai instanceof c){ac++}}if(ao||ac===1){this.action_icons.composite_icon.show()}else{this.action_icons.composite_icon.hide();$(".bs-tooltip").remove()}if(ac>1&&ac===this.drawables.length){var ap={},ad;ai=this.drawables[0];for(ak=0;ak<ai.filters_manager.filters.length;ak++){ad=ai.filters_manager.filters[ak];ap[ad.name]=[ad]}for(al=1;al<this.drawables.length;al++){ai=this.drawables[al];for(ak=0;ak<ai.filters_manager.filters.length;ak++){ad=ai.filters_manager.filters[ak];if(ad.name in ap){ap[ad.name].push(ad)}}}this.filters_manager.remove_all();var af,ah,aj,am;for(var an in ap){af=ap[an];if(af.length===ac){ah=new i.NumberFilter({name:af[0].name,index:af[0].index});this.filters_manager.add_filter(ah)}}if(this.filters_manager.filters.length>0){this.action_icons.filters_icon.show()}else{this.action_icons.filters_icon.hide()}}else{this.action_icons.filters_icon.hide()}}}},_restore_filter_managers:function(){for(var ac=0;ac<this.drawables.length;ac++){this.drawables[ac].filters_manager=this.saved_filters_managers[ac]}this.saved_filters_managers=[]},setup_multitrack_filtering:function(){if(this.filters_manager.filters.length>0){this.saved_filters_managers=[];for(var ac=0;ac<this.drawables.length;ac++){drawable=this.drawables[ac];this.saved_filters_managers.push(drawable.filters_manager);drawable.filters_manager=this.filters_manager}}this.filters_manager.init_filters()},show_composite_track:function(){var ad=new f(this.view,this.view,{name:this.name,drawables:this.drawables});var ac=this.container.replace_drawable(this,ad,true);ad.request_draw()},add_drawable:function(ac){y.prototype.add_drawable.call(this,ac);this.update_icons()},remove_drawable:function(ac){y.prototype.remove_drawable.call(this,ac);this.update_icons()},to_dict:function(){if(this.filters_manager.visible()){this._restore_filter_managers()}var ac=p(y.prototype.to_dict.call(this),{filters:this.filters_manager.to_dict()});if(this.filters_manager.visible()){this.setup_multitrack_filtering()}return ac},request_draw:function(ac){ab.each(this.drawables,function(ad){ad.request_draw(ac)})}});var Y=Backbone.View.extend({initialize:function(ac){p(ac,{obj_type:"View"});y.call(this,"View",ac.container,ac);this.chrom=null;this.vis_id=ac.vis_id;this.dbkey=ac.dbkey;this.label_tracks=[];this.tracks_to_be_redrawn=[];this.max_low=0;this.max_high=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.load_chroms_deferred=null;this.render();this.canvas_manager=new w.CanvasManager(this.container.get(0).ownerDocument);this.reset();this.config=new F({track:this,params:[{key:"a_color",label:"A Color",type:"color",default_value:"#FF0000"},{key:"c_color",label:"C Color",type:"color",default_value:"#00FF00"},{key:"g_color",label:"G Color",type:"color",default_value:"#0000FF"},{key:"t_color",label:"T Color",type:"color",default_value:"#FF00FF"},{key:"n_color",label:"N Color",type:"color",default_value:"#AAAAAA"},],saved_values:ac.prefs,onchange:function(){track.request_redraw({clear_tile_cache:true})}})},render:function(){this.requested_redraw=false;var ae=this.container,ac=this;this.top_container=$("<div/>").addClass("top-container").appendTo(ae);this.browser_content_div=$("<div/>").addClass("content").css("position","relative").appendTo(ae);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(ae);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").attr("id","viewport-container").appendTo(this.browser_content_div);this.content_div=this.viewport_container;j(this.viewport_container,ac);this.intro_div=$("<div/>").addClass("intro").appendTo(this.viewport_container).hide();var af=$("<div/>").text("Add Datasets to Visualization").addClass("action-button").appendTo(this.intro_div).click(function(){w.select_datasets(config.root+"visualization/list_current_history_datasets",config.root+"api/datasets",{"f-dbkey":ac.dbkey},function(ag){ab.each(ag,function(ah){ac.add_drawable(o(ah,ac,ac))})})});this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("trackster-nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("trackster-nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a/>").attr("href","javascript:void(0);").attr("title","Close overview").addClass("icon-button overview-close tooltip").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var ad=function(ag){if(ag.type==="focusout"||(ag.keyCode||ag.which)===13||(ag.keyCode||ag.which)===27){if((ag.keyCode||ag.which)!==27){ac.go_to($(this).val())}$(this).hide();$(this).val("");ac.location_span.show();ac.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",ad).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").attr("original-title","Click to change location").tooltip({placement:"bottom"}).appendTo(this.nav_controls);this.location_span.click(function(){ac.location_span.hide();ac.chrom_select.hide();ac.nav_input.val(ac.chrom+":"+ac.low+"-"+ac.high);ac.nav_input.css("display","inline-block");ac.nav_input.select();ac.nav_input.focus();ac.nav_input.autocomplete({source:function(ai,ag){var aj=[],ah=$.map(ac.get_tracks(c),function(ak){return ak.data_manager.search_features(ai.term).success(function(al){aj=aj.concat(al)})});$.when.apply($,ah).done(function(){ag($.map(aj,function(ak){return{label:ak[0],value:ak[1]}}))})}})});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a/>").attr("id","zoom-out").attr("title","Zoom out").tooltip({placement:"bottom"}).click(function(){ac.zoom_out();ac.request_redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a/>").attr("id","zoom-in").attr("title","Zoom in").tooltip({placement:"bottom"}).click(function(){ac.zoom_in();ac.request_redraw()}).appendTo(this.nav_controls);this.load_chroms_deferred=this.load_chroms({low:0});this.chrom_select.bind("change",function(){ac.change_chrom(ac.chrom_select.val())});this.browser_content_div.click(function(ag){$(this).find("input").trigger("blur")});this.browser_content_div.bind("dblclick",function(ag){ac.zoom_in(ag.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(ag,ah){this.current_x=ah.offsetX}).bind("drag",function(ag,ai){var aj=ai.offsetX-this.current_x;this.current_x=ai.offsetX;var ah=Math.round(aj/ac.viewport_container.width()*(ac.max_high-ac.max_low));ac.move_delta(-ah)});this.overview_close.click(function(){ac.reset_overview()});this.viewport_container.bind("draginit",function(ag,ah){if(ag.clientX>ac.viewport_container.width()-16){return false}}).bind("dragstart",function(ag,ah){ah.original_low=ac.low;ah.current_height=ag.clientY;ah.current_x=ah.offsetX}).bind("drag",function(ai,ak){var ag=$(this);var al=ak.offsetX-ak.current_x;var ah=ag.scrollTop()-(ai.clientY-ak.current_height);ag.scrollTop(ah);ak.current_height=ai.clientY;ak.current_x=ak.offsetX;var aj=Math.round(al/ac.viewport_container.width()*(ac.high-ac.low));ac.move_delta(aj)}).bind("mousewheel",function(ai,ak,ah,ag){if(ah){ah*=50;var aj=Math.round(-ah/ac.viewport_container.width()*(ac.high-ac.low));ac.move_delta(aj)}});this.top_labeltrack.bind("dragstart",function(ag,ah){return $("<div />").css({height:ac.browser_content_div.height()+ac.top_labeltrack.height()+ac.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ak,al){$(al.proxy).css({left:Math.min(ak.pageX,al.startX)-ac.container.offset().left,width:Math.abs(ak.pageX-al.startX)});var ah=Math.min(ak.pageX,al.startX)-ac.container.offset().left,ag=Math.max(ak.pageX,al.startX)-ac.container.offset().left,aj=(ac.high-ac.low),ai=ac.viewport_container.width();ac.update_location(Math.round(ah/ai*aj)+ac.low,Math.round(ag/ai*aj)+ac.low)}).bind("dragend",function(al,am){var ah=Math.min(al.pageX,am.startX),ag=Math.max(al.pageX,am.startX),aj=(ac.high-ac.low),ai=ac.viewport_container.width(),ak=ac.low;ac.low=Math.round(ah/ai*aj)+ak;ac.high=Math.round(ag/ai*aj)+ak;$(am.proxy).remove();ac.request_redraw()});this.add_label_track(new W(this,{content_div:this.top_labeltrack}));this.add_label_track(new W(this,{content_div:this.nav_labeltrack}));$(window).bind("resize",function(){if(this.resize_timer){clearTimeout(this.resize_timer)}this.resize_timer=setTimeout(function(){ac.resize_window()},500)});$(document).bind("redraw",function(){ac.redraw()});this.reset();$(window).trigger("resize")},get_base_color:function(ac){return this.config.values[ac.toLowerCase()+"_color"]||this.config.values.n_color}});p(Y.prototype,y.prototype,{changed:function(){this.has_changes=true},update_intro_div:function(){if(this.drawables.length===0){this.intro_div.show()}else{this.intro_div.hide()}},trigger_navigate:function(ad,af,ac,ag){if(this.timer){clearTimeout(this.timer)}if(ag){var ae=this;this.timer=setTimeout(function(){ae.trigger("navigate",ad+":"+af+"-"+ac)},500)}else{view.trigger("navigate",ad+":"+af+"-"+ac)}},update_location:function(ac,ae){this.location_span.text(commatize(ac)+" - "+commatize(ae));this.nav_input.val(this.chrom+":"+commatize(ac)+"-"+commatize(ae));var ad=view.chrom_select.val();if(ad!==""){this.trigger_navigate(ad,view.low,view.high,true)}},load_chroms:function(ae){ae.num=v;var ac=this,ad=$.Deferred();$.ajax({url:config.root+"api/genomes/"+this.dbkey,data:ae,dataType:"json",success:function(ag){if(ag.chrom_info.length===0){return}if(ag.reference){ac.add_label_track(new B(ac))}ac.chrom_data=ag.chrom_info;var aj='<option value="">Select Chrom/Contig</option>';for(var ai=0,af=ac.chrom_data.length;ai<af;ai++){var ah=ac.chrom_data[ai].chrom;aj+='<option value="'+ah+'">'+ah+"</option>"}if(ag.prev_chroms){aj+='<option value="previous">Previous '+v+"</option>"}if(ag.next_chroms){aj+='<option value="next">Next '+v+"</option>"}ac.chrom_select.html(aj);ac.chrom_start_index=ag.start_index;ad.resolve(ag.chrom_info)},error:function(){alert("Could not load chroms for this dbkey:",ac.dbkey)}});return ad},change_chrom:function(ah,ad,aj){var ae=this;if(!ae.chrom_data){ae.load_chroms_deferred.then(function(){ae.change_chrom(ah,ad,aj)});return}if(!ah||ah==="None"){return}if(ah==="previous"){ae.load_chroms({low:this.chrom_start_index-v});return}if(ah==="next"){ae.load_chroms({low:this.chrom_start_index+v});return}var ai=$.grep(ae.chrom_data,function(ak,al){return ak.chrom===ah})[0];if(ai===undefined){ae.load_chroms({chrom:ah},function(){ae.change_chrom(ah,ad,aj)});return}else{if(ah!==ae.chrom){ae.chrom=ah;ae.chrom_select.val(ae.chrom);ae.max_high=ai.len-1;ae.reset();for(var ag=0,ac=ae.drawables.length;ag<ac;ag++){var af=ae.drawables[ag];if(af.init){af.init()}}if(ae.reference_track){ae.reference_track.init()}}if(ad&&aj){ae.low=Math.max(ad,0);ae.high=Math.min(aj,ae.max_high)}else{ae.low=0;ae.high=ae.max_high}ae.reset_overview();ae.request_redraw()}},go_to:function(ag){ag=ag.replace(/,/g,"");ag=ag.replace(/:|\-/g," ");var ad=ag.split(/\s+/),af=ad[0],ae=(ad[1]?parseInt(ad[1],10):null),ac=(ad[2]?parseInt(ad[2],10):null);if(!ac){ae=ae-15;ac=ae+15}this.change_chrom(af,ae,ac)},move_fraction:function(ae){var ac=this;var ad=ac.high-ac.low;this.move_delta(ae*ad)},move_delta:function(af){var ac=this;var ae=ac.high-ac.low;if(ac.low-af<ac.max_low){ac.low=ac.max_low;ac.high=ac.max_low+ae}else{if(ac.high-af>ac.max_high){ac.high=ac.max_high;ac.low=ac.max_high-ae}else{ac.high-=af;ac.low-=af}}ac.request_redraw({data_fetch:false});if(this.redraw_on_move_fn){clearTimeout(this.redraw_on_move_fn)}this.redraw_on_move_fn=setTimeout(function(){ac.request_redraw()},200);var ad=ac.chrom_select.val();this.trigger_navigate(ad,ac.low,ac.high,true)},add_drawable:function(ac){y.prototype.add_drawable.call(this,ac);ac.init();this.changed();this.update_intro_div()},add_label_track:function(ac){ac.view=this;ac.init();this.label_tracks.push(ac)},remove_drawable:function(ae,ad){y.prototype.remove_drawable.call(this,ae);if(ad){var ac=this;ae.container_div.hide(0,function(){$(this).remove();ac.update_intro_div()})}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},request_redraw:function(ad,ae){var ac=this,af=(ae?[ae]:ac.drawables);ab.each(af,function(ag){var ah=ab.find(ac.tracks_to_be_redrawn,function(ai){return ai[0]===ag});if(ah){ah[1]=ad}else{ac.tracks_to_be_redrawn.push([ag,ad])}});if(!this.requested_redraw){requestAnimationFrame(function(){ac._redraw()});this.requested_redraw=true}},_redraw:function(){this.requested_redraw=false;var ac=this.low,ag=this.high;if(ac<this.max_low){ac=this.max_low}if(ag>this.max_high){ag=this.max_high}var ad=this.high-this.low;if(this.high!==0&&ad<this.min_separation){ag=ac+this.min_separation}this.low=Math.floor(ac);this.high=Math.ceil(ag);this.update_location(this.low,this.high);this.resolution_b_px=(this.high-this.low)/this.viewport_container.width();this.resolution_px_b=1/this.resolution_b_px;var af=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ah=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ae=13;this.overview_box.css({left:af,width:Math.max(ae,ah)}).show();if(ah<ae){this.overview_box.css("left",af-(ae-ah)/2)}if(this.overview_highlight){this.overview_highlight.css({left:af,width:ah})}ab.each(this.tracks_to_be_redrawn,function(ak){var ai=ak[0],aj=ak[1];if(ai){ai._draw(aj)}});this.tracks_to_be_redrawn=[];ab.each(this.label_tracks,function(ai){ai._draw()})},zoom_in:function(ad,ae){if(this.max_high===0||this.high-this.low<=this.min_separation){return}var af=this.high-this.low,ag=af/2+this.low,ac=(af/this.zoom_factor)/2;if(ad){ag=ad/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(ag-ac);this.high=Math.round(ag+ac);this.changed();this.request_redraw()},zoom_out:function(){if(this.max_high===0){return}var ad=this.high-this.low,ae=ad/2+this.low,ac=(ad*this.zoom_factor)/2;this.low=Math.round(ae-ac);this.high=Math.round(ae+ac);this.changed();this.request_redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.request_redraw()},set_overview:function(ae){if(this.overview_drawable){if(this.overview_drawable.dataset.id===ae.dataset.id){return}this.overview_viewport.find(".track").remove()}var ad=ae.copy({content_div:this.overview_viewport}),ac=this;ad.header_div.hide();ad.is_overview=true;ac.overview_drawable=ad;this.overview_drawable.postdraw_actions=function(){ac.overview_highlight.show().height(ac.overview_drawable.content_div.height());ac.overview_viewport.height(ac.overview_drawable.content_div.height()+ac.overview_box.outerHeight());ac.overview_close.show();ac.resize_window()};ac.overview_drawable.request_draw();this.changed()},reset_overview:function(){$(".bs-tooltip").remove();this.overview_viewport.find(".track-tile").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide();view.resize_window();view.overview_drawable=null}});var r=function(ae,aj,af){this.track=ae;this.id=aj.id;this.name=aj.name;this.params=[];var aq=aj.params;for(var ag=0;ag<aq.length;ag++){var al=aq[ag],ad=al.name,ap=al.label,ah=unescape(al.html),ar=al.value,an=al.type;if(an==="number"){this.params.push(new e(ad,ap,ah,(ad in af?af[ad]:ar),al.min,al.max))}else{if(an==="select"){this.params.push(new O(ad,ap,ah,(ad in af?af[ad]:ar)))}else{console.log("WARNING: unrecognized tool parameter type:",ad,an)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(au){au.stopPropagation()}).click(function(au){au.stopPropagation()}).bind("dblclick",function(au){au.stopPropagation()});var ao=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var am=this.params;var ak=this;$.each(this.params,function(av,ay){var ax=$("<div>").addClass("param-row").appendTo(ak.parent_div);var au=$("<div>").addClass("param-label").text(ay.label).appendTo(ax);var aw=$("<div/>").addClass("param-input").html(ay.html).appendTo(ax);aw.find(":input").val(ay.value);$("<div style='clear: both;'/>").appendTo(ax)});this.parent_div.find("input").click(function(){$(this).select()});var at=$("<div>").addClass("param-row").appendTo(this.parent_div);var ai=$("<input type='submit'>").attr("value","Run on complete dataset").appendTo(at);var ac=$("<input type='submit'>").attr("value","Run on visible region").css("margin-left","3em").appendTo(at);ac.click(function(){ak.run_on_region()});ai.click(function(){ak.run_on_dataset()});if("visible" in af&&af.visible){this.parent_div.show()}};p(r.prototype,{update_params:function(){for(var ac=0;ac<this.params.length;ac++){this.params[ac].update_value()}},state_dict:function(){var ad={};for(var ac=0;ac<this.params.length;ac++){ad[this.params[ac].name]=this.params[ac].value}ad.visible=this.parent_div.is(":visible");return ad},get_param_values_dict:function(){var ac={};this.parent_div.find(":input").each(function(){var ad=$(this).attr("name"),ae=$(this).val();ac[ad]=ae});return ac},get_param_values:function(){var ac=[];this.parent_div.find(":input").each(function(){var ad=$(this).attr("name"),ae=$(this).val();if(ad){ac[ac.length]=ae}});return ac},run_on_dataset:function(){var ac=this;ac.run({target_dataset_id:this.track.dataset.id,action:"rerun",tool_id:ac.id},null,function(ad){show_modal(ac.name+" is Running",ac.name+" is running on the complete dataset. Tool outputs are in dataset's history.",{Close:hide_modal})})},run_on_region:function(){var ai=new w.GenomeRegion({chrom:this.track.view.chrom,start:this.track.view.low,end:this.track.view.high}),ad={target_dataset_id:this.track.dataset.id,action:"rerun",tool_id:this.id,regions:[ai.toJSON()]},ah=this.track,ae=ad.tool_id+ah.tool_region_and_parameters_str(ai),ac;if(ah.container===view){var ag=new Q(view,view,{name:this.name});var af=ah.container.replace_drawable(ah,ag,false);ag.container_div.insertBefore(ah.view.content_div.children()[af]);ag.add_drawable(ah);ah.container_div.appendTo(ag.content_div);ac=ag}else{ac=ah.container}var aj=new ah.constructor(view,ac,{name:ae,hda_ldda:"hda"});aj.init_for_tool_data();aj.change_mode(ah.mode);aj.set_filters_manager(ah.filters_manager.copy(aj));aj.update_icons();ac.add_drawable(aj);aj.tiles_div.text("Starting job.");this.update_params();this.run(ad,aj,function(ak){aj.set_dataset(new X.Dataset(ak));aj.tiles_div.text("Running job.");aj.init()})},run:function(ac,ae,af){ac.inputs=this.get_param_values_dict();var ad=new k.ServerStateDeferred({ajax_settings:{url:config.root+"/api/tools",data:JSON.stringify(ac),dataType:"json",contentType:"application/json",type:"POST"},interval:2000,success_fn:function(ag){return ag!=="pending"}});$.when(ad.go()).then(function(ag){if(ag==="no converter"){ae.container_div.addClass("error");ae.content_div.text(J)}else{if(ag.error){ae.container_div.addClass("error");ae.content_div.text(x+ag.message)}else{af(ag)}}})}});var O=function(ad,ac,ae,af){this.name=ad;this.label=ac;this.html=$(ae);this.value=af};p(O.prototype,{update_value:function(){this.value=$(this.html).val()}});var e=function(ae,ad,ag,ah,af,ac){O.call(this,ae,ad,ag,ah);this.min=af;this.max=ac};p(e.prototype,O.prototype,{update_value:function(){O.prototype.update_value.call(this);this.value=parseFloat(this.value)}});var C=function(ac,ad){L.Scaler.call(this,ad);this.filter=ac};C.prototype.gen_val=function(ac){if(this.filter.high===Number.MAX_VALUE||this.filter.low===-Number.MAX_VALUE||this.filter.low===this.filter.high){return this.default_val}return((parseFloat(ac[this.filter.index])-this.filter.low)/(this.filter.high-this.filter.low))};var F=function(ac){this.track=ac.track;this.params=ac.params;this.values={};this.restore_values((ac.saved_values?ac.saved_values:{}));this.onchange=ac.onchange};p(F.prototype,{set_param_default_value:function(ad,ac){var ae=ab.find(this.params,function(af){return af.key===ad});if(ae){ae.default_value=ac}},set_param_value:function(ac,ad){var ae=ab.find(this.params,function(af){return af.key===ac});if(ae){if(typeof ad==="string"||ad instanceof String){if(ad.trim()===""){ad=ae.default_value}else{if(ae.type==="float"){ad=parseFloat(ad)}else{if(ae.type==="int"){ad=parseInt(ad,10)}}}}}if(this.values[ac]!==ad){this.values[ac]=ad;return true}else{return false}},restore_values:function(ac){var ad=this;$.each(this.params,function(ae,af){if(ac[af.key]!==undefined){ad.values[af.key]=ac[af.key]}else{ad.values[af.key]=af.default_value}})},build_form:function(){var af=this;var ac=$("<div />");var ae;function ad(ak,ag){for(var ao=0;ao<ak.length;ao++){ae=ak[ao];if(ae.hidden){continue}var ai="param_"+ao;var at=af.values[ae.key];var av=$("<div class='form-row' />").appendTo(ag);av.append($("<label />").attr("for",ai).text(ae.label+":"));if(ae.type==="bool"){av.append($('<input type="checkbox" />').attr("id",ai).attr("name",ai).attr("checked",at))}else{if(ae.type==="text"){av.append($('<input type="text"/>').attr("id",ai).val(at).click(function(){$(this).select()}))}else{if(ae.type==="select"){var aq=$("<select />").attr("id",ai);for(var am=0;am<ae.options.length;am++){$("<option/>").text(ae.options[am].label).attr("value",ae.options[am].value).appendTo(aq)}aq.val(at);av.append(aq)}else{if(ae.type==="color"){var au=$("<div/>").appendTo(av),ap=$("<input />").attr("id",ai).attr("name",ai).val(at).css("float","left").appendTo(au).click(function(ax){$(".bs-tooltip").removeClass("in");var aw=$(this).siblings(".bs-tooltip").addClass("in");aw.css({left:$(this).position().left+$(this).width()+5,top:$(this).position().top-($(aw).height()/2)+($(this).height()/2)}).show();aw.click(function(ay){ay.stopPropagation()});$(document).bind("click.color-picker",function(){aw.hide();$(document).unbind("click.color-picker")});ax.stopPropagation()}),an=$("<a href='javascript:void(0)'/>").addClass("icon-button arrow-circle").appendTo(au).attr("title","Set new random color").tooltip(),ar=$("<div class='bs-tooltip right' style='position: absolute;' />").appendTo(au).hide(),aj=$("<div class='tooltip-inner' style='text-align: inherit'></div>").appendTo(ar),ah=$("<div class='tooltip-arrow'></div>").appendTo(ar),al=$.farbtastic(aj,{width:100,height:100,callback:ap,color:at});au.append($("<div/>").css("clear","both"));(function(aw){an.click(function(){aw.setColor(k.get_random_color())})})(al)}else{av.append($("<input />").attr("id",ai).attr("name",ai).val(at))}}}}if(ae.help){av.append($("<div class='help'/>").text(ae.help))}}}ad(this.params,ac);return ac},update_from_form:function(ac){var ae=this;var ad=false;$.each(this.params,function(af,ah){if(!ah.hidden){var ai="param_"+af;var ag=ac.find("#"+ai).val();if(ah.type==="bool"){ag=ac.find("#"+ai).is(":checked")}ad=ae.set_param_value(ah.key,ag)||ad}});if(ad){this.onchange();this.track.changed()}}});var b=function(ac,ag,ae,ad,af){this.track=ac;this.region=ag;this.low=ag.get("start");this.high=ag.get("end");this.resolution=ae;this.html_elt=$("<div class='track-tile'/>").append(ad).height($(ad).attr("height"));this.data=af;this.stale=false};b.prototype.predisplay_actions=function(){};var M=function(ac,ag,ae,ad,af){b.call(this,ac,ag,ae,ad,af)};M.prototype.predisplay_actions=function(){};var P=function(af,an,ag,ae,ai,ap,aj,aq,ad,am){b.call(this,af,an,ag,ae,ai);this.mode=aj;this.all_slotted=ad;this.feature_mapper=am;this.has_icons=false;if(aq){this.has_icons=true;var ak=this;ae=this.html_elt.children()[0],message_div=$("<div/>").addClass("tile-message").css({height:D-1,width:ae.width}).prependTo(this.html_elt);var al=new w.GenomeRegion({chrom:af.view.chrom,start:this.low,end:this.high}),ao=ai.length,ah=$("<a href='javascript:void(0);'/>").addClass("icon more-down").attr("title","For speed, only the first "+ao+" features in this region were obtained from server. Click to get more data including depth").tooltip().appendTo(message_div),ac=$("<a href='javascript:void(0);'/>").addClass("icon more-across").attr("title","For speed, only the first "+ao+" features in this region were obtained from server. Click to get more data excluding depth").tooltip().appendTo(message_div);ah.click(function(){ak.stale=true;af.data_manager.get_more_data(al,af.mode,ak.resolution,{},af.data_manager.DEEP_DATA_REQ);$(".bs-tooltip").hide();af.request_draw()}).dblclick(function(ar){ar.stopPropagation()});ac.click(function(){ak.stale=true;af.data_manager.get_more_data(al,af.mode,ak.resolution,{},af.data_manager.BROAD_DATA_REQ);$(".bs-tooltip").hide();af.request_draw()}).dblclick(function(ar){ar.stopPropagation()})}};p(P.prototype,b.prototype);P.prototype.predisplay_actions=function(){var ad=this,ac={};if(ad.mode!=="Pack"){return}$(this.html_elt).hover(function(){this.hovered=true;$(this).mousemove()},function(){this.hovered=false;$(this).parents(".track-content").children(".overlay").children(".feature-popup").remove()}).mousemove(function(ao){if(!this.hovered){return}var aj=$(this).offset(),an=ao.pageX-aj.left,am=ao.pageY-aj.top,at=ad.feature_mapper.get_feature_data(an,am),ak=(at?at[0]:null);$(this).parents(".track-content").children(".overlay").children(".feature-popup").each(function(){if(!ak||$(this).attr("id")!==ak.toString()){$(this).remove()}});if(at){var af=ac[ak];if(!af){var ak=at[0],ap={name:at[3],start:at[1],end:at[2],strand:at[4]},ai=ad.track.filters_manager.filters,ah;for(var al=0;al<ai.length;al++){ah=ai[al];ap[ah.name]=at[ah.index]}var af=$("<div/>").attr("id",ak).addClass("feature-popup"),au=$("<table/>"),ar,aq,av;for(ar in ap){aq=ap[ar];av=$("<tr/>").appendTo(au);$("<th/>").appendTo(av).text(ar);$("<td/>").attr("align","left").appendTo(av).text(typeof(aq)==="number"?V(aq,2):aq)}af.append($("<div class='feature-popup-inner'>").append(au));ac[ak]=af}af.appendTo($(this).parents(".track-content").children(".overlay"));var ag=an+parseInt(ad.html_elt.css("left"))-af.width()/2,ae=am+parseInt(ad.html_elt.css("top"))+7;af.css("left",ag+"px").css("top",ae+"px")}else{if(!ao.isPropagationStopped()){ao.stopPropagation();$(this).siblings().each(function(){$(this).trigger(ao)})}}}).mouseleave(function(){$(this).parents(".track-content").children(".overlay").children(".feature-popup").remove()})};var g=function(ad,ac,ae){p(ae,{drag_handle_class:"draghandle"});q.call(this,ad,ac,ae);this.dataset=new X.Dataset(ae.dataset);this.dataset_check_type="converted_datasets_state";this.data_url_extra_params={};this.data_query_wait=("data_query_wait" in ae?ae.data_query_wait:K);this.data_manager=("data_manager" in ae?ae.data_manager:new w.GenomeDataManager({dataset:this.dataset,genome:new w.Genome({key:ad.dbkey,chroms_info:{chrom_info:ad.chrom_data}}),data_mode_compatible:this.data_and_mode_compatible,can_subset:this.can_subset}));this.min_height_px=16;this.max_height_px=800;this.visible_height_px=0;this.content_div=$("<div class='track-content'>").appendTo(this.container_div);if(this.container){this.container.content_div.append(this.container_div);if(!("resize" in ae)||ae.resize){this.add_resize_handle()}}};p(g.prototype,q.prototype,{action_icons_def:[{name:"mode_icon",title:"Set display mode",css_class:"chevron-expand",on_click_fn:function(){}},q.prototype.action_icons_def[0],{name:"overview_icon",title:"Set as overview",css_class:"overview-icon",on_click_fn:function(ac){ac.view.set_overview(ac)}},q.prototype.action_icons_def[1],{name:"filters_icon",title:"Filters",css_class:"filters-icon",on_click_fn:function(ac){if(ac.filters_manager.visible()){ac.filters_manager.clear_filters()}else{ac.filters_manager.init_filters()}ac.filters_manager.toggle()}},{name:"tools_icon",title:"Tool",css_class:"hammer",on_click_fn:function(ac){ac.dynamic_tool_div.toggle();if(ac.dynamic_tool_div.is(":visible")){ac.set_name(ac.name+ac.tool_region_and_parameters_str())}else{ac.revert_name()}$(".bs-tooltip").remove()}},{name:"param_space_viz_icon",title:"Tool parameter space visualization",css_class:"arrow-split",on_click_fn:function(ac){var af='<strong>Tool</strong>: <%= track.tool.name %><br/><strong>Dataset</strong>: <%= track.name %><br/><strong>Region(s)</strong>: <select name="regions"><option value="cur">current viewing area</option><option value="bookmarks">bookmarks</option><option value="both">current viewing area and bookmarks</option></select>',ae=ab.template(af,{track:ac});var ah=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ad=function(){var aj=$('select[name="regions"] option:selected').val(),al,ai=new w.GenomeRegion({chrom:view.chrom,start:view.low,end:view.high}),ak=ab.map($(".bookmark"),function(am){return new w.GenomeRegion({from_str:$(am).children(".position").text()})});if(aj==="cur"){al=[ai]}else{if(aj==="bookmarks"){al=ak}else{al=[ai].concat(ak)}}hide_modal();window.location.href=config.root+"visualization/sweepster?"+$.param({dataset_id:ac.dataset.id,hda_ldda:ac.dataset.get("hda_ldda"),regions:JSON.stringify(new Backbone.Collection(al).toJSON())})},ag=function(ai){if((ai.keyCode||ai.which)===27){ah()}else{if((ai.keyCode||ai.which)===13){ad()}}};show_modal("Visualize tool parameter space and output from different parameter settings?",ae,{No:ah,Yes:ad})}},q.prototype.action_icons_def[2]],can_draw:function(){if(this.dataset.id&&q.prototype.can_draw.call(this)){return true}return false},build_container_div:function(){return $("<div/>").addClass("track").attr("id","track_"+this.id).css("position","relative")},build_header_div:function(){var ac=$("<div class='track-header'/>");if(this.view.editor){this.drag_div=$("<div/>").addClass(this.drag_handle_class).appendTo(ac)}this.name_div=$("<div/>").addClass("track-name").appendTo(ac).text(this.name).attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase());return ac},set_dataset:function(ac){this.dataset=ac;this.data_manager.set("dataset",ac)},on_resize:function(){this.request_draw({clear_tile_cache:true})},add_resize_handle:function(){var ac=this;var af=false;var ae=false;var ad=$("<div class='track-resize'>");$(ac.container_div).hover(function(){if(ac.content_visible){af=true;ad.show()}},function(){af=false;if(!ae){ad.hide()}});ad.hide().bind("dragstart",function(ag,ah){ae=true;ah.original_height=$(ac.content_div).height()}).bind("drag",function(ah,ai){var ag=Math.min(Math.max(ai.original_height+ai.deltaY,ac.min_height_px),ac.max_height_px);$(ac.tiles_div).css("height",ag);ac.visible_height_px=(ac.max_height_px===ag?0:ag);ac.on_resize()}).bind("dragend",function(ag,ah){ac.tile_cache.clear();ae=false;if(!af){ad.hide()}ac.config.values.height=ac.visible_height_px;ac.changed()}).appendTo(ac.container_div)},set_display_modes:function(af,ai){this.display_modes=af;this.mode=(ai?ai:(this.config&&this.config.values.mode?this.config.values.mode:this.display_modes[0]));this.action_icons.mode_icon.attr("title","Set display mode (now: "+this.mode+")");var ad=this,ag={};for(var ae=0,ac=ad.display_modes.length;ae<ac;ae++){var ah=ad.display_modes[ae];ag[ah]=function(aj){return function(){ad.change_mode(aj);ad.icons_div.show();ad.container_div.mouseleave(function(){ad.icons_div.hide()})}}(ah)}make_popupmenu(this.action_icons.mode_icon,ag)},build_action_icons:function(){q.prototype.build_action_icons.call(this,this.action_icons_def);if(this.display_modes!==undefined){this.set_display_modes(this.display_modes)}},hide_contents:function(){this.tiles_div.hide();this.container_div.find(".yaxislabel, .track-resize").hide()},show_contents:function(){this.tiles_div.show();this.container_div.find(".yaxislabel, .track-resize").show();this.request_draw()},get_type:function(){if(this instanceof W){return"LabelTrack"}else{if(this instanceof B){return"ReferenceTrack"}else{if(this instanceof h){return"LineTrack"}else{if(this instanceof T){return"ReadTrack"}else{if(this instanceof Z){return"VariantTrack"}else{if(this instanceof f){return"CompositeTrack"}else{if(this instanceof c){return"FeatureTrack"}}}}}}}return""},init:function(ae){var ad=this;ad.enabled=false;ad.tile_cache.clear();ad.data_manager.clear();ad.tiles_div.css("height","auto");ad.tiles_div.text("").children().remove();ad.container_div.removeClass("nodata error pending");if(!ad.dataset.id){return}var ac=$.Deferred(),af={hda_ldda:ad.dataset.get("hda_ldda"),data_type:this.dataset_check_type,chrom:ad.view.chrom,retry:ae};$.getJSON(this.dataset.url(),af,function(ag){if(!ag||ag==="error"||ag.kind==="error"){ad.container_div.addClass("error");ad.tiles_div.text(n);if(ag.message){ad.tiles_div.append($("<a href='javascript:void(0);'></a>").text("View error").click(function(){show_modal("Trackster Error","<pre>"+ag.message+"</pre>",{Close:hide_modal})}));ad.tiles_div.append($("<span/>").text(" "));ad.tiles_div.append($("<a href='javascript:void(0);'></a>").text("Try again").click(function(){ad.init(true)}))}}else{if(ag==="no converter"){ad.container_div.addClass("error");ad.tiles_div.text(J)}else{if(ag==="no data"||(ag.data!==undefined&&(ag.data===null||ag.data.length===0))){ad.container_div.addClass("nodata");ad.tiles_div.text(E)}else{if(ag==="pending"){ad.container_div.addClass("pending");ad.tiles_div.html(u);setTimeout(function(){ad.init()},ad.data_query_wait)}else{if(ag==="data"||ag.status==="data"){if(ag.valid_chroms){ad.valid_chroms=ag.valid_chroms;ad.update_icons()}ad.tiles_div.text(U);if(ad.view.chrom){ad.tiles_div.text("");ad.tiles_div.css("height",ad.visible_height_px+"px");ad.enabled=true;$.when.apply($,ad.predraw_init()).done(function(){ac.resolve();ad.container_div.removeClass("nodata error pending");ad.request_draw()})}else{ac.resolve()}}}}}}});this.update_icons();return ac},predraw_init:function(){var ac=this;return $.getJSON(ac.dataset.url(),{data_type:"data",stats:true,chrom:ac.view.chrom,low:0,high:ac.view.max_high,hda_ldda:ac.dataset.get("hda_ldda")},function(ad){ac.container_div.addClass("line-track");var af=ad.data;if(af&&af.min&&af.max){var ae=af.min,ag=af.max;ae=Math.floor(Math.min(0,Math.max(ae,af.mean-2*af.sd)));ag=Math.ceil(Math.max(0,Math.min(ag,af.mean+2*af.sd)));ac.config.set_param_default_value("min_value",ae);ac.config.set_param_default_value("max_value",ag);ac.prefs.min_value=ae;ac.prefs.max_value=ag}})},get_drawables:function(){return this}});var N=function(ae,ad,af){g.call(this,ae,ad,af);var ac=this;l(ac.container_div,ac.drag_handle_class,".group",ac);this.filters_manager=new i.FiltersManager(this,("filters" in af?af.filters:null));this.data_manager.set("filters_manager",this.filters_manager);this.filters_available=false;this.tool=("tool" in af&&af.tool?new r(this,af.tool,af.tool_state):null);this.tile_cache=new w.Cache(R);this.left_offset=0;if(this.header_div){this.set_filters_manager(this.filters_manager);if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}}this.tiles_div=$("<div/>").addClass("tiles").appendTo(this.content_div);this.overlay_div=$("<div/>").addClass("overlay").appendTo(this.content_div);if(af.mode){this.change_mode(af.mode)}};p(N.prototype,q.prototype,g.prototype,{action_icons_def:g.prototype.action_icons_def.concat([{name:"show_more_rows_icon",title:"To minimize track height, not all feature rows are displayed. Click to display more rows.",css_class:"exclamation",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.slotters[ac.view.resolution_px_b].max_rows*=2;ac.request_draw({clear_tile_cache:true})},hide:true}]),copy:function(ac){var ad=this.to_dict();p(ad,{data_manager:this.data_manager});var ae=new this.constructor(this.view,ac,ad);ae.change_mode(this.mode);ae.enabled=this.enabled;return ae},set_filters_manager:function(ac){this.filters_manager=ac;this.header_div.after(this.filters_manager.parent_div)},to_dict:function(){return{track_type:this.get_type(),name:this.name,dataset:{id:this.dataset.id,hda_ldda:this.dataset.get("hda_ldda")},prefs:this.prefs,mode:this.mode,filters:this.filters_manager.to_dict(),tool_state:(this.tool?this.tool.state_dict():{})}},set_min_max:function(){var ac=this;return $.getJSON(ac.dataset.url(),{data_type:"data",stats:true,chrom:ac.view.chrom,low:0,high:ac.view.max_high,hda_ldda:ac.dataset.get("hda_ldda")},function(ad){var af=ad.data;if(isNaN(parseFloat(ac.prefs.min_value))||isNaN(parseFloat(ac.prefs.max_value))){var ae=af.min,ag=af.max;ae=Math.floor(Math.min(0,Math.max(ae,af.mean-2*af.sd)));ag=Math.ceil(Math.max(0,Math.min(ag,af.mean+2*af.sd)));ac.prefs.min_value=ae;ac.prefs.max_value=ag}})},change_mode:function(ad){var ac=this;ac.mode=ad;ac.config.values.mode=ad;if(ad==="Auto"){this.data_manager.clear()}ac.request_draw({clear_tile_cache:true});this.action_icons.mode_icon.attr("title","Set display mode (now: "+ac.mode+")");return ac},update_icons:function(){var ac=this;if(ac.filters_available){ac.action_icons.filters_icon.show()}else{ac.action_icons.filters_icon.hide()}if(ac.tool){ac.action_icons.tools_icon.show();ac.action_icons.param_space_viz_icon.show()}else{ac.action_icons.tools_icon.hide();ac.action_icons.param_space_viz_icon.hide()}},_gen_tile_cache_key:function(ad,ac){return ad+"_"+ac},request_draw:function(ac){if(ac&&ac.clear_tile_cache){this.tile_cache.clear()}this.view.request_redraw(ac,this)},before_draw:function(){this.max_height_px=0},_draw:function(ap){if(!this.can_draw()){return}var am=ap&&ap.clear_after,ak=this.view.low,ag=this.view.high,aj=ag-ak,ad=this.view.container.width(),ao=this.view.resolution_px_b,af=this.view.resolution_b_px;if(this.is_overview){ak=this.view.max_low;ag=this.view.max_high;af=(view.max_high-view.max_low)/ad;ao=1/af}this.before_draw();this.tiles_div.children().addClass("remove");var ac=Math.floor(ak/(af*S)),al,ah,ai=[],an=[];while((ac*S*af)<ag){al=this._get_tile_bounds(ac,af);ah=this.draw_helper(al,af,ao,ap);ai.push(ah);$.when(ah).then(function(aq){an.push(aq)});ac+=1}if(!am){this.tiles_div.children(".remove").removeClass("remove").remove()}var ae=this;$.when.apply($,ai).then(function(){ae.tiles_div.children(".remove").remove();an=ab.filter(an,function(aq){return aq!==null});if(an.length!==0){ae.postdraw_actions(an,ad,ao,am)}})},_add_yaxis_label:function(af,ah){var ad=this,ag=(af==="max"?"top":"bottom"),ai=(af==="max"?"max":"min"),ac=(af==="max"?"max_value":"min_value"),ah=ah||function(){ad.request_draw({clear_tile_cache:true})},ae=this.container_div.find(".yaxislabel."+ag);if(ae.length!==0){ae.text(ad.prefs[ac])}else{ae=$("<div/>").text(ad.prefs[ac]).make_text_editable({num_cols:12,on_finish:function(aj){$(".bs-tooltip").remove();ad.config.set_param_value(ac,aj);ah()},help_text:"Set "+ai+" value"}).addClass("yaxislabel "+ag).css("color",this.prefs.label_color);this.container_div.prepend(ae)}},postdraw_actions:function(af,ag,ai,ac){var ae=ab.filter(af,function(aj){return(aj instanceof M)});if(ae.length>0){this.max_height_px=0;var ad=this;ab.each(af,function(aj){if(!(aj instanceof M)){aj.html_elt.remove();ad.draw_helper(aj.region,aj.resolution,ai,{force:true,mode:"Coverage"})}});ad._add_yaxis_label("max")}else{this.container_div.find(".yaxislabel").remove();var ah=ab.find(af,function(aj){return aj.has_icons});if(ah){ab.each(af,function(aj){if(!aj.has_icons){aj.html_elt.css("padding-top",D)}})}}},get_mode:function(ac){return this.mode},update_auto_mode:function(ac){},_get_drawables:function(){return[this]},draw_helper:function(al,af,ao,ap){if(!ap){ap={}}var ad=ap.force,an=!(ap.data_fetch===false),ai=ap.mode||this.mode,ae=this,ag=this._get_drawables(),am=this._gen_tile_cache_key(ao,al),ah=function(aq){return(aq&&"track" in aq)};var aj=(ad?undefined:ae.tile_cache.get_elt(am));if(aj){if(ah(aj)){ae.show_tile(aj,ao)}return aj}if(!an){return null}var ak=function(){var aq=(ab.find(A,function(at){return at===ai})?"Coverage":ai);var ar=ab.map(ag,function(at){return at.data_manager.get_data(al,aq,af,ae.data_url_extra_params)});if(view.reference_track){ar.push(view.reference_track.data_manager.get_data(al,ai,af,view.reference_track.data_url_extra_params))}return ar};var ac=$.Deferred();ae.tile_cache.set_elt(am,ac);$.when.apply($,ak()).then(function(){var aq=ak(),aw=aq,aC;if(view.reference_track){aC=view.reference_track.data_manager.subset_entry(aq.pop(),al)}var ax=[],au=[];ab.each(ag,function(aH,aE){var aG=aH.mode,aF=aw[aE];if(aG==="Auto"){aG=aH.get_mode(aF);aH.update_auto_mode(aG)}ax.push(aG);au.push(aH.get_canvas_height(aF,aG,ao,ar))});var av=ae.view.canvas_manager.new_canvas(),ay=al.get("start"),aD=al.get("end"),at=0,ar=Math.ceil((aD-ay)*ao)+ae.left_offset,aA=ab.max(au),az;av.width=ar;av.height=(ap.height||aA);var aB=av.getContext("2d");aB.translate(ae.left_offset,0);if(ag.length>1){aB.globalAlpha=0.5;aB.globalCompositeOperation="source-over"}ab.each(ag,function(aF,aE){az=aF.draw_tile(aw[aE],aB,ax[aE],af,al,ao,aC)});if(az!==undefined){ae.tile_cache.set_elt(am,az);ae.show_tile(az,ao)}ac.resolve(az)});return ac},get_canvas_height:function(ac,ae,af,ad){return this.visible_height_px},_draw_line_track_tile:function(ac,ae,ai,ag,ah,aj){var af=ae.canvas,ad=new L.LinePainter(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai);ad.draw(ae,af.width,af.height,aj);return new M(this,ah,ag,af,ac.data)},draw_tile:function(ac,ad,ah,af,ag,ai,ae){console.log("Warning: TiledTrack.draw_tile() not implemented.")},show_tile:function(ae,ah){var ad=this,ac=ae.html_elt;ae.predisplay_actions();var ag=(ae.low-(this.is_overview?this.view.max_low:this.view.low))*ah;if(this.left_offset){ag-=this.left_offset}ac.css({position:"absolute",top:0,left:ag});if(ac.hasClass("remove")){ac.removeClass("remove")}else{this.tiles_div.append(ac)}ae.html_elt.height("auto");this.max_height_px=Math.max(this.max_height_px,ae.html_elt.height());ae.html_elt.parent().children().css("height",this.max_height_px+"px");var af=this.max_height_px;if(this.visible_height_px!==0){af=Math.min(this.max_height_px,this.visible_height_px)}this.tiles_div.css("height",af+"px")},_get_tile_bounds:function(ac,ad){var af=Math.floor(ac*S*ad),ag=Math.ceil(S*ad),ae=(af+ag<=this.view.max_high?af+ag:this.view.max_high);return new w.GenomeRegion({chrom:this.view.chrom,start:af,end:ae})},tool_region_and_parameters_str:function(ae){var ac=this,ad=(ae!==undefined?ae.toString():"all");return" - region=["+ad+"], parameters=["+ac.tool.get_param_values().join(", ")+"]"},data_and_mode_compatible:function(ac,ad){if(ad==="Auto"){return true}else{if(ad==="Coverage"){return ac.dataset_type==="bigwig"}else{if(ac.extra_info==="no_detail"){return false}else{return true}}}},can_subset:function(ac){if(ac.dataset_type==="bigwig"||ac.message||ac.extra_info==="no_detail"){return false}return true},init_for_tool_data:function(){this.data_manager.set("data_type","raw_data");this.data_query_wait=1000;this.dataset_check_type="state";this.normal_postdraw_actions=this.postdraw_actions;this.postdraw_actions=function(ae,af,ah,ac){var ad=this;ad.normal_postdraw_actions(ae,af,ah,ac);ad.dataset_check_type="converted_datasets_state";ad.data_query_wait=K;var ag=new k.ServerStateDeferred({url:ad.dataset_state_url,url_params:{dataset_id:ad.dataset.id,hda_ldda:ad.dataset.get("hda_ldda")},interval:ad.data_query_wait,success_fn:function(ai){return ai!=="pending"}});$.when(ag.go()).then(function(){ad.data_manager.set("data_type","data")});ad.postdraw_actions=ad.normal_postdraw_actions}}});var W=function(ad,ac){var ae={resize:false};g.call(this,ad,ac,ae);this.container_div.addClass("label-track")};p(W.prototype,g.prototype,{build_header_div:function(){},init:function(){this.enabled=true},predraw_init:function(){},_draw:function(ag){var ae=this.view,af=ae.high-ae.low,aj=Math.floor(Math.pow(10,Math.floor(Math.log(af)/Math.log(10)))),ac=Math.floor(ae.low/aj)*aj,ah=this.view.container.width(),ad=$("<div style='position: relative; height: 1.3em;'></div>");while(ac<ae.high){var ai=(ac-ae.low)/af*ah;ad.append($("<div class='label'>"+commatize(ac)+"</div>").css({position:"absolute",left:ai-1}));ac+=aj}this.content_div.children(":first").remove();this.content_div.append(ad)}});var f=function(ad,ac,ag){this.display_modes=A;N.call(this,ad,ac,ag);this.drawables=[];if("drawables" in ag){var af;for(var ae=0;ae<ag.drawables.length;ae++){af=ag.drawables[ae];this.drawables[ae]=o(af,ad,null);if(af.left_offset>this.left_offset){this.left_offset=af.left_offset}}this.enabled=true}ab.each(this.drawables,function(ah){if(ah instanceof c||ah instanceof T){ah.change_mode("Coverage")}});this.update_icons();this.obj_type="CompositeTrack"};p(f.prototype,N.prototype,{action_icons_def:[{name:"composite_icon",title:"Show individual tracks",css_class:"layers-stack",on_click_fn:function(ac){$(".bs-tooltip").remove();ac.show_group()}}].concat(N.prototype.action_icons_def),to_dict:y.prototype.to_dict,add_drawable:y.prototype.add_drawable,unpack_drawables:y.prototype.unpack_drawables,change_mode:function(ac){N.prototype.change_mode.call(this,ac);for(var ad=0;ad<this.drawables.length;ad++){this.drawables[ad].change_mode(ac)}},init:function(){var ae=[];for(var ad=0;ad<this.drawables.length;ad++){ae.push(this.drawables[ad].init())}var ac=this;$.when.apply($,ae).then(function(){ac.enabled=true;ac.request_draw()})},update_icons:function(){this.action_icons.filters_icon.hide();this.action_icons.tools_icon.hide();this.action_icons.param_space_viz_icon.hide()},can_draw:q.prototype.can_draw,_get_drawables:function(){return this.drawables},show_group:function(){var af=new Q(this.view,this.container,{name:this.name}),ac;for(var ae=0;ae<this.drawables.length;ae++){ac=this.drawables[ae];ac.update_icons();af.add_drawable(ac);ac.container=af;af.content_div.append(ac.container_div)}var ad=this.container.replace_drawable(this,af,true);af.request_draw({clear_tile_cache:true})},before_draw:function(){N.prototype.before_draw.call(this);var ad=ab.min(ab.map(this.drawables,function(ae){return ae.prefs.min_value})),ac=ab.max(ab.map(this.drawables,function(ae){return ae.prefs.max_value}));this.prefs.min_value=ad;this.prefs.max_value=ac;ab.each(this.drawables,function(ae){ae.prefs.min_value=ad;ae.prefs.max_value=ac})},update_all_min_max:function(){var ac=this;ab.each(this.drawables,function(ad){ad.prefs.min_value=ac.prefs.min_value;ad.prefs.max_value=ac.prefs.max_value});this.request_draw({clear_tile_cache:true})},postdraw_actions:function(ai,ac,al,ah){N.prototype.postdraw_actions.call(this,ai,ac,al,ah);var ag=-1;for(var ae=0;ae<ai.length;ae++){var aj=ai[ae].html_elt.find("canvas").height();if(aj>ag){ag=aj}}for(var ae=0;ae<ai.length;ae++){var af=ai[ae];if(af.html_elt.find("canvas").height()!==ag){this.draw_helper(af.region,af.resolution,al,{force:true,height:ag});af.html_elt.remove()}}var ad=this,ak=function(){ad.update_all_min_max()};this._add_yaxis_label("min",ak);this._add_yaxis_label("max",ak)}});var B=function(ac){N.call(this,ac,{content_div:ac.top_labeltrack},{resize:false});ac.reference_track=this;this.left_offset=200;this.visible_height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=config.root+"api/genomes//"+this.view.dbkey;this.data_url_extra_params={reference:true};this.data_manager=new w.GenomeReferenceDataManager({data_url:this.data_url,can_subset:this.can_subset});this.hide_contents()};p(B.prototype,q.prototype,N.prototype,{build_header_div:function(){},init:function(){this.data_manager.clear();this.enabled=true},predraw_init:function(){},can_draw:q.prototype.can_draw,draw_helper:function(ae,ad,af,ac){if(af>this.view.canvas_manager.char_width_px){this.tiles_div.show();return N.prototype.draw_helper.call(this,ae,ad,af,ac)}else{this.tiles_div.hide();return null}},can_subset:function(ac){return true},draw_tile:function(af,al,ag,ad,ai,am){var ae=this.data_manager.subset_entry(af,ai),ak=ae.data;var ac=al.canvas;al.font=al.canvas.manager.default_font;al.textAlign="center";for(var ah=0,aj=ak.length;ah<aj;ah++){al.fillStyle=this.view.get_base_color(ak[ah]);al.fillText(ak[ah],Math.floor(ah*am),10)}return new b(this,ai,ad,ac,ae)}});var h=function(ae,ad,af){var ac=this;this.display_modes=A;this.mode="Histogram";N.call(this,ae,ad,af);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"color",label:"Color",type:"color",default_value:k.get_random_color()},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:32,hidden:true}],saved_values:af.prefs,onchange:function(){ac.set_name(ac.prefs.name);ac.request_redraw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height};p(h.prototype,q.prototype,N.prototype,{before_draw:function(){},draw_tile:function(ac,ad,ag,ae,af,ah){return this._draw_line_track_tile(ac,ad,ag,ae,af,ah)},can_subset:function(ac){return(ac.data[1][0]-ac.data[0][0]===1)},postdraw_actions:function(ad,ae,af,ac){this._add_yaxis_label("max");this._add_yaxis_label("min")}});var s=function(ae,ad,af){var ac=this;this.display_modes=["Heatmap"];this.mode="Heatmap";N.call(this,ae,ad,af);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"pos_color",label:"Positive Color",type:"color",default_value:"#FF8C00"},{key:"neg_color",label:"Negative Color",type:"color",default_value:"#4169E1"},{key:"min_value",label:"Min Value",type:"float",default_value:-1},{key:"max_value",label:"Max Value",type:"float",default_value:1},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:500,hidden:true}],saved_values:af.prefs,onchange:function(){ac.set_name(ac.prefs.name);this.request_redraw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height};p(s.prototype,q.prototype,N.prototype,{draw_tile:function(ac,ae,ai,ag,ah,aj){var af=ae.canvas,ad=new L.DiagonalHeatmapPainter(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai);ad.draw(ae,af.width,af.height,aj);return new b(this,ah,ag,af,ac.data)}});var c=function(af,ae,ah){var ad=this;this.display_modes=["Auto","Coverage","Dense","Squish","Pack"];N.call(this,af,ae,ah);var ag=k.get_random_color(),ac=k.get_random_color([ag,"#FFFFFF"]);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"block_color",label:"Block color",type:"color",default_value:ag},{key:"reverse_strand_color",label:"Antisense strand color",type:"color",default_value:ac},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true,help:"Show the number of items in each bin when drawing summary histogram"},{key:"min_value",label:"Histogram minimum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"max_value",label:"Histogram maximum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"connector_style",label:"Connector style",type:"select",default_value:"fishbones",options:[{label:"Line with arrows",value:"fishbone"},{label:"Arcs",value:"arcs"}]},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.visible_height_px,hidden:true}],saved_values:ah.prefs,onchange:function(){ad.set_name(ad.prefs.name);ad.set_painter_from_config();ad.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.visible_height_px=this.config.values.height;this.container_div.addClass("feature-track");this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.slotters={};this.start_end_dct={};this.left_offset=200;this.set_painter_from_config()};p(c.prototype,q.prototype,N.prototype,{set_painter_from_config:function(){if(this.config.values.connector_style==="arcs"){this.painter=L.ArcLinkedFeaturePainter}else{this.painter=L.LinkedFeaturePainter}},postdraw_actions:function(am,ae,an,al){N.prototype.postdraw_actions.call(this,am,ae,an,al);var ag=this,ah;if(ag.filters_manager){var af=ag.filters_manager.filters;for(var aj=0;aj<af.length;aj++){af[aj].update_ui_elt()}var ai=false,ak,ad;for(ah=0;ah<am.length;ah++){if(am[ah].data.length){ak=am[ah].data[0];for(var aj=0;aj<af.length;aj++){ad=af[aj];if(ad.applies_to(ak)&&ad.min!==ad.max){ai=true;break}}}}if(ag.filters_available!==ai){ag.filters_available=ai;if(!ag.filters_available){ag.filters_manager.hide()}ag.update_icons()}}if(am[0] instanceof P){var ac=true;for(ah=0;ah<am.length;ah++){if(!am[ah].all_slotted){ac=false;break}}if(!ac){this.action_icons.show_more_rows_icon.show()}else{this.action_icons.show_more_rows_icon.hide()}}else{this.action_icons.show_more_rows_icon.hide()}},update_auto_mode:function(ac){var ac;if(this.mode==="Auto"){if(ac==="no_detail"){ac="feature spans"}this.action_icons.mode_icon.attr("title","Set display mode (now: Auto/"+ac+")")}},incremental_slots:function(ag,ac,af){var ad=this.view.canvas_manager.dummy_context,ae=this.slotters[ag];if(!ae||(ae.mode!==af)){ae=new (t.FeatureSlotter)(ag,af,z,function(ah){return ad.measureText(ah)});this.slotters[ag]=ae}return ae.slot_features(ac)},get_mode:function(ac){if(ac.extra_info==="no_detail"||this.is_overview){mode="no_detail"}else{if(this.view.high-this.view.low>I){mode="Squish"}else{mode="Pack"}}return mode},get_canvas_height:function(ac,ag,ah,ad){if(ag==="Coverage"||ac.dataset_type==="bigwig"){return this.summary_draw_height}else{var af=this.incremental_slots(ah,ac.data,ag);var ae=new (this.painter)(null,null,null,this.prefs,ag);return Math.max(aa,ae.get_required_height(af,ad))}},draw_tile:function(am,aq,ao,ar,af,aj,ae){var ap=this,ad=aq.canvas,ay=af.get("start"),ac=af.get("end"),ag=this.left_offset;if(am.dataset_type==="bigwig"){return this._draw_line_track_tile(am,aq,ao,ar,af,aj)}var ai=[],an=this.slotters[aj].slots;all_slotted=true;if(am.data){var ak=this.filters_manager.filters;for(var at=0,av=am.data.length;at<av;at++){var ah=am.data[at];var au=false;var al;for(var ax=0,aC=ak.length;ax<aC;ax++){al=ak[ax];al.update_attrs(ah);if(!al.keep(ah)){au=true;break}}if(!au){ai.push(ah);if(!(ah[0] in an)){all_slotted=false}}}}var aB=(this.filters_manager.alpha_filter?new C(this.filters_manager.alpha_filter):null),az=(this.filters_manager.height_filter?new C(this.filters_manager.height_filter):null),aA=new (this.painter)(ai,ay,ac,this.prefs,ao,aB,az,ae,function(aD){return ap.view.get_base_color(aD)});var aw=null;aq.fillStyle=this.prefs.block_color;aq.font=aq.canvas.manager.default_font;aq.textAlign="right";if(am.data){aw=aA.draw(aq,ad.width,ad.height,aj,an);aw.translation=-ag}return new P(ap,af,ar,ad,am.data,aj,ao,am.message,all_slotted,aw)}});var Z=function(ad,ac,ae){this.display_modes=["Auto","Coverage","Dense","Squish","Pack"];N.call(this,ad,ac,ae);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"color",label:"Histogram color",type:"color",default_value:k.get_random_color()},{key:"show_sample_data",label:"Show sample data",type:"bool",default_value:true},{key:"show_labels",label:"Show summary and sample labels",type:"bool",default_value:true},{key:"summary_height",label:"Locus summary height",type:"float",default_value:20},{key:"mode",type:"string",default_value:this.mode,hidden:true}],saved_values:ae.prefs,onchange:function(){this.track.set_name(this.track.prefs.name);this.track.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.painter=L.VariantPainter;this.summary_draw_height=30;this.left_offset=30};p(Z.prototype,q.prototype,N.prototype,{draw_tile:function(ac,af,ai,ag,ah,aj){if(ac.dataset_type==="bigwig"){return this._draw_line_track_tile(ac,af,"Histogram",ag,ah,aj)}else{var ae=this.view,ad=new (this.painter)(ac.data,ah.get("start"),ah.get("end"),this.prefs,ai,function(ak){return ae.get_base_color(ak)});ad.draw(af,af.canvas.width,af.canvas.height,aj);return new b(this,ah,ag,af.canvas,ac.data)}},get_canvas_height:function(ac,ag,ah,ae){if(ac.dataset_type==="bigwig"){return this.summary_draw_height}else{var af=new (this.painter)(null,null,null,this.prefs,ag);var ad=(this.dataset.get_metadata("sample_names")?this.dataset.get_metadata("sample_names").length:0);if(ad===0&&ac.data.length!==0){ad=ac.data[0][7].match(/,/g);if(ad===null){ad=1}else{ad=ad.length+1}}return af.get_required_height(ad)}},predraw_init:function(){var ac=[g.prototype.predraw_init.call(this)];if(!this.dataset.get_metadata("sample_names")){ac.push(this.dataset.fetch())}return ac},postdraw_actions:function(af,ag,ai,ad){N.prototype.postdraw_actions.call(this,af,ag,ai,ad);var ae=ab.filter(af,function(aj){return(aj instanceof M)});if(ae.length===0&&this.prefs.show_labels){var ac;if(this.container_div.find(".yaxislabel.variant").length===0){ac=this.prefs.summary_height/2;this.tiles_div.prepend($("<div/>").text("Summary").addClass("yaxislabel variant top").css({"font-size":ac+"px",top:(this.prefs.summary_height-ac)/2+"px"}));if(this.prefs.show_sample_data){var ah=this.dataset.get("metadata").get("sample_names").join("<br/>");this.tiles_div.prepend($("<div/>").html(ah).addClass("yaxislabel variant top sample").css({top:this.prefs.summary_height+2,}))}}ac=(this.mode==="Squish"?5:10)+"px";$(this.tiles_div).find(".sample").css({"font-size":ac,"line-height":ac});$(this.tiles_div).find(".yaxislabel").css("color",this.prefs.label_color)}else{this.container_div.find(".yaxislabel.variant").remove()}}});var T=function(ae,ad,ag){c.call(this,ae,ad,ag);var af=k.get_random_color(),ac=k.get_random_color([af,"#ffffff"]);this.config=new F({track:this,params:[{key:"name",label:"Name",type:"text",default_value:this.name},{key:"block_color",label:"Block and sense strand color",type:"color",default_value:af},{key:"reverse_strand_color",label:"Antisense strand color",type:"color",default_value:ac},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"min_value",label:"Histogram minimum",type:"float",default_value:null,help:"clear value to set automatically"},{key:"max_value",label:"Histogram maximum",type:"float",default_value:null,help:"clear value to set automatically"}],saved_values:ag.prefs,onchange:function(){this.track.set_name(this.track.prefs.name);this.track.request_draw({clear_tile_cache:true})}});this.prefs=this.config.values;this.painter=(ae.reference_track?L.RefBasedReadPainter:L.ReadPainter);this.update_icons()};p(T.prototype,q.prototype,N.prototype,c.prototype);var d={CompositeTrack:f,DrawableGroup:Q,DiagonalHeatmapTrack:s,FeatureTrack:c,LineTrack:h,ReadTrack:T,VariantTrack:Z,VcfTrack:Z};var o=function(ae,ad,ac){if("copy" in ae){return ae.copy(ac)}else{var af=ae.obj_type;if(!af){af=ae.track_type}return new d[af](ad,ac,ae)}};return{TracksterView:Y,DrawableGroup:Q,LineTrack:h,FeatureTrack:c,DiagonalHeatmapTrack:s,ReadTrack:T,VariantTrack:Z,CompositeTrack:f,object_from_template:o}});
\ No newline at end of file
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a static/scripts/viz/trackster.js
--- a/static/scripts/viz/trackster.js
+++ b/static/scripts/viz/trackster.js
@@ -110,17 +110,23 @@
// ajax
$.ajax(
{
- url: config.app.new_browser,
+ url: config.root + "api/genomes?chrom_info=True",
data: {},
error: function() { alert( "Couldn't create new browser." ); },
- success: function(form_html)
+ success: function(response)
{
- show_modal("New Visualization", form_html,
+ // show dialog
+ show_modal("New Visualization", self.template_view_new(response),
{
"Cancel": function() { window.location = config.root + "visualization/list"; },
"Create": function() { self.create_browser($("#new-title").val(), $("#new-dbkey").val()); }
});
+ // select default
+ if (config.app.default_dbkey)
+ $("#new-dbkey option[value='" + config.default_dbkey +"']").attr("selected", true);
+
+ // change focus
$("#new-title").focus();
$("select[name='dbkey']").combobox(
{
@@ -134,6 +140,42 @@
});
},
+ // new browser form
+ template_view_new: function(response)
+ {
+ // start template
+ var html = '<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;">' +
+ '<div class="form-row">' +
+ '<label for="new-title">Browser name:</label>' +
+ '<div class="form-row-input">' +
+ '<input type="text" name="title" id="new-title" value="Unnamed"></input>' +
+ '</div>' +
+ '<div style="clear: both;"></div>' +
+ '</div>' +
+ '<div class="form-row">' +
+ '<label for="new-dbkey">Reference genome build (dbkey): </label>' +
+ '<div class="form-row-input">' +
+ '<select name="dbkey" id="new-dbkey">';
+
+ // add dbkeys
+ for (var key in response)
+ html += '<option value="' + response[key][1] + '">' + response[key][0] + '</option>';
+
+ // close selection/finalize template
+ html += '</select>' +
+ '</div>' +
+ '<div style="clear: both;"></div>' +
+ '</div>' +
+ '<div class="form-row">' +
+ 'Is the build not listed here? ' +
+ '<a href="' + config.root + 'user/dbkeys?use_panels=True">Add a Custom Build</a>' +
+ '</div>' +
+ '</form>';
+
+ // return
+ return html;
+ },
+
// create
create_browser : function(name, dbkey)
{
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -951,7 +951,7 @@
// Introduction div shown when there are no tracks.
this.intro_div = $("<div/>").addClass("intro").appendTo(this.viewport_container).hide();
var add_tracks_button = $("<div/>").text("Add Datasets to Visualization").addClass("action-button").appendTo(this.intro_div).click(function () {
- visualization.select_datasets(config.root + "/visualization/list_current_history_datasets", config.root + "/api/datasets", { 'f-dbkey': view.dbkey }, function(tracks) {
+ visualization.select_datasets(config.root + "visualization/list_current_history_datasets", config.root + "api/datasets", { 'f-dbkey': view.dbkey }, function(tracks) {
_.each(tracks, function(track) {
view.add_drawable( object_from_template(track, view, view) );
});
diff -r f3a985005267a8c2022da3c0c8d9af496f8e5901 -r f06d793860c40c59200c1441374ca4993854e94a templates/webapps/galaxy/tracks/new_browser.mako
--- a/templates/webapps/galaxy/tracks/new_browser.mako
+++ /dev/null
@@ -1,29 +0,0 @@
-<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;">
- <div class="form-row">
- <label for="new-title">Browser name:</label>
- <div class="form-row-input">
- <input type="text" name="title" id="new-title" value="Unnamed"></input>
- </div>
- <div style="clear: both;"></div>
- </div>
- <div class="form-row">
- <label for="new-dbkey">Reference genome build (dbkey): </label>
- <div class="form-row-input">
- <select name="dbkey" id="new-dbkey">
- %for dbkey in dbkeys:
- <option value="${dbkey[1]}">${dbkey[0]}</option>
- %endfor
- </select>
- </div>
- <div style="clear: both;"></div>
- </div>
- <div class="form-row">
- Is the build not listed here?
- <a href="${h.url_for( controller='user', action='dbkeys', use_panels=True )}">Add a Custom Build</a>
- </div>
- %if default_dbkey is not None:
- <script type="text/javascript">
- $("#new-dbkey option[value='${default_dbkey}']").attr("selected", true);
- </script>
- %endif
-</form>
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.
1
0
commit/galaxy-central: carlfeberhard: Pull request #168 from Kyle Ellrott: add graph content datatypes SIF, XGMML, RDF
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f3a985005267/
Changeset: f3a985005267
User: carlfeberhard
Date: 2013-08-08 00:07:46
Summary: Pull request #168 from Kyle Ellrott: add graph content datatypes SIF, XGMML, RDF
Affected #: 3 files
diff -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 -r f3a985005267a8c2022da3c0c8d9af496f8e5901 datatypes_conf.xml.sample
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -245,6 +245,10 @@
<datatype extension="snpmatrix" type="galaxy.datatypes.genetics:SNPMatrix" display_in_upload="true"/><datatype extension="xls" type="galaxy.datatypes.tabular:Tabular"/><!-- End RGenetics Datatypes -->
+ <!-- graph datatypes -->
+ <datatype extension="xgmml" type="galaxy.datatypes.graph:Xgmml" display_in_upload="true"/>
+ <datatype extension="sif" type="galaxy.datatypes.graph:Sif" display_in_upload="true"/>
+ <datatype extension="rdf" type="galaxy.datatypes.graph:Rdf" display_in_upload="true"/></registration><sniffers><!--
@@ -281,6 +285,9 @@
<sniffer type="galaxy.datatypes.tabular:Sam"/><sniffer type="galaxy.datatypes.data:Newick"/><sniffer type="galaxy.datatypes.data:Nexus"/>
+ <sniffer type="galaxy.datatypes.graph:Xgmml"/>
+ <sniffer type="galaxy.datatypes.graph:Sif"/>
+ <sniffer type="galaxy.datatypes.graph:Rdf"/><sniffer type="galaxy.datatypes.images:Jpg"/><sniffer type="galaxy.datatypes.images:Png"/><sniffer type="galaxy.datatypes.images:Tiff"/>
diff -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 -r f3a985005267a8c2022da3c0c8d9af496f8e5901 lib/galaxy/datatypes/graph.py
--- /dev/null
+++ b/lib/galaxy/datatypes/graph.py
@@ -0,0 +1,110 @@
+"""
+Graph content classes.
+"""
+
+import data, tabular, xml
+
+import logging
+log = logging.getLogger( __name__ )
+
+
+class Xgmml( xml.GenericXml ):
+ """
+ XGMML graph format
+ (http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats)
+ """
+ file_ext = "xgmml"
+
+ def set_peek( self, dataset, is_multi_byte=False ):
+ """
+ Set the peek and blurb text
+ """
+ if not dataset.dataset.purged:
+ dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
+ dataset.blurb = 'XGMML data'
+ else:
+ dataset.peek = 'file does not exist'
+ dataset.blurb = 'file purged from disk'
+
+ def sniff( self, filename ):
+ """
+ Determines whether the file is XML or not, should probably actually check if it is a real xgmml file....
+ """
+ line = ''
+ with open( filename ) as handle:
+ line = handle.readline()
+
+ #TODO - Is there a more robust way to do this?
+ return line.startswith( '<?xml ' )
+
+ @staticmethod
+ def merge( split_files, output_file ):
+ """
+ Merging multiple XML files is non-trivial and must be done in subclasses.
+ """
+ if len( split_files ) > 1:
+ raise NotImplementedError( "Merging multiple XML files is non-trivial "
+ + "and must be implemented for each XML type" )
+ #For one file only, use base class method (move/copy)
+ data.Text.merge( split_files, output_file )
+
+
+class Sif( tabular.Tabular ):
+ """
+ SIF graph format
+ (http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats)
+
+ First column: node id
+ Second column: relationship type
+ Third to Nth column: target ids for link
+ """
+ file_ext = "sif"
+
+ def set_peek( self, dataset, is_multi_byte=False ):
+ """
+ Set the peek and blurb text
+ """
+ if not dataset.dataset.purged:
+ dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
+ dataset.blurb = 'SIF data'
+ else:
+ dataset.peek = 'file does not exist'
+ dataset.blurb = 'file purged from disk'
+
+ def sniff( self, filename ):
+ """
+ Determines whether the file is SIF
+ """
+ print '---------------------------------------- sniffing Siffing'
+ line = ''
+ with open( filename ) as infile:
+ correct = True
+ for line in infile:
+ if not line.strip():
+ continue
+ tlen = len( line.split( "\t" ) )
+ # may contain 1 or >= 3 columns
+ if tlen == 2:
+ correct = False
+ return correct
+
+ @staticmethod
+ def merge( split_files, output_file ):
+ data.Text.merge( split_files, output_file )
+
+
+#TODO: we might want to look at rdflib or a similar, larger lib/egg
+class Rdf( xml.GenericXml ):
+ """
+ Resource Description Framework format (http://www.w3.org/RDF/)
+ """
+ file_ext = "rdf"
+
+ def set_peek( self, dataset, is_multi_byte=False ):
+ """Set the peek and blurb text"""
+ if not dataset.dataset.purged:
+ dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
+ dataset.blurb = 'RDF data'
+ else:
+ dataset.peek = 'file does not exist'
+ dataset.blurb = 'file purged from disk'
diff -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 -r f3a985005267a8c2022da3c0c8d9af496f8e5901 lib/galaxy/datatypes/registry.py
--- a/lib/galaxy/datatypes/registry.py
+++ b/lib/galaxy/datatypes/registry.py
@@ -2,7 +2,7 @@
Provides mapping between extensions and datatypes, mime-types, etc.
"""
import os, sys, tempfile, threading, logging, imp
-import data, tabular, interval, images, sequence, qualityscore, genetics, xml, coverage, tracks, chrominfo, binary, assembly, ngsindex
+import data, tabular, interval, images, sequence, qualityscore, genetics, xml, coverage, tracks, chrominfo, binary, assembly, ngsindex, graph
import galaxy.util
from galaxy.util.odict import odict
from display_applications.application import DisplayApplication
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.
1
0
commit/galaxy-central: jgoecks: Remove JSON2 library because it is no longer needed: all modern web browsers natively support JSON.stringify and JSON.parse
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/31774ed13ae2/
Changeset: 31774ed13ae2
User: jgoecks
Date: 2013-08-07 22:02:23
Summary: Remove JSON2 library because it is no longer needed: all modern web browsers natively support JSON.stringify and JSON.parse
Affected #: 6 files
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 static/scripts/libs/json2.js
--- a/static/scripts/libs/json2.js
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- http://www.JSON.org/json2.js
- 2011-02-23
-
- Public Domain.
-
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
- See http://www.JSON.org/js.html
-
-
- This code should be minified before deployment.
- See http://javascript.crockford.com/jsmin.html
-
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
- NOT CONTROL.
-
-
- This file creates a global JSON object containing two methods: stringify
- and parse.
-
- JSON.stringify(value, replacer, space)
- value any JavaScript value, usually an object or array.
-
- replacer an optional parameter that determines how object
- values are stringified for objects. It can be a
- function or an array of strings.
-
- space an optional parameter that specifies the indentation
- of nested structures. If it is omitted, the text will
- be packed without extra whitespace. If it is a number,
- it will specify the number of spaces to indent at each
- level. If it is a string (such as '\t' or ' '),
- it contains the characters used to indent at each level.
-
- This method produces a JSON text from a JavaScript value.
-
- When an object value is found, if the object contains a toJSON
- method, its toJSON method will be called and the result will be
- stringified. A toJSON method does not serialize: it returns the
- value represented by the name/value pair that should be serialized,
- or undefined if nothing should be serialized. The toJSON method
- will be passed the key associated with the value, and this will be
- bound to the value
-
- For example, this would serialize Dates as ISO strings.
-
- Date.prototype.toJSON = function (key) {
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- return this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z';
- };
-
- You can provide an optional replacer method. It will be passed the
- key and value of each member, with this bound to the containing
- object. The value that is returned from your method will be
- serialized. If your method returns undefined, then the member will
- be excluded from the serialization.
-
- If the replacer parameter is an array of strings, then it will be
- used to select the members to be serialized. It filters the results
- such that only members with keys listed in the replacer array are
- stringified.
-
- Values that do not have JSON representations, such as undefined or
- functions, will not be serialized. Such values in objects will be
- dropped; in arrays they will be replaced with null. You can use
- a replacer function to replace those with JSON values.
- JSON.stringify(undefined) returns undefined.
-
- The optional space parameter produces a stringification of the
- value that is filled with line breaks and indentation to make it
- easier to read.
-
- If the space parameter is a non-empty string, then that string will
- be used for indentation. If the space parameter is a number, then
- the indentation will be that many spaces.
-
- Example:
-
- text = JSON.stringify(['e', {pluribus: 'unum'}]);
- // text is '["e",{"pluribus":"unum"}]'
-
-
- text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
- // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
-
- text = JSON.stringify([new Date()], function (key, value) {
- return this[key] instanceof Date ?
- 'Date(' + this[key] + ')' : value;
- });
- // text is '["Date(---current time---)"]'
-
-
- JSON.parse(text, reviver)
- This method parses a JSON text to produce an object or array.
- It can throw a SyntaxError exception.
-
- The optional reviver parameter is a function that can filter and
- transform the results. It receives each of the keys and values,
- and its return value is used instead of the original value.
- If it returns what it received, then the structure is not modified.
- If it returns undefined then the member is deleted.
-
- Example:
-
- // Parse the text. Values that look like ISO date strings will
- // be converted to Date objects.
-
- myData = JSON.parse(text, function (key, value) {
- var a;
- if (typeof value === 'string') {
- a =
-/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
- if (a) {
- return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
- +a[5], +a[6]));
- }
- }
- return value;
- });
-
- myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
- var d;
- if (typeof value === 'string' &&
- value.slice(0, 5) === 'Date(' &&
- value.slice(-1) === ')') {
- d = new Date(value.slice(5, -1));
- if (d) {
- return d;
- }
- }
- return value;
- });
-
-
- This is a reference implementation. You are free to copy, modify, or
- redistribute.
-*/
-
-/*jslint evil: true, strict: false, regexp: false */
-
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
- call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
- getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
- lastIndex, length, parse, prototype, push, replace, slice, stringify,
- test, toJSON, toString, valueOf
-*/
-
-
-// Create a JSON object only if one does not already exist. We create the
-// methods in a closure to avoid creating global variables.
-
-var JSON;
-if (!JSON) {
- JSON = {};
-}
-
-(function () {
- "use strict";
-
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- if (typeof Date.prototype.toJSON !== 'function') {
-
- Date.prototype.toJSON = function (key) {
-
- return isFinite(this.valueOf()) ?
- this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z' : null;
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
- }
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
-
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can safely slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe escape
-// sequences.
-
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
- }
-
-
- function str(key, holder) {
-
-// Produce a string from holder[key].
-
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
-// If the value has a toJSON method, call it to obtain a replacement value.
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
-// If we were called with a replacer function, then call the replacer to
-// obtain a replacement value.
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
-// What happens next depends on the value's type.
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
-
-// JSON numbers must be finite. Encode non-finite numbers as null.
-
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
-
-// If the value is a boolean or null, convert it to a string. Note:
-// typeof null does not produce 'null'. The case is included here in
-// the remote chance that this gets fixed someday.
-
- return String(value);
-
-// If the type is 'object', we might be dealing with an object or an array or
-// null.
-
- case 'object':
-
-// Due to a specification blunder in ECMAScript, typeof null is 'object',
-// so watch out for that case.
-
- if (!value) {
- return 'null';
- }
-
-// Make an array to hold the partial results of stringifying this object value.
-
- gap += indent;
- partial = [];
-
-// Is the value an array?
-
- if (Object.prototype.toString.apply(value) === '[object Array]') {
-
-// The value is an array. Stringify every element. Use null as a placeholder
-// for non-JSON values.
-
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
-// Join all of the elements together, separated with commas, and wrap them in
-// brackets.
-
- v = partial.length === 0 ? '[]' : gap ?
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
-// If the replacer is an array, use it to select the members to be stringified.
-
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- if (typeof rep[i] === 'string') {
- k = rep[i];
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
-
-// Otherwise, iterate through all of the keys in the object.
-
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
-// Join all of the member texts together, separated with commas,
-// and wrap them in braces.
-
- v = partial.length === 0 ? '{}' : gap ?
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
- '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
-
-// If the JSON object does not yet have a stringify method, give it one.
-
- if (typeof JSON.stringify !== 'function') {
- JSON.stringify = function (value, replacer, space) {
-
-// The stringify method takes a value and an optional replacer, and an optional
-// space parameter, and returns a JSON text. The replacer can be a function
-// that can replace values, or an array of strings that will select the keys.
-// A default replacer method can be provided. Use of the space parameter can
-// produce text that is more easily readable.
-
- var i;
- gap = '';
- indent = '';
-
-// If the space parameter is a number, make an indent string containing that
-// many spaces.
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
-
-// If the space parameter is a string, it will be used as the indent string.
-
- } else if (typeof space === 'string') {
- indent = space;
- }
-
-// If there is a replacer, it must be a function or an array.
-// Otherwise, throw an error.
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
-// Make a fake root object containing our value under the key of ''.
-// Return the result of stringifying the value.
-
- return str('', {'': value});
- };
- }
-
-
-// If the JSON object does not yet have a parse method, give it one.
-
- if (typeof JSON.parse !== 'function') {
- JSON.parse = function (text, reviver) {
-
-// The parse method takes a text and an optional reviver function, and returns
-// a JavaScript value if the text is a valid JSON text.
-
- var j;
-
- function walk(holder, key) {
-
-// The walk method is used to recursively walk the resulting structure so
-// that modifications can be made.
-
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }
-
-
-// Parsing happens in four stages. In the first stage, we replace certain
-// Unicode characters with escape sequences. JavaScript handles many characters
-// incorrectly, either silently deleting them, or treating them as line endings.
-
- text = String(text);
- cx.lastIndex = 0;
- if (cx.test(text)) {
- text = text.replace(cx, function (a) {
- return '\\u' +
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
-// In the second stage, we run the text against regular expressions that look
-// for non-JSON patterns. We are especially concerned with '()' and 'new'
-// because they can cause invocation, and '=' because it can cause mutation.
-// But just to be safe, we want to reject all unexpected forms.
-
-// We split the second stage into 4 regexp operations in order to work around
-// crippling inefficiencies in IE's and Safari's regexp engines. First we
-// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-// replace all simple value tokens with ']' characters. Third, we delete all
-// open brackets that follow a colon or comma or that begin the text. Finally,
-// we look to see that the remaining characters are only whitespace or ']' or
-// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
- if (/^[\],:{}\s]*$/
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-// In the third stage we use the eval function to compile the text into a
-// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-// in JavaScript: it can begin a block or an object literal. We wrap the text
-// in parens to eliminate the ambiguity.
-
- j = eval('(' + text + ')');
-
-// In the optional fourth stage, we recursively walk the new structure, passing
-// each name/value pair to a reviver function for possible transformation.
-
- return typeof reviver === 'function' ?
- walk({'': j}, '') : j;
- }
-
-// If the text is not JSON parseable, then a SyntaxError is thrown.
-
- throw new SyntaxError('JSON.parse');
- };
- }
-}());
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 static/scripts/packed/libs/json2.js
--- a/static/scripts/packed/libs/json2.js
+++ /dev/null
@@ -1,1 +0,0 @@
-var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());
\ No newline at end of file
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 templates/base.mako
--- a/templates/base.mako
+++ b/templates/base.mako
@@ -40,7 +40,6 @@
"libs/jquery/jquery",
"libs/jquery/jquery.migrate",
"libs/jquery/select2",
- "libs/json2",
"libs/bootstrap",
"libs/underscore",
"libs/backbone/backbone",
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -52,7 +52,6 @@
${h.js(
'libs/jquery/jquery',
'libs/jquery/jquery.migrate',
- 'libs/json2',
'libs/jquery/select2',
'libs/bootstrap',
'libs/underscore',
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 templates/search/search.mako
--- a/templates/search/search.mako
+++ b/templates/search/search.mako
@@ -3,7 +3,6 @@
${h.js(
'libs/jquery/jquery',
- 'libs/json2'
)}
</%def>
diff -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 -r 31774ed13ae2fc137d231df4b0cb710b8bb47797 templates/webapps/galaxy/library/common/browse_library_opt.mako
--- a/templates/webapps/galaxy/library/common/browse_library_opt.mako
+++ b/templates/webapps/galaxy/library/common/browse_library_opt.mako
@@ -48,7 +48,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- ${h.js("libs/json2")}
${h.js("libs/jquery/jstorage")}
${common_javascripts()}
${self.grid_javascripts()}
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.
1
0
commit/galaxy-central: carlfeberhard: Visualization framework: add plugin version of scatterplot to be managed in the repo
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/42cbb2d2014c/
Changeset: 42cbb2d2014c
User: carlfeberhard
Date: 2013-08-07 21:43:44
Summary: Visualization framework: add plugin version of scatterplot to be managed in the repo
Affected #: 14 files
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/Gruntfile.js
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/Gruntfile.js
@@ -0,0 +1,56 @@
+// NOTE: use 'sudo npm install .', then 'grunt' to use this file
+
+module.exports = function(grunt) {
+
+ grunt.initConfig({
+ pkg: grunt.file.readJSON( 'package.json' ),
+
+ handlebars: {
+ compile: {
+ options: {
+ namespace: 'Templates',
+ processName : function( filepath ){
+ return filepath.match( /\w*\.handlebars/ )[0].replace( '.handlebars', '' );
+ }
+ },
+ files: {
+ "build/compiled-templates.js" : "src/handlebars/*.handlebars"
+ }
+ }
+ },
+
+ concat: {
+ options: {
+ separator: ';\n'
+ },
+ dist: {
+ //NOTE: mvc references templates - templates must be cat'd first
+ src : [ 'build/compiled-templates.js', 'src/**/*.js' ],
+ dest: 'build/scatterplot-concat.js'
+ }
+ },
+
+ uglify: {
+ options: {
+ },
+ dist: {
+ src : 'build/scatterplot-concat.js',
+ // uglify directly into static dir
+ dest: 'static/scatterplot.js'
+ }
+ },
+
+ watch: {
+ files: [ 'src/**.js', 'src/handlebars/*.handlebars' ],
+ tasks: [ 'default' ]
+ }
+ });
+
+ grunt.loadNpmTasks( 'grunt-contrib-handlebars' );
+ grunt.loadNpmTasks( 'grunt-contrib-concat' );
+ grunt.loadNpmTasks( 'grunt-contrib-uglify' );
+ grunt.loadNpmTasks( 'grunt-contrib-watch' );
+
+ grunt.registerTask( 'default', [ 'handlebars', 'concat', 'uglify' ]);
+ grunt.registerTask( 'watch', [ 'handlebars', 'concat', 'uglify', 'watch' ]);
+};
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/config/scatterplot.xml
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/config/scatterplot.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE visualization SYSTEM "../../visualization.dtd">
+<visualization name="scatterplot">
+ <data_sources>
+ <data_source>
+ <model_class>HistoryDatasetAssociation</model_class>
+ <test type="isinstance" test_attr="datatype" result_type="datatype">tabular.Tabular</test>
+ <to_param param_attr="id">dataset_id</to_param>
+ </data_source>
+ </data_sources>
+ <params>
+ <param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
+ </params>
+ <template>scatterplot/templates/scatterplot.mako</template>
+</visualization>
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/package.json
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "galaxy-scatterplot",
+ "version": "0.0.0",
+ "description": "Scatterplot visualization plugin for the Galaxy informatics framework",
+ "main": " ",
+ "scripts": {
+ "test": "test"
+ },
+ "keywords": [
+ "galaxy",
+ "visualization",
+ "d3"
+ ],
+ "author": "Carl Eberhard",
+ "license": "BSD",
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-cli": "~0.1.9",
+ "grunt-contrib-handlebars": "~0.5.10",
+ "grunt-contrib-concat": "~0.3.0",
+ "grunt-contrib-uglify": "~0.2.2",
+ "grunt-contrib-watch": "~0.5.1"
+ }
+}
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/handlebars/chartControl.handlebars
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/handlebars/chartControl.handlebars
@@ -0,0 +1,56 @@
+<p class="help-text">
+ Use the following controls to how the chart is displayed.
+ The slide controls can be moved by the mouse or, if the 'handle' is in focus, your keyboard's arrow keys.
+ Move the focus between controls by using the tab or shift+tab keys on your keyboard.
+ Use the 'Draw' button to render (or re-render) the chart with the current settings.
+ </p>
+
+ <div id="datapointSize" class="form-input numeric-slider-input">
+ <label for="datapointSize">Size of data point: </label>
+ <div class="slider-output">{{datapointSize}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ Size of the graphic representation of each data point
+ </p>
+ </div>
+
+ <div id="animDuration" class="form-input checkbox-input">
+ <label for="animate-chart">Animate chart transitions?: </label>
+ <input type="checkbox" id="animate-chart"
+ class="checkbox control"{{#if animDuration}} checked="true"{{/if}} />
+ <p class="form-help help-text-small">
+ Uncheck this to disable the animations used on the chart
+ </p>
+ </div>
+
+ <div id="width" class="form-input numeric-slider-input">
+ <label for="width">Chart width: </label>
+ <div class="slider-output">{{width}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ (not including chart margins and axes)
+ </p>
+ </div>
+
+ <div id="height" class="form-input numeric-slider-input">
+ <label for="height">Chart height: </label>
+ <div class="slider-output">{{height}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ (not including chart margins and axes)
+ </p>
+ </div>
+
+ <div id="X-axis-label"class="text-input form-input">
+ <label for="X-axis-label">Re-label the X axis: </label>
+ <input type="text" name="X-axis-label" id="X-axis-label" value="{{xLabel}}" />
+ <p class="form-help help-text-small"></p>
+ </div>
+
+ <div id="Y-axis-label" class="text-input form-input">
+ <label for="Y-axis-label">Re-label the Y axis: </label>
+ <input type="text" name="Y-axis-label" id="Y-axis-label" value="{{yLabel}}" />
+ <p class="form-help help-text-small"></p>
+ </div>
+
+ <input id="render-button" type="button" value="Draw" />
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/handlebars/chartDisplay.handlebars
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/handlebars/chartDisplay.handlebars
@@ -0,0 +1,1 @@
+<svg width="{{width}}" height="{{height}}"></svg>
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/handlebars/dataControl.handlebars
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/handlebars/dataControl.handlebars
@@ -0,0 +1,56 @@
+<p class="help-text">
+ Use the following controls to change the data used by the chart.
+ Use the 'Draw' button to render (or re-render) the chart with the current settings.
+ </p>
+
+ {{! column selector containers }}
+ <div class="column-select">
+ <label for="X-select">Data column for X: </label>
+ <select name="X" id="X-select">
+ {{#each numericColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+ <div class="column-select">
+ <label for="Y-select">Data column for Y: </label>
+ <select name="Y" id="Y-select">
+ {{#each numericColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+
+ {{! optional id column }}
+ <div id="include-id">
+ <label for="include-id-checkbox">Include a third column as data point IDs?</label>
+ <input type="checkbox" name="include-id" id="include-id-checkbox" />
+ <p class="help-text-small">
+ These will be displayed (along with the x and y values) when you hover over
+ a data point.
+ </p>
+ </div>
+ <div class="column-select" style="display: none">
+ <label for="ID-select">Data column for IDs: </label>
+ <select name="ID" id="ID-select">
+ {{#each allColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+
+ {{! if we're using generic column selection names ('column 1') - allow the user to use the first line }}
+ <div id="first-line-header" style="display: none;">
+ <p>Possible headers: {{ possibleHeaders }}
+ </p>
+ <label for="first-line-header-checkbox">Use the above as column headers?</label>
+ <input type="checkbox" name="include-id" id="first-line-header-checkbox"
+ {{#if usePossibleHeaders }}checked="true"{{/if}}/>
+ <p class="help-text-small">
+ It looks like Galaxy couldn't get proper column headers for this data.
+ Would you like to use the column headers above as column names to select columns?
+ </p>
+ </div>
+
+ <input id="render-button" type="button" value="Draw" />
+ <div class="clear"></div>
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/handlebars/scatterplotControlForm.handlebars
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/handlebars/scatterplotControlForm.handlebars
@@ -0,0 +1,46 @@
+{{! main layout }}
+
+<div class="scatterplot-container chart-container tabbable tabs-left">
+ {{! tab buttons/headers using Bootstrap }}
+ <ul class="nav nav-tabs">
+ {{! start with the data controls as the displayed tab }}
+ <li class="active"><a href="#data-control" data-toggle="tab" class="tooltip"
+ title="Use this tab to change which data are used">Data Controls</a></li>
+ <li><a href="#chart-control" data-toggle="tab" class="tooltip"
+ title="Use this tab to change how the chart is drawn">Chart Controls</a></li>
+ <li><a href="#stats-display" data-toggle="tab" class="tooltip"
+ title="This tab will display overall statistics for your data">Statistics</a></li>
+ <li><a href="#chart-display" data-toggle="tab" class="tooltip"
+ title="This tab will display the chart">Chart</a>
+ {{! loading indicator - initially hidden }}
+ <div id="loading-indicator" style="display: none;">
+ <img class="loading-img" src="{{loadingIndicatorImagePath}}" />
+ <span class="loading-message">{{message}}</span>
+ </div>
+ </li>
+ </ul>
+
+ {{! data form, chart config form, stats, and chart all get their own tab }}
+ <div class="tab-content">
+ {{! ---------------------------- tab for data settings form }}
+ <div id="data-control" class="tab-pane active">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for chart graphics control form }}
+ <div id="chart-control" class="tab-pane">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for data statistics }}
+ <div id="stats-display" class="tab-pane">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for actual chart }}
+ <div id="chart-display" class="tab-pane">
+ {{! chart rendered separately }}
+ </div>
+
+ </div>{{! end .tab-content }}
+</div>{{! end .chart-control }}
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/handlebars/statsDisplay.handlebars
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/handlebars/statsDisplay.handlebars
@@ -0,0 +1,8 @@
+<p class="help-text">By column:</p>
+ <table id="chart-stats-table">
+ <thead><th></th><th>X</th><th>Y</th></thead>
+ {{#each stats}}
+ <tr><td>{{name}}</td><td>{{xval}}</td><td>{{yval}}</td></tr>
+ </tr>
+ {{/each}}
+ </table>
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/scatterplot.js
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/scatterplot.js
@@ -0,0 +1,488 @@
+/* =============================================================================
+todo:
+ outside this:
+ BUG: setting width, height in plot controls doesn't re-interpolate data locations!!
+ BUG?: get metadata_column_names (from datatype if necessary)
+ BUG: single vis in popupmenu should have tooltip with that name NOT 'Visualizations'
+
+ wire label setters, anim setter
+
+ TwoVarScatterplot:
+ ??: maybe better to do this with a canvas...
+ save as visualization
+ to seperate file?
+ remove underscore dependencies
+ add interface to change values (seperate)?
+ download svg -> base64 encode
+ incorporate glyphs, glyph state renderers
+
+ ScatterplotSettingsForm:
+ some css bug that lowers the width of settings form when plot-controls tab is open
+ causes chart to shift
+ what can be abstracted/reused for other graphs?
+ avoid direct manipulation of this.plot
+ allow option to put plot into seperate tab of interface (for small multiples)
+
+ provide callback in view to load data incrementally - for large sets
+ paginate
+ handle rerender
+ use endpoint (here and on the server (fileptr))
+ fetch (new?) data
+ handle rerender
+ use d3.TSV?
+ render warning on long data (> maxDataPoints)
+ adjust endpoint
+
+ selectable list of preset column comparisons (rnaseq etc.)
+ how to know what sort of Tabular the data is?
+ smarter about headers
+ validate columns selection (here or server)
+
+ set stats column names by selected columns
+ move chart into tabbed area...
+
+ Scatterplot.mako:
+ multiple plots on one page (small multiples)
+ ?? ensure svg styles thru d3 or css?
+ d3: configable (easily)
+ css: standard - better maintenance
+ ? override at config
+
+============================================================================= */
+/**
+ * Two Variable scatterplot visualization using d3
+ * Uses semi transparent circles to show density of data in x, y grid
+ * usage :
+ * var plot = new TwoVarScatterplot({ containerSelector : 'div#my-plot', ... })
+ * plot.render( xColumnData, yColumnData );
+ *
+ * depends on: d3, underscore
+ */
+function TwoVarScatterplot( config ){
+ var TICK_LINE_AND_PADDING = 10,
+ GUESS_AT_SVG_CHAR_WIDTH = 7,
+ GUESS_AT_SVG_CHAR_HEIGHT = 10,
+ PADDING = 8,
+ X_LABEL_TOO_LONG_AT = 5;
+
+ // set up logging
+ //this.debugging = true;
+ this.log = function(){
+ if( this.debugging && console && console.debug ){
+ var args = Array.prototype.slice.call( arguments );
+ args.unshift( this.toString() );
+ console.debug.apply( console, args );
+ }
+ };
+ this.log( 'new TwoVarScatterplot:', config );
+
+ // ........................................................ set up chart config
+ // config will default to these values when not passed in
+ //NOTE: called on new
+ this.defaults = {
+ id : 'TwoVarScatterplot',
+ containerSelector : 'body',
+ //TODO??: needed?
+ maxDataPoints : 30000,
+ datapointSize : 4,
+ animDuration : 500,
+ //TODO: variable effect (not always exactly # of ticks set to)
+ xNumTicks : 10,
+ yNumTicks : 10,
+ xAxisLabelBumpY : 40,
+ yAxisLabelBumpX : -40,
+ width : 400,
+ height : 400,
+ //TODO: anyway to make this a sub-obj?
+ marginTop : 50,
+ marginRight : 50,
+ marginBottom : 50,
+ marginLeft : 50,
+
+ xMin : null,
+ xMax : null,
+ yMin : null,
+ yMax : null,
+
+ xLabel : "X",
+ yLabel : "Y"
+ };
+ this.config = _.extend( {}, this.defaults, config );
+ this.log( 'intial config:', this.config );
+
+ this.updateConfig = function( newConfig, rerender ){
+ // setter for chart config
+ //TODO: validate here
+ _.extend( this.config, newConfig );
+ this.log( this + '.updateConfig:', this.config );
+ //TODO: implement rerender flag
+ };
+
+ // ........................................................ helpers
+ this.toString = function(){
+ return this.config.id;
+ };
+ // conv. methods for svg transforms
+ this.translateStr = function( x, y ){
+ return 'translate(' + x + ',' + y + ')';
+ };
+ this.rotateStr = function( d, x, y ){
+ return 'rotate(' + d + ',' + x + ',' + y + ')';
+ };
+
+ // ........................................................ initial element creation
+ this.adjustChartDimensions = function( top, right, bottom, left ){
+ //this.log( this + '.adjustChartDimensions', arguments );
+ top = top || 0;
+ right = right || 0;
+ bottom = bottom || 0;
+ left = left || 0;
+ this.svg
+ .attr( "width", this.config.width + ( this.config.marginRight + right )
+ + ( this.config.marginLeft + left ) )
+ .attr( "height", this.config.height + ( this.config.marginTop + top )
+ + ( this.config.marginBottom + bottom ) )
+ // initial is hidden - show it
+ .style( 'display', 'block' );
+
+ // move content group away from margins
+ //TODO: allow top, right axis
+ this.content = this.svg.select( "g.content" )
+ .attr( "transform", this.translateStr( this.config.marginLeft + left, this.config.marginTop + top ) );
+ };
+
+ // ........................................................ data and scales
+ this.preprocessData = function( data, min, max ){
+ //this.log( this + '.preprocessData', arguments );
+ //TODO: filter by min, max if set
+
+ // set a cap on the data, limit to first n points
+ return ( data.length > this.config.maxDataPoints )? ( data.slice( 0, this.config.maxDataPoints ) ): ( data );
+ };
+
+ this.findMinMaxes = function( xCol, yCol, meta ){
+ //this.log( this + '.findMinMaxes', arguments );
+ // configuration takes priority, otherwise meta (from the server) if passed, last-resort: compute it here
+ this.xMin = this.config.xMin || ( meta )?( meta[0].min ):( d3.min( xCol ) );
+ this.xMax = this.config.xMax || ( meta )?( meta[0].max ):( d3.max( xCol ) );
+ this.yMin = this.config.yMin || ( meta )?( meta[1].min ):( d3.min( yCol ) );
+ this.yMax = this.config.yMax || ( meta )?( meta[1].max ):( d3.max( yCol ) );
+ };
+
+ this.setUpScales = function(){
+ //this.log( this + '.setUpScales', arguments );
+ // Interpolation for x, y based on data domains
+ this.xScale = d3.scale.linear()
+ .domain([ this.xMin, this.xMax ])
+ .range([ 0, this.config.width ]),
+ this.yScale = d3.scale.linear()
+ .domain([ this.yMin, this.yMax ])
+ .range([ this.config.height, 0 ]);
+ };
+
+ // ........................................................ axis and ticks
+ this.setUpXAxis = function(){
+ //this.log( this + '.setUpXAxis', arguments );
+ // origin: bottom, left
+ //TODO: incoporate top, right
+ this.xAxisFn = d3.svg.axis()
+ .scale( this.xScale )
+ .ticks( this.config.xNumTicks )
+ .orient( 'bottom' );
+ this.xAxis// = content.select( 'g#x-axis' )
+ .attr( 'transform', this.translateStr( 0, this.config.height ) )
+ .call( this.xAxisFn );
+ //this.log( 'xAxis:', this.xAxis );
+
+ //TODO: adjust ticks when tick labels are long - move odds down and extend tick line
+ // (for now) hide them
+ var xLongestTickLabel = d3.max( _.map( [ this.xMin, this.xMax ],
+ function( number ){ return ( String( number ) ).length; } ) );
+ //this.log( 'xLongestTickLabel:', xLongestTickLabel );
+ if( xLongestTickLabel >= X_LABEL_TOO_LONG_AT ){
+ this.xAxis.selectAll( 'g' ).filter( ':nth-child(odd)' ).style( 'display', 'none' );
+ }
+
+ this.log( 'this.config.xLabel:', this.config.xLabel );
+ this.xAxisLabel// = xAxis.select( 'text#x-axis-label' )
+ .attr( 'x', this.config.width / 2 )
+ .attr( 'y', this.config.xAxisLabelBumpY )
+ .attr( 'text-anchor', 'middle' )
+ .text( this.config.xLabel );
+ this.log( 'xAxisLabel:', this.xAxisLabel );
+ };
+
+ this.setUpYAxis = function(){
+ //this.log( this + '.setUpYAxis', arguments );
+ this.yAxisFn = d3.svg.axis()
+ .scale( this.yScale )
+ .ticks( this.config.yNumTicks )
+ .orient( 'left' );
+ this.yAxis// = content.select( 'g#y-axis' )
+ .call( this.yAxisFn );
+ //this.log( 'yAxis:', this.yAxis );
+
+ // a too complicated section for increasing the left margin when tick labels are long
+ // get the tick labels for the y axis
+ var yTickLabels = this.yAxis.selectAll( 'text' ).filter( function( e, i ){ return i !== 0; } );
+ this.log( 'yTickLabels:', yTickLabels );
+
+ // get the longest label length (or 0 if no labels)
+ this.yLongestLabel = d3.max(
+ //NOTE: d3 returns an nested array - use the plain array inside ([0])
+ yTickLabels[0].map( function( e, i ){
+ return ( d3.select( e ).text() ).length;
+ })
+ ) || 0;
+ //this.log( 'yLongestLabel:', this.yLongestLabel );
+ //TODO: lose the guessing if possible
+ var neededY = TICK_LINE_AND_PADDING + ( this.yLongestLabel * GUESS_AT_SVG_CHAR_WIDTH )
+ + PADDING + GUESS_AT_SVG_CHAR_HEIGHT;
+ //this.log( 'neededY:', neededY );
+
+ // increase width for yLongerStr, increase margin for y
+ //TODO??: (or transform each number: 2k)
+ this.config.yAxisLabelBumpX = -( neededY - GUESS_AT_SVG_CHAR_HEIGHT );
+ if( this.config.marginLeft < neededY ){
+ var adjusting = ( neededY ) - this.config.marginLeft;
+ adjusting = ( adjusting < 0 )?( 0 ):( adjusting );
+ //this.log( 'adjusting:', adjusting );
+
+ // update dimensions, translations
+ this.adjustChartDimensions( 0, 0, 0, adjusting );
+ }
+ //this.log( 'this.config.yAxisLableBumpx, this.config.marginLeft:',
+ // this.config.yAxisLabelBumpX, this.config.marginLeft );
+
+ this.yAxisLabel// = yAxis.select( 'text#y-axis-label' )
+ .attr( 'x', this.config.yAxisLabelBumpX )
+ .attr( 'y', this.config.height / 2 )
+ .attr( 'text-anchor', 'middle' )
+ .attr( 'transform', this.rotateStr( -90, this.config.yAxisLabelBumpX, this.config.height / 2 ) )
+ .text( this.config.yLabel );
+ //this.log( 'yAxisLabel:', this.yAxisLabel );
+ };
+
+ // ........................................................ grid lines
+ this.renderGrid = function(){
+ //this.log( this + '.renderGrid', arguments );
+ // VERTICAL
+ // select existing
+ this.vGridLines = this.content.selectAll( 'line.v-grid-line' )
+ .data( this.xScale.ticks( this.xAxisFn.ticks()[0] ) );
+
+ // append any extra lines needed (more ticks)
+ this.vGridLines.enter().append( 'svg:line' )
+ .classed( 'grid-line v-grid-line', true );
+
+ // update the attributes of existing and appended
+ this.vGridLines
+ .attr( 'x1', this.xScale )
+ .attr( 'y1', 0 )
+ .attr( 'x2', this.xScale )
+ .attr( 'y2', this.config.height );
+
+ // remove unneeded (less ticks)
+ this.vGridLines.exit().remove();
+ //this.log( 'vGridLines:', this.vGridLines );
+
+ // HORIZONTAL
+ this.hGridLines = this.content.selectAll( 'line.h-grid-line' )
+ .data( this.yScale.ticks( this.yAxisFn.ticks()[0] ) );
+
+ this.hGridLines.enter().append( 'svg:line' )
+ .classed( 'grid-line h-grid-line', true );
+
+ this.hGridLines
+ .attr( 'x1', 0 )
+ .attr( 'y1', this.yScale )
+ .attr( 'x2', this.config.width )
+ .attr( 'y2', this.yScale );
+
+ this.hGridLines.exit().remove();
+ //this.log( 'hGridLines:', this.hGridLines );
+ };
+
+ // ........................................................ data points
+ this.renderDatapoints = function( xCol, yCol, ids ){
+ this.log( this + '.renderDatapoints', arguments );
+ var count = 0,
+ plot = this,
+ xPosFn = function( d, i ){
+ //if( d ){ this.log( 'x.data:', newXCol[ i ], 'plotted:', plot.xScale( newXCol[ i ] ) ); }
+ return plot.xScale( xCol[ i ] );
+ },
+ yPosFn = function( d, i ){
+ //if( d ){ this.log( 'y.data:', newYCol[ i ], 'plotted:', plot.yScale( newYCol[ i ] ) ); }
+ return plot.yScale( yCol[ i ] );
+ };
+
+ //this.datapoints = this.addDatapoints( xCol, yCol, ids, ".glyph" );
+ var datapoints = this.content.selectAll( '.glyph' ).data( xCol );
+
+ // enter - NEW data to be added as glyphs: give them a 'entry' position and style
+ count = 0;
+ datapoints.enter()
+ .append( 'svg:circle' )
+ .each( function(){ count += 1; } )
+ .classed( "glyph", true )
+ .attr( "cx", 0 )
+ .attr( "cy", this.config.height )
+ // start all bubbles small...
+ .attr( "r", 0 );
+ this.log( count, ' new glyphs created' );
+
+ // for all EXISTING glyphs and those that need to be added: transition anim to final state
+ count = 0;
+ datapoints
+ // ...animate to final position
+ .transition().duration( this.config.animDuration )
+ .each( function(){ count += 1; } )
+ .attr( "cx", xPosFn )
+ .attr( "cy", yPosFn )
+ .attr( "r", plot.config.datapointSize );
+ this.log( count, ' existing glyphs transitioned' );
+
+ // events
+ // glyphs that need to be removed: transition to from normal state to 'exit' state, remove from DOM
+ datapoints.exit()
+ .each( function(){ count += 1; } )
+ .transition().duration( this.config.animDuration )
+ .attr( "cy", this.config.height )
+ .attr( "r", 0 )
+ .remove();
+ this.log( count, ' glyphs removed' );
+
+ this._addDatapointEventhandlers( datapoints, xCol, yCol, ids );
+ };
+
+ this._addDatapointEventhandlers = function( datapoints, xCol, yCol, ids ){
+ var plot = this;
+ datapoints
+ //TODO: remove magic numbers
+ .on( 'mouseover', function( d, i ){
+ var datapoint = d3.select( this );
+ datapoint
+ .style( 'fill', 'red' )
+ .style( 'fill-opacity', 1 );
+
+ // create horiz, vert lines to axis
+ plot.content.append( 'line' )
+ .attr( 'stroke', 'red' )
+ .attr( 'stroke-width', 1 )
+ // start not at center, but at the edge of the circle - to prevent mouseover thrashing
+ .attr( 'x1', datapoint.attr( 'cx' ) - plot.config.datapointSize )
+ .attr( 'y1', datapoint.attr( 'cy' ) )
+ .attr( 'x2', 0 )
+ .attr( 'y2', datapoint.attr( 'cy' ) )
+ .classed( 'hoverline', true );
+
+ // if the vertical hoverline
+ if( datapoint.attr( 'cy' ) < plot.config.height ){
+ plot.content.append( 'line' )
+ .attr( 'stroke', 'red' )
+ .attr( 'stroke-width', 1 )
+ .attr( 'x1', datapoint.attr( 'cx' ) )
+ .attr( 'y1', datapoint.attr( 'cy' ) + plot.config.datapointSize )
+ .attr( 'x2', datapoint.attr( 'cx' ) )
+ .attr( 'y2', plot.config.height )
+ .classed( 'hoverline', true );
+ }
+
+ var datapointWindowPos = $( this ).offset();
+ plot.datapointInfoBox = plot.infoBox(
+ datapointWindowPos.top, datapointWindowPos.left,
+ plot.infoHtml( xCol[ i ], yCol[ i ], ( ids )?( ids[ i ] ):( undefined ) )
+ );
+ $( 'body' ).append( plot.datapointInfoBox );
+ })
+ .on( 'mouseout', function(){
+ d3.select( this )
+ .style( 'fill', 'black' )
+ .style( 'fill-opacity', 0.2 );
+ plot.content.selectAll( '.hoverline' ).remove();
+ if( plot.datapointInfoBox ){
+ plot.datapointInfoBox.remove();
+ }
+ });
+ },
+
+ this.render = function( columnData, meta ){
+ this.log( this + '.render', arguments );
+ this.log( '\t config:', this.config );
+
+ // prepare the data
+ //pre: columns passed are numeric
+ //pre: at least two columns are passed
+ //assume: first column is x, second column is y, any remaining aren't used
+ var xCol = columnData[0],
+ yCol = columnData[1],
+ ids = ( columnData.length > 2 )?( columnData[2] ):( undefined );
+ //this.log( this + '.render', xCol.length, yCol.length, this.config );
+
+ //pre: xCol.len == yCol.len
+ xCol = this.preprocessData( xCol );
+ yCol = this.preprocessData( yCol );
+ this.log( 'xCol len', xCol.length, 'yCol len', yCol.length );
+
+ this.findMinMaxes( xCol, yCol, meta );
+ //this.log( 'xMin, xMax, yMin, yMax:', this.xMin, this.xMax, this.yMin, this.yMax );
+ this.setUpScales();
+
+ // find (or build if it doesn't exist) the svg dom infrastructure
+ if( !this.svg ){ this.svg = d3.select( 'svg' ).attr( "class", "chart" ); }
+ if( !this.content ){
+ this.content = this.svg.append( "svg:g" ).attr( "class", "content" ).attr( 'id', this.config.id );
+ }
+ //this.log( 'svg:', this.svg );
+ //this.log( 'content:', this.content );
+
+ this.adjustChartDimensions();
+
+ if( !this.xAxis ){ this.xAxis = this.content.append( 'g' ).attr( 'class', 'axis' ).attr( 'id', 'x-axis' ); }
+ if( !this.xAxisLabel ){
+ this.xAxisLabel = this.xAxis.append( 'text' ).attr( 'class', 'axis-label' ).attr( 'id', 'x-axis-label' );
+ }
+ //this.log( 'xAxis:', this.xAxis, 'xAxisLabel:', this.xAxisLabel );
+
+ if( !this.yAxis ){ this.yAxis = this.content.append( 'g' ).attr( 'class', 'axis' ).attr( 'id', 'y-axis' ); }
+ if( !this.yAxisLabel ){
+ this.yAxisLabel = this.yAxis.append( 'text' ).attr( 'class', 'axis-label' ).attr( 'id', 'y-axis-label' );
+ }
+ //this.log( 'yAxis:', this.yAxis, 'yAxisLabel:', this.yAxisLabel );
+
+ this.setUpXAxis();
+ this.setUpYAxis();
+
+ this.renderGrid();
+ this.renderDatapoints( xCol, yCol, ids );
+ };
+
+ this.infoHtml = function( x, y, id ){
+ var retDiv = $( '<div/>' );
+ if( id ){
+ $( '<div/>' ).text( id ).css( 'font-weight', 'bold' ).appendTo( retDiv );
+ }
+ $( '<div/>' ).text( x ).appendTo( retDiv );
+ $( '<div/>' ).text( y ).appendTo( retDiv );
+ return retDiv.html();
+ };
+
+ //TODO: html for now
+ this.infoBox = function( top, left, html, adjTop, adjLeft ){
+ adjTop = adjTop || 0;
+ adjLeft = adjLeft || 20;
+ var infoBox = $( '<div />' )
+ .addClass( 'chart-info-box' )
+ .css({
+ 'position' : 'absolute',
+ 'top' : top + adjTop,
+ 'left' : left + adjLeft
+ });
+ infoBox.html( html );
+ return infoBox;
+ };
+
+}
+
+//==============================================================================
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/scatterplotControlForm.js
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/scatterplotControlForm.js
@@ -0,0 +1,631 @@
+/* =============================================================================
+todo:
+ I'd like to move the svg creation out of the splot constr. to:
+ allow adding splots to an existing canvas
+ allow mult. splots sharing a canvas
+
+
+ outside this:
+ BUG: setting width, height in plot controls doesn't re-interpolate data locations!!
+ BUG?: get metadata_column_names (from datatype if necessary)
+ BUG: single vis in popupmenu should have tooltip with that name NOT 'Visualizations'
+
+ wire label setters, anim setter
+
+ TwoVarScatterplot:
+ ??: maybe better to do this with a canvas...
+ save as visualization
+ to seperate file?
+ remove underscore dependencies
+ add interface to change values (seperate)?
+ download svg -> base64 encode
+ incorporate glyphs, glyph state renderers
+
+ ScatterplotSettingsForm:
+ some css bug that lowers the width of settings form when plot-controls tab is open
+ causes chart to shift
+ what can be abstracted/reused for other graphs?
+ avoid direct manipulation of this.plot
+ allow option to put plot into seperate tab of interface (for small multiples)
+
+ provide callback in view to load data incrementally - for large sets
+ paginate
+ handle rerender
+ use endpoint (here and on the server (fileptr))
+ fetch (new?) data
+ handle rerender
+ use d3.TSV?
+ render warning on long data (> maxDataPoints)
+ adjust endpoint
+
+ selectable list of preset column comparisons (rnaseq etc.)
+ how to know what sort of Tabular the data is?
+ smarter about headers
+ validate columns selection (here or server)
+
+ set stats column names by selected columns
+ move chart into tabbed area...
+
+ Scatterplot.mako:
+ multiple plots on one page (small multiples)
+ ?? ensure svg styles thru d3 or css?
+ d3: configable (easily)
+ css: standard - better maintenance
+ ? override at config
+
+============================================================================= */
+/**
+ * Scatterplot control UI as a backbone view
+ * handles:
+ * getting the desired data
+ * configuring the plot display
+ * showing (general) statistics
+ *
+ * initialize attributes REQUIRES a dataset and an apiDatasetsURL
+ */
+var ScatterplotControlForm = BaseView.extend( LoggableMixin ).extend({
+ //logger : console,
+ className : 'scatterplot-control-form',
+
+ //NOTE: should include time needed to render
+ dataLoadDelay : 4000,
+ dataLoadSize : 5000,
+
+ loadingIndicatorImage : 'loading_small_white_bg.gif',
+ fetchMsg : 'Fetching data...',
+ renderMsg : 'Rendering...',
+
+ initialize : function( attributes ){
+ this.log( this + '.initialize, attributes:', attributes );
+
+ this.dataset = null;
+ this.chartConfig = null;
+ this.chart = null;
+ this.loader = null;
+
+ // set up refs to the four tab areas
+ this.$dataControl = null;
+ this.$chartControl = null;
+ this.$statsDisplay = null;
+ this.$chartDisplay = null;
+
+ this.dataFetch = null;
+
+ this.initializeFromAttributes( attributes );
+ this.initializeChart( attributes );
+ this.initializeDataLoader( attributes );
+ },
+
+ initializeFromAttributes : function( attributes ){
+ // required settings: ensure certain vars we need are passed in attributes
+ if( !attributes || !attributes.dataset ){
+ throw( "ScatterplotView requires a dataset" );
+ } else {
+ this.dataset = attributes.dataset;
+ }
+ if( jQuery.type( this.dataset.metadata_column_types ) === 'string' ){
+ this.dataset.metadata_column_types = this.dataset.metadata_column_types.split( ', ' );
+ }
+ this.log( '\t dataset:', this.dataset );
+
+ // attempt to get possible headers from the data's first line
+ if( this.dataset.comment_lines && this.dataset.comment_lines.length ){
+ //TODO:??
+ var firstLine = this.dataset.comment_lines[0],
+ possibleHeaders = firstLine.split( '\t' );
+ if( possibleHeaders.length === this.dataset.metadata_column_types.length ){
+ this.possibleHeaders = possibleHeaders;
+ }
+ }
+
+ // passed from mako helper
+ //TODO: integrate to galaxyPaths
+ //TODO: ?? seems like data loader section would be better
+ if( !attributes.apiDatasetsURL ){
+ throw( "ScatterplotView requires a apiDatasetsURL" );
+ } else {
+ this.dataURL = attributes.apiDatasetsURL + '/' + this.dataset.id + '?';
+ }
+ this.log( '\t dataURL:', this.dataURL );
+ },
+
+ initializeChart : function( attributes ){
+ // set up the basic chart infrastructure and config (if any)
+ this.chartConfig = attributes.chartConfig || {};
+ //if( this.logger ){ this.chartConfig.debugging = true; }
+ this.log( '\t initial chartConfig:', this.chartConfig );
+
+ this.chart = new TwoVarScatterplot( this.chartConfig );
+ //TODO: remove 2nd ref, use this.chart.config
+ this.chartConfig = this.chart.config;
+ },
+
+ initializeDataLoader : function( attributes ){
+ // set up data loader
+ var view = this;
+ this.loader = new LazyDataLoader({
+ //logger : ( this.logger )?( this.logger ):( null ),
+ // we'll generate this when columns are chosen
+ url : null,
+ start : attributes.start || 0,
+ //NOTE: metadata_data_lines can be null (so we won't know the total)
+ total : attributes.total || this.dataset.metadata_data_lines,
+ delay : this.dataLoadDelay,
+ size : this.dataLoadSize,
+
+ buildUrl : function( start, size ){
+ // currently VERY SPECIFIC to using data_providers.py start_val, max_vals params
+ return this.url + '&' + jQuery.param({
+ start_val: start,
+ max_vals: size
+ });
+ }
+ });
+ $( this.loader ).bind( 'error', function( event, status, error ){
+ view.log( 'ERROR:', status, error );
+ alert( 'ERROR fetching data:\n' + status + '\n' + error );
+ view.hideLoadingIndicator();
+ });
+ },
+
+ // ------------------------------------------------------------------------- CONTROLS RENDERING
+ render : function(){
+ this.log( this + '.render' );
+
+ // render the tab controls, areas and loading indicator
+ this.$el.append( ScatterplotControlForm.templates.mainLayout({
+ loadingIndicatorImagePath : '/static/images/' + this.loadingIndicatorImage,
+ message : ''
+ }));
+
+ // render the tab content
+ this.$dataControl = this._render_dataControl();
+ this.$chartControl = this._render_chartControl();
+ this.$statsDisplay = this.$el.find( '.tab-pane#stats-display' );
+ this.$chartDisplay = this._render_chartDisplay();
+
+ // auto render if given both x, y column choices in query for page
+ //TODO:?? add autoRender=1 to query maybe?
+ if( this.chartConfig.xColumn && this.chartConfig.yColumn ){
+ this.renderChart();
+ }
+
+ // set up behaviours
+ this.$el.find( '.tooltip' ).tooltip();
+
+ // uncomment any of the following to have that tab show on initial load (for testing)
+ //this.$el.find( 'ul.nav' ).find( 'a[href="#data-control"]' ).tab( 'show' );
+ //this.$el.find( 'ul.nav' ).find( 'a[href="#chart-control"]' ).tab( 'show' );
+ //this.$el.find( 'ul.nav' ).find( 'a[href="#stats-display"]' ).tab( 'show' );
+ //this.$el.find( 'ul.nav' ).find( 'a[href="#chart-display"]' ).tab( 'show' );
+ return this;
+ },
+
+ _render_dataControl : function(){
+ // controls for which columns are used to plot datapoints (and ids/additional info to attach if desired)
+ var view = this,
+ allColumns = [],
+ numericColumns = [],
+ usePossibleHeaders = ( this.possibleHeaders && this.$dataControl )?
+ ( this.$dataControl.find( '#first-line-header-checkbox' ).is( ':checked' ) ):( false );
+
+ // gather column indeces (from metadata_column_types) and names (from metadata_columnnames)
+ _.each( this.dataset.metadata_column_types, function( type, index ){
+ // use a 1 based index in names/values within the form (will be dec. when parsed out)
+ var oneBasedIndex = index + 1,
+ // default name is 'column <index>'...
+ name = 'column ' + oneBasedIndex;
+
+ // ...but label with the name if available...
+ if( view.dataset.metadata_column_names ){
+ name = view.dataset.metadata_column_names[ index ];
+
+ // ...or, use the first line as headers if the user wants
+ } else if( usePossibleHeaders ){
+ name = view.possibleHeaders[ index ];
+ }
+
+ // cache all columns here
+ allColumns.push({ index: oneBasedIndex, name: name });
+
+ // filter numeric columns to their own list
+ if( type === 'int' || type === 'float' ){
+ numericColumns.push({ index: oneBasedIndex, name: name });
+ }
+ });
+ //TODO: other vals: max_vals, start_val, pagination (chart-settings)
+
+ // render the html
+ var $dataControl = this.$el.find( '.tab-pane#data-control' );
+ $dataControl.html( ScatterplotControlForm.templates.dataControl({
+ allColumns : allColumns,
+ numericColumns : numericColumns,
+ possibleHeaders : ( this.possibleHeaders )?( this.possibleHeaders.join( ', ' ) ):( '' ),
+ usePossibleHeaders : usePossibleHeaders
+ }));
+
+ if( !this.dataset.metadata_column_names && this.possibleHeaders ){
+ $dataControl.find( '#first-line-header' ).show();
+ }
+
+ // preset to column selectors if they were passed in the config in the query string
+ $dataControl.find( '#X-select' ).val( this.chartConfig.xColumn );
+ $dataControl.find( '#Y-select' ).val( this.chartConfig.yColumn );
+ if( this.chartConfig.idColumn !== undefined ){
+ $dataControl.find( '#include-id-checkbox' )
+ .attr( 'checked', true ).trigger( 'change' );
+ $dataControl.find( '#ID-select' ).val( this.chartConfig.idColumn );
+ }
+
+ return $dataControl;
+ },
+
+ _render_chartControl : function(){
+ // tab content to control how the chart is rendered (data glyph size, chart size, etc.)
+ var view = this,
+ $chartControl = this.$el.find( '.tab-pane#chart-control' ),
+ // limits for controls (by control/chartConfig id)
+ //TODO: move into TwoVarScatterplot
+ controlRanges = {
+ 'datapointSize' : { min: 2, max: 10, step: 1 },
+ 'width' : { min: 200, max: 800, step: 20 },
+ 'height' : { min: 200, max: 800, step: 20 }
+ };
+
+ // render the html
+ $chartControl.append( ScatterplotControlForm.templates.chartControl( this.chartConfig ) );
+
+ // set up behaviours, js on sliders
+ $chartControl.find( '.numeric-slider-input' ).each( function(){
+ var $this = $( this ),
+ $output = $this.find( '.slider-output' ),
+ $slider = $this.find( '.slider' ),
+ id = $this.attr( 'id' );
+ //chartControl.log( 'slider set up', 'this:', $this, 'slider:', $slider, 'id', id );
+
+ // what to do when the slider changes: update display and update chartConfig
+ //TODO: move out of loop
+ function onSliderChange(){
+ var $this = $( this ),
+ newValue = $this.slider( 'value' );
+ //chartControl.log( 'slider change', 'this:', $this, 'output:', $output, 'value', newValue );
+ $output.text( newValue );
+ //chartControl.chartConfig[ id ] = newValue;
+ }
+
+ $slider.slider( _.extend( controlRanges[ id ], {
+ value : view.chartConfig[ id ],
+ change : onSliderChange,
+ slide : onSliderChange
+ }));
+ });
+
+ return $chartControl;
+ },
+
+ _render_chartDisplay : function(){
+ // render the tab content where the chart is displayed (but not the chart itself)
+ var $chartDisplay = this.$el.find( '.tab-pane#chart-display' );
+ $chartDisplay.append( ScatterplotControlForm.templates.chartDisplay( this.chartConfig ) );
+ return $chartDisplay;
+ },
+
+ // ------------------------------------------------------------------------- EVENTS
+ events : {
+ 'change #include-id-checkbox' : 'toggleThirdColumnSelector',
+ 'change #first-line-header-checkbox' : 'rerenderDataControl',
+ 'click #data-control #render-button' : 'renderChart',
+ 'click #chart-control #render-button' : 'changeChartSettings'
+ },
+
+ toggleThirdColumnSelector : function(){
+ // show/hide the id selector on the data settings panel
+ this.$el.find( 'select[name="ID"]' ).parent().toggle();
+ },
+
+ rerenderDataControl : function(){
+ this.$dataControl = this._render_dataControl();
+ },
+
+ showLoadingIndicator : function( message, callback ){
+ // display the loading indicator over the tab panels if hidden, update message (if passed)
+ message = message || '';
+ var indicator = this.$el.find( 'div#loading-indicator' );
+ messageBox = indicator.find( '.loading-message' );
+
+ if( indicator.is( ':visible' ) ){
+ if( message ){
+ messageBox.fadeOut( 'fast', function(){
+ messageBox.text( message );
+ messageBox.fadeIn( 'fast', callback );
+ });
+ } else {
+ callback();
+ }
+
+ } else {
+ if( message ){ messageBox.text( message ); }
+ indicator.fadeIn( 'fast', callback );
+ }
+ },
+
+ hideLoadingIndicator : function( callback ){
+ this.$el.find( 'div#loading-indicator' ).fadeOut( 'fast', callback );
+ },
+
+ // ------------------------------------------------------------------------- CHART/STATS RENDERING
+ renderChart : function(){
+ // fetch the data, (re-)render the chart
+ this.log( this + '.renderChart' );
+
+ //TODO: separate data fetch
+
+ // this is a complete re-render, so clear the prev. data
+ this.data = null;
+ this.meta = null;
+
+ // update the chartConfig (here and chart) using chart settings
+ //TODO: separate and improve (used in changeChartSettings too)
+ _.extend( this.chartConfig, this.getChartSettings() );
+ this.log( '\t chartConfig:', this.chartConfig );
+ this.chart.updateConfig( this.chartConfig, false );
+
+ // build the url with the current data settings
+ this.loader.url = this.dataURL + '&' + jQuery.param( this.getDataSettings() );
+ this.log( '\t loader: total lines:', this.loader.total, ' url:', this.loader.url );
+
+ // bind the new data event to: aggregate data, update the chart and stats with new data
+ var view = this;
+ $( this.loader ).bind( 'loaded.new', function( event, response ){
+ view.log( view + ' loaded.new', response );
+
+ // aggregate data and meta
+ view.postProcessDataFetchResponse( response );
+ view.log( '\t postprocessed data:', view.data );
+ view.log( '\t postprocessed meta:', view.meta );
+
+ // update the chart and stats
+ view.showLoadingIndicator( view.renderMsg, function(){
+ view.chart.render( view.data, view.meta );
+ view.renderStats( view.data, view.meta );
+ view.hideLoadingIndicator();
+ });
+ });
+ // when all data loaded - unbind (or we'll start doubling event handlers)
+ $( this.loader ).bind( 'complete', function( event, data ){
+ view.log( view + ' complete', data );
+ $( view.loader ).unbind();
+ });
+
+ // begin loading the data, switch to the chart display tab
+ view.showLoadingIndicator( view.fetchMsg, function(){
+ view.$el.find( 'ul.nav' ).find( 'a[href="#chart-display"]' ).tab( 'show' );
+ view.loader.load();
+ });
+ },
+
+ renderStats : function(){
+ this.log( this + '.renderStats' );
+ // render the stats table in the stats panel
+ //TODO: there's a better way
+ this.$statsDisplay.html( ScatterplotControlForm.templates.statsDisplay({
+ stats: [
+ { name: 'Count', xval: this.meta[0].count, yval: this.meta[1].count },
+ { name: 'Min', xval: this.meta[0].min, yval: this.meta[1].min },
+ { name: 'Max', xval: this.meta[0].max, yval: this.meta[1].max },
+ { name: 'Sum', xval: this.meta[0].sum, yval: this.meta[1].sum },
+ { name: 'Mean', xval: this.meta[0].mean, yval: this.meta[1].mean },
+ { name: 'Median', xval: this.meta[0].median, yval: this.meta[1].median }
+ ]
+ }));
+ },
+
+ changeChartSettings : function(){
+ // re-render the chart with new chart settings and OLD data
+ var view = this;
+ newChartSettings = this.getChartSettings();
+
+ // update the chart config from the chartSettings panel controls
+ _.extend( this.chartConfig, newChartSettings );
+ this.log( 'this.chartConfig:', this.chartConfig );
+ this.chart.updateConfig( this.chartConfig, false );
+
+ // if there's current data, call chart.render with it (no data fetch)
+ if( view.data && view.meta ){
+ view.showLoadingIndicator( view.renderMsg, function(){
+ view.$el.find( 'ul.nav' ).find( 'a[href="#chart-display"]' ).tab( 'show' );
+ view.chart.render( view.data, view.meta );
+ view.hideLoadingIndicator();
+ });
+
+ // no current data, call renderChart instead (which will fetch data)
+ } else {
+ this.renderChart();
+ }
+ },
+
+ // ------------------------------------------------------------------------- DATA AGGREGATION
+ postProcessDataFetchResponse : function( response ){
+ // the loader only returns new data - it's up to this to munge the fetches together properly
+ //TODO: we're now storing data in two places: loader and here
+ // can't we reduce incoming data into loader.data[0]? are there concurrency problems?
+ this.postProcessData( response.data );
+ this.postProcessMeta( response.meta );
+ },
+
+ postProcessData : function( newData ){
+ // stack the column data on top of each other into this.data
+ //this.log( this + '.postProcessData:', newData );
+ var view = this;
+
+ // if we already have data: aggregate
+ if( view.data ){
+ _.each( newData, function( newColData, colIndex ){
+ //view.log( colIndex + ' data:', newColData );
+ //TODO??: time, space efficiency of this?
+ view.data[ colIndex ] = view.data[ colIndex ].concat( newColData );
+ });
+
+ // otherwise: assign (first load)
+ } else {
+ view.data = newData;
+ }
+ },
+
+ postProcessMeta : function( newMeta ){
+ // munge the meta data (stats) from the server fetches together
+ //pre: this.data must be preprocessed (needed for medians)
+ //this.log( this + '.postProcessMeta:', newMeta );
+ var view = this,
+ colTypes = this.dataset.metadata_column_types;
+
+ // if we already have meta: aggregate
+ if( view.meta ){
+ _.each( newMeta, function( newColMeta, colIndex ){
+ var colMeta = view.meta[ colIndex ],
+ colType = colTypes[ colIndex ];
+ //view.log( '\t ' + colIndex + ' postprocessing meta:', newColMeta );
+ //view.log( colIndex + ' old meta:',
+ // 'min:', colMeta.min,
+ // 'max:', colMeta.max,
+ // 'sum:', colMeta.sum,
+ // 'mean:', colMeta.mean,
+ // 'median:', colMeta.median
+ //);
+
+ //!TODO: at what point are we getting int/float overflow on these?!
+ //??: need to be null safe?
+ colMeta.count += ( newColMeta.count )?( newColMeta.count ):( 0 );
+ //view.log( colIndex, 'count:', colMeta.count );
+
+ if( ( colType === 'int' ) || ( colType === 'float' ) ){
+ //view.log( colIndex + ' incoming meta:',
+ // 'min:', newColMeta.min,
+ // 'max:', newColMeta.max,
+ // 'sum:', newColMeta.sum,
+ // 'mean:', newColMeta.mean,
+ // 'median:', newColMeta.median
+ //);
+
+ colMeta.min = Math.min( newColMeta.min, colMeta.min );
+ colMeta.max = Math.max( newColMeta.max, colMeta.max );
+ colMeta.sum = newColMeta.sum + colMeta.sum;
+ colMeta.mean = ( colMeta.count )?( colMeta.sum / colMeta.count ):( null );
+
+ // median's a pain bc of sorting (requires the data as well)
+ var sortedCol = view.data[ colIndex ].slice().sort(),
+ middleIndex = Math.floor( sortedCol.length / 2 );
+
+ if( sortedCol.length % 2 === 0 ){
+ colMeta.median = ( ( sortedCol[ middleIndex ] + sortedCol[( middleIndex + 1 )] ) / 2 );
+
+ } else {
+ colMeta.median = sortedCol[ middleIndex ];
+ }
+
+ //view.log( colIndex + ' new meta:',
+ // 'min:', colMeta.min,
+ // 'max:', colMeta.max,
+ // 'sum:', colMeta.sum,
+ // 'mean:', colMeta.mean,
+ // 'median:', colMeta.median
+ //);
+ }
+ });
+
+ // otherwise: assign (first load)
+ } else {
+ view.meta = newMeta;
+ //view.log( '\t meta (first load):', view.meta );
+ }
+ },
+
+ // ------------------------------------------------------------------------- GET DATA/CHART SETTINGS
+ getDataSettings : function(){
+ // parse the column values for both indeces (for the data fetch) and names (for the chart)
+ var columnSelections = this.getColumnSelections(),
+ columns = [];
+ this.log( '\t columnSelections:', columnSelections );
+
+ //TODO: validate columns - minimally: we can assume either set by selectors or via a good query string
+
+ // get column indices for params, include the desired ID column (if any)
+ //NOTE: these are presented in human-readable 1 base index (to match the data.peek) - adjust
+ columns = [
+ columnSelections.X.colIndex - 1,
+ columnSelections.Y.colIndex - 1
+ ];
+ if( this.$dataControl.find( '#include-id-checkbox' ).attr( 'checked' ) ){
+ columns.push( columnSelections.ID.colIndex - 1 );
+ }
+ //TODO: other vals: max, start, page
+
+ var params = {
+ data_type : 'raw_data',
+ provider : 'column_with_stats',
+ columns : '[' + columns + ']'
+ };
+ this.log( '\t data settings (url params):', params );
+ return params;
+ },
+
+ getColumnSelections : function(){
+ // gets the current user-selected values for which columns to fetch from the data settings panel
+ // returns a map: { column-select name (eg. X) : { colIndex : column-selector val,
+ // colName : selected option text }, ... }
+ var selections = {};
+ this.$dataControl.find( 'div.column-select select' ).each( function(){
+ var $this = $( this ),
+ val = $this.val();
+ selections[ $this.attr( 'name' ) ] = {
+ colIndex : val,
+ colName : $this.children( '[value="' + val + '"]' ).text()
+ };
+ });
+ return selections;
+ },
+
+ getChartSettings : function(){
+ // gets the user-selected chartConfig from the chart settings panel
+ var settings = {},
+ colSelections = this.getColumnSelections();
+ //this.log( 'colSelections:', colSelections );
+
+ //TODO: simplify with keys and loop
+ settings.datapointSize = this.$chartControl.find( '#datapointSize.numeric-slider-input' )
+ .find( '.slider' ).slider( 'value' );
+ settings.width = this.$chartControl.find( '#width.numeric-slider-input' )
+ .find( '.slider' ).slider( 'value' );
+ settings.height = this.$chartControl.find( '#height.numeric-slider-input' )
+ .find( '.slider' ).slider( 'value' );
+
+ // update axes labels using chartSettings inputs (if not at defaults), otherwise the selects' colName
+ //TODO: a little confusing
+ var chartSettingsXLabel = this.$chartControl.find( 'input#X-axis-label' ).val(),
+ chartSettingsYLabel = this.$chartControl.find( 'input#Y-axis-label' ).val();
+ settings.xLabel = ( chartSettingsXLabel === 'X' )?
+ ( colSelections.X.colName ):( chartSettingsXLabel );
+ settings.yLabel = ( chartSettingsYLabel === 'Y' )?
+ ( colSelections.Y.colName ):( chartSettingsYLabel );
+
+ settings.animDuration = ( this.$chartControl.find( '#animate-chart' ).is( ':checked' ) )?
+ ( this.chart.defaults.animDuration ):( 0 );
+
+ this.log( '\t chartSettings:', settings );
+ return settings;
+ },
+
+ toString : function(){
+ return 'ScatterplotControlForm(' + (( this.dataset )?( this.dataset.id ):( '' )) + ')';
+ }
+});
+
+ScatterplotControlForm.templates = {
+ mainLayout : Templates.scatterplotControlForm,
+ dataControl : Templates.dataControl,
+ chartControl : Templates.chartControl,
+ statsDisplay : Templates.statsDisplay,
+ chartDisplay : Templates.chartDisplay
+};
+
+//==============================================================================
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/src/visualization-templates.html
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/src/visualization-templates.html
@@ -0,0 +1,182 @@
+<script type="text/template" class="template-visualization" id="template-visualization-scatterplotControlForm">
+{{! main layout }}
+
+<div class="scatterplot-container chart-container tabbable tabs-left">
+ {{! tab buttons/headers using Bootstrap }}
+ <ul class="nav nav-tabs">
+ {{! start with the data controls as the displayed tab }}
+ <li class="active"><a href="#data-control" data-toggle="tab" class="tooltip"
+ title="Use this tab to change which data are used">Data Controls</a></li>
+ <li><a href="#chart-control" data-toggle="tab" class="tooltip"
+ title="Use this tab to change how the chart is drawn">Chart Controls</a></li>
+ <li><a href="#stats-display" data-toggle="tab" class="tooltip"
+ title="This tab will display overall statistics for your data">Statistics</a></li>
+ <li><a href="#chart-display" data-toggle="tab" class="tooltip"
+ title="This tab will display the chart">Chart</a>
+ {{! loading indicator - initially hidden }}
+ <div id="loading-indicator" style="display: none;">
+ <img class="loading-img" src="{{loadingIndicatorImagePath}}" />
+ <span class="loading-message">{{message}}</span>
+ </div>
+ </li>
+ </ul>
+
+ {{! data form, chart config form, stats, and chart all get their own tab }}
+ <div class="tab-content">
+ {{! ---------------------------- tab for data settings form }}
+ <div id="data-control" class="tab-pane active">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for chart graphics control form }}
+ <div id="chart-control" class="tab-pane">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for data statistics }}
+ <div id="stats-display" class="tab-pane">
+ {{! rendered separately }}
+ </div>
+
+ {{! ---------------------------- tab for actual chart }}
+ <div id="chart-display" class="tab-pane">
+ {{! chart rendered separately }}
+ </div>
+
+ </div>{{! end .tab-content }}
+</div>{{! end .chart-control }}
+</script>
+
+<script type="text/template" class="template-visualization" id="template-visualization-dataControl">
+
+ <p class="help-text">
+ Use the following controls to change the data used by the chart.
+ Use the 'Draw' button to render (or re-render) the chart with the current settings.
+ </p>
+
+ {{! column selector containers }}
+ <div class="column-select">
+ <label for="X-select">Data column for X: </label>
+ <select name="X" id="X-select">
+ {{#each numericColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+ <div class="column-select">
+ <label for="Y-select">Data column for Y: </label>
+ <select name="Y" id="Y-select">
+ {{#each numericColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+
+ {{! optional id column }}
+ <div id="include-id">
+ <label for="include-id-checkbox">Include a third column as data point IDs?</label>
+ <input type="checkbox" name="include-id" id="include-id-checkbox" />
+ <p class="help-text-small">
+ These will be displayed (along with the x and y values) when you hover over
+ a data point.
+ </p>
+ </div>
+ <div class="column-select" style="display: none">
+ <label for="ID-select">Data column for IDs: </label>
+ <select name="ID" id="ID-select">
+ {{#each allColumns}}
+ <option value="{{index}}">{{name}}</option>
+ {{/each}}
+ </select>
+ </div>
+
+ {{! if we're using generic column selection names ('column 1') - allow the user to use the first line }}
+ <div id="first-line-header" style="display: none;">
+ <p>Possible headers: {{ possibleHeaders }}
+ </p>
+ <label for="first-line-header-checkbox">Use the above as column headers?</label>
+ <input type="checkbox" name="include-id" id="first-line-header-checkbox"
+ {{#if usePossibleHeaders }}checked="true"{{/if}}/>
+ <p class="help-text-small">
+ It looks like Galaxy couldn't get proper column headers for this data.
+ Would you like to use the column headers above as column names to select columns?
+ </p>
+ </div>
+
+ <input id="render-button" type="button" value="Draw" />
+ <div class="clear"></div>
+</script>
+
+<script type="text/template" class="template-visualization" id="template-visualization-chartControl">
+ <p class="help-text">
+ Use the following controls to how the chart is displayed.
+ The slide controls can be moved by the mouse or, if the 'handle' is in focus, your keyboard's arrow keys.
+ Move the focus between controls by using the tab or shift+tab keys on your keyboard.
+ Use the 'Draw' button to render (or re-render) the chart with the current settings.
+ </p>
+
+ <div id="datapointSize" class="form-input numeric-slider-input">
+ <label for="datapointSize">Size of data point: </label>
+ <div class="slider-output">{{datapointSize}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ Size of the graphic representation of each data point
+ </p>
+ </div>
+
+ <div id="animDuration" class="form-input checkbox-input">
+ <label for="animate-chart">Animate chart transitions?: </label>
+ <input type="checkbox" id="animate-chart"
+ class="checkbox control"{{#if animDuration}} checked="true"{{/if}} />
+ <p class="form-help help-text-small">
+ Uncheck this to disable the animations used on the chart
+ </p>
+ </div>
+
+ <div id="width" class="form-input numeric-slider-input">
+ <label for="width">Chart width: </label>
+ <div class="slider-output">{{width}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ (not including chart margins and axes)
+ </p>
+ </div>
+
+ <div id="height" class="form-input numeric-slider-input">
+ <label for="height">Chart height: </label>
+ <div class="slider-output">{{height}}</div>
+ <div class="slider"></div>
+ <p class="form-help help-text-small">
+ (not including chart margins and axes)
+ </p>
+ </div>
+
+ <div id="X-axis-label"class="text-input form-input">
+ <label for="X-axis-label">Re-label the X axis: </label>
+ <input type="text" name="X-axis-label" id="X-axis-label" value="{{xLabel}}" />
+ <p class="form-help help-text-small"></p>
+ </div>
+
+ <div id="Y-axis-label" class="text-input form-input">
+ <label for="Y-axis-label">Re-label the Y axis: </label>
+ <input type="text" name="Y-axis-label" id="Y-axis-label" value="{{yLabel}}" />
+ <p class="form-help help-text-small"></p>
+ </div>
+
+ <input id="render-button" type="button" value="Draw" />
+</script>
+
+<script type="text/template" class="template-visualization" id="template-visualization-statsDisplay">
+ <p class="help-text">By column:</p>
+ <table id="chart-stats-table">
+ <thead><th></th><th>X</th><th>Y</th></thead>
+ {{#each stats}}
+ <tr><td>{{name}}</td><td>{{xval}}</td><td>{{yval}}</td></tr>
+ </tr>
+ {{/each}}
+ </table>
+</script>
+
+<script type="text/template" class="template-visualization" id="template-visualization-chartDisplay">
+ <svg width="{{width}}" height="{{height}}"></svg>
+</script>
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/static/scatterplot.css
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/static/scatterplot.css
@@ -0,0 +1,181 @@
+/*TODO: use/move into base.less*/
+* { margin: 0px; padding: 0px; }
+
+/* -------------------------------------------- general layout */
+div.tab-pane {
+ padding: 8px;
+}
+
+/* -------------------------------------------- header */
+.header {
+ margin-bottom: 8px;
+}
+
+#chart-header {
+ padding : 8px;
+ background-color: #ebd9b2;
+ margin-bottom: 16px;
+ overflow: auto;
+}
+
+#chart-header .subtitle {
+ margin: -4px 0px 0px 4px;
+ padding : 0;
+ color: white;
+ font-size: small;
+}
+
+/* -------------------------------------------- main layout */
+#scatterplot {
+ /*from width + margin of chart?*/
+}
+
+.scatterplot-container .tab-pane {
+}
+
+/* -------------------------------------------- all controls */
+
+#scatterplot input[type=button],
+#scatterplot select {
+ width: 100%;
+ max-width: 256px;
+ margin-bottom: 8px;
+}
+
+#scatterplot .help-text,
+#scatterplot .help-text-small {
+ color: grey;
+}
+
+#scatterplot .help-text {
+ padding-bottom: 16px;
+}
+
+#scatterplot .help-text-small {
+ padding: 4px;
+ font-size: smaller;
+}
+
+#scatterplot > * {
+}
+
+#scatterplot input[value=Draw] {
+ display: block;
+ margin-top: 16px;
+}
+
+#scatterplot .numeric-slider-input {
+ max-width: 70%;
+}
+
+/* -------------------------------------------- data controls */
+
+/* -------------------------------------------- chart controls */
+#chart-control .form-input {
+ /*display: table-row;*/
+}
+
+#chart-control label {
+ /*text-align: right;*/
+ margin-bottom: 8px;
+ /*display: table-cell;*/
+}
+
+#chart-control .slider {
+ /*display: table-cell;*/
+ height: 8px;
+ display: block;
+ margin: 8px 0px 0px 8px;
+}
+
+#chart-control .slider-output {
+ /*display: table-cell;*/
+ float: right;
+}
+
+#chart-control input[type="text"] {
+ border: 1px solid lightgrey;
+}
+
+
+/* -------------------------------------------- statistics */
+#stats-display table#chart-stats-table {
+ width: 100%;
+}
+
+#stats-display #chart-stats-table th {
+ width: 30%;
+ padding: 4px;
+ font-weight: bold;
+ color: grey;
+}
+
+#stats-display #chart-stats-table td {
+ border: solid lightgrey;
+ border-width: 1px 0px 0px 1px;
+ padding: 4px;
+}
+
+#stats-display #chart-stats-table td:nth-child(1) {
+ border-width: 1px 0px 0px 0px;
+ padding-right: 1em;
+ text-align: right;
+ font-weight: bold;
+ color: grey;
+}
+
+/* -------------------------------------------- load indicators */
+#loading-indicator {
+ margin: 12px 0px 0px 8px;
+}
+
+#scatterplot #loading-indicator .loading-message {
+ font-style: italic;
+ font-size: smaller;
+ color: grey;
+}
+
+/* -------------------------------------------- chart area */
+#chart-holder {
+ overflow: auto;
+ margin-left: 8px;
+}
+
+svg .grid-line {
+ fill: none;
+ stroke: lightgrey;
+ stroke-opacity: 0.5;
+ shape-rendering: crispEdges;
+ stroke-dasharray: 3, 3;
+}
+
+svg .axis path, svg .axis line {
+ fill: none;
+ stroke: black;
+ shape-rendering: crispEdges;
+}
+
+svg .axis text {
+ font-family: monospace;
+ font-size: 12px;
+}
+
+svg #x-axis-label, svg #y-axis-label {
+ font-family: sans-serif;
+ font-size: 10px;
+}
+
+svg .glyph {
+ stroke: none;
+ fill: black;
+ fill-opacity: 0.2;
+}
+
+/* -------------------------------------------- info box */
+.chart-info-box {
+ border-radius: 4px;
+ padding: 4px;
+ background-color: white;
+ border: 1px solid black;
+}
+
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/static/scatterplot.js
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/static/scatterplot.js
@@ -0,0 +1,1 @@
+function TwoVarScatterplot(a){var b=10,c=7,d=10,e=8,f=5;this.log=function(){if(this.debugging&&console&&console.debug){var a=Array.prototype.slice.call(arguments);a.unshift(this.toString()),console.debug.apply(console,a)}},this.log("new TwoVarScatterplot:",a),this.defaults={id:"TwoVarScatterplot",containerSelector:"body",maxDataPoints:3e4,datapointSize:4,animDuration:500,xNumTicks:10,yNumTicks:10,xAxisLabelBumpY:40,yAxisLabelBumpX:-40,width:400,height:400,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,xMin:null,xMax:null,yMin:null,yMax:null,xLabel:"X",yLabel:"Y"},this.config=_.extend({},this.defaults,a),this.log("intial config:",this.config),this.updateConfig=function(a){_.extend(this.config,a),this.log(this+".updateConfig:",this.config)},this.toString=function(){return this.config.id},this.translateStr=function(a,b){return"translate("+a+","+b+")"},this.rotateStr=function(a,b,c){return"rotate("+a+","+b+","+c+")"},this.adjustChartDimensions=function(a,b,c,d){a=a||0,b=b||0,c=c||0,d=d||0,this.svg.attr("width",this.config.width+(this.config.marginRight+b)+(this.config.marginLeft+d)).attr("height",this.config.height+(this.config.marginTop+a)+(this.config.marginBottom+c)).style("display","block"),this.content=this.svg.select("g.content").attr("transform",this.translateStr(this.config.marginLeft+d,this.config.marginTop+a))},this.preprocessData=function(a){return a.length>this.config.maxDataPoints?a.slice(0,this.config.maxDataPoints):a},this.findMinMaxes=function(a,b,c){this.xMin=this.config.xMin||c?c[0].min:d3.min(a),this.xMax=this.config.xMax||c?c[0].max:d3.max(a),this.yMin=this.config.yMin||c?c[1].min:d3.min(b),this.yMax=this.config.yMax||c?c[1].max:d3.max(b)},this.setUpScales=function(){this.xScale=d3.scale.linear().domain([this.xMin,this.xMax]).range([0,this.config.width]),this.yScale=d3.scale.linear().domain([this.yMin,this.yMax]).range([this.config.height,0])},this.setUpXAxis=function(){this.xAxisFn=d3.svg.axis().scale(this.xScale).ticks(this.config.xNumTicks).orient("bottom"),this.xAxis.attr("transform",this.translateStr(0,this.config.height)).call(this.xAxisFn);var a=d3.max(_.map([this.xMin,this.xMax],function(a){return String(a).length}));a>=f&&this.xAxis.selectAll("g").filter(":nth-child(odd)").style("display","none"),this.log("this.config.xLabel:",this.config.xLabel),this.xAxisLabel.attr("x",this.config.width/2).attr("y",this.config.xAxisLabelBumpY).attr("text-anchor","middle").text(this.config.xLabel),this.log("xAxisLabel:",this.xAxisLabel)},this.setUpYAxis=function(){this.yAxisFn=d3.svg.axis().scale(this.yScale).ticks(this.config.yNumTicks).orient("left"),this.yAxis.call(this.yAxisFn);var a=this.yAxis.selectAll("text").filter(function(a,b){return 0!==b});this.log("yTickLabels:",a),this.yLongestLabel=d3.max(a[0].map(function(a){return d3.select(a).text().length}))||0;var f=b+this.yLongestLabel*c+e+d;if(this.config.yAxisLabelBumpX=-(f-d),this.config.marginLeft<f){var g=f-this.config.marginLeft;g=0>g?0:g,this.adjustChartDimensions(0,0,0,g)}this.yAxisLabel.attr("x",this.config.yAxisLabelBumpX).attr("y",this.config.height/2).attr("text-anchor","middle").attr("transform",this.rotateStr(-90,this.config.yAxisLabelBumpX,this.config.height/2)).text(this.config.yLabel)},this.renderGrid=function(){this.vGridLines=this.content.selectAll("line.v-grid-line").data(this.xScale.ticks(this.xAxisFn.ticks()[0])),this.vGridLines.enter().append("svg:line").classed("grid-line v-grid-line",!0),this.vGridLines.attr("x1",this.xScale).attr("y1",0).attr("x2",this.xScale).attr("y2",this.config.height),this.vGridLines.exit().remove(),this.hGridLines=this.content.selectAll("line.h-grid-line").data(this.yScale.ticks(this.yAxisFn.ticks()[0])),this.hGridLines.enter().append("svg:line").classed("grid-line h-grid-line",!0),this.hGridLines.attr("x1",0).attr("y1",this.yScale).attr("x2",this.config.width).attr("y2",this.yScale),this.hGridLines.exit().remove()},this.renderDatapoints=function(a,b,c){this.log(this+".renderDatapoints",arguments);var d=0,e=this,f=function(b,c){return e.xScale(a[c])},g=function(a,c){return e.yScale(b[c])},h=this.content.selectAll(".glyph").data(a);d=0,h.enter().append("svg:circle").each(function(){d+=1}).classed("glyph",!0).attr("cx",0).attr("cy",this.config.height).attr("r",0),this.log(d," new glyphs created"),d=0,h.transition().duration(this.config.animDuration).each(function(){d+=1}).attr("cx",f).attr("cy",g).attr("r",e.config.datapointSize),this.log(d," existing glyphs transitioned"),h.exit().each(function(){d+=1}).transition().duration(this.config.animDuration).attr("cy",this.config.height).attr("r",0).remove(),this.log(d," glyphs removed"),this._addDatapointEventhandlers(h,a,b,c)},this._addDatapointEventhandlers=function(a,b,c,d){var e=this;a.on("mouseover",function(a,f){var g=d3.select(this);g.style("fill","red").style("fill-opacity",1),e.content.append("line").attr("stroke","red").attr("stroke-width",1).attr("x1",g.attr("cx")-e.config.datapointSize).attr("y1",g.attr("cy")).attr("x2",0).attr("y2",g.attr("cy")).classed("hoverline",!0),g.attr("cy")<e.config.height&&e.content.append("line").attr("stroke","red").attr("stroke-width",1).attr("x1",g.attr("cx")).attr("y1",g.attr("cy")+e.config.datapointSize).attr("x2",g.attr("cx")).attr("y2",e.config.height).classed("hoverline",!0);var h=$(this).offset();e.datapointInfoBox=e.infoBox(h.top,h.left,e.infoHtml(b[f],c[f],d?d[f]:void 0)),$("body").append(e.datapointInfoBox)}).on("mouseout",function(){d3.select(this).style("fill","black").style("fill-opacity",.2),e.content.selectAll(".hoverline").remove(),e.datapointInfoBox&&e.datapointInfoBox.remove()})},this.render=function(a,b){this.log(this+".render",arguments),this.log(" config:",this.config);var c=a[0],d=a[1],e=a.length>2?a[2]:void 0;c=this.preprocessData(c),d=this.preprocessData(d),this.log("xCol len",c.length,"yCol len",d.length),this.findMinMaxes(c,d,b),this.setUpScales(),this.svg||(this.svg=d3.select("svg").attr("class","chart")),this.content||(this.content=this.svg.append("svg:g").attr("class","content").attr("id",this.config.id)),this.adjustChartDimensions(),this.xAxis||(this.xAxis=this.content.append("g").attr("class","axis").attr("id","x-axis")),this.xAxisLabel||(this.xAxisLabel=this.xAxis.append("text").attr("class","axis-label").attr("id","x-axis-label")),this.yAxis||(this.yAxis=this.content.append("g").attr("class","axis").attr("id","y-axis")),this.yAxisLabel||(this.yAxisLabel=this.yAxis.append("text").attr("class","axis-label").attr("id","y-axis-label")),this.setUpXAxis(),this.setUpYAxis(),this.renderGrid(),this.renderDatapoints(c,d,e)},this.infoHtml=function(a,b,c){var d=$("<div/>");return c&&$("<div/>").text(c).css("font-weight","bold").appendTo(d),$("<div/>").text(a).appendTo(d),$("<div/>").text(b).appendTo(d),d.html()},this.infoBox=function(a,b,c,d,e){d=d||0,e=e||20;var f=$("<div />").addClass("chart-info-box").css({position:"absolute",top:a+d,left:b+e});return f.html(c),f}}this.Templates=this.Templates||{},this.Templates.chartControl=Handlebars.template(function(a,b,c,d,e){function f(){return' checked="true"'}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var g,h="",i="function",j=this.escapeExpression,k=this;return h+='<p class="help-text">\n Use the following controls to how the chart is displayed.\n The slide controls can be moved by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys.\n Move the focus between controls by using the tab or shift+tab keys on your keyboard.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n </p>\n\n <div id="datapointSize" class="form-input numeric-slider-input">\n <label for="datapointSize">Size of data point: </label>\n <div class="slider-output">',(g=c.datapointSize)?g=g.call(b,{hash:{},data:e}):(g=b.datapointSize,g=typeof g===i?g.apply(b):g),h+=j(g)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n Size of the graphic representation of each data point\n </p>\n </div>\n\n <div id="animDuration" class="form-input checkbox-input">\n <label for="animate-chart">Animate chart transitions?: </label>\n <input type="checkbox" id="animate-chart"\n class="checkbox control"',g=c["if"].call(b,b.animDuration,{hash:{},inverse:k.noop,fn:k.program(1,f,e),data:e}),(g||0===g)&&(h+=g),h+=' />\n <p class="form-help help-text-small">\n Uncheck this to disable the animations used on the chart\n </p>\n </div>\n\n <div id="width" class="form-input numeric-slider-input">\n <label for="width">Chart width: </label>\n <div class="slider-output">',(g=c.width)?g=g.call(b,{hash:{},data:e}):(g=b.width,g=typeof g===i?g.apply(b):g),h+=j(g)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="height" class="form-input numeric-slider-input">\n <label for="height">Chart height: </label>\n <div class="slider-output">',(g=c.height)?g=g.call(b,{hash:{},data:e}):(g=b.height,g=typeof g===i?g.apply(b):g),h+=j(g)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="X-axis-label"class="text-input form-input">\n <label for="X-axis-label">Re-label the X axis: </label>\n <input type="text" name="X-axis-label" id="X-axis-label" value="',(g=c.xLabel)?g=g.call(b,{hash:{},data:e}):(g=b.xLabel,g=typeof g===i?g.apply(b):g),h+=j(g)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <div id="Y-axis-label" class="text-input form-input">\n <label for="Y-axis-label">Re-label the Y axis: </label>\n <input type="text" name="Y-axis-label" id="Y-axis-label" value="',(g=c.yLabel)?g=g.call(b,{hash:{},data:e}):(g=b.yLabel,g=typeof g===i?g.apply(b):g),h+=j(g)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />'}),this.Templates.chartDisplay=Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f,g="",h="function",i=this.escapeExpression;return g+='<svg width="',(f=c.width)?f=f.call(b,{hash:{},data:e}):(f=b.width,f=typeof f===h?f.apply(b):f),g+=i(f)+'" height="',(f=c.height)?f=f.call(b,{hash:{},data:e}):(f=b.height,f=typeof f===h?f.apply(b):f),g+=i(f)+'"></svg>'}),this.Templates.dataControl=Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e="";return e+='\n <option value="',(d=c.index)?d=d.call(a,{hash:{},data:b}):(d=a.index,d=typeof d===j?d.apply(a):d),e+=k(d)+'">',(d=c.name)?d=d.call(a,{hash:{},data:b}):(d=a.name,d=typeof d===j?d.apply(a):d),e+=k(d)+"</option>\n "}function g(){return'checked="true"'}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var h,i="",j="function",k=this.escapeExpression,l=this;return i+='<p class="help-text">\n Use the following controls to change the data used by the chart.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n </p>\n\n \n <div class="column-select">\n <label for="X-select">Data column for X: </label>\n <select name="X" id="X-select">\n ',h=c.each.call(b,b.numericColumns,{hash:{},inverse:l.noop,fn:l.program(1,f,e),data:e}),(h||0===h)&&(i+=h),i+='\n </select>\n </div>\n <div class="column-select">\n <label for="Y-select">Data column for Y: </label>\n <select name="Y" id="Y-select">\n ',h=c.each.call(b,b.numericColumns,{hash:{},inverse:l.noop,fn:l.program(1,f,e),data:e}),(h||0===h)&&(i+=h),i+='\n </select>\n </div>\n\n \n <div id="include-id">\n <label for="include-id-checkbox">Include a third column as data point IDs?</label>\n <input type="checkbox" name="include-id" id="include-id-checkbox" />\n <p class="help-text-small">\n These will be displayed (along with the x and y values) when you hover over\n a data point.\n </p>\n </div>\n <div class="column-select" style="display: none">\n <label for="ID-select">Data column for IDs: </label>\n <select name="ID" id="ID-select">\n ',h=c.each.call(b,b.allColumns,{hash:{},inverse:l.noop,fn:l.program(1,f,e),data:e}),(h||0===h)&&(i+=h),i+='\n </select>\n </div>\n\n \n <div id="first-line-header" style="display: none;">\n <p>Possible headers: ',(h=c.possibleHeaders)?h=h.call(b,{hash:{},data:e}):(h=b.possibleHeaders,h=typeof h===j?h.apply(b):h),i+=k(h)+'\n </p>\n <label for="first-line-header-checkbox">Use the above as column headers?</label>\n <input type="checkbox" name="include-id" id="first-line-header-checkbox"\n ',h=c["if"].call(b,b.usePossibleHeaders,{hash:{},inverse:l.noop,fn:l.program(3,g,e),data:e}),(h||0===h)&&(i+=h),i+='/>\n <p class="help-text-small">\n It looks like Galaxy couldn\'t get proper column headers for this data.\n Would you like to use the column headers above as column names to select columns?\n </p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />\n <div class="clear"></div>'}),this.Templates.scatterplotControlForm=Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f,g="",h="function",i=this.escapeExpression;return g+='\n\n<div class="scatterplot-container chart-container tabbable tabs-left">\n \n <ul class="nav nav-tabs">\n \n <li class="active"><a href="#data-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change which data are used">Data Controls</a></li>\n <li><a href="#chart-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change how the chart is drawn">Chart Controls</a></li>\n <li><a href="#stats-display" data-toggle="tab" class="tooltip"\n title="This tab will display overall statistics for your data">Statistics</a></li>\n <li><a href="#chart-display" data-toggle="tab" class="tooltip"\n title="This tab will display the chart">Chart</a>\n \n <div id="loading-indicator" style="display: none;">\n <img class="loading-img" src="',(f=c.loadingIndicatorImagePath)?f=f.call(b,{hash:{},data:e}):(f=b.loadingIndicatorImagePath,f=typeof f===h?f.apply(b):f),g+=i(f)+'" />\n <span class="loading-message">',(f=c.message)?f=f.call(b,{hash:{},data:e}):(f=b.message,f=typeof f===h?f.apply(b):f),g+=i(f)+"</span>\n </div>\n </li>\n </ul>\n\n "+'\n <div class="tab-content">\n '+'\n <div id="data-control" class="tab-pane active">\n '+"\n </div>\n \n "+'\n <div id="chart-control" class="tab-pane">\n '+"\n </div>\n\n "+'\n <div id="stats-display" class="tab-pane">\n '+"\n </div>\n\n "+'\n <div id="chart-display" class="tab-pane">\n '+"\n </div>\n\n </div>"+"\n</div>"}),this.Templates.statsDisplay=Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e="";return e+="\n <tr><td>",(d=c.name)?d=d.call(a,{hash:{},data:b}):(d=a.name,d=typeof d===i?d.apply(a):d),e+=j(d)+"</td><td>",(d=c.xval)?d=d.call(a,{hash:{},data:b}):(d=a.xval,d=typeof d===i?d.apply(a):d),e+=j(d)+"</td><td>",(d=c.yval)?d=d.call(a,{hash:{},data:b}):(d=a.yval,d=typeof d===i?d.apply(a):d),e+=j(d)+"</td></tr>\n </tr>\n "}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var g,h="",i="function",j=this.escapeExpression,k=this;return h+='<p class="help-text">By column:</p>\n <table id="chart-stats-table">\n <thead><th></th><th>X</th><th>Y</th></thead>\n ',g=c.each.call(b,b.stats,{hash:{},inverse:k.noop,fn:k.program(1,f,e),data:e}),(g||0===g)&&(h+=g),h+="\n </table>"});var ScatterplotControlForm=BaseView.extend(LoggableMixin).extend({className:"scatterplot-control-form",dataLoadDelay:4e3,dataLoadSize:5e3,loadingIndicatorImage:"loading_small_white_bg.gif",fetchMsg:"Fetching data...",renderMsg:"Rendering...",initialize:function(a){this.log(this+".initialize, attributes:",a),this.dataset=null,this.chartConfig=null,this.chart=null,this.loader=null,this.$dataControl=null,this.$chartControl=null,this.$statsDisplay=null,this.$chartDisplay=null,this.dataFetch=null,this.initializeFromAttributes(a),this.initializeChart(a),this.initializeDataLoader(a)},initializeFromAttributes:function(a){if(!a||!a.dataset)throw"ScatterplotView requires a dataset";if(this.dataset=a.dataset,"string"===jQuery.type(this.dataset.metadata_column_types)&&(this.dataset.metadata_column_types=this.dataset.metadata_column_types.split(", ")),this.log(" dataset:",this.dataset),this.dataset.comment_lines&&this.dataset.comment_lines.length){var b=this.dataset.comment_lines[0],c=b.split(" ");c.length===this.dataset.metadata_column_types.length&&(this.possibleHeaders=c)}if(!a.apiDatasetsURL)throw"ScatterplotView requires a apiDatasetsURL";this.dataURL=a.apiDatasetsURL+"/"+this.dataset.id+"?",this.log(" dataURL:",this.dataURL)},initializeChart:function(a){this.chartConfig=a.chartConfig||{},this.log(" initial chartConfig:",this.chartConfig),this.chart=new TwoVarScatterplot(this.chartConfig),this.chartConfig=this.chart.config},initializeDataLoader:function(a){var b=this;this.loader=new LazyDataLoader({url:null,start:a.start||0,total:a.total||this.dataset.metadata_data_lines,delay:this.dataLoadDelay,size:this.dataLoadSize,buildUrl:function(a,b){return this.url+"&"+jQuery.param({start_val:a,max_vals:b})}}),$(this.loader).bind("error",function(a,c,d){b.log("ERROR:",c,d),alert("ERROR fetching data:\n"+c+"\n"+d),b.hideLoadingIndicator()})},render:function(){return this.log(this+".render"),this.$el.append(ScatterplotControlForm.templates.mainLayout({loadingIndicatorImagePath:"/static/images/"+this.loadingIndicatorImage,message:""})),this.$dataControl=this._render_dataControl(),this.$chartControl=this._render_chartControl(),this.$statsDisplay=this.$el.find(".tab-pane#stats-display"),this.$chartDisplay=this._render_chartDisplay(),this.chartConfig.xColumn&&this.chartConfig.yColumn&&this.renderChart(),this.$el.find(".tooltip").tooltip(),this},_render_dataControl:function(){var a=this,b=[],c=[],d=this.possibleHeaders&&this.$dataControl?this.$dataControl.find("#first-line-header-checkbox").is(":checked"):!1;_.each(this.dataset.metadata_column_types,function(e,f){var g=f+1,h="column "+g;a.dataset.metadata_column_names?h=a.dataset.metadata_column_names[f]:d&&(h=a.possibleHeaders[f]),b.push({index:g,name:h}),("int"===e||"float"===e)&&c.push({index:g,name:h})});var e=this.$el.find(".tab-pane#data-control");return e.html(ScatterplotControlForm.templates.dataControl({allColumns:b,numericColumns:c,possibleHeaders:this.possibleHeaders?this.possibleHeaders.join(", "):"",usePossibleHeaders:d})),!this.dataset.metadata_column_names&&this.possibleHeaders&&e.find("#first-line-header").show(),e.find("#X-select").val(this.chartConfig.xColumn),e.find("#Y-select").val(this.chartConfig.yColumn),void 0!==this.chartConfig.idColumn&&(e.find("#include-id-checkbox").attr("checked",!0).trigger("change"),e.find("#ID-select").val(this.chartConfig.idColumn)),e},_render_chartControl:function(){var a=this,b=this.$el.find(".tab-pane#chart-control"),c={datapointSize:{min:2,max:10,step:1},width:{min:200,max:800,step:20},height:{min:200,max:800,step:20}};return b.append(ScatterplotControlForm.templates.chartControl(this.chartConfig)),b.find(".numeric-slider-input").each(function(){function b(){var a=$(this),b=a.slider("value");e.text(b)}var d=$(this),e=d.find(".slider-output"),f=d.find(".slider"),g=d.attr("id");f.slider(_.extend(c[g],{value:a.chartConfig[g],change:b,slide:b}))}),b},_render_chartDisplay:function(){var a=this.$el.find(".tab-pane#chart-display");return a.append(ScatterplotControlForm.templates.chartDisplay(this.chartConfig)),a},events:{"change #include-id-checkbox":"toggleThirdColumnSelector","change #first-line-header-checkbox":"rerenderDataControl","click #data-control #render-button":"renderChart","click #chart-control #render-button":"changeChartSettings"},toggleThirdColumnSelector:function(){this.$el.find('select[name="ID"]').parent().toggle()},rerenderDataControl:function(){this.$dataControl=this._render_dataControl()},showLoadingIndicator:function(a,b){a=a||"";var c=this.$el.find("div#loading-indicator");messageBox=c.find(".loading-message"),c.is(":visible")?a?messageBox.fadeOut("fast",function(){messageBox.text(a),messageBox.fadeIn("fast",b)}):b():(a&&messageBox.text(a),c.fadeIn("fast",b))},hideLoadingIndicator:function(a){this.$el.find("div#loading-indicator").fadeOut("fast",a)},renderChart:function(){this.log(this+".renderChart"),this.data=null,this.meta=null,_.extend(this.chartConfig,this.getChartSettings()),this.log(" chartConfig:",this.chartConfig),this.chart.updateConfig(this.chartConfig,!1),this.loader.url=this.dataURL+"&"+jQuery.param(this.getDataSettings()),this.log(" loader: total lines:",this.loader.total," url:",this.loader.url);var a=this;$(this.loader).bind("loaded.new",function(b,c){a.log(a+" loaded.new",c),a.postProcessDataFetchResponse(c),a.log(" postprocessed data:",a.data),a.log(" postprocessed meta:",a.meta),a.showLoadingIndicator(a.renderMsg,function(){a.chart.render(a.data,a.meta),a.renderStats(a.data,a.meta),a.hideLoadingIndicator()})}),$(this.loader).bind("complete",function(b,c){a.log(a+" complete",c),$(a.loader).unbind()}),a.showLoadingIndicator(a.fetchMsg,function(){a.$el.find("ul.nav").find('a[href="#chart-display"]').tab("show"),a.loader.load()})},renderStats:function(){this.log(this+".renderStats"),this.$statsDisplay.html(ScatterplotControlForm.templates.statsDisplay({stats:[{name:"Count",xval:this.meta[0].count,yval:this.meta[1].count},{name:"Min",xval:this.meta[0].min,yval:this.meta[1].min},{name:"Max",xval:this.meta[0].max,yval:this.meta[1].max},{name:"Sum",xval:this.meta[0].sum,yval:this.meta[1].sum},{name:"Mean",xval:this.meta[0].mean,yval:this.meta[1].mean},{name:"Median",xval:this.meta[0].median,yval:this.meta[1].median}]}))},changeChartSettings:function(){var a=this;newChartSettings=this.getChartSettings(),_.extend(this.chartConfig,newChartSettings),this.log("this.chartConfig:",this.chartConfig),this.chart.updateConfig(this.chartConfig,!1),a.data&&a.meta?a.showLoadingIndicator(a.renderMsg,function(){a.$el.find("ul.nav").find('a[href="#chart-display"]').tab("show"),a.chart.render(a.data,a.meta),a.hideLoadingIndicator()}):this.renderChart()},postProcessDataFetchResponse:function(a){this.postProcessData(a.data),this.postProcessMeta(a.meta)},postProcessData:function(a){var b=this;b.data?_.each(a,function(a,c){b.data[c]=b.data[c].concat(a)}):b.data=a},postProcessMeta:function(a){var b=this,c=this.dataset.metadata_column_types;b.meta?_.each(a,function(a,d){var e=b.meta[d],f=c[d];if(e.count+=a.count?a.count:0,"int"===f||"float"===f){e.min=Math.min(a.min,e.min),e.max=Math.max(a.max,e.max),e.sum=a.sum+e.sum,e.mean=e.count?e.sum/e.count:null;var g=b.data[d].slice().sort(),h=Math.floor(g.length/2);e.median=0===g.length%2?(g[h]+g[h+1])/2:g[h]}}):b.meta=a},getDataSettings:function(){var a=this.getColumnSelections(),b=[];this.log(" columnSelections:",a),b=[a.X.colIndex-1,a.Y.colIndex-1],this.$dataControl.find("#include-id-checkbox").attr("checked")&&b.push(a.ID.colIndex-1);var c={data_type:"raw_data",provider:"column_with_stats",columns:"["+b+"]"};return this.log(" data settings (url params):",c),c},getColumnSelections:function(){var a={};return this.$dataControl.find("div.column-select select").each(function(){var b=$(this),c=b.val();a[b.attr("name")]={colIndex:c,colName:b.children('[value="'+c+'"]').text()}}),a},getChartSettings:function(){var a={},b=this.getColumnSelections();a.datapointSize=this.$chartControl.find("#datapointSize.numeric-slider-input").find(".slider").slider("value"),a.width=this.$chartControl.find("#width.numeric-slider-input").find(".slider").slider("value"),a.height=this.$chartControl.find("#height.numeric-slider-input").find(".slider").slider("value");var c=this.$chartControl.find("input#X-axis-label").val(),d=this.$chartControl.find("input#Y-axis-label").val();return a.xLabel="X"===c?b.X.colName:c,a.yLabel="Y"===d?b.Y.colName:d,a.animDuration=this.$chartControl.find("#animate-chart").is(":checked")?this.chart.defaults.animDuration:0,this.log(" chartSettings:",a),a},toString:function(){return"ScatterplotControlForm("+(this.dataset?this.dataset.id:"")+")"}});ScatterplotControlForm.templates={mainLayout:Templates.scatterplotControlForm,dataControl:Templates.dataControl,chartControl:Templates.chartControl,statsDisplay:Templates.statsDisplay,chartDisplay:Templates.chartDisplay};
\ No newline at end of file
diff -r c623f3d38221c588de3976c05b688387933cbf29 -r 42cbb2d2014cbdb4e227faefa69f0c9808d5b1e7 config/plugins/visualizations/scatterplot/templates/scatterplot.mako
--- /dev/null
+++ b/config/plugins/visualizations/scatterplot/templates/scatterplot.mako
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>${hda.name} | ${visualization_name}</title>
+
+## ----------------------------------------------------------------------------
+<link type="text/css" rel="Stylesheet" media="screen" href="/static/style/base.css">
+<link type="text/css" rel="Stylesheet" media="screen" href="/static/style/jquery-ui/smoothness/jquery-ui.css">
+
+<link type="text/css" rel="Stylesheet" media="screen" href="/plugins/visualizations/scatterplot/static/scatterplot.css">
+
+## ----------------------------------------------------------------------------
+<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.migrate.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/underscore.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/backbone/backbone.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/backbone/backbone-relational.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/handlebars.runtime.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/d3.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/bootstrap.js"></script>
+<script type="text/javascript" src="/static/scripts/libs/jquery/jquery-ui.js"></script>
+<script type="text/javascript" src="/static/scripts/utils/LazyDataLoader.js"></script>
+<script type="text/javascript" src="/static/scripts/mvc/base-mvc.js"></script>
+
+<script type="text/javascript" src="/plugins/visualizations/scatterplot/static/scatterplot.js"></script>
+
+</head>
+
+## ----------------------------------------------------------------------------
+<body>
+%if not embedded:
+## dataset info: only show if on own page
+<div id="chart-header" class="header">
+ <h2 class="title">Scatterplot of '${hda.name}'</h2>
+ <p class="subtitle">${hda.info}</p>
+</div>
+%endif
+
+<div id="scatterplot" class="scatterplot-control-form"></div>
+
+<script type="text/javascript">
+$(function(){
+ var hda = ${h.to_json_string( trans.security.encode_dict_ids( hda.get_api_value() ) )},
+ querySettings = ${h.to_json_string( query_args )},
+ chartConfig = _.extend( querySettings, {
+ containerSelector : '#chart',
+ //TODO: move to ScatterplotControlForm.initialize
+ marginTop : ( querySettings.marginTop > 20 )?( querySettings.marginTop ):( 20 ),
+
+ xColumn : querySettings.xColumn,
+ yColumn : querySettings.yColumn,
+ idColumn : querySettings.idColumn
+ });
+ //console.debug( querySettings );
+
+ var settingsForm = new ScatterplotControlForm({
+ dataset : hda,
+ apiDatasetsURL : "${h.url_for( controller='/api/datasets', action='index' )}",
+ el : $( '#scatterplot' ),
+ chartConfig : chartConfig
+ }).render();
+
+});
+</script>
+
+</body>
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.
1
0
commit/galaxy-central: dan: Fix for Datatype.matches_any() introduced in 10027:b999689a0130. Fixes issue seen where external display applications requiring format conversions would always fail with server error.
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8ee4176d44ba/
Changeset: 8ee4176d44ba
Branch: next-stable
User: dan
Date: 2013-08-07 21:23:30
Summary: Fix for Datatype.matches_any() introduced in 10027:b999689a0130. Fixes issue seen where external display applications requiring format conversions would always fail with server error.
Affected #: 1 file
diff -r 3615504d0a43b511c44a4aa6a8fa520260373694 -r 8ee4176d44bad2c1029356e869d601752ae54cd0 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -7,6 +7,7 @@
import tempfile
import zipfile
from cgi import escape
+from inspect import isclass
from galaxy import util
from galaxy.datatypes.metadata import MetadataElement #import directly to maintain ease of use in Datatype class definitions
from galaxy.util import inflector
@@ -553,7 +554,7 @@
Check if this datatype is of any of the target_datatypes or is
a subtype thereof.
"""
- datatype_classes = tuple( [ datatype.__class__ for datatype in target_datatypes ] )
+ datatype_classes = tuple( [ datatype if isclass( datatype ) else datatype.__class__ for datatype in target_datatypes ] )
return isinstance( self, datatype_classes )
def merge( split_files, output_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.
1
0
commit/galaxy-central: dan: Fix for Datatype.matches_any() introduced in 10027:b999689a0130. Fixes issue seen where external display applications requiring format conversions would always fail with server error.
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c623f3d38221/
Changeset: c623f3d38221
User: dan
Date: 2013-08-07 21:23:30
Summary: Fix for Datatype.matches_any() introduced in 10027:b999689a0130. Fixes issue seen where external display applications requiring format conversions would always fail with server error.
Affected #: 1 file
diff -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 -r c623f3d38221c588de3976c05b688387933cbf29 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -7,6 +7,7 @@
import tempfile
import zipfile
from cgi import escape
+from inspect import isclass
from galaxy import util
from galaxy.datatypes.metadata import MetadataElement #import directly to maintain ease of use in Datatype class definitions
from galaxy.util import inflector
@@ -554,7 +555,7 @@
Check if this datatype is of any of the target_datatypes or is
a subtype thereof.
"""
- datatype_classes = tuple( [ datatype.__class__ for datatype in target_datatypes ] )
+ datatype_classes = tuple( [ datatype if isclass( datatype ) else datatype.__class__ for datatype in target_datatypes ] )
return isinstance( self, datatype_classes )
def merge( split_files, output_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.
1
0
commit/galaxy-central: carlfeberhard: Handlebars.runtime.js: update to 1.0.0, recompile templates, pack (devs need to update their handlebars.compilers to 1.0.12)
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1f45ab84c121/
Changeset: 1f45ab84c121
User: carlfeberhard
Date: 2013-08-07 21:12:35
Summary: Handlebars.runtime.js: update to 1.0.0, recompile templates, pack (devs need to update their handlebars.compilers to 1.0.12)
Affected #: 50 files
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/libs/handlebars.runtime.js
--- a/static/scripts/libs/handlebars.runtime.js
+++ b/static/scripts/libs/handlebars.runtime.js
@@ -1,39 +1,80 @@
+/*
+
+Copyright (C) 2011 by Yehuda Katz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+// lib/handlebars/browser-prefix.js
+var Handlebars = {};
+
+(function(Handlebars, undefined) {
+;
// lib/handlebars/base.js
-/*jshint eqnull:true*/
-this.Handlebars = {};
+Handlebars.VERSION = "1.0.0";
+Handlebars.COMPILER_REVISION = 4;
-(function(Handlebars) {
-
-Handlebars.VERSION = "1.0.rc.1";
+Handlebars.REVISION_CHANGES = {
+ 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
+ 2: '== 1.0.0-rc.3',
+ 3: '== 1.0.0-rc.4',
+ 4: '>= 1.0.0'
+};
Handlebars.helpers = {};
Handlebars.partials = {};
+var toString = Object.prototype.toString,
+ functionType = '[object Function]',
+ objectType = '[object Object]';
+
Handlebars.registerHelper = function(name, fn, inverse) {
- if(inverse) { fn.not = inverse; }
- this.helpers[name] = fn;
+ if (toString.call(name) === objectType) {
+ if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); }
+ Handlebars.Utils.extend(this.helpers, name);
+ } else {
+ if (inverse) { fn.not = inverse; }
+ this.helpers[name] = fn;
+ }
};
Handlebars.registerPartial = function(name, str) {
- this.partials[name] = str;
+ if (toString.call(name) === objectType) {
+ Handlebars.Utils.extend(this.partials, name);
+ } else {
+ this.partials[name] = str;
+ }
};
Handlebars.registerHelper('helperMissing', function(arg) {
if(arguments.length === 2) {
return undefined;
} else {
- throw new Error("Could not find property '" + arg + "'");
+ throw new Error("Missing helper: '" + arg + "'");
}
});
-var toString = Object.prototype.toString, functionType = "[object Function]";
-
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
var inverse = options.inverse || function() {}, fn = options.fn;
-
- var ret = "";
var type = toString.call(context);
if(type === functionType) { context = context.call(this); }
@@ -62,63 +103,97 @@
return obj;
};
+Handlebars.logger = {
+ DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
+
+ methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
+
+ // can be overridden in the host environment
+ log: function(level, obj) {
+ if (Handlebars.logger.level <= level) {
+ var method = Handlebars.logger.methodMap[level];
+ if (typeof console !== 'undefined' && console[method]) {
+ console[method].call(console, obj);
+ }
+ }
+ }
+};
+
+Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
+
Handlebars.registerHelper('each', function(context, options) {
var fn = options.fn, inverse = options.inverse;
- var ret = "", data;
+ var i = 0, ret = "", data;
+
+ var type = toString.call(context);
+ if(type === functionType) { context = context.call(this); }
if (options.data) {
data = Handlebars.createFrame(options.data);
}
- if(context && context.length > 0) {
- for(var i=0, j=context.length; i<j; i++) {
- if (data) { data.index = i; }
- ret = ret + fn(context[i], { data: data });
+ if(context && typeof context === 'object') {
+ if(context instanceof Array){
+ for(var j = context.length; i<j; i++) {
+ if (data) { data.index = i; }
+ ret = ret + fn(context[i], { data: data });
+ }
+ } else {
+ for(var key in context) {
+ if(context.hasOwnProperty(key)) {
+ if(data) { data.key = key; }
+ ret = ret + fn(context[key], {data: data});
+ i++;
+ }
+ }
}
- } else {
+ }
+
+ if(i === 0){
ret = inverse(this);
}
+
return ret;
});
-Handlebars.registerHelper('if', function(context, options) {
- var type = toString.call(context);
- if(type === functionType) { context = context.call(this); }
+Handlebars.registerHelper('if', function(conditional, options) {
+ var type = toString.call(conditional);
+ if(type === functionType) { conditional = conditional.call(this); }
- if(!context || Handlebars.Utils.isEmpty(context)) {
+ if(!conditional || Handlebars.Utils.isEmpty(conditional)) {
return options.inverse(this);
} else {
return options.fn(this);
}
});
-Handlebars.registerHelper('unless', function(context, options) {
- var fn = options.fn, inverse = options.inverse;
- options.fn = inverse;
- options.inverse = fn;
-
- return Handlebars.helpers['if'].call(this, context, options);
+Handlebars.registerHelper('unless', function(conditional, options) {
+ return Handlebars.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn});
});
Handlebars.registerHelper('with', function(context, options) {
- return options.fn(context);
+ var type = toString.call(context);
+ if(type === functionType) { context = context.call(this); }
+
+ if (!Handlebars.Utils.isEmpty(context)) return options.fn(context);
});
-Handlebars.registerHelper('log', function(context) {
- Handlebars.log(context);
+Handlebars.registerHelper('log', function(context, options) {
+ var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
+ Handlebars.log(level, context);
});
-
-}(this.Handlebars));
;
// lib/handlebars/utils.js
+
+var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
+
Handlebars.Exception = function(message) {
var tmp = Error.prototype.constructor.apply(this, arguments);
- for (var p in tmp) {
- if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
+ // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
+ for (var idx = 0; idx < errorProps.length; idx++) {
+ this[errorProps[idx]] = tmp[errorProps[idx]];
}
-
- this.message = tmp.message;
};
Handlebars.Exception.prototype = new Error();
@@ -130,52 +205,61 @@
return this.string.toString();
};
-(function() {
- var escape = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- "`": "`"
- };
+var escape = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'",
+ "`": "`"
+};
- var badChars = /[&<>"'`]/g;
- var possible = /[&<>"'`]/;
+var badChars = /[&<>"'`]/g;
+var possible = /[&<>"'`]/;
- var escapeChar = function(chr) {
- return escape[chr] || "&";
- };
+var escapeChar = function(chr) {
+ return escape[chr] || "&";
+};
- Handlebars.Utils = {
- escapeExpression: function(string) {
- // don't escape SafeStrings, since they're already safe
- if (string instanceof Handlebars.SafeString) {
- return string.toString();
- } else if (string == null || string === false) {
- return "";
- }
-
- if(!possible.test(string)) { return string; }
- return string.replace(badChars, escapeChar);
- },
-
- isEmpty: function(value) {
- if (typeof value === "undefined") {
- return true;
- } else if (value === null) {
- return true;
- } else if (value === false) {
- return true;
- } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
- return true;
- } else {
- return false;
+Handlebars.Utils = {
+ extend: function(obj, value) {
+ for(var key in value) {
+ if(value.hasOwnProperty(key)) {
+ obj[key] = value[key];
}
}
- };
-})();;
+ },
+
+ escapeExpression: function(string) {
+ // don't escape SafeStrings, since they're already safe
+ if (string instanceof Handlebars.SafeString) {
+ return string.toString();
+ } else if (string == null || string === false) {
+ return "";
+ }
+
+ // Force a string conversion as this will be done by the append regardless and
+ // the regex test will do this transparently behind the scenes, causing issues if
+ // an object's to string has escaped characters in it.
+ string = string.toString();
+
+ if(!possible.test(string)) { return string; }
+ return string.replace(badChars, escapeChar);
+ },
+
+ isEmpty: function(value) {
+ if (!value && value !== 0) {
+ return true;
+ } else if(toString.call(value) === "[object Array]" && value.length === 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+};
+;
// lib/handlebars/runtime.js
+
Handlebars.VM = {
template: function(templateSpec) {
// Just add water
@@ -186,39 +270,73 @@
program: function(i, fn, data) {
var programWrapper = this.programs[i];
if(data) {
- return Handlebars.VM.program(fn, data);
- } else if(programWrapper) {
- return programWrapper;
- } else {
- programWrapper = this.programs[i] = Handlebars.VM.program(fn);
- return programWrapper;
+ programWrapper = Handlebars.VM.program(i, fn, data);
+ } else if (!programWrapper) {
+ programWrapper = this.programs[i] = Handlebars.VM.program(i, fn);
}
+ return programWrapper;
+ },
+ merge: function(param, common) {
+ var ret = param || common;
+
+ if (param && common) {
+ ret = {};
+ Handlebars.Utils.extend(ret, common);
+ Handlebars.Utils.extend(ret, param);
+ }
+ return ret;
},
programWithDepth: Handlebars.VM.programWithDepth,
- noop: Handlebars.VM.noop
+ noop: Handlebars.VM.noop,
+ compilerInfo: null
};
return function(context, options) {
options = options || {};
- return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
+ var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
+
+ var compilerInfo = container.compilerInfo || [],
+ compilerRevision = compilerInfo[0] || 1,
+ currentRevision = Handlebars.COMPILER_REVISION;
+
+ if (compilerRevision !== currentRevision) {
+ if (compilerRevision < currentRevision) {
+ var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision],
+ compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision];
+ throw "Template was precompiled with an older version of Handlebars than the current runtime. "+
+ "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").";
+ } else {
+ // Use the embedded version info since the runtime doesn't know about this revision yet
+ throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+
+ "Please update your runtime to a newer version ("+compilerInfo[1]+").";
+ }
+ }
+
+ return result;
};
},
- programWithDepth: function(fn, data, $depth) {
- var args = Array.prototype.slice.call(arguments, 2);
+ programWithDepth: function(i, fn, data /*, $depth */) {
+ var args = Array.prototype.slice.call(arguments, 3);
- return function(context, options) {
+ var program = function(context, options) {
options = options || {};
return fn.apply(this, [context, options.data || data].concat(args));
};
+ program.program = i;
+ program.depth = args.length;
+ return program;
},
- program: function(fn, data) {
- return function(context, options) {
+ program: function(i, fn, data) {
+ var program = function(context, options) {
options = options || {};
return fn(context, options.data || data);
};
+ program.program = i;
+ program.depth = 0;
+ return program;
},
noop: function() { return ""; },
invokePartial: function(partial, name, context, helpers, partials, data) {
@@ -239,3 +357,6 @@
Handlebars.template = Handlebars.VM.template;
;
+// lib/handlebars/browser-suffix.js
+})(Handlebars);
+;
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/libs/handlebars.runtime.js
--- a/static/scripts/packed/libs/handlebars.runtime.js
+++ b/static/scripts/packed/libs/handlebars.runtime.js
@@ -1,1 +1,1 @@
-this.Handlebars={};(function(c){c.VERSION="1.0.rc.1";c.helpers={};c.partials={};c.registerHelper=function(e,f,d){if(d){f.not=d}this.helpers[e]=f};c.registerPartial=function(d,e){this.partials[d]=e};c.registerHelper("helperMissing",function(d){if(arguments.length===2){return undefined}else{throw new Error("Could not find property '"+d+"'")}});var a=Object.prototype.toString,b="[object Function]";c.registerHelper("blockHelperMissing",function(g,f){var d=f.inverse||function(){},i=f.fn;var e="";var h=a.call(g);if(h===b){g=g.call(this)}if(g===true){return i(this)}else{if(g===false||g==null){return d(this)}else{if(h==="[object Array]"){if(g.length>0){return c.helpers.each(g,f)}else{return d(this)}}else{return i(g)}}}});c.K=function(){};c.createFrame=Object.create||function(d){c.K.prototype=d;var e=new c.K();c.K.prototype=null;return e};c.registerHelper("each",function(k,g){var l=g.fn,d=g.inverse;var f="",m;if(g.data){m=c.createFrame(g.data)}if(k&&k.length>0){for(var h=0,e=k.length;h<e;h++){if(m){m.index=h}f=f+l(k[h],{data:m})}}else{f=d(this)}return f});c.registerHelper("if",function(e,d){var f=a.call(e);if(f===b){e=e.call(this)}if(!e||c.Utils.isEmpty(e)){return d.inverse(this)}else{return d.fn(this)}});c.registerHelper("unless",function(f,e){var g=e.fn,d=e.inverse;e.fn=d;e.inverse=g;return c.helpers["if"].call(this,f,e)});c.registerHelper("with",function(e,d){return d.fn(e)});c.registerHelper("log",function(d){c.log(d)})}(this.Handlebars));Handlebars.Exception=function(b){var a=Error.prototype.constructor.apply(this,arguments);for(var c in a){if(a.hasOwnProperty(c)){this[c]=a[c]}}this.message=a.message};Handlebars.Exception.prototype=new Error();Handlebars.SafeString=function(a){this.string=a};Handlebars.SafeString.prototype.toString=function(){return this.string.toString()};(function(){var c={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var d=/[&<>"'`]/g;var b=/[&<>"'`]/;var a=function(e){return c[e]||"&"};Handlebars.Utils={escapeExpression:function(e){if(e instanceof Handlebars.SafeString){return e.toString()}else{if(e==null||e===false){return""}}if(!b.test(e)){return e}return e.replace(d,a)},isEmpty:function(e){if(typeof e==="undefined"){return true}else{if(e===null){return true}else{if(e===false){return true}else{if(Object.prototype.toString.call(e)==="[object Array]"&&e.length===0){return true}else{return false}}}}}}})();Handlebars.VM={template:function(a){var b={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(d,e,f){var c=this.programs[d];if(f){return Handlebars.VM.program(e,f)}else{if(c){return c}else{c=this.programs[d]=Handlebars.VM.program(e);return c}}},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(d,c){c=c||{};return a.call(b,Handlebars,d,c.helpers,c.partials,c.data)}},programWithDepth:function(b,d,c){var a=Array.prototype.slice.call(arguments,2);return function(f,e){e=e||{};return b.apply(this,[f,e.data||d].concat(a))}},program:function(a,b){return function(d,c){c=c||{};return a(d,c.data||b)}},noop:function(){return""},invokePartial:function(a,c,e,f,d,g){var b={helpers:f,partials:d,data:g};if(a===undefined){throw new Handlebars.Exception("The partial "+c+" could not be found")}else{if(a instanceof Function){return a(e,b)}else{if(!Handlebars.compile){throw new Handlebars.Exception("The partial "+c+" could not be compiled when running in runtime-only mode")}else{d[c]=Handlebars.compile(a,{data:g!==undefined});return d[c](e,b)}}}}};Handlebars.template=Handlebars.VM.template;
\ No newline at end of file
+var Handlebars={};(function(c,e){c.VERSION="1.0.0";c.COMPILER_REVISION=4;c.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};c.helpers={};c.partials={};var d=Object.prototype.toString,f="[object Function]",b="[object Object]";c.registerHelper=function(l,m,k){if(d.call(l)===b){if(k||m){throw new c.Exception("Arg not supported with multiple helpers")}c.Utils.extend(this.helpers,l)}else{if(k){m.not=k}this.helpers[l]=m}};c.registerPartial=function(k,l){if(d.call(k)===b){c.Utils.extend(this.partials,k)}else{this.partials[k]=l}};c.registerHelper("helperMissing",function(k){if(arguments.length===2){return e}else{throw new Error("Missing helper: '"+k+"'")}});c.registerHelper("blockHelperMissing",function(m,l){var k=l.inverse||function(){},o=l.fn;var n=d.call(m);if(n===f){m=m.call(this)}if(m===true){return o(this)}else{if(m===false||m==null){return k(this)}else{if(n==="[object Array]"){if(m.length>0){return c.helpers.each(m,l)}else{return k(this)}}else{return o(m)}}}});c.K=function(){};c.createFrame=Object.create||function(k){c.K.prototype=k;var l=new c.K();c.K.prototype=null;return l};c.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(m,k){if(c.logger.level<=m){var l=c.logger.methodMap[m];if(typeof console!=="undefined"&&console[l]){console[l].call(console,k)}}}};c.log=function(l,k){c.logger.log(l,k)};c.registerHelper("each",function(k,t){var r=t.fn,m=t.inverse;var o=0,p="",n;var q=d.call(k);if(q===f){k=k.call(this)}if(t.data){n=c.createFrame(t.data)}if(k&&typeof k==="object"){if(k instanceof Array){for(var l=k.length;o<l;o++){if(n){n.index=o}p=p+r(k[o],{data:n})}}else{for(var s in k){if(k.hasOwnProperty(s)){if(n){n.key=s}p=p+r(k[s],{data:n});o++}}}}if(o===0){p=m(this)}return p});c.registerHelper("if",function(l,k){var m=d.call(l);if(m===f){l=l.call(this)}if(!l||c.Utils.isEmpty(l)){return k.inverse(this)}else{return k.fn(this)}});c.registerHelper("unless",function(l,k){return c.helpers["if"].call(this,l,{fn:k.inverse,inverse:k.fn})});c.registerHelper("with",function(l,k){var m=d.call(l);if(m===f){l=l.call(this)}if(!c.Utils.isEmpty(l)){return k.fn(l)}});c.registerHelper("log",function(l,k){var m=k.data&&k.data.level!=null?parseInt(k.data.level,10):1;c.log(m,l)});var i=["description","fileName","lineNumber","message","name","number","stack"];c.Exception=function(m){var l=Error.prototype.constructor.apply(this,arguments);for(var k=0;k<i.length;k++){this[i[k]]=l[i[k]]}};c.Exception.prototype=new Error();c.SafeString=function(k){this.string=k};c.SafeString.prototype.toString=function(){return this.string.toString()};var h={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var a=/[&<>"'`]/g;var g=/[&<>"'`]/;var j=function(k){return h[k]||"&"};c.Utils={extend:function(m,l){for(var k in l){if(l.hasOwnProperty(k)){m[k]=l[k]}}},escapeExpression:function(k){if(k instanceof c.SafeString){return k.toString()}else{if(k==null||k===false){return""}}k=k.toString();if(!g.test(k)){return k}return k.replace(a,j)},isEmpty:function(k){if(!k&&k!==0){return true}else{if(d.call(k)==="[object Array]"&&k.length===0){return true}else{return false}}}};c.VM={template:function(k){var l={escapeExpression:c.Utils.escapeExpression,invokePartial:c.VM.invokePartial,programs:[],program:function(n,o,p){var m=this.programs[n];if(p){m=c.VM.program(n,o,p)}else{if(!m){m=this.programs[n]=c.VM.program(n,o)}}return m},merge:function(o,n){var m=o||n;if(o&&n){m={};c.Utils.extend(m,n);c.Utils.extend(m,o)}return m},programWithDepth:c.VM.programWithDepth,noop:c.VM.noop,compilerInfo:null};return function(q,p){p=p||{};var n=k.call(l,c,q,p.helpers,p.partials,p.data);var r=l.compilerInfo||[],o=r[0]||1,t=c.COMPILER_REVISION;if(o!==t){if(o<t){var m=c.REVISION_CHANGES[t],s=c.REVISION_CHANGES[o];throw"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+m+") or downgrade your runtime to an older version ("+s+")."}else{throw"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+r[1]+")."}}return n}},programWithDepth:function(m,n,o){var l=Array.prototype.slice.call(arguments,3);var k=function(q,p){p=p||{};return n.apply(this,[q,p.data||o].concat(l))};k.program=m;k.depth=l.length;return k},program:function(l,m,n){var k=function(p,o){o=o||{};return m(p,o.data||n)};k.program=l;k.depth=0;return k},noop:function(){return""},invokePartial:function(k,m,o,p,n,q){var l={helpers:p,partials:n,data:q};if(k===e){throw new c.Exception("The partial "+m+" could not be found")}else{if(k instanceof Function){return k(o,l)}else{if(!c.compile){throw new c.Exception("The partial "+m+" could not be compiled when running in runtime-only mode")}else{n[m]=c.compile(k,{data:q!==e});return n[m](o,l)}}}}};c.template=c.VM.template})(Handlebars);
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/helpers-common-templates.js
--- a/static/scripts/packed/templates/compiled/helpers-common-templates.js
+++ b/static/scripts/packed/templates/compiled/helpers-common-templates.js
@@ -1,1 +1,1 @@
-Handlebars.registerPartial("clearFloatDiv",function(a){return'<div class="clear"></div>'});Handlebars.registerHelper("warningmessagesmall",function(a){return'<div class="warningmessagesmall"><strong>'+a.fn(this)+"</strong></div>"});Handlebars.registerHelper("local",function(a){return _l(a.fn(this))});Handlebars.registerPartial("iconButton",function(c,b){var a="";a+=(c.enabled)?("<a"):("<span");if(c.title){a+=' title="'+c.title+'"'}a+=' class="icon-button';if(c.isMenuButton){a+=" menu-button"}if(c.title){a+=" tooltip"}a+=" "+c.icon_class;if(!c.enabled){a+="_disabled"}a+='"';if(c.id){a+=' id="'+c.id+'"'}a+=' href="'+((c.href)?(c.href):("javascript:void(0);"))+'"';if(c.target){a+=' target="'+c.target+'"'}if(!c.visible){a+=' style="display: none;"'}a+=">"+((c.enabled)?("</a>"):("</span>"));return a});
\ No newline at end of file
+Handlebars.registerPartial("clearFloatDiv",function(a){return'<div class="clear"></div>'});Handlebars.registerHelper("warningmessagesmall",function(a){return'<div class="warningmessagesmall"><strong>'+a.fn(this)+"</strong></div>"});Handlebars.registerHelper("local",function(a){return _l(a.fn(this))});
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/panel_section.js
--- a/static/scripts/packed/templates/compiled/panel_section.js
+++ b/static/scripts/packed/templates/compiled/panel_section.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.panel_section=b(function(e,k,d,j,i){this.compilerInfo=[2,">= 1.0.0-rc.3"];d=d||e.helpers;i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<div class="toolSectionTitle" id="title_';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+'">\n <a href="javascript:void(0)"><span>';if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+'</span></a>\n</div>\n<div id="';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+'" class="toolSectionBody" style="display: none; ">\n <div class="toolSectionBg"></div>\n<div>';return g})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.panel_section=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<div class="toolSectionTitle" id="title_';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+'">\n <a href="javascript:void(0)"><span>';if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+'</span></a>\n</div>\n<div id="';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+'" class="toolSectionBody" style="display: none; ">\n <div class="toolSectionBg"></div>\n<div>';return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-annotationArea.js
--- a/static/scripts/packed/templates/compiled/template-hda-annotationArea.js
+++ b/static/scripts/packed/templates/compiled/template-hda-annotationArea.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,q,f,o,n){f=f||g.helpers;var l="",d,k,j,s=this,h="function",p=f.helperMissing,i=void 0,m=this.escapeExpression,r=f.blockHelperMissing;function e(u,t){return"Annotation"}function c(u,t){return"Edit dataset annotation"}l+='\n<div id="';k=f.id;d=k||q.id;if(typeof d===h){d=d.call(q,{hash:{}})}else{if(d===i){d=p.call(q,"id",{hash:{}})}}l+=m(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';k=f.local;d=k||q.local;j=s.program(1,e,n);j.hash={};j.fn=j;j.inverse=s.noop;if(k&&typeof d===h){d=d.call(q,j)}else{d=r.call(q,d,j)}if(d||d===0){l+=d}l+=':</strong>\n <div id="';k=f.id;d=k||q.id;if(typeof d===h){d=d.call(q,{hash:{}})}else{if(d===i){d=p.call(q,"id",{hash:{}})}}l+=m(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';k=f.local;d=k||q.local;j=s.program(3,c,n);j.hash={};j.fn=j;j.inverse=s.noop;if(k&&typeof d===h){d=d.call(q,j)}else{d=r.call(q,d,j)}if(d||d===0){l+=d}l+='">\n </div>\n</div>';return l})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,p,h="function",j=this.escapeExpression,o=this,n=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}i+='\n<div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';p={hash:{},inverse:o.noop,fn:o.program(1,e,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+=':</strong>\n <div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';p={hash:{},inverse:o.noop,fn:o.program(3,c,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+='">\n </div>\n</div>';return i})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-displayApps.js
--- a/static/scripts/packed/templates/compiled/template-hda-displayApps.js
+++ b/static/scripts/packed/templates/compiled/template-hda-displayApps.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,s,r,k,t){r=r||h.helpers;var j,g,i,p,o=this,f="function",q=r.helperMissing,d=void 0,e=this.escapeExpression,c=r.blockHelperMissing;function n(y,x){var u="",w,v;u+="\n ";i=r.label;w=i||y.label;if(typeof w===f){w=w.call(y,{hash:{}})}else{if(w===d){w=q.call(y,"label",{hash:{}})}}u+=e(w)+"\n ";i=r.links;w=i||y.links;v=r.each;p=o.program(2,m,x);p.hash={};p.fn=p;p.inverse=o.noop;w=v.call(y,w,p);if(w||w===0){u+=w}u+="\n <br />\n";return u}function m(x,w){var u="",v;u+='\n <a target="';i=r.target;v=i||x.target;if(typeof v===f){v=v.call(x,{hash:{}})}else{if(v===d){v=q.call(x,"target",{hash:{}})}}u+=e(v)+'" href="';i=r.href;v=i||x.href;if(typeof v===f){v=v.call(x,{hash:{}})}else{if(v===d){v=q.call(x,"href",{hash:{}})}}u+=e(v)+'">';i=r.local;v=i||x.local;p=o.program(3,l,w);p.hash={};p.fn=p;p.inverse=o.noop;if(i&&typeof v===f){v=v.call(x,p)}else{v=c.call(x,v,p)}if(v||v===0){u+=v}u+="</a>\n ";return u}function l(w,v){var u;i=r.text;u=i||w.text;if(typeof u===f){u=u.call(w,{hash:{}})}else{if(u===d){u=q.call(w,"text",{hash:{}})}}return e(u)}i=r.displayApps;j=i||s.displayApps;g=r.each;p=o.program(1,n,t);p.hash={};p.fn=p;p.inverse=o.noop;j=g.call(s,j,p);if(j||j===0){return j}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,m,g,l,k){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,h.helpers);k=k||{};var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(s,r){var p="",q;p+="\n ";if(q=g.label){q=q.call(s,{hash:{},data:r})}else{q=s.label;q=typeof q===i?q.apply(s):q}p+=j(q)+"\n ";q=g.each.call(s,s.links,{hash:{},inverse:o.noop,fn:o.program(2,e,r),data:r});if(q||q===0){p+=q}p+="\n <br />\n";return p}function e(t,s){var p="",r,q;p+='\n <a target="';if(r=g.target){r=r.call(t,{hash:{},data:s})}else{r=t.target;r=typeof r===i?r.apply(t):r}p+=j(r)+'" href="';if(r=g.href){r=r.call(t,{hash:{},data:s})}else{r=t.href;r=typeof r===i?r.apply(t):r}p+=j(r)+'">';q={hash:{},inverse:o.noop,fn:o.program(3,c,s),data:s};if(r=g.local){r=r.call(t,q)}else{r=t.local;r=typeof r===i?r.apply(t):r}if(!g.local){r=n.call(t,r,q)}if(r||r===0){p+=r}p+="</a>\n ";return p}function c(r,q){var p;if(p=g.text){p=p.call(r,{hash:{},data:q})}else{p=r.text;p=typeof p===i?p.apply(r):p}return j(p)}d=g.each.call(m,m.displayApps,{hash:{},inverse:o.noop,fn:o.program(1,f,k),data:k});if(d||d===0){return d}else{return""}})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-downloadLinks.js
--- a/static/scripts/packed/templates/compiled/template-hda-downloadLinks.js
+++ b/static/scripts/packed/templates/compiled/template-hda-downloadLinks.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(i,v,u,n,y){u=u||i.helpers;var k,h,j,s,r=this,f="function",t=u.helperMissing,d=void 0,e=this.escapeExpression,c=u.blockHelperMissing;function q(D,C){var z="",B,A;z+='\n<div popupmenu="dataset-';j=u.id;B=j||D.id;if(typeof B===f){B=B.call(D,{hash:{}})}else{if(B===d){B=t.call(D,"id",{hash:{}})}}z+=e(B)+'-popup">\n <a class="action-button" href="';j=u.urls;B=j||D.urls;B=(B===null||B===undefined||B===false?B:B.download);if(typeof B===f){B=B.call(D,{hash:{}})}else{if(B===d){B=t.call(D,"urls.download",{hash:{}})}}z+=e(B)+'">';j=u.local;B=j||D.local;s=r.program(2,p,C);s.hash={};s.fn=s;s.inverse=r.noop;if(j&&typeof B===f){B=B.call(D,s)}else{B=c.call(D,B,s)}if(B||B===0){z+=B}z+="</a>\n <a>";j=u.local;B=j||D.local;s=r.program(4,o,C);s.hash={};s.fn=s;s.inverse=r.noop;if(j&&typeof B===f){B=B.call(D,s)}else{B=c.call(D,B,s)}if(B||B===0){z+=B}z+="</a>\n ";j=u.urls;B=j||D.urls;B=(B===null||B===undefined||B===false?B:B.meta_download);A=u.each;s=r.program(6,m,C);s.hash={};s.fn=s;s.inverse=r.noop;B=A.call(D,B,s);if(B||B===0){z+=B}z+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';j=u.id;B=j||D.id;if(typeof B===f){B=B.call(D,{hash:{}})}else{if(B===d){B=t.call(D,"id",{hash:{}})}}z+=e(B)+'-popup">\n <a href="';j=u.urls;B=j||D.urls;B=(B===null||B===undefined||B===false?B:B.download);if(typeof B===f){B=B.call(D,{hash:{}})}else{if(B===d){B=t.call(D,"urls.download",{hash:{}})}}z+=e(B)+'" title="';j=u.local;B=j||D.local;s=r.program(9,g,C);s.hash={};s.fn=s;s.inverse=r.noop;if(j&&typeof B===f){B=B.call(D,s)}else{B=c.call(D,B,s)}if(B||B===0){z+=B}z+='" class="icon-button disk tooltip"></a>\n</div>\n';return z}function p(A,z){return"Download Dataset"}function o(A,z){return"Additional Files"}function m(C,B){var z="",A;z+='\n <a class="action-button" href="';j=u.url;A=j||C.url;if(typeof A===f){A=A.call(C,{hash:{}})}else{if(A===d){A=t.call(C,"url",{hash:{}})}}z+=e(A)+'">';j=u.local;A=j||C.local;s=r.program(7,l,B);s.hash={};s.fn=s;s.inverse=r.noop;if(j&&typeof A===f){A=A.call(C,s)}else{A=c.call(C,A,s)}if(A||A===0){z+=A}z+=" ";j=u.file_type;A=j||C.file_type;if(typeof A===f){A=A.call(C,{hash:{}})}else{if(A===d){A=t.call(C,"file_type",{hash:{}})}}z+=e(A)+"</a>\n ";return z}function l(A,z){return"Download"}function g(A,z){return"Download"}function x(C,B){var z="",A;z+="\n";z+='\n<a href="';j=u.urls;A=j||C.urls;A=(A===null||A===undefined||A===false?A:A.download);if(typeof A===f){A=A.call(C,{hash:{}})}else{if(A===d){A=t.call(C,"urls.download",{hash:{}})}}z+=e(A)+'" title="';j=u.local;A=j||C.local;s=r.program(12,w,B);s.hash={};s.fn=s;s.inverse=r.noop;if(j&&typeof A===f){A=A.call(C,s)}else{A=c.call(C,A,s)}if(A||A===0){z+=A}z+='" class="icon-button disk tooltip"></a>\n';return z}function w(A,z){return"Download"}j=u.urls;k=j||v.urls;k=(k===null||k===undefined||k===false?k:k.meta_download);h=u["if"];s=r.program(1,q,y);s.hash={};s.fn=s;s.inverse=r.program(11,x,y);k=h.call(v,k,s);if(k||k===0){return k}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,s,h="function",i=this.escapeExpression,q=this,m=f.blockHelperMissing;function e(y,x){var t="",w,v,u;t+='\n<div popupmenu="dataset-';if(w=f.id){w=w.call(y,{hash:{},data:x})}else{w=y.id;w=typeof w===h?w.apply(y):w}t+=i(w)+'-popup">\n <a class="action-button" href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'">';u={hash:{},inverse:q.noop,fn:q.program(2,d,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n <a>";u={hash:{},inverse:q.noop,fn:q.program(4,r,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n ";v=f.each.call(y,((w=y.urls),w==null||w===false?w:w.meta_download),{hash:{},inverse:q.noop,fn:q.program(6,p,x),data:x});if(v||v===0){t+=v}t+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';if(v=f.id){v=v.call(y,{hash:{},data:x})}else{v=y.id;v=typeof v===h?v.apply(y):v}t+=i(v)+'-popup">\n <a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk tooltip"></a>\n</div>\n';return t}function d(u,t){return"Download Dataset"}function r(u,t){return"Additional Files"}function p(x,w){var t="",v,u;t+='\n <a class="action-button" href="';if(v=f.url){v=v.call(x,{hash:{},data:w})}else{v=x.url;v=typeof v===h?v.apply(x):v}t+=i(v)+'">';u={hash:{},inverse:q.noop,fn:q.program(7,o,w),data:w};if(v=f.local){v=v.call(x,u)}else{v=x.local;v=typeof v===h?v.apply(x):v}if(!f.local){v=m.call(x,v,u)}if(v||v===0){t+=v}t+=" ";if(v=f.file_type){v=v.call(x,{hash:{},data:w})}else{v=x.file_type;v=typeof v===h?v.apply(x):v}t+=i(v)+"</a>\n ";return t}function o(u,t){return"Download"}function n(y,x){var t="",w,v,u;t+='\n\n<a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk tooltip"></a>\n';return t}s=f["if"].call(l,((c=l.urls),c==null||c===false?c:c.meta_download),{hash:{},inverse:q.program(9,n,j),fn:q.program(1,e,j),data:j});if(s||s===0){return s}else{return""}})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-failedMetadata.js
--- a/static/scripts/packed/templates/compiled/template-hda-failedMetadata.js
+++ b/static/scripts/packed/templates/compiled/template-hda-failedMetadata.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetadata"]=b(function(g,p,f,n,m){f=f||g.helpers;var c,k,j,r=this,h="function",q=f.blockHelperMissing,o=f.helperMissing,i=void 0,l=this.escapeExpression;function e(v,u){var s="",t;s+="\n";k=f.local;t=k||v.local;j=r.program(2,d,u);j.hash={};j.fn=j;j.inverse=r.noop;if(k&&typeof t===h){t=t.call(v,j)}else{t=q.call(v,t,j)}if(t||t===0){s+=t}s+='\nYou may be able to <a href="';k=f.urls;t=k||v.urls;t=(t===null||t===undefined||t===false?t:t.edit);if(typeof t===h){t=t.call(v,{hash:{}})}else{if(t===i){t=o.call(v,"urls.edit",{hash:{}})}}s+=l(t)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return s}function d(t,s){return"An error occurred setting the metadata for this dataset."}k=f.warningmessagesmall;c=k||p.warningmessagesmall;j=r.program(1,e,m);j.hash={};j.fn=j;j.inverse=r.noop;if(k&&typeof c===h){c=c.call(p,j)}else{c=q.call(p,c,j)}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetadata"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,o,n=this,h="function",m=f.blockHelperMissing,i=this.escapeExpression;function e(t,s){var p="",r,q;p+="\n";q={hash:{},inverse:n.noop,fn:n.program(2,d,s),data:s};if(r=f.local){r=r.call(t,q)}else{r=t.local;r=typeof r===h?r.apply(t):r}if(!f.local){r=m.call(t,r,q)}if(r||r===0){p+=r}p+='\nYou may be able to <a href="'+i(((r=((r=t.urls),r==null||r===false?r:r.edit)),typeof r===h?r.apply(t):r))+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return p}function d(q,p){return"An error occurred setting the metadata for this dataset."}o={hash:{},inverse:n.noop,fn:n.program(1,e,j),data:j};if(c=f.warningmessagesmall){c=c.call(l,o)}else{c=l.warningmessagesmall;c=typeof c===h?c.apply(l):c}if(!f.warningmessagesmall){c=m.call(l,c,o)}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
--- a/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
+++ b/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(i,v,t,n,w){t=t||i.helpers;var u="",k,h,j,r,q=this,f="function",s=t.helperMissing,d=void 0,e=this.escapeExpression,c=t.blockHelperMissing;function p(y,x){return"format: "}function o(y,x){return"database: "}function m(A,z){var x="",y;x+='\n <a class="metadata-dbkey" href="';j=t.urls;y=j||A.urls;y=(y===null||y===undefined||y===false?y:y.edit);if(typeof y===f){y=y.call(A,{hash:{}})}else{if(y===d){y=s.call(A,"urls.edit",{hash:{}})}}x+=e(y)+'" target="galaxy_main">';j=t.metadata_dbkey;y=j||A.metadata_dbkey;if(typeof y===f){y=y.call(A,{hash:{}})}else{if(y===d){y=s.call(A,"metadata_dbkey",{hash:{}})}}x+=e(y)+"</a>\n ";return x}function l(A,z){var x="",y;x+='\n <span class="metadata-dbkey ';j=t.metadata_dbkey;y=j||A.metadata_dbkey;if(typeof y===f){y=y.call(A,{hash:{}})}else{if(y===d){y=s.call(A,"metadata_dbkey",{hash:{}})}}x+=e(y)+'">';j=t.metadata_dbkey;y=j||A.metadata_dbkey;if(typeof y===f){y=y.call(A,{hash:{}})}else{if(y===d){y=s.call(A,"metadata_dbkey",{hash:{}})}}x+=e(y)+"</span>\n ";return x}function g(A,z){var x="",y;x+='\n<div class="hda-info"> ';j=t.misc_info;y=j||A.misc_info;if(typeof y===f){y=y.call(A,{hash:{}})}else{if(y===d){y=s.call(A,"misc_info",{hash:{}})}}x+=e(y)+" </div>\n";return x}u+='<div class="hda-summary">\n ';j=t.misc_blurb;k=j||v.misc_blurb;if(typeof k===f){k=k.call(v,{hash:{}})}else{if(k===d){k=s.call(v,"misc_blurb",{hash:{}})}}u+=e(k)+"<br />\n ";j=t.local;k=j||v.local;r=q.program(1,p,w);r.hash={};r.fn=r;r.inverse=q.noop;if(j&&typeof k===f){k=k.call(v,r)}else{k=c.call(v,k,r)}if(k||k===0){u+=k}u+='<span class="';j=t.data_type;k=j||v.data_type;if(typeof k===f){k=k.call(v,{hash:{}})}else{if(k===d){k=s.call(v,"data_type",{hash:{}})}}u+=e(k)+'">';j=t.data_type;k=j||v.data_type;if(typeof k===f){k=k.call(v,{hash:{}})}else{if(k===d){k=s.call(v,"data_type",{hash:{}})}}u+=e(k)+"</span>,\n ";j=t.local;k=j||v.local;r=q.program(3,o,w);r.hash={};r.fn=r;r.inverse=q.noop;if(j&&typeof k===f){k=k.call(v,r)}else{k=c.call(v,k,r)}if(k||k===0){u+=k}u+="\n ";j=t.dbkey_unknown_and_editable;k=j||v.dbkey_unknown_and_editable;h=t["if"];r=q.program(5,m,w);r.hash={};r.fn=r;r.inverse=q.program(7,l,w);k=h.call(v,k,r);if(k||k===0){u+=k}u+="\n</div>\n";j=t.misc_info;k=j||v.misc_info;h=t["if"];r=q.program(9,g,w);r.hash={};r.fn=r;r.inverse=q.noop;k=h.call(v,k,r);if(k||k===0){u+=k}return u})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,s,h="function",j=this.escapeExpression,r=this,n=f.blockHelperMissing;function e(u,t){return"format: "}function c(u,t){return"database: "}function q(x,w){var t="",v,u;t+='\n <a class="metadata-dbkey" href="'+j(((v=((v=x.urls),v==null||v===false?v:v.edit)),typeof v===h?v.apply(x):v))+'" target="galaxy_main">';if(u=f.metadata_dbkey){u=u.call(x,{hash:{},data:w})}else{u=x.metadata_dbkey;u=typeof u===h?u.apply(x):u}t+=j(u)+"</a>\n ";return t}function p(w,v){var t="",u;t+='\n <span class="metadata-dbkey ';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+'">';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+"</span>\n ";return t}function o(w,v){var t="",u;t+='\n<div class="hda-info"> ';if(u=f.misc_info){u=u.call(w,{hash:{},data:v})}else{u=w.misc_info;u=typeof u===h?u.apply(w):u}t+=j(u)+" </div>\n";return t}i+='<div class="hda-summary">\n ';if(d=f.misc_blurb){d=d.call(m,{hash:{},data:k})}else{d=m.misc_blurb;d=typeof d===h?d.apply(m):d}i+=j(d)+"<br />\n ";s={hash:{},inverse:r.noop,fn:r.program(1,e,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+='<span class="';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+'">';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+"</span>,\n ";s={hash:{},inverse:r.noop,fn:r.program(3,c,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+="\n ";d=f["if"].call(m,m.dbkey_unknown_and_editable,{hash:{},inverse:r.program(7,p,k),fn:r.program(5,q,k),data:k});if(d||d===0){i+=d}i+="\n</div>\n";d=f["if"].call(m,m.misc_info,{hash:{},inverse:r.noop,fn:r.program(9,o,k),data:k});if(d||d===0){i+=d}return i})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-tagArea.js
--- a/static/scripts/packed/templates/compiled/template-hda-tagArea.js
+++ b/static/scripts/packed/templates/compiled/template-hda-tagArea.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,m,e,l,k){e=e||f.helpers;var j="",c,i,h,o=this,g="function",n=e.blockHelperMissing;function d(q,p){return"Tags"}j+='\n<div class="tag-area" style="display: none;">\n <strong>';i=e.local;c=i||m.local;h=o.program(1,d,k);h.hash={};h.fn=h;h.inverse=o.noop;if(i&&typeof c===g){c=c.call(m,h)}else{c=n.call(m,c,h)}if(c||c===0){j+=c}j+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return j})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,k,e,j,i){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);i=i||{};var h="",c,n,m=this,g="function",l=e.blockHelperMissing;function d(p,o){return"Tags"}h+='\n<div class="tag-area" style="display: none;">\n <strong>';n={hash:{},inverse:m.noop,fn:m.program(1,d,i),data:i};if(c=e.local){c=c.call(k,n)}else{c=k.local;c=typeof c===g?c.apply(k):c}if(!e.local){c=l.call(k,c,n)}if(c||c===0){h+=c}h+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return h})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-titleLink.js
--- a/static/scripts/packed/templates/compiled/template-hda-titleLink.js
+++ b/static/scripts/packed/templates/compiled/template-hda-titleLink.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='<span class="historyItemTitle">';h=d.hid;c=h||n.hid;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"hid",{hash:{}})}}i+=j(c)+": ";h=d.name;c=h||n.name;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"name",{hash:{}})}}i+=j(c)+"</span>";return i})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<span class="historyItemTitle">';if(c=d.hid){c=c.call(k,{hash:{},data:i})}else{c=k.hid;c=typeof c===f?c.apply(k):c}g+=h(c)+": ";if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+"</span>";return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-hda-warning-messages.js
--- a/static/scripts/packed/templates/compiled/template-hda-warning-messages.js
+++ b/static/scripts/packed/templates/compiled/template-hda-warning-messages.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(j,z,x,q,H){x=x||j.helpers;var y="",m,i,l,v,u=this,f="function",w=x.helperMissing,d=void 0,e=this.escapeExpression,c=x.blockHelperMissing;function t(L,K){var I="",J;I+='\n<div class="errormessagesmall">\n ';l=x.local;J=l||L.local;v=u.program(2,s,K);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof J===f){J=J.call(L,v)}else{J=c.call(L,J,v)}if(J||J===0){I+=J}I+=":\n ";l=x.local;J=l||L.local;v=u.program(4,r,K);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof J===f){J=J.call(L,v)}else{J=c.call(L,J,v)}if(J||J===0){I+=J}I+="\n</div>\n";return I}function s(J,I){return"There was an error getting the data for this dataset"}function r(K,J){var I;l=x.error;I=l||K.error;if(typeof I===f){I=I.call(K,{hash:{}})}else{if(I===d){I=w.call(K,"error",{hash:{}})}}return e(I)}function p(L,K){var J,I;l=x.purged;J=l||L.purged;I=x.unless;v=u.program(7,o,K);v.hash={};v.fn=v;v.inverse=u.noop;J=I.call(L,J,v);if(J||J===0){return J}else{return""}}function o(L,K){var I="",J;I+="\n";l=x.warningmessagesmall;J=l||L.warningmessagesmall;v=u.program(8,k,K);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof J===f){J=J.call(L,v)}else{J=c.call(L,J,v)}if(J||J===0){I+=J}I+="\n";return I}function k(M,L){var I="",K,J;I+="\n ";l=x.local;K=l||M.local;v=u.program(9,h,L);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof K===f){K=K.call(M,v)}else{K=c.call(M,K,v)}if(K||K===0){I+=K}I+="\n ";l=x.urls;K=l||M.urls;K=(K===null||K===undefined||K===false?K:K.undelete);J=x["if"];v=u.program(11,G,L);v.hash={};v.fn=v;v.inverse=u.noop;K=J.call(M,K,v);if(K||K===0){I+=K}I+="\n";return I}function h(J,I){return"This dataset has been deleted."}function G(M,L){var I="",K,J;I+="\n ";I+='\n Click <a href="';l=x.urls;K=l||M.urls;K=(K===null||K===undefined||K===false?K:K.undelete);if(typeof K===f){K=K.call(M,{hash:{}})}else{if(K===d){K=w.call(M,"urls.undelete",{hash:{}})}}I+=e(K)+'" class="historyItemUndelete" id="historyItemUndeleter-';l=x.id;K=l||M.id;if(typeof K===f){K=K.call(M,{hash:{}})}else{if(K===d){K=w.call(M,"id",{hash:{}})}}I+=e(K)+'"\n target="galaxy_history">here</a> to undelete it\n ';l=x.urls;K=l||M.urls;K=(K===null||K===undefined||K===false?K:K.purge);J=x["if"];v=u.program(12,F,L);v.hash={};v.fn=v;v.inverse=u.noop;K=J.call(M,K,v);if(K||K===0){I+=K}I+="\n ";return I}function F(L,K){var I="",J;I+='\n or <a href="';l=x.urls;J=l||L.urls;J=(J===null||J===undefined||J===false?J:J.purge);if(typeof J===f){J=J.call(L,{hash:{}})}else{if(J===d){J=w.call(L,"urls.purge",{hash:{}})}}I+=e(J)+'" class="historyItemPurge" id="historyItemPurger-';l=x.id;J=l||L.id;if(typeof J===f){J=J.call(L,{hash:{}})}else{if(J===d){J=w.call(L,"id",{hash:{}})}}I+=e(J)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return I}function E(K,J){var I;l=x.warningmessagesmall;I=l||K.warningmessagesmall;v=u.program(15,D,J);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof I===f){I=I.call(K,v)}else{I=c.call(K,I,v)}if(I||I===0){return I}else{return""}}function D(L,K){var I="",J;I+="\n ";l=x.local;J=l||L.local;v=u.program(16,C,K);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof J===f){J=J.call(L,v)}else{J=c.call(L,J,v)}if(J||J===0){I+=J}I+="\n";return I}function C(J,I){return"This dataset has been deleted and removed from disk."}function B(K,J){var I;l=x.warningmessagesmall;I=l||K.warningmessagesmall;v=u.program(19,A,J);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof I===f){I=I.call(K,v)}else{I=c.call(K,I,v)}if(I||I===0){return I}else{return""}}function A(M,L){var I="",K,J;I+="\n ";l=x.local;K=l||M.local;v=u.program(20,n,L);v.hash={};v.fn=v;v.inverse=u.noop;if(l&&typeof K===f){K=K.call(M,v)}else{K=c.call(M,K,v)}if(K||K===0){I+=K}I+="\n ";l=x.urls;K=l||M.urls;K=(K===null||K===undefined||K===false?K:K.unhide);J=x["if"];v=u.program(22,g,L);v.hash={};v.fn=v;v.inverse=u.noop;K=J.call(M,K,v);if(K||K===0){I+=K}I+="\n";return I}function n(J,I){return"This dataset has been hidden."}function g(L,K){var I="",J;I+='\n Click <a href="';l=x.urls;J=l||L.urls;J=(J===null||J===undefined||J===false?J:J.unhide);if(typeof J===f){J=J.call(L,{hash:{}})}else{if(J===d){J=w.call(L,"urls.unhide",{hash:{}})}}I+=e(J)+'" class="historyItemUnhide" id="historyItemUnhider-';l=x.id;J=l||L.id;if(typeof J===f){J=J.call(L,{hash:{}})}else{if(J===d){J=w.call(L,"id",{hash:{}})}}I+=e(J)+'"\n target="galaxy_history">here</a> to unhide it\n ';return I}l=x.error;m=l||z.error;i=x["if"];v=u.program(1,t,H);v.hash={};v.fn=v;v.inverse=u.noop;m=i.call(z,m,v);if(m||m===0){y+=m}y+="\n\n";l=x.deleted;m=l||z.deleted;i=x["if"];v=u.program(6,p,H);v.hash={};v.fn=v;v.inverse=u.noop;m=i.call(z,m,v);if(m||m===0){y+=m}y+="\n\n";l=x.purged;m=l||z.purged;i=x["if"];v=u.program(14,E,H);v.hash={};v.fn=v;v.inverse=u.noop;m=i.call(z,m,v);if(m||m===0){y+=m}y+="\n\n";l=x.visible;m=l||z.visible;i=x.unless;v=u.program(18,B,H);v.hash={};v.fn=v;v.inverse=u.noop;m=i.call(z,m,v);if(m||m===0){y+=m}return y})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(h,u,s,n,C){this.compilerInfo=[4,">= 1.0.0"];s=this.merge(s,h.helpers);C=C||{};var t="",j,e="function",d=this.escapeExpression,r=this,c=s.blockHelperMissing;function q(H,G){var D="",F,E;D+='\n<div class="errormessagesmall">\n ';E={hash:{},inverse:r.noop,fn:r.program(2,p,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+=":\n ";E={hash:{},inverse:r.noop,fn:r.program(4,o,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n</div>\n";return D}function p(E,D){return"There was an error getting the data for this dataset"}function o(F,E){var D;if(D=s.error){D=D.call(F,{hash:{},data:E})}else{D=F.error;D=typeof D===e?D.apply(F):D}return d(D)}function m(F,E){var D;D=s.unless.call(F,F.purged,{hash:{},inverse:r.noop,fn:r.program(7,l,E),data:E});if(D||D===0){return D}else{return""}}function l(H,G){var D="",F,E;D+="\n";E={hash:{},inverse:r.noop,fn:r.program(8,i,G),data:G};if(F=s.warningmessagesmall){F=F.call(H,E)}else{F=H.warningmessagesmall;F=typeof F===e?F.apply(H):F}if(!s.warningmessagesmall){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n";return D}function i(I,H){var D="",G,F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(9,g,H),data:H};if(G=s.local){G=G.call(I,E)}else{G=I.local;G=typeof G===e?G.apply(I):G}if(!s.local){G=c.call(I,G,E)}if(G||G===0){D+=G}D+="\n ";F=s["if"].call(I,((G=I.urls),G==null||G===false?G:G.undelete),{hash:{},inverse:r.noop,fn:r.program(11,B,H),data:H});if(F||F===0){D+=F}D+="\n";return D}function g(E,D){return"This dataset has been deleted."}function B(H,G){var D="",F,E;D+='\n \n Click <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.undelete)),typeof F===e?F.apply(H):F))+'" class="historyItemUndelete" id="historyItemUndeleter-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to undelete it\n ';E=s["if"].call(H,((F=H.urls),F==null||F===false?F:F.purge),{hash:{},inverse:r.noop,fn:r.program(12,A,G),data:G});if(E||E===0){D+=E}D+="\n ";return D}function A(H,G){var D="",F,E;D+='\n or <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.purge)),typeof F===e?F.apply(H):F))+'" class="historyItemPurge" id="historyItemPurger-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return D}function z(G,F){var E,D;D={hash:{},inverse:r.noop,fn:r.program(15,y,F),data:F};if(E=s.warningmessagesmall){E=E.call(G,D)}else{E=G.warningmessagesmall;E=typeof E===e?E.apply(G):E}if(!s.warningmessagesmall){E=c.call(G,E,D)}if(E||E===0){return E}else{return""}}function y(H,G){var D="",F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(16,x,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n";return D}function x(E,D){return"This dataset has been deleted and removed from disk."}function w(G,F){var E,D;D={hash:{},inverse:r.noop,fn:r.program(19,v,F),data:F};if(E=s.warningmessagesmall){E=E.call(G,D)}else{E=G.warningmessagesmall;E=typeof E===e?E.apply(G):E}if(!s.warningmessagesmall){E=c.call(G,E,D)}if(E||E===0){return E}else{return""}}function v(I,H){var D="",G,F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(20,k,H),data:H};if(G=s.local){G=G.call(I,E)}else{G=I.local;G=typeof G===e?G.apply(I):G}if(!s.local){G=c.call(I,G,E)}if(G||G===0){D+=G}D+="\n ";F=s["if"].call(I,((G=I.urls),G==null||G===false?G:G.unhide),{hash:{},inverse:r.noop,fn:r.program(22,f,H),data:H});if(F||F===0){D+=F}D+="\n";return D}function k(E,D){return"This dataset has been hidden."}function f(H,G){var D="",F,E;D+='\n Click <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.unhide)),typeof F===e?F.apply(H):F))+'" class="historyItemUnhide" id="historyItemUnhider-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to unhide it\n ';return D}j=s["if"].call(u,u.error,{hash:{},inverse:r.noop,fn:r.program(1,q,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s["if"].call(u,u.deleted,{hash:{},inverse:r.noop,fn:r.program(6,m,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s["if"].call(u,u.purged,{hash:{},inverse:r.noop,fn:r.program(14,z,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s.unless.call(u,u.visible,{hash:{},inverse:r.noop,fn:r.program(18,w,C),data:C});if(j||j===0){t+=j}return t})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(G,d,F,p,M){F=F||G.helpers;var m="",s,q,c,L,g=this,l="function",v=F.blockHelperMissing,E=F.helperMissing,t=void 0,H=this.escapeExpression;function D(Q,P){var N="",O;N+='\n <div id="history-name" class="tooltip editable-text"\n title="';c=F.local;O=c||Q.local;L=g.program(2,C,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+='">';c=F.name;O=c||Q.name;if(typeof O===l){O=O.call(Q,{hash:{}})}else{if(O===t){O=E.call(Q,"name",{hash:{}})}}N+=H(O)+"</div>\n ";return N}function C(O,N){return"Click to rename history"}function B(Q,P){var N="",O;N+='\n <div id="history-name" class="tooltip"\n title="';c=F.local;O=c||Q.local;L=g.program(5,A,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+='">';c=F.name;O=c||Q.name;if(typeof O===l){O=O.call(Q,{hash:{}})}else{if(O===t){O=E.call(Q,"name",{hash:{}})}}N+=H(O)+"</div>\n ";return N}function A(O,N){return"You must be logged in to edit your history name"}function y(Q,P){var N="",O;N+='\n <a id="history-tag" title="';c=F.local;O=c||Q.local;L=g.program(8,x,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';c=F.local;O=c||Q.local;L=g.program(10,z,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return N}function x(O,N){return"Edit history tags"}function z(O,N){return"Edit history annotation"}function w(R,Q){var N="",P,O;N+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';c=F.local;P=c||R.local;L=g.program(13,u,Q);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof P===l){P=P.call(R,L)}else{P=v.call(R,P,L)}if(P||P===0){N+=P}N+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';c=F.local;P=c||R.local;L=g.program(15,r,Q);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof P===l){P=P.call(R,L)}else{P=v.call(R,P,L)}if(P||P===0){N+=P}N+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';c=F.local;P=c||R.local;L=g.program(17,o,Q);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof P===l){P=P.call(R,L)}else{P=v.call(R,P,L)}if(P||P===0){N+=P}N+='">\n ';c=F.annotation;P=c||R.annotation;O=F["if"];L=g.program(19,n,Q);L.hash={};L.fn=L;L.inverse=g.program(21,k,Q);P=O.call(R,P,L);if(P||P===0){N+=P}N+="\n </div>\n </div>\n </div>\n </div>\n ";return N}function u(O,N){return"Tags"}function r(O,N){return"Annotation"}function o(O,N){return"Click to edit annotation"}function n(Q,P){var N="",O;N+="\n ";c=F.annotation;O=c||Q.annotation;if(typeof O===l){O=O.call(Q,{hash:{}})}else{if(O===t){O=E.call(Q,"annotation",{hash:{}})}}N+=H(O)+"\n ";return N}function k(Q,P){var N="",O;N+="\n <em>";c=F.local;O=c||Q.local;L=g.program(22,j,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+="</em>\n ";return N}function j(O,N){return"Describe or add notes to history"}function i(Q,P){var N="",O;N+="\n ";c=F.warningmessagesmall;O=c||Q.warningmessagesmall;L=g.program(25,h,P);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof O===l){O=O.call(Q,L)}else{O=v.call(Q,O,L)}if(O||O===0){N+=O}N+="\n ";return N}function h(P,O){var N;c=F.local;N=c||P.local;L=g.program(26,f,O);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof N===l){N=N.call(P,L)}else{N=v.call(P,N,L)}if(N||N===0){return N}else{return""}}function f(O,N){return"You are currently viewing a deleted history!"}function e(Q,P){var N="",O;N+='\n <div class="';c=F.status;O=c||Q.status;if(typeof O===l){O=O.call(Q,{hash:{}})}else{if(O===t){O=E.call(Q,"status",{hash:{}})}}N+=H(O)+'message">';c=F.message;O=c||Q.message;if(typeof O===l){O=O.call(Q,{hash:{}})}else{if(O===t){O=E.call(Q,"message",{hash:{}})}}N+=H(O)+"</div>\n ";return N}function K(O,N){return"You are over your disk quota"}function J(O,N){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function I(O,N){return"Your history is empty. Click 'Get Data' on the left pane to start"}m+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n ';m+='\n <div id="history-name-container">\n ';m+="\n ";c=F.user;s=c||d.user;s=(s===null||s===undefined||s===false?s:s.email);q=F["if"];L=g.program(1,D,M);L.hash={};L.fn=L;L.inverse=g.program(4,B,M);s=q.call(d,s,L);if(s||s===0){m+=s}m+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';c=F.nice_size;s=c||d.nice_size;if(typeof s===l){s=s.call(d,{hash:{}})}else{if(s===t){s=E.call(d,"nice_size",{hash:{}})}}m+=H(s)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';c=F.user;s=c||d.user;s=(s===null||s===undefined||s===false?s:s.email);q=F["if"];L=g.program(7,y,M);L.hash={};L.fn=L;L.inverse=g.noop;s=q.call(d,s,L);if(s||s===0){m+=s}m+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n ';m+="\n ";m+="\n ";c=F.user;s=c||d.user;s=(s===null||s===undefined||s===false?s:s.email);q=F["if"];L=g.program(12,w,M);L.hash={};L.fn=L;L.inverse=g.noop;s=q.call(d,s,L);if(s||s===0){m+=s}m+="\n\n ";c=F.deleted;s=c||d.deleted;q=F["if"];L=g.program(24,i,M);L.hash={};L.fn=L;L.inverse=g.noop;s=q.call(d,s,L);if(s||s===0){m+=s}m+='\n\n <div id="message-container">\n ';c=F.message;s=c||d.message;q=F["if"];L=g.program(28,e,M);L.hash={};L.fn=L;L.inverse=g.noop;s=q.call(d,s,L);if(s||s===0){m+=s}m+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';c=F.local;s=c||d.local;L=g.program(30,K,M);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof s===l){s=s.call(d,L)}else{s=v.call(d,s,L)}if(s||s===0){m+=s}m+=".\n ";c=F.local;s=c||d.local;L=g.program(32,J,M);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof s===l){s=s.call(d,L)}else{s=v.call(d,s,L)}if(s||s===0){m+=s}m+='.\n </div>\n </div>\n</div>\n\n<div id="';c=F.id;s=c||d.id;if(typeof s===l){s=s.call(d,{hash:{}})}else{if(s===t){s=E.call(d,"id",{hash:{}})}}m+=H(s)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';c=F.local;s=c||d.local;L=g.program(34,I,M);L.hash={};L.fn=L;L.inverse=g.noop;if(c&&typeof s===l){s=s.call(d,L)}else{s=v.call(d,s,L)}if(s||s===0){m+=s}m+="\n</div>";return m})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,C,A,s,J){this.compilerInfo=[4,">= 1.0.0"];A=this.merge(A,m.helpers);J=J||{};var B="",p,l,h,x=this,e="function",c=A.blockHelperMissing,d=this.escapeExpression;function v(O,N){var K="",M,L;K+='\n <div id="history-name" class="tooltip editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(2,u,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function u(L,K){return"Click to rename history"}function t(O,N){var K="",M,L;K+='\n <div id="history-name" class="tooltip"\n title="';L={hash:{},inverse:x.noop,fn:x.program(5,r,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function r(L,K){return"You must be logged in to edit your history name"}function q(O,N){var K="",M,L;K+='\n <a id="history-tag" title="';L={hash:{},inverse:x.noop,fn:x.program(8,o,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';L={hash:{},inverse:x.noop,fn:x.program(10,I,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return K}function o(L,K){return"Edit history tags"}function I(L,K){return"Edit history annotation"}function H(O,N){var K="",M,L;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(13,G,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(15,F,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(17,E,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">\n ';M=A["if"].call(O,O.annotation,{hash:{},inverse:x.program(21,n,N),fn:x.program(19,D,N),data:N});if(M||M===0){K+=M}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function G(L,K){return"Tags"}function F(L,K){return"Annotation"}function E(L,K){return"Click to edit annotation"}function D(N,M){var K="",L;K+="\n ";if(L=A.annotation){L=L.call(N,{hash:{},data:M})}else{L=N.annotation;L=typeof L===e?L.apply(N):L}K+=d(L)+"\n ";return K}function n(O,N){var K="",M,L;K+="\n <em>";L={hash:{},inverse:x.noop,fn:x.program(22,k,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="</em>\n ";return K}function k(L,K){return"Describe or add notes to history"}function j(O,N){var K="",M,L;K+="\n ";L={hash:{},inverse:x.noop,fn:x.program(25,i,N),data:N};if(M=A.warningmessagesmall){M=M.call(O,L)}else{M=O.warningmessagesmall;M=typeof M===e?M.apply(O):M}if(!A.warningmessagesmall){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="\n ";return K}function i(N,M){var L,K;K={hash:{},inverse:x.noop,fn:x.program(26,g,M),data:M};if(L=A.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!A.local){L=c.call(N,L,K)}if(L||L===0){return L}else{return""}}function g(L,K){return"You are currently viewing a deleted history!"}function f(N,M){var K="",L;K+='\n <div class="';if(L=A.status){L=L.call(N,{hash:{},data:M})}else{L=N.status;L=typeof L===e?L.apply(N):L}K+=d(L)+'message">';if(L=A.message){L=L.call(N,{hash:{},data:M})}else{L=N.message;L=typeof L===e?L.apply(N):L}K+=d(L)+"</div>\n ";return K}function z(L,K){return"You are over your disk quota"}function y(L,K){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function w(L,K){return"Your history is empty. Click 'Get Data' on the left pane to start"}B+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.program(4,t,J),fn:x.program(1,v,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=A.nice_size){l=l.call(C,{hash:{},data:J})}else{l=C.nice_size;l=typeof l===e?l.apply(C):l}B+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(7,q,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(12,H,J),data:J});if(l||l===0){B+=l}B+="\n\n ";l=A["if"].call(C,C.deleted,{hash:{},inverse:x.noop,fn:x.program(24,j,J),data:J});if(l||l===0){B+=l}B+='\n\n <div id="message-container">\n ';l=A["if"].call(C,C.message,{hash:{},inverse:x.noop,fn:x.program(28,f,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:x.noop,fn:x.program(30,z,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+=".\n ";h={hash:{},inverse:x.noop,fn:x.program(32,y,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+='.\n </div>\n </div>\n</div>\n\n<div id="';if(l=A.id){l=l.call(C,{hash:{},data:J})}else{l=C.id;l=typeof l===e?l.apply(C):l}B+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:x.noop,fn:x.program(34,w,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+="\n</div>";return B})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-iconButton.js
--- a/static/scripts/packed/templates/compiled/template-iconButton.js
+++ b/static/scripts/packed/templates/compiled/template-iconButton.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-iconButton"]=b(function(e,j,d,i,h){d=d||e.helpers;i=i||e.partials;var g="",c,f,k=this;g+="\n";c=j;c=k.invokePartial(i.iconButton,"iconButton",c,d,i);if(c||c===0){g+=c}return g})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-iconButton"]=b(function(i,j,g,e,h){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,i.helpers);e=this.merge(e,i.partials);h=h||{};var c="",f,d=this;c+="\n";f=d.invokePartial(e.iconButton,"iconButton",j,g,e,h);if(f||f===0){c+=f}return c})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-popupmenu-menu.js
--- a/static/scripts/packed/templates/compiled/template-popupmenu-menu.js
+++ b/static/scripts/packed/templates/compiled/template-popupmenu-menu.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-popupmenu-menu"]=b(function(h,w,u,n,B){u=u||h.helpers;var v="",k,g,j,s,r=this,e="function",t=u.helperMissing,c=void 0,d=this.escapeExpression;function q(G,F){var C="",E,D;C+="\n ";j=u.options;E=j||G.options;D=u.each;s=r.program(2,p,F);s.hash={};s.fn=s;s.inverse=r.noop;E=D.call(G,E,s);if(E||E===0){C+=E}C+="\n";return C}function p(G,F){var C="",E,D;C+="\n ";j=u.divider;E=j||G.divider;D=u["if"];s=r.program(3,o,F);s.hash={};s.fn=s;s.inverse=r.program(5,m,F);E=D.call(G,E,s);if(E||E===0){C+=E}C+="\n ";return C}function o(D,C){return'\n <li class="divider"></li>\n '}function m(G,F){var C="",E,D;C+="\n ";j=u.header;E=j||G.header;D=u["if"];s=r.program(6,l,F);s.hash={};s.fn=s;s.inverse=r.program(8,i,F);E=D.call(G,E,s);if(E||E===0){C+=E}C+="\n ";return C}function l(F,E){var C="",D;C+='\n <li class="head"><a href=""javascript:void(0);">';j=u.html;D=j||F.html;if(typeof D===e){D=D.call(F,{hash:{}})}else{if(D===c){D=t.call(F,"html",{hash:{}})}}if(D||D===0){C+=D}C+="</a></li>\n ";return C}function i(G,F){var C="",E,D;C+="\n ";C+='\n <li><a href="';j=u.href;E=j||G.href;D=u["if"];s=r.program(9,f,F);s.hash={};s.fn=s;s.inverse=r.program(11,A,F);E=D.call(G,E,s);if(E||E===0){C+=E}C+='"\n ';j=u.href;E=j||G.href;D=u["if"];s=r.program(13,z,F);s.hash={};s.fn=s;s.inverse=r.noop;E=D.call(G,E,s);if(E||E===0){C+=E}C+=' class="popupmenu-option">\n ';j=u.checked;E=j||G.checked;D=u["if"];s=r.program(15,y,F);s.hash={};s.fn=s;s.inverse=r.noop;E=D.call(G,E,s);if(E||E===0){C+=E}C+="\n ";j=u.html;E=j||G.html;if(typeof E===e){E=E.call(G,{hash:{}})}else{if(E===c){E=t.call(G,"html",{hash:{}})}}if(E||E===0){C+=E}C+="\n </a></li>\n ";return C}function f(E,D){var C;j=u.href;C=j||E.href;if(typeof C===e){C=C.call(E,{hash:{}})}else{if(C===c){C=t.call(E,"href",{hash:{}})}}return d(C)}function A(D,C){return"javascript:void(0);"}function z(F,E){var C="",D;C+='target="';j=u.target;D=j||F.target;if(typeof D===e){D=D.call(F,{hash:{}})}else{if(D===c){D=t.call(F,"target",{hash:{}})}}C+=d(D)+'"';return C}function y(D,C){return'<span class="fa-icon-ok"></span>'}function x(D,C){return"\n <li>No Options.</li>\n"}v+='<ul id="';j=u.id;k=j||w.id;if(typeof k===e){k=k.call(w,{hash:{}})}else{if(k===c){k=t.call(w,"id",{hash:{}})}}v+=d(k)+'-menu" class="dropdown-menu">\n';j=u.options;k=j||w.options;k=(k===null||k===undefined||k===false?k:k.length);g=u["if"];s=r.program(1,q,B);s.hash={};s.fn=s;s.inverse=r.program(17,x,B);k=g.call(w,k,s);if(k||k===0){v+=k}v+="\n</ul>";return v})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-popupmenu-menu"]=b(function(g,s,q,l,x){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);x=x||{};var r="",i,f,d="function",c=this.escapeExpression,p=this;function o(B,A){var y="",z;y+="\n ";z=q.each.call(B,B.options,{hash:{},inverse:p.noop,fn:p.program(2,n,A),data:A});if(z||z===0){y+=z}y+="\n";return y}function n(B,A){var y="",z;y+="\n ";z=q["if"].call(B,B.divider,{hash:{},inverse:p.program(5,k,A),fn:p.program(3,m,A),data:A});if(z||z===0){y+=z}y+="\n ";return y}function m(z,y){return'\n <li class="divider"></li>\n '}function k(B,A){var y="",z;y+="\n ";z=q["if"].call(B,B.header,{hash:{},inverse:p.program(8,h,A),fn:p.program(6,j,A),data:A});if(z||z===0){y+=z}y+="\n ";return y}function j(B,A){var y="",z;y+='\n <li class="head"><a href=""javascript:void(0);">';if(z=q.html){z=z.call(B,{hash:{},data:A})}else{z=B.html;z=typeof z===d?z.apply(B):z}if(z||z===0){y+=z}y+="</a></li>\n ";return y}function h(B,A){var y="",z;y+='\n \n <li><a href="';z=q["if"].call(B,B.href,{hash:{},inverse:p.program(11,w,A),fn:p.program(9,e,A),data:A});if(z||z===0){y+=z}y+='"\n ';z=q["if"].call(B,B.href,{hash:{},inverse:p.noop,fn:p.program(13,v,A),data:A});if(z||z===0){y+=z}y+=' class="popupmenu-option">\n ';z=q["if"].call(B,B.checked,{hash:{},inverse:p.noop,fn:p.program(15,u,A),data:A});if(z||z===0){y+=z}y+="\n ";if(z=q.html){z=z.call(B,{hash:{},data:A})}else{z=B.html;z=typeof z===d?z.apply(B):z}if(z||z===0){y+=z}y+="\n </a></li>\n ";return y}function e(A,z){var y;if(y=q.href){y=y.call(A,{hash:{},data:z})}else{y=A.href;y=typeof y===d?y.apply(A):y}return c(y)}function w(z,y){return"javascript:void(0);"}function v(B,A){var y="",z;y+='target="';if(z=q.target){z=z.call(B,{hash:{},data:A})}else{z=B.target;z=typeof z===d?z.apply(B):z}y+=c(z)+'"';return y}function u(z,y){return'<span class="fa-icon-ok"></span>'}function t(z,y){return"\n <li>No Options.</li>\n"}r+='<ul id="';if(i=q.id){i=i.call(s,{hash:{},data:x})}else{i=s.id;i=typeof i===d?i.apply(s):i}r+=c(i)+'-menu" class="dropdown-menu">\n';f=q["if"].call(s,((i=s.options),i==null||i===false?i:i.length),{hash:{},inverse:p.program(17,t,x),fn:p.program(1,o,x),data:x});if(f||f===0){r+=f}r+="\n</ul>";return r})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
--- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
+++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(h,s,q,k,t){q=q||h.helpers;var r="",j,g,i,o,n=this,f="function",p=q.helperMissing,d=void 0,e=this.escapeExpression,c=q.blockHelperMissing;function m(x,w){var u="",v;u+=' title="Using ';i=q.nice_total_disk_usage;v=i||x.nice_total_disk_usage;if(typeof v===f){v=v.call(x,{hash:{}})}else{if(v===d){v=p.call(x,"nice_total_disk_usage",{hash:{}})}}u+=e(v)+'"';return u}function l(v,u){return"Using"}r+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';i=q.quota_percent;j=i||s.quota_percent;if(typeof j===f){j=j.call(s,{hash:{}})}else{if(j===d){j=p.call(s,"quota_percent",{hash:{}})}}r+=e(j)+'%"></div>\n ';r+='\n <div id="quota-meter-text" class="quota-meter-text tooltip"\n style="top: 6px"';i=q.nice_total_disk_usage;j=i||s.nice_total_disk_usage;g=q["if"];o=n.program(1,m,t);o.hash={};o.fn=o;o.inverse=n.noop;j=g.call(s,j,o);if(j||j===0){r+=j}r+=">\n ";i=q.local;j=i||s.local;o=n.program(3,l,t);o.hash={};o.fn=o;o.inverse=n.noop;if(i&&typeof j===f){j=j.call(s,o)}else{j=c.call(s,j,o)}if(j||j===0){r+=j}r+=" ";i=q.quota_percent;j=i||s.quota_percent;if(typeof j===f){j=j.call(s,{hash:{}})}else{if(j===d){j=p.call(s,"quota_percent",{hash:{}})}}r+=e(j)+"%\n </div>\n</div>";return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,p,h="function",j=this.escapeExpression,o=this,n=f.blockHelperMissing;function e(t,s){var q="",r;q+=' title="Using ';if(r=f.nice_total_disk_usage){r=r.call(t,{hash:{},data:s})}else{r=t.nice_total_disk_usage;r=typeof r===h?r.apply(t):r}q+=j(r)+'"';return q}function c(r,q){return"Using"}i+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';if(d=f.quota_percent){d=d.call(m,{hash:{},data:k})}else{d=m.quota_percent;d=typeof d===h?d.apply(m):d}i+=j(d)+'%"></div>\n \n <div id="quota-meter-text" class="quota-meter-text tooltip"\n style="top: 6px"';d=f["if"].call(m,m.nice_total_disk_usage,{hash:{},inverse:o.noop,fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+=">\n ";p={hash:{},inverse:o.noop,fn:o.program(3,c,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+=" ";if(d=f.quota_percent){d=d.call(m,{hash:{},data:k})}else{d=m.quota_percent;d=typeof d===h?d.apply(m):d}i+=j(d)+"%\n </div>\n</div>";return i})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
--- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
+++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(h,s,q,k,t){q=q||h.helpers;var r="",j,g,i,o,n=this,f="function",c=q.blockHelperMissing,p=q.helperMissing,d=void 0,e=this.escapeExpression;function m(x,w){var u="",v;i=q.local;v=i||x.local;o=n.program(2,l,w);o.hash={};o.fn=o;o.inverse=n.noop;if(i&&typeof v===f){v=v.call(x,o)}else{v=c.call(x,v,o)}if(v||v===0){u+=v}u+=" ";i=q.nice_total_disk_usage;v=i||x.nice_total_disk_usage;if(typeof v===f){v=v.call(x,{hash:{}})}else{if(v===d){v=p.call(x,"nice_total_disk_usage",{hash:{}})}}u+=e(v);return u}function l(v,u){return"Using"}r+='<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n ';i=q.nice_total_disk_usage;j=i||s.nice_total_disk_usage;g=q["if"];o=n.program(1,m,t);o.hash={};o.fn=o;o.inverse=n.noop;j=g.call(s,j,o);if(j||j===0){r+=j}r+="\n </div>\n</div>";return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var p="",r,q;q={hash:{},inverse:o.noop,fn:o.program(2,d,s),data:s};if(r=f.local){r=r.call(t,q)}else{r=t.local;r=typeof r===h?r.apply(t):r}if(!f.local){r=n.call(t,r,q)}if(r||r===0){p+=r}p+=" ";if(r=f.nice_total_disk_usage){r=r.call(t,{hash:{},data:s})}else{r=t.nice_total_disk_usage;r=typeof r===h?r.apply(t):r}p+=j(r);return p}function d(q,p){return"Using"}i+='<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n ';c=f["if"].call(m,m.nice_total_disk_usage,{hash:{},inverse:o.noop,fn:o.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n </div>\n</div>";return i})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-visualization-chartControl.js
--- a/static/scripts/packed/templates/compiled/template-visualization-chartControl.js
+++ b/static/scripts/packed/templates/compiled/template-visualization-chartControl.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-chartControl"]=b(function(f,p,e,n,m){e=e||f.helpers;var k="",c,r,j,i,q=this,g="function",o=e.helperMissing,h=void 0,l=this.escapeExpression;function d(t,s){return' checked="true"'}k+='<p class="help-text">\n Use the following controls to how the chart is displayed.\n The slide controls can be moved by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys.\n Move the focus between controls by using the tab or shift+tab keys on your keyboard.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n </p>\n\n <div id="datapointSize" class="form-input numeric-slider-input">\n <label for="datapointSize">Size of data point: </label>\n <div class="slider-output">';j=e.datapointSize;c=j||p.datapointSize;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"datapointSize",{hash:{}})}}k+=l(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n Size of the graphic representation of each data point\n </p>\n </div>\n\n <div id="animDuration" class="form-input checkbox-input">\n <label for="animate-chart">Animate chart transitions?: </label>\n <input type="checkbox" id="animate-chart"\n class="checkbox control"';j=e.animDuration;c=j||p.animDuration;r=e["if"];i=q.program(1,d,m);i.hash={};i.fn=i;i.inverse=q.noop;c=r.call(p,c,i);if(c||c===0){k+=c}k+=' />\n <p class="form-help help-text-small">\n Uncheck this to disable the animations used on the chart\n </p>\n </div>\n\n <div id="width" class="form-input numeric-slider-input">\n <label for="width">Chart width: </label>\n <div class="slider-output">';j=e.width;c=j||p.width;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"width",{hash:{}})}}k+=l(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="height" class="form-input numeric-slider-input">\n <label for="height">Chart height: </label>\n <div class="slider-output">';j=e.height;c=j||p.height;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"height",{hash:{}})}}k+=l(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="X-axis-label"class="text-input form-input">\n <label for="X-axis-label">Re-label the X axis: </label>\n <input type="text" name="X-axis-label" id="X-axis-label" value="';j=e.xLabel;c=j||p.xLabel;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"xLabel",{hash:{}})}}k+=l(c)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <div id="Y-axis-label" class="text-input form-input">\n <label for="Y-axis-label">Re-label the Y axis: </label>\n <input type="text" name="Y-axis-label" id="Y-axis-label" value="';j=e.yLabel;c=j||p.yLabel;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"yLabel",{hash:{}})}}k+=l(c)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />';return k})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-chartControl"]=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,g="function",i=this.escapeExpression,m=this;function d(o,n){return' checked="true"'}h+='<p class="help-text">\n Use the following controls to how the chart is displayed.\n The slide controls can be moved by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys.\n Move the focus between controls by using the tab or shift+tab keys on your keyboard.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n </p>\n\n <div id="datapointSize" class="form-input numeric-slider-input">\n <label for="datapointSize">Size of data point: </label>\n <div class="slider-output">';if(c=e.datapointSize){c=c.call(l,{hash:{},data:j})}else{c=l.datapointSize;c=typeof c===g?c.apply(l):c}h+=i(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n Size of the graphic representation of each data point\n </p>\n </div>\n\n <div id="animDuration" class="form-input checkbox-input">\n <label for="animate-chart">Animate chart transitions?: </label>\n <input type="checkbox" id="animate-chart"\n class="checkbox control"';c=e["if"].call(l,l.animDuration,{hash:{},inverse:m.noop,fn:m.program(1,d,j),data:j});if(c||c===0){h+=c}h+=' />\n <p class="form-help help-text-small">\n Uncheck this to disable the animations used on the chart\n </p>\n </div>\n\n <div id="width" class="form-input numeric-slider-input">\n <label for="width">Chart width: </label>\n <div class="slider-output">';if(c=e.width){c=c.call(l,{hash:{},data:j})}else{c=l.width;c=typeof c===g?c.apply(l):c}h+=i(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="height" class="form-input numeric-slider-input">\n <label for="height">Chart height: </label>\n <div class="slider-output">';if(c=e.height){c=c.call(l,{hash:{},data:j})}else{c=l.height;c=typeof c===g?c.apply(l):c}h+=i(c)+'</div>\n <div class="slider"></div>\n <p class="form-help help-text-small">\n (not including chart margins and axes)\n </p>\n </div>\n\n <div id="X-axis-label"class="text-input form-input">\n <label for="X-axis-label">Re-label the X axis: </label>\n <input type="text" name="X-axis-label" id="X-axis-label" value="';if(c=e.xLabel){c=c.call(l,{hash:{},data:j})}else{c=l.xLabel;c=typeof c===g?c.apply(l):c}h+=i(c)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <div id="Y-axis-label" class="text-input form-input">\n <label for="Y-axis-label">Re-label the Y axis: </label>\n <input type="text" name="Y-axis-label" id="Y-axis-label" value="';if(c=e.yLabel){c=c.call(l,{hash:{},data:j})}else{c=l.yLabel;c=typeof c===g?c.apply(l):c}h+=i(c)+'" />\n <p class="form-help help-text-small"></p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />';return h})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-visualization-chartDisplay.js
--- a/static/scripts/packed/templates/compiled/template-visualization-chartDisplay.js
+++ b/static/scripts/packed/templates/compiled/template-visualization-chartDisplay.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-chartDisplay"]=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='<svg width="';h=d.width;c=h||n.width;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"width",{hash:{}})}}i+=j(c)+'" height="';h=d.height;c=h||n.height;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"height",{hash:{}})}}i+=j(c)+'"></svg>';return i})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-chartDisplay"]=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<svg width="';if(c=d.width){c=c.call(k,{hash:{},data:i})}else{c=k.width;c=typeof c===f?c.apply(k):c}g+=h(c)+'" height="';if(c=d.height){c=c.call(k,{hash:{},data:i})}else{c=k.height;c=typeof c===f?c.apply(k):c}g+=h(c)+'"></svg>';return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-visualization-dataControl.js
--- a/static/scripts/packed/templates/compiled/template-visualization-dataControl.js
+++ b/static/scripts/packed/templates/compiled/template-visualization-dataControl.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-dataControl"]=b(function(g,t,r,l,u){r=r||g.helpers;var s="",i,f,h,p,o=this,e="function",q=r.helperMissing,c=void 0,d=this.escapeExpression;function n(y,x){var v="",w;v+='\n <option value="';h=r.index;w=h||y.index;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"index",{hash:{}})}}v+=d(w)+'">';h=r.name;w=h||y.name;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"name",{hash:{}})}}v+=d(w)+"</option>\n ";return v}function m(y,x){var v="",w;v+='\n <option value="';h=r.index;w=h||y.index;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"index",{hash:{}})}}v+=d(w)+'">';h=r.name;w=h||y.name;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"name",{hash:{}})}}v+=d(w)+"</option>\n ";return v}function k(y,x){var v="",w;v+='\n <option value="';h=r.index;w=h||y.index;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"index",{hash:{}})}}v+=d(w)+'">';h=r.name;w=h||y.name;if(typeof w===e){w=w.call(y,{hash:{}})}else{if(w===c){w=q.call(y,"name",{hash:{}})}}v+=d(w)+"</option>\n ";return v}function j(w,v){return'checked="true"'}s+="<p class=\"help-text\">\n Use the following controls to change the data used by the chart.\n Use the 'Draw' button to render (or re-render) the chart with the current settings.\n </p>\n\n ";s+='\n <div class="column-select">\n <label for="X-select">Data column for X: </label>\n <select name="X" id="X-select">\n ';h=r.numericColumns;i=h||t.numericColumns;f=r.each;p=o.program(1,n,u);p.hash={};p.fn=p;p.inverse=o.noop;i=f.call(t,i,p);if(i||i===0){s+=i}s+='\n </select>\n </div>\n <div class="column-select">\n <label for="Y-select">Data column for Y: </label>\n <select name="Y" id="Y-select">\n ';h=r.numericColumns;i=h||t.numericColumns;f=r.each;p=o.program(3,m,u);p.hash={};p.fn=p;p.inverse=o.noop;i=f.call(t,i,p);if(i||i===0){s+=i}s+="\n </select>\n </div>\n\n ";s+='\n <div id="include-id">\n <label for="include-id-checkbox">Include a third column as data point IDs?</label>\n <input type="checkbox" name="include-id" id="include-id-checkbox" />\n <p class="help-text-small">\n These will be displayed (along with the x and y values) when you hover over\n a data point.\n </p>\n </div>\n <div class="column-select" style="display: none">\n <label for="ID-select">Data column for IDs: </label>\n <select name="ID" id="ID-select">\n ';h=r.allColumns;i=h||t.allColumns;f=r.each;p=o.program(5,k,u);p.hash={};p.fn=p;p.inverse=o.noop;i=f.call(t,i,p);if(i||i===0){s+=i}s+="\n </select>\n </div>\n\n ";s+='\n <div id="first-line-header" style="display: none;">\n <p>Possible headers: ';h=r.possibleHeaders;i=h||t.possibleHeaders;if(typeof i===e){i=i.call(t,{hash:{}})}else{if(i===c){i=q.call(t,"possibleHeaders",{hash:{}})}}s+=d(i)+'\n </p>\n <label for="first-line-header-checkbox">Use the above as column headers?</label>\n <input type="checkbox" name="include-id" id="first-line-header-checkbox"\n ';h=r.usePossibleHeaders;i=h||t.usePossibleHeaders;f=r["if"];p=o.program(7,j,u);p.hash={};p.fn=p;p.inverse=o.noop;i=f.call(t,i,p);if(i||i===0){s+=i}s+='/>\n <p class="help-text-small">\n It looks like Galaxy couldn\'t get proper column headers for this data.\n Would you like to use the column headers above as column names to select columns?\n </p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />\n <div class="clear"></div>';return s})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-dataControl"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,n=this;function e(r,q){var o="",p;o+='\n <option value="';if(p=f.index){p=p.call(r,{hash:{},data:q})}else{p=r.index;p=typeof p===h?p.apply(r):p}o+=j(p)+'">';if(p=f.name){p=p.call(r,{hash:{},data:q})}else{p=r.name;p=typeof p===h?p.apply(r):p}o+=j(p)+"</option>\n ";return o}function c(p,o){return'checked="true"'}i+='<p class="help-text">\n Use the following controls to change the data used by the chart.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n </p>\n\n \n <div class="column-select">\n <label for="X-select">Data column for X: </label>\n <select name="X" id="X-select">\n ';d=f.each.call(m,m.numericColumns,{hash:{},inverse:n.noop,fn:n.program(1,e,k),data:k});if(d||d===0){i+=d}i+='\n </select>\n </div>\n <div class="column-select">\n <label for="Y-select">Data column for Y: </label>\n <select name="Y" id="Y-select">\n ';d=f.each.call(m,m.numericColumns,{hash:{},inverse:n.noop,fn:n.program(1,e,k),data:k});if(d||d===0){i+=d}i+='\n </select>\n </div>\n\n \n <div id="include-id">\n <label for="include-id-checkbox">Include a third column as data point IDs?</label>\n <input type="checkbox" name="include-id" id="include-id-checkbox" />\n <p class="help-text-small">\n These will be displayed (along with the x and y values) when you hover over\n a data point.\n </p>\n </div>\n <div class="column-select" style="display: none">\n <label for="ID-select">Data column for IDs: </label>\n <select name="ID" id="ID-select">\n ';d=f.each.call(m,m.allColumns,{hash:{},inverse:n.noop,fn:n.program(1,e,k),data:k});if(d||d===0){i+=d}i+='\n </select>\n </div>\n\n \n <div id="first-line-header" style="display: none;">\n <p>Possible headers: ';if(d=f.possibleHeaders){d=d.call(m,{hash:{},data:k})}else{d=m.possibleHeaders;d=typeof d===h?d.apply(m):d}i+=j(d)+'\n </p>\n <label for="first-line-header-checkbox">Use the above as column headers?</label>\n <input type="checkbox" name="include-id" id="first-line-header-checkbox"\n ';d=f["if"].call(m,m.usePossibleHeaders,{hash:{},inverse:n.noop,fn:n.program(3,c,k),data:k});if(d||d===0){i+=d}i+='/>\n <p class="help-text-small">\n It looks like Galaxy couldn\'t get proper column headers for this data.\n Would you like to use the column headers above as column names to select columns?\n </p>\n </div>\n\n <input id="render-button" type="button" value="Draw" />\n <div class="clear"></div>';return i})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-visualization-scatterplotControlForm.js
--- a/static/scripts/packed/templates/compiled/template-visualization-scatterplotControlForm.js
+++ b/static/scripts/packed/templates/compiled/template-visualization-scatterplotControlForm.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-scatterplotControlForm"]=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='\n\n<div class="scatterplot-container chart-container tabbable tabs-left">\n ';i+='\n <ul class="nav nav-tabs">\n ';i+='\n <li class="active"><a href="#data-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change which data are used">Data Controls</a></li>\n <li><a href="#chart-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change how the chart is drawn">Chart Controls</a></li>\n <li><a href="#stats-display" data-toggle="tab" class="tooltip"\n title="This tab will display overall statistics for your data">Statistics</a></li>\n <li><a href="#chart-display" data-toggle="tab" class="tooltip"\n title="This tab will display the chart">Chart</a>\n ';i+='\n <div id="loading-indicator" style="display: none;">\n <img class="loading-img" src="';h=d.loadingIndicatorImagePath;c=h||n.loadingIndicatorImagePath;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"loadingIndicatorImagePath",{hash:{}})}}i+=j(c)+'" />\n <span class="loading-message">';h=d.message;c=h||n.message;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"message",{hash:{}})}}i+=j(c)+"</span>\n </div>\n </li>\n </ul>\n\n ";i+='\n <div class="tab-content">\n ';i+='\n <div id="data-control" class="tab-pane active">\n ';i+="\n </div>\n \n ";i+='\n <div id="chart-control" class="tab-pane">\n ';i+="\n </div>\n\n ";i+='\n <div id="stats-display" class="tab-pane">\n ';i+="\n </div>\n\n ";i+='\n <div id="chart-display" class="tab-pane">\n ';i+="\n </div>\n\n </div>";i+="\n</div>";return i})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-scatterplotControlForm"]=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='\n\n<div class="scatterplot-container chart-container tabbable tabs-left">\n \n <ul class="nav nav-tabs">\n \n <li class="active"><a href="#data-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change which data are used">Data Controls</a></li>\n <li><a href="#chart-control" data-toggle="tab" class="tooltip"\n title="Use this tab to change how the chart is drawn">Chart Controls</a></li>\n <li><a href="#stats-display" data-toggle="tab" class="tooltip"\n title="This tab will display overall statistics for your data">Statistics</a></li>\n <li><a href="#chart-display" data-toggle="tab" class="tooltip"\n title="This tab will display the chart">Chart</a>\n \n <div id="loading-indicator" style="display: none;">\n <img class="loading-img" src="';if(c=d.loadingIndicatorImagePath){c=c.call(k,{hash:{},data:i})}else{c=k.loadingIndicatorImagePath;c=typeof c===f?c.apply(k):c}g+=h(c)+'" />\n <span class="loading-message">';if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}g+=h(c)+'</span>\n </div>\n </li>\n </ul>\n\n \n <div class="tab-content">\n \n <div id="data-control" class="tab-pane active">\n \n </div>\n \n \n <div id="chart-control" class="tab-pane">\n \n </div>\n\n \n <div id="stats-display" class="tab-pane">\n \n </div>\n\n \n <div id="chart-display" class="tab-pane">\n \n </div>\n\n </div>\n</div>';return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-visualization-statsDisplay.js
--- a/static/scripts/packed/templates/compiled/template-visualization-statsDisplay.js
+++ b/static/scripts/packed/templates/compiled/template-visualization-statsDisplay.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-statsDisplay"]=b(function(f,p,e,n,m){e=e||f.helpers;var k="",c,r,j,i,q=this,g="function",o=e.helperMissing,h=void 0,l=this.escapeExpression;function d(v,u){var s="",t;s+="\n <tr><td>";j=e.name;t=j||v.name;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"name",{hash:{}})}}s+=l(t)+"</td><td>";j=e.xval;t=j||v.xval;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"xval",{hash:{}})}}s+=l(t)+"</td><td>";j=e.yval;t=j||v.yval;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"yval",{hash:{}})}}s+=l(t)+"</td></tr>\n </tr>\n ";return s}k+='<p class="help-text">By column:</p>\n <table id="chart-stats-table">\n <thead><th></th><th>X</th><th>Y</th></thead>\n ';j=e.stats;c=j||p.stats;r=e.each;i=q.program(1,d,m);i.hash={};i.fn=i;i.inverse=q.noop;c=r.call(p,c,i);if(c||c===0){k+=c}k+="\n </table>";return k})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-visualization-statsDisplay"]=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,g="function",i=this.escapeExpression,m=this;function d(q,p){var n="",o;n+="\n <tr><td>";if(o=e.name){o=o.call(q,{hash:{},data:p})}else{o=q.name;o=typeof o===g?o.apply(q):o}n+=i(o)+"</td><td>";if(o=e.xval){o=o.call(q,{hash:{},data:p})}else{o=q.xval;o=typeof o===g?o.apply(q):o}n+=i(o)+"</td><td>";if(o=e.yval){o=o.call(q,{hash:{},data:p})}else{o=q.yval;o=typeof o===g?o.apply(q):o}n+=i(o)+"</td></tr>\n </tr>\n ";return n}h+='<p class="help-text">By column:</p>\n <table id="chart-stats-table">\n <thead><th></th><th>X</th><th>Y</th></thead>\n ';c=e.each.call(l,l.stats,{hash:{},inverse:m.noop,fn:m.program(1,d,j),data:j});if(c||c===0){h+=c}h+="\n </table>";return h})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/template-warningmessagesmall.js
--- a/static/scripts/packed/templates/compiled/template-warningmessagesmall.js
+++ b/static/scripts/packed/templates/compiled/template-warningmessagesmall.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-warningmessagesmall"]=b(function(e,m,d,k,j){d=d||e.helpers;var i="",c,h,n=this,f="function",l=d.helperMissing,g=void 0;i+=' \n <div class="warningmessagesmall"><strong>';h=d.warning;c=h||m.warning;if(typeof c===f){c=c.call(m,{hash:{}})}else{if(c===g){c=l.call(m,"warning",{hash:{}})}}if(c||c===0){i+=c}i+="</strong></div>";return i})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-warningmessagesmall"]=b(function(i,j,f,d,g){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,i.helpers);g=g||{};var c="",e,h="function";c+=' \n <div class="warningmessagesmall"><strong>';if(e=f.warning){e=e.call(j,{hash:{},data:g})}else{e=j.warning;e=typeof e===h?e.apply(j):e}if(e||e===0){c+=e}c+="</strong></div>";return c})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/tool_form.js
--- a/static/scripts/packed/templates/compiled/tool_form.js
+++ b/static/scripts/packed/templates/compiled/tool_form.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_form=b(function(f,l,e,k,j){this.compilerInfo=[2,">= 1.0.0-rc.3"];e=e||f.helpers;j=j||{};var h="",c,g="function",i=this.escapeExpression,m=this;function d(q,p){var n="",o;n+='\n <div class="form-row">\n <label for="';if(o=e.name){o=o.call(q,{hash:{},data:p})}else{o=q.name;o=typeof o===g?o.apply(q):o}n+=i(o)+'">';if(o=e.label){o=o.call(q,{hash:{},data:p})}else{o=q.label;o=typeof o===g?o.apply(q):o}n+=i(o)+':</label>\n <div class="form-row-input">\n ';if(o=e.html){o=o.call(q,{hash:{},data:p})}else{o=q.html;o=typeof o===g?o.apply(q):o}if(o||o===0){n+=o}n+='\n </div>\n <div class="toolParamHelp" style="clear: both;">\n ';if(o=e.help){o=o.call(q,{hash:{},data:p})}else{o=q.help;o=typeof o===g?o.apply(q):o}n+=i(o)+'\n </div>\n <div style="clear: both;"></div>\n </div>\n ';return n}h+='<div class="toolFormTitle">';if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" (version ";if(c=e.version){c=c.call(l,{hash:{},data:j})}else{c=l.version;c=typeof c===g?c.apply(l):c}h+=i(c)+')</div>\n <div class="toolFormBody">\n ';c=e.each.call(l,l.inputs,{hash:{},inverse:m.noop,fn:m.program(1,d,j),data:j});if(c||c===0){h+=c}h+='\n </div>\n <div class="form-row form-actions">\n <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">\n</div>\n<div class="toolHelp">\n <div class="toolHelpBody">';if(c=e.help){c=c.call(l,{hash:{},data:j})}else{c=l.help;c=typeof c===g?c.apply(l):c}h+=i(c)+"</div>\n</div>";return h})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_form=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,g="function",i=this.escapeExpression,m=this;function d(q,p){var n="",o;n+='\n <div class="form-row">\n <label for="';if(o=e.name){o=o.call(q,{hash:{},data:p})}else{o=q.name;o=typeof o===g?o.apply(q):o}n+=i(o)+'">';if(o=e.label){o=o.call(q,{hash:{},data:p})}else{o=q.label;o=typeof o===g?o.apply(q):o}n+=i(o)+':</label>\n <div class="form-row-input">\n ';if(o=e.html){o=o.call(q,{hash:{},data:p})}else{o=q.html;o=typeof o===g?o.apply(q):o}if(o||o===0){n+=o}n+='\n </div>\n <div class="toolParamHelp" style="clear: both;">\n ';if(o=e.help){o=o.call(q,{hash:{},data:p})}else{o=q.help;o=typeof o===g?o.apply(q):o}n+=i(o)+'\n </div>\n <div style="clear: both;"></div>\n </div>\n ';return n}h+='<div class="toolFormTitle">';if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" (version ";if(c=e.version){c=c.call(l,{hash:{},data:j})}else{c=l.version;c=typeof c===g?c.apply(l):c}h+=i(c)+')</div>\n <div class="toolFormBody">\n ';c=e.each.call(l,l.inputs,{hash:{},inverse:m.noop,fn:m.program(1,d,j),data:j});if(c||c===0){h+=c}h+='\n </div>\n <div class="form-row form-actions">\n <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">\n</div>\n<div class="toolHelp">\n <div class="toolHelpBody">';if(c=e.help){c=c.call(l,{hash:{},data:j})}else{c=l.help;c=typeof c===g?c.apply(l):c}h+=i(c)+"</div>\n</div>";return h})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/tool_link.js
--- a/static/scripts/packed/templates/compiled/tool_link.js
+++ b/static/scripts/packed/templates/compiled/tool_link.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_link=b(function(e,k,d,j,i){this.compilerInfo=[2,">= 1.0.0-rc.3"];d=d||e.helpers;i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<a class="';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+' tool-link" href="';if(c=d.link){c=c.call(k,{hash:{},data:i})}else{c=k.link;c=typeof c===f?c.apply(k):c}g+=h(c)+'" target="';if(c=d.target){c=c.call(k,{hash:{},data:i})}else{c=k.target;c=typeof c===f?c.apply(k):c}g+=h(c)+'" minsizehint="';if(c=d.min_width){c=c.call(k,{hash:{},data:i})}else{c=k.min_width;c=typeof c===f?c.apply(k):c}g+=h(c)+'">';if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+"</a> ";if(c=d.description){c=c.call(k,{hash:{},data:i})}else{c=k.description;c=typeof c===f?c.apply(k):c}g+=h(c);return g})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_link=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<a class="';if(c=d.id){c=c.call(k,{hash:{},data:i})}else{c=k.id;c=typeof c===f?c.apply(k):c}g+=h(c)+' tool-link" href="';if(c=d.link){c=c.call(k,{hash:{},data:i})}else{c=k.link;c=typeof c===f?c.apply(k):c}g+=h(c)+'" target="';if(c=d.target){c=c.call(k,{hash:{},data:i})}else{c=k.target;c=typeof c===f?c.apply(k):c}g+=h(c)+'" minsizehint="';if(c=d.min_width){c=c.call(k,{hash:{},data:i})}else{c=k.min_width;c=typeof c===f?c.apply(k):c}g+=h(c)+'">';if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+"</a> ";if(c=d.description){c=c.call(k,{hash:{},data:i})}else{c=k.description;c=typeof c===f?c.apply(k):c}g+=h(c);return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/packed/templates/compiled/tool_search.js
--- a/static/scripts/packed/templates/compiled/tool_search.js
+++ b/static/scripts/packed/templates/compiled/tool_search.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_search=b(function(e,k,d,j,i){this.compilerInfo=[2,">= 1.0.0-rc.3"];d=d||e.helpers;i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<input type="text" name="query" value="';if(c=d.search_hint_string){c=c.call(k,{hash:{},data:i})}else{c=k.search_hint_string;c=typeof c===f?c.apply(k):c}g+=h(c)+'" id="tool-search-query" autocomplete="off" class="search-query parent-width" />\n<a id="search-clear-btn" class="tooltip" title="clear search (esc)"></a>\n<img src="';if(c=d.spinner_url){c=c.call(k,{hash:{},data:i})}else{c=k.spinner_url;c=typeof c===f?c.apply(k):c}g+=h(c)+'" id="search-spinner" class="search-spinner"/>';return g})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_search=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<input type="text" name="query" value="';if(c=d.search_hint_string){c=c.call(k,{hash:{},data:i})}else{c=k.search_hint_string;c=typeof c===f?c.apply(k):c}g+=h(c)+'" id="tool-search-query" autocomplete="off" class="search-query parent-width" />\n<a id="search-clear-btn" class="tooltip" title="clear search (esc)"></a>\n<img src="';if(c=d.spinner_url){c=c.call(k,{hash:{},data:i})}else{c=k.spinner_url;c=typeof c===f?c.apply(k):c}g+=h(c)+'" id="search-spinner" class="search-spinner"/>';return g})})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/helpers-common-templates.js
--- a/static/scripts/templates/compiled/helpers-common-templates.js
+++ b/static/scripts/templates/compiled/helpers-common-templates.js
@@ -13,31 +13,4 @@
*/
Handlebars.registerHelper( 'local', function( options ){
return _l( options.fn( this ) );
-});
-/** Renders a glx style icon-button (see IconButton in mvc/ui.js)
- * can be used in either of the following ways:
- * within a template: {{> iconButton buttonData}}
- * from js: var templated = ( Handlebars.partials.iconButton( buttonData ) );
- */
-Handlebars.registerPartial( 'iconButton', function( buttonData, options ){
- var buffer = "";
- buffer += ( buttonData.enabled )?( '<a' ):( '<span' );
-
- if( buttonData.title ){ buffer += ' title="' + buttonData.title + '"'; }
-
- buffer += ' class="icon-button';
- if( buttonData.isMenuButton ){ buffer += ' menu-button'; }
- if( buttonData.title ){ buffer += ' tooltip'; }
- buffer += ' ' + buttonData.icon_class;
- if( !buttonData.enabled ){ buffer += '_disabled'; }
- buffer += '"';
-
- if( buttonData.id ){ buffer += ' id="' + buttonData.id + '"'; }
- buffer += ' href="' + ( ( buttonData.href )?( buttonData.href ):( 'javascript:void(0);' ) ) + '"';
- if( buttonData.target ){ buffer += ' target="' + buttonData.target + '"'; }
-
- if( !buttonData.visible ){ buffer += ' style="display: none;"'; }
-
- buffer += '>' + ( ( buttonData.enabled )?( '</a>' ):( '</span>' ) );
- return buffer;
});
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/panel_section.js
--- a/static/scripts/templates/compiled/panel_section.js
+++ b/static/scripts/templates/compiled/panel_section.js
@@ -1,8 +1,8 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['panel_section'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [2,'>= 1.0.0-rc.3'];
-helpers = helpers || Handlebars.helpers; data = data || {};
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-annotationArea.js
--- a/static/scripts/templates/compiled/template-hda-annotationArea.js
+++ b/static/scripts/templates/compiled/template-hda-annotationArea.js
@@ -1,49 +1,43 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- return "Annotation";}
+ return "Annotation";
+ }
function program3(depth0,data) {
- return "Edit dataset annotation";}
+ return "Edit dataset annotation";
+ }
buffer += "\n<div id=\"";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>";
+ options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += ":</strong>\n <div id=\"";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(3, program3, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\">\n </div>\n</div>";
- return buffer;});
+ return buffer;
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-displayApps.js
--- a/static/scripts/templates/compiled/template-hda-displayApps.js
+++ b/static/scripts/templates/compiled/template-hda-displayApps.js
@@ -1,71 +1,53 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- var buffer = "", stack1, stack2;
+ var buffer = "", stack1;
buffer += "\n ";
- foundHelper = helpers.label;
- stack1 = foundHelper || depth0.label;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "label", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\n ";
- foundHelper = helpers.links;
- stack1 = foundHelper || depth0.links;
- stack2 = helpers.each;
- tmp1 = self.program(2, program2, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ if (stack1 = helpers.label) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\n ";
+ stack1 = helpers.each.call(depth0, depth0.links, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n <br />\n";
- return buffer;}
+ return buffer;
+ }
function program2(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n <a target=\"";
- foundHelper = helpers.target;
- stack1 = foundHelper || depth0.target;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "target", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" href=\"";
- foundHelper = helpers.href;
- stack1 = foundHelper || depth0.href;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "href", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(3, program3, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.target) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\" href=\"";
+ if (stack1 = helpers.href) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "</a>\n ";
- return buffer;}
+ return buffer;
+ }
function program3(depth0,data) {
var stack1;
- foundHelper = helpers.text;
- stack1 = foundHelper || depth0.text;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "text", { hash: {} }); }
- return escapeExpression(stack1);}
+ if (stack1 = helpers.text) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ return escapeExpression(stack1);
+ }
- foundHelper = helpers.displayApps;
- stack1 = foundHelper || depth0.displayApps;
- stack2 = helpers.each;
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers.each.call(depth0, depth0.displayApps, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
+ else { return ''; }
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-downloadLinks.js
--- a/static/scripts/templates/compiled/template-hda-downloadLinks.js
+++ b/static/scripts/templates/compiled/template-hda-downloadLinks.js
@@ -1,158 +1,105 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var stack1, stack2, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- var buffer = "", stack1, stack2;
+ var buffer = "", stack1, stack2, options;
buffer += "\n<div popupmenu=\"dataset-";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "-popup\">\n <a class=\"action-button\" href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.download);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.download", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(2, program2, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "-popup\">\n <a class=\"action-button\" href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.download)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\">";
+ options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "</a>\n <a>";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(4, program4, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "</a>\n ";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.meta_download);
- stack2 = helpers.each;
- tmp1 = self.program(6, program6, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ stack2 = helpers.each.call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.meta_download), {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "-popup\">\n <a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.download);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.download", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" title=\"";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(9, program9, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "-popup\">\n <a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.download)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n";
- return buffer;}
+ return buffer;
+ }
function program2(depth0,data) {
- return "Download Dataset";}
+ return "Download Dataset";
+ }
function program4(depth0,data) {
- return "Additional Files";}
+ return "Additional Files";
+ }
function program6(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n <a class=\"action-button\" href=\"";
- foundHelper = helpers.url;
- stack1 = foundHelper || depth0.url;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "url", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(7, program7, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.url) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += " ";
- foundHelper = helpers.file_type;
- stack1 = foundHelper || depth0.file_type;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "file_type", { hash: {} }); }
- buffer += escapeExpression(stack1) + "</a>\n ";
- return buffer;}
+ if (stack1 = helpers.file_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</a>\n ";
+ return buffer;
+ }
function program7(depth0,data) {
- return "Download";}
+ return "Download";
+ }
function program9(depth0,data) {
-
- return "Download";}
+ var buffer = "", stack1, stack2, options;
+ buffer += "\n"
+ + "\n<a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.download)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += "\" class=\"icon-button disk tooltip\"></a>\n";
+ return buffer;
+ }
-function program11(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n";
- buffer += "\n<a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.download);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.download", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" title=\"";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(12, program12, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\" class=\"icon-button disk tooltip\"></a>\n";
- return buffer;}
-function program12(depth0,data) {
-
-
- return "Download";}
-
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.meta_download);
- stack2 = helpers['if'];
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.program(11, program11, data);
- stack1 = stack2.call(depth0, stack1, tmp1);
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.meta_download), {hash:{},inverse:self.program(9, program9, data),fn:self.program(1, program1, data),data:data});
+ if(stack2 || stack2 === 0) { return stack2; }
+ else { return ''; }
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-failedMetadata.js
--- a/static/scripts/templates/compiled/template-hda-failedMetadata.js
+++ b/static/scripts/templates/compiled/template-hda-failedMetadata.js
@@ -1,43 +1,35 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-failedMetadata'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, foundHelper, tmp1, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var stack1, options, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
function program1(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(2, program2, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\nYou may be able to <a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.edit);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.edit", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n";
- return buffer;}
+ buffer += "\nYou may be able to <a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n";
+ return buffer;
+ }
function program2(depth0,data) {
- return "An error occurred setting the metadata for this dataset.";}
+ return "An error occurred setting the metadata for this dataset.";
+ }
- foundHelper = helpers.warningmessagesmall;
- stack1 = foundHelper || depth0.warningmessagesmall;
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
+ else { return ''; }
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-hdaSummary.js
--- a/static/scripts/templates/compiled/template-hda-hdaSummary.js
+++ b/static/scripts/templates/compiled/template-hda-hdaSummary.js
@@ -1,117 +1,91 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- return "format: ";}
+ return "format: ";
+ }
function program3(depth0,data) {
- return "database: ";}
+ return "database: ";
+ }
function program5(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n <a class=\"metadata-dbkey\" href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.edit);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.edit", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">";
- foundHelper = helpers.metadata_dbkey;
- stack1 = foundHelper || depth0.metadata_dbkey;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "metadata_dbkey", { hash: {} }); }
- buffer += escapeExpression(stack1) + "</a>\n ";
- return buffer;}
+ var buffer = "", stack1, stack2;
+ buffer += "\n <a class=\"metadata-dbkey\" href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" target=\"galaxy_main\">";
+ if (stack2 = helpers.metadata_dbkey) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.metadata_dbkey; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "</a>\n ";
+ return buffer;
+ }
function program7(depth0,data) {
var buffer = "", stack1;
buffer += "\n <span class=\"metadata-dbkey ";
- foundHelper = helpers.metadata_dbkey;
- stack1 = foundHelper || depth0.metadata_dbkey;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "metadata_dbkey", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.metadata_dbkey;
- stack1 = foundHelper || depth0.metadata_dbkey;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "metadata_dbkey", { hash: {} }); }
- buffer += escapeExpression(stack1) + "</span>\n ";
- return buffer;}
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</span>\n ";
+ return buffer;
+ }
function program9(depth0,data) {
var buffer = "", stack1;
buffer += "\n<div class=\"hda-info\"> ";
- foundHelper = helpers.misc_info;
- stack1 = foundHelper || depth0.misc_info;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "misc_info", { hash: {} }); }
- buffer += escapeExpression(stack1) + " </div>\n";
- return buffer;}
+ if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + " </div>\n";
+ return buffer;
+ }
buffer += "<div class=\"hda-summary\">\n ";
- foundHelper = helpers.misc_blurb;
- stack1 = foundHelper || depth0.misc_blurb;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "misc_blurb", { hash: {} }); }
- buffer += escapeExpression(stack1) + "<br />\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "<br />\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "<span class=\"";
- foundHelper = helpers.data_type;
- stack1 = foundHelper || depth0.data_type;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "data_type", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.data_type;
- stack1 = foundHelper || depth0.data_type;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "data_type", { hash: {} }); }
- buffer += escapeExpression(stack1) + "</span>,\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(3, program3, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ if (stack1 = helpers.data_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ if (stack1 = helpers.data_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</span>,\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- foundHelper = helpers.dbkey_unknown_and_editable;
- stack1 = foundHelper || depth0.dbkey_unknown_and_editable;
- stack2 = helpers['if'];
- tmp1 = self.program(5, program5, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.program(7, program7, data);
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers['if'].call(depth0, depth0.dbkey_unknown_and_editable, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>\n";
- foundHelper = helpers.misc_info;
- stack1 = foundHelper || depth0.misc_info;
- stack2 = helpers['if'];
- tmp1 = self.program(9, program9, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
- return buffer;});
+ return buffer;
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-tagArea.js
--- a/static/scripts/templates/compiled/template-hda-tagArea.js
+++ b/static/scripts/templates/compiled/template-hda-tagArea.js
@@ -1,24 +1,23 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, tmp1, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, options, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- return "Tags";}
+ return "Tags";
+ }
buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>";
- return buffer;});
+ return buffer;
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-titleLink.js
--- a/static/scripts/templates/compiled/template-hda-titleLink.js
+++ b/static/scripts/templates/compiled/template-hda-titleLink.js
@@ -1,20 +1,20 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
buffer += "<span class=\"historyItemTitle\">";
- foundHelper = helpers.hid;
- stack1 = foundHelper || depth0.hid;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "hid", { hash: {} }); }
- buffer += escapeExpression(stack1) + ": ";
- foundHelper = helpers.name;
- stack1 = foundHelper || depth0.name;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
- buffer += escapeExpression(stack1) + "</span>";
- return buffer;});
+ if (stack1 = helpers.hid) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + ": ";
+ if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</span>";
+ return buffer;
+ });
})();
\ No newline at end of file
diff -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef -r 1f45ab84c1217c0b65a840a90ef60ff267d0d946 static/scripts/templates/compiled/template-hda-warning-messages.js
--- a/static/scripts/templates/compiled/template-hda-warning-messages.js
+++ b/static/scripts/templates/compiled/template-hda-warning-messages.js
@@ -1,284 +1,194 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing;
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n<div class=\"errormessagesmall\">\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(2, program2, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += ":\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(4, program4, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>\n";
- return buffer;}
+ return buffer;
+ }
function program2(depth0,data) {
- return "There was an error getting the data for this dataset";}
+ return "There was an error getting the data for this dataset";
+ }
function program4(depth0,data) {
var stack1;
- foundHelper = helpers.error;
- stack1 = foundHelper || depth0.error;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "error", { hash: {} }); }
- return escapeExpression(stack1);}
+ if (stack1 = helpers.error) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.error; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ return escapeExpression(stack1);
+ }
function program6(depth0,data) {
- var stack1, stack2;
- foundHelper = helpers.purged;
- stack1 = foundHelper || depth0.purged;
- stack2 = helpers.unless;
- tmp1 = self.program(7, program7, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ var stack1;
+ stack1 = helpers.unless.call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
+ else { return ''; }
+ }
function program7(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n";
- foundHelper = helpers.warningmessagesmall;
- stack1 = foundHelper || depth0.warningmessagesmall;
- tmp1 = self.program(8, program8, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data};
+ if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n";
- return buffer;}
+ return buffer;
+ }
function program8(depth0,data) {
- var buffer = "", stack1, stack2;
+ var buffer = "", stack1, stack2, options;
buffer += "\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(9, program9, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.undelete);
- stack2 = helpers['if'];
- tmp1 = self.program(11, program11, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.undelete), {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n";
- return buffer;}
+ return buffer;
+ }
function program9(depth0,data) {
- return "This dataset has been deleted.";}
+ return "This dataset has been deleted.";
+ }
function program11(depth0,data) {
var buffer = "", stack1, stack2;
- buffer += "\n ";
- buffer += "\n Click <a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.undelete);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.undelete", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.purge);
- stack2 = helpers['if'];
- tmp1 = self.program(12, program12, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n "
+ + "\n Click <a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.undelete)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-";
+ if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.purge), {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n ";
- return buffer;}
+ return buffer;
+ }
function program12(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n or <a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.purge);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.purge", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" class=\"historyItemPurge\" id=\"historyItemPurger-";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n ";
- return buffer;}
+ var buffer = "", stack1, stack2;
+ buffer += "\n or <a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.purge)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" class=\"historyItemPurge\" id=\"historyItemPurger-";
+ if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n ";
+ return buffer;
+ }
function program14(depth0,data) {
- var stack1;
- foundHelper = helpers.warningmessagesmall;
- stack1 = foundHelper || depth0.warningmessagesmall;
- tmp1 = self.program(15, program15, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ var stack1, options;
+ options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data};
+ if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
+ else { return ''; }
+ }
function program15(depth0,data) {
- var buffer = "", stack1;
+ var buffer = "", stack1, options;
buffer += "\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(16, program16, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n";
- return buffer;}
+ return buffer;
+ }
function program16(depth0,data) {
- return "This dataset has been deleted and removed from disk.";}
+ return "This dataset has been deleted and removed from disk.";
+ }
function program18(depth0,data) {
- var stack1;
- foundHelper = helpers.warningmessagesmall;
- stack1 = foundHelper || depth0.warningmessagesmall;
- tmp1 = self.program(19, program19, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ var stack1, options;
+ options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data};
+ if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
+ else { return ''; }
+ }
function program19(depth0,data) {
- var buffer = "", stack1, stack2;
+ var buffer = "", stack1, stack2, options;
buffer += "\n ";
- foundHelper = helpers.local;
- stack1 = foundHelper || depth0.local;
- tmp1 = self.program(20, program20, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
- else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
+ options = {hash:{},inverse:self.noop,fn:self.program(20, program20, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.unhide);
- stack2 = helpers['if'];
- tmp1 = self.program(22, program22, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
- if(stack1 || stack1 === 0) { buffer += stack1; }
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.unhide), {hash:{},inverse:self.noop,fn:self.program(22, program22, data),data:data});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n";
- return buffer;}
+ return buffer;
+ }
function program20(depth0,data) {
- return "This dataset has been hidden.";}
+ return "This dataset has been hidden.";
+ }
function program22(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n Click <a href=\"";
- foundHelper = helpers.urls;
- stack1 = foundHelper || depth0.urls;
- stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.unhide);
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "urls.unhide", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-";
- foundHelper = helpers.id;
- stack1 = foundHelper || depth0.id;
- if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
- else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to unhide it\n ";
- return buffer;}
+ var buffer = "", stack1, stack2;
+ buffer += "\n Click <a href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.unhide)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-";
+ if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "\"\n target=\"galaxy_history\">here</a> to unhide it\n ";
+ return buffer;
+ }
- foundHelper = helpers.error;
- stack1 = foundHelper || depth0.error;
- stack2 = helpers['if'];
- tmp1 = self.program(1, program1, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers['if'].call(depth0, depth0.error, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
- foundHelper = helpers.deleted;
- stack1 = foundHelper || depth0.deleted;
- stack2 = helpers['if'];
- tmp1 = self.program(6, program6, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
- foundHelper = helpers.purged;
- stack1 = foundHelper || depth0.purged;
- stack2 = helpers['if'];
- tmp1 = self.program(14, program14, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers['if'].call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
- foundHelper = helpers.visible;
- stack1 = foundHelper || depth0.visible;
- stack2 = helpers.unless;
- tmp1 = self.program(18, program18, data);
- tmp1.hash = {};
- tmp1.fn = tmp1;
- tmp1.inverse = self.noop;
- stack1 = stack2.call(depth0, stack1, tmp1);
+ stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(18, program18, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
- return buffer;});
+ return buffer;
+ });
})();
\ No newline at end of file
This diff is so big that we needed to truncate the remainder.
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.
1
0
commit/galaxy-central: guerler: Bowtie2: Update test case
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0d6d8af41543/
Changeset: 0d6d8af41543
User: guerler
Date: 2013-08-07 20:44:17
Summary: Bowtie2: Update test case
Affected #: 1 file
diff -r fff3d1c445f81fa43d5cfbce06b6445375cb6986 -r 0d6d8af4154353a60ab3c8d95d80a0b2447409ef test-data/bowtie2/phix_mapped.bam
Binary file test-data/bowtie2/phix_mapped.bam has changed
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.
1
0
commit/galaxy-central: guerler: Bowtie2: Update test case
by commits-noreply@bitbucket.org 07 Aug '13
by commits-noreply@bitbucket.org 07 Aug '13
07 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/fff3d1c445f8/
Changeset: fff3d1c445f8
User: guerler
Date: 2013-08-07 20:40:09
Summary: Bowtie2: Update test case
Affected #: 1 file
diff -r 446e2fee6b8f978472e67031f429aeda6cdfffdd -r fff3d1c445f81fa43d5cfbce06b6445375cb6986 test-data/bowtie2/phix_mapped.bam
Binary file test-data/bowtie2/phix_mapped.bam has changed
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.
1
0