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
November 2013
- 1 participants
- 208 discussions
commit/galaxy-central: afgane: Fix tool_panel_section id retrieval (affected installation of tools via the API into an existing tool panel)
by commits-noreply@bitbucket.org 25 Nov '13
by commits-noreply@bitbucket.org 25 Nov '13
25 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6997fa059319/
Changeset: 6997fa059319
User: afgane
Date: 2013-11-25 17:56:54
Summary: Fix tool_panel_section id retrieval (affected installation of tools via the API into an existing tool panel)
Affected #: 1 file
diff -r 87086657a2f4dbd44a2377f550fa6573876a8006 -r 6997fa059319b288877cf0728ac20fbb57e80dee lib/tool_shed/util/tool_util.py
--- a/lib/tool_shed/util/tool_util.py
+++ b/lib/tool_shed/util/tool_util.py
@@ -673,7 +673,7 @@
tool_panel_section_id=section_id,
new_tool_panel_section=new_tool_panel_section )
elif tool_panel_section:
- tool_panel_section_key = 'section_%s' % str( tool_panel_section )
+ tool_panel_section_key = 'section_%s' % str( tool_panel_section.id )
tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ]
else:
return None, None
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: jmchilton: Update datatypes.data:display_data's doc per Peter Cock's suggestion.
by commits-noreply@bitbucket.org 25 Nov '13
by commits-noreply@bitbucket.org 25 Nov '13
25 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/87086657a2f4/
Changeset: 87086657a2f4
User: jmchilton
Date: 2013-11-25 16:47:18
Summary: Update datatypes.data:display_data's doc per Peter Cock's suggestion.
Affected #: 1 file
diff -r 35cc1687eb7b348811bf9e4f6e9d4374b00b6f09 -r 87086657a2f4dbd44a2377f550fa6573876a8006 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -288,7 +288,14 @@
return open( dataset.file_name )
def display_data(self, trans, data, preview=False, filename=None, to_ext=None, size=None, offset=None, **kwd):
- """ Old display method, for transition """
+ """ Old display method, for transition - though still used by API and
+ test framework. Datatypes should be very careful if overridding this
+ method and this interface between datatypes and Galaxy will likely
+ change.
+
+ TOOD: Document alternatives to overridding this method (data
+ providers?).
+ """
#Relocate all composite datatype display to a common location.
composite_extensions = trans.app.datatypes_registry.get_composite_extensions( )
composite_extensions.append('html') # for archiving composite datatypes
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/583c64d963d4/
Changeset: 583c64d963d4
User: jmchilton
Date: 2013-11-25 16:23:26
Summary: Allow <metabolite>, <metadata>, <metagenome>, etc... in Galaxy XML content.
Affected #: 1 file
diff -r 9165deb8008461d43107c2b1cd99b750bcb0508f -r 583c64d963d41c7e38f76e2be23531b160ec972f lib/galaxy/datatypes/checkers.py
--- a/lib/galaxy/datatypes/checkers.py
+++ b/lib/galaxy/datatypes/checkers.py
@@ -32,7 +32,7 @@
regexp1 = re.compile( "<A\s+[^>]*HREF[^>]+>", re.I )
regexp2 = re.compile( "<IFRAME[^>]*>", re.I )
regexp3 = re.compile( "<FRAMESET[^>]*>", re.I )
- regexp4 = re.compile( "<META[^>]*>", re.I )
+ regexp4 = re.compile( "<META[\W][^>]*>", re.I )
regexp5 = re.compile( "<SCRIPT[^>]*>", re.I )
lineno = 0
for line in temp:
https://bitbucket.org/galaxy/galaxy-central/commits/35cc1687eb7b/
Changeset: 35cc1687eb7b
User: jmchilton
Date: 2013-11-25 16:23:26
Summary: checker.py - define constant for # of lines to check for HTML.
Affected #: 1 file
diff -r 583c64d963d41c7e38f76e2be23531b160ec972f -r 35cc1687eb7b348811bf9e4f6e9d4374b00b6f09 lib/galaxy/datatypes/checkers.py
--- a/lib/galaxy/datatypes/checkers.py
+++ b/lib/galaxy/datatypes/checkers.py
@@ -2,6 +2,8 @@
from galaxy import util
from StringIO import StringIO
+HTML_CHECK_LINES = 100
+
try:
import Image as PIL
except ImportError:
@@ -35,6 +37,8 @@
regexp4 = re.compile( "<META[\W][^>]*>", re.I )
regexp5 = re.compile( "<SCRIPT[^>]*>", re.I )
lineno = 0
+ # TODO: Potentially reading huge lines into string here, this should be
+ # reworked.
for line in temp:
lineno += 1
matches = regexp1.search( line ) or regexp2.search( line ) or regexp3.search( line ) or regexp4.search( line ) or regexp5.search( line )
@@ -42,7 +46,7 @@
if chunk is None:
temp.close()
return True
- if lineno > 100:
+ if HTML_CHECK_LINES and (lineno > HTML_CHECK_LINES):
break
if chunk is None:
temp.close()
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
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9165deb80084/
Changeset: 9165deb80084
User: guerler
Date: 2013-11-25 15:25:31
Summary: Pack scripts
Affected #: 2 files
diff -r 5dfc0b3bf0351e7274cd3a5bdeab921752215973 -r 9165deb8008461d43107c2b1cd99b750bcb0508f static/scripts/packed/galaxy.grids.js
--- a/static/scripts/packed/galaxy.grids.js
+++ b/static/scripts/packed/galaxy.grids.js
@@ -1,1 +1,1 @@
-jQuery.ajaxSettings.traditional=true;var Grid=Backbone.Model.extend({defaults:{url_base:"",async:false,async_ops:[],categorical_filters:[],filters:{},sort_key:null,show_item_checkboxes:false,cur_page:1,num_pages:1,operation:undefined,item_ids:undefined},can_async_op:function(a){return _.indexOf(this.attributes.async_ops,a)!==-1},add_filter:function(e,f,b){if(b){var c=this.attributes.filters[e],a;if(c===null||c===undefined){a=f}else{if(typeof(c)=="string"){if(c=="All"){a=f}else{var d=[];d[0]=c;d[1]=f;a=d}}else{a=c;a.push(f)}}this.attributes.filters[e]=a}else{this.attributes.filters[e]=f}},remove_filter:function(b,e){var a=this.attributes.filters[b];if(a===null||a===undefined){return false}var d=true;if(typeof(a)==="string"){if(a=="All"){d=false}else{delete this.attributes.filters[b]}}else{var c=_.indexOf(a,e);if(c!==-1){a.splice(c,1)}else{d=false}}return d},get_url_data:function(){var a={async:this.attributes.async,sort:this.attributes.sort_key,page:this.attributes.cur_page,show_item_checkboxes:this.attributes.show_item_checkboxes};if(this.attributes.operation){a.operation=this.attributes.operation}if(this.attributes.item_ids){a.id=this.attributes.item_ids}var b=this;_.each(_.pairs(b.attributes.filters),function(c){a["f-"+c[0]]=c[1]});return a}});var GridView=Backbone.View.extend({grid:null,initialize:function(a){this.grid=a;this.init_grid_elements();this.init_grid_controls();$("input[type=text]").each(function(){$(this).click(function(){$(this).select()}).keyup(function(){$(this).css("font-style","normal")})})},init_grid_controls:function(){$(".submit-image").each(function(){$(this).mousedown(function(){$(this).addClass("gray-background")});$(this).mouseup(function(){$(this).removeClass("gray-background")})});var a=this;$(".sort-link").each(function(){$(this).click(function(){a.set_sort_condition($(this).attr("sort_key"));return false})});$(".page-link > a").each(function(){$(this).click(function(){a.set_page($(this).attr("page_num"));return false})});$(".categorical-filter > a").each(function(){$(this).click(function(){a.set_categorical_filter($(this).attr("filter_key"),$(this).attr("filter_val"));return false})});$(".text-filter-form").each(function(){$(this).submit(function(){var e=$(this).attr("column_key");var d=$("#input-"+e+"-filter");var f=d.val();d.val("");a.add_filter_condition(e,f,true);return false})});var b=$("#input-tags-filter");if(b.length){b.autocomplete(this.grid.history_tag_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}var c=$("#input-name-filter");if(c.length){c.autocomplete(this.grid.history_name_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}$(".advanced-search-toggle").each(function(){$(this).click(function(){$("#standard-search").slideToggle("fast");$("#advanced-search").slideToggle("fast");return false})})},init_grid_elements:function(){$(".grid").each(function(){var c=$(this).find("input.grid-row-select-checkbox");var b=$(this).find("span.grid-selected-count");var d=function(){b.text($(c).filter(":checked").length)};$(c).each(function(){$(this).change(d)});d()});var a=this;$(".label").each(function(){var b=$(this).attr("href");if(b!==undefined&&b.indexOf("operation=")!=-1){$(this).click(function(){a.do_operation_from_href($(this).attr("href"));return false})}});if($(".community_rating_star").length!==0){$(".community_rating_star").rating({})}make_popup_menus()},go_page_one:function(){var a=this.grid.get("cur_page");if(a!==null&&a!==undefined&&a!=="all"){this.grid.set("cur_page",1)}},add_filter_condition:function(d,f,a){if(f===""){return false}this.grid.add_filter(d,f,a);var e=$("<span>"+f+"<a href='javascript:void(0);'><span class='delete-search-icon' /></a></span>");e.addClass("text-filter-val");var c=this;e.click(function(){c.grid.remove_filter(d,f);$(this).remove();c.go_page_one();c.update_grid()});var b=$("#"+d+"-filtering-criteria");b.append(e);this.go_page_one();this.update_grid()},set_sort_condition:function(f){var e=this.grid.get("sort_key");var d=f;if(e.indexOf(f)!==-1){if(e.substring(0,1)!=="-"){d="-"+f}else{}}$(".sort-arrow").remove();var c=(d.substring(0,1)=="-")?"↑":"↓";var a=$("<span>"+c+"</span>").addClass("sort-arrow");var b=$("#"+f+"-header");b.append(a);this.grid.set("sort_key",d);this.go_page_one();this.update_grid()},set_categorical_filter:function(c,e){var b=this.grid.get("categorical_filters")[c],d=this.grid.get("filters")[c];var a=this;$("."+c+"-filter").each(function(){var i=$.trim($(this).text());var g=b[i];var h=g[c];if(h==e){$(this).empty();$(this).addClass("current-filter");$(this).append(i)}else{if(h==d){$(this).empty();var f=$("<a href='#'>"+i+"</a>");f.click(function(){a.set_categorical_filter(c,h)});$(this).removeClass("current-filter");$(this).append(f)}}});this.grid.add_filter(c,e);this.go_page_one();this.update_grid()},set_page:function(a){var b=this;$(".page-link").each(function(){var h=$(this).attr("id"),f=parseInt(h.split("-")[2],10),d=b.grid.get("cur_page"),g;if(f===a){g=$(this).children().text();$(this).empty();$(this).addClass("inactive-link");$(this).text(g)}else{if(f===d){g=$(this).text();$(this).empty();$(this).removeClass("inactive-link");var e=$("<a href='#'>"+g+"</a>");e.click(function(){set_page(f)});$(this).append(e)}}});var c=true;if(a==="all"){this.grid.set("cur_page",a);c=false}else{this.grid.set("cur_page",parseInt(a,10))}this.update_grid(c)},do_operation:function(b,a){b=b.toLowerCase();this.grid.set({operation:b,item_ids:a});if(this.grid.can_async_op(b)){this.update_grid(true)}else{this.go_to_URL()}},do_operation_from_href:function(c){var f=c.split("?");if(f.length>1){var a=f[1];var e=a.split("&");var b=null;var g=-1;for(var d=0;d<e.length;d++){if(e[d].indexOf("operation")!=-1){b=e[d].split("=")[1]}else{if(e[d].indexOf("id")!=-1){g=e[d].split("=")[1]}}}this.do_operation(b,g);return false}},go_to_URL:function(){this.grid.set("async",false);window.location=this.grid.get("url_base")+"?"+$.param(this.grid.get_url_data());this.grid.set({operation:undefined,item_ids:undefined})},update_grid:function(b){if(!this.grid.get("async")){this.go_to_URL();return}var c=(this.grid.get("operation")?"POST":"GET");$(".loading-elt-overlay").show();var a=this;$.ajax({type:c,url:a.grid.get("url_base"),data:a.grid.get_url_data(),error:function(){alert("Grid refresh failed")},success:function(e){var d=e.split("*****");$("#grid-table-body").html(d[0]);$("#grid-table-footer").html(d[1]);$("#grid-table-body").trigger("update");a.init_grid_elements();make_popup_menus();$(".loading-elt-overlay").hide();var f=$.trim(d[2]);if(f!==""){$("#grid-message").html(f).show();setTimeout(function(){$("#grid-message").hide()},5000)}},complete:function(){a.grid.set({operation:undefined,item_ids:undefined})}})},check_all_items:function(){var a=document.getElementById("check_all"),b=document.getElementsByTagName("input"),d=0,c;if(a.checked===true){for(c=0;c<b.length;c++){if(b[c].name.indexOf("id")!==-1){b[c].checked=true;d++}}}else{for(c=0;c<b.length;c++){if(b[c].name.indexOf("id")!==-1){b[c].checked=false}}}this.init_grid_elements()},submit_operation:function(d,e){var c=$('input[name="id"]:checked').length;if(!c>0){return false}if(e!="None"&&e!=""){if(!confirm(e)){return false}}var b=$(d).val();var a=[];$("input[name=id]:checked").each(function(){a.push($(this).val())});this.do_operation(b,a);return true}});
\ No newline at end of file
+jQuery.ajaxSettings.traditional=true;define(["mvc/ui"],function(){var a=Backbone.Model.extend({defaults:{url_base:"",async:false,async_ops:[],categorical_filters:[],filters:{},sort_key:null,show_item_checkboxes:false,cur_page:1,num_pages:1,operation:undefined,item_ids:undefined},can_async_op:function(c){return _.indexOf(this.attributes.async_ops,c)!==-1},add_filter:function(g,h,d){if(d){var e=this.attributes.filters[g],c;if(e===null||e===undefined){c=h}else{if(typeof(e)=="string"){if(e=="All"){c=h}else{var f=[];f[0]=e;f[1]=h;c=f}}else{c=e;c.push(h)}}this.attributes.filters[g]=c}else{this.attributes.filters[g]=h}},remove_filter:function(d,g){var c=this.attributes.filters[d];if(c===null||c===undefined){return false}var f=true;if(typeof(c)==="string"){if(c=="All"){f=false}else{delete this.attributes.filters[d]}}else{var e=_.indexOf(c,g);if(e!==-1){c.splice(e,1)}else{f=false}}return f},get_url_data:function(){var c={async:this.attributes.async,sort:this.attributes.sort_key,page:this.attributes.cur_page,show_item_checkboxes:this.attributes.show_item_checkboxes};if(this.attributes.operation){c.operation=this.attributes.operation}if(this.attributes.item_ids){c.id=this.attributes.item_ids}var d=this;_.each(_.pairs(d.attributes.filters),function(e){c["f-"+e[0]]=e[1]});return c}});var b=Backbone.View.extend({grid:null,initialize:function(c){this.init_grid(c);this.init_grid_controls();$("input[type=text]").each(function(){$(this).click(function(){$(this).select()}).keyup(function(){$(this).css("font-style","normal")})})},init_grid:function(c){this.grid=c;this.init_grid_elements()},init_grid_controls:function(){$(".submit-image").each(function(){$(this).mousedown(function(){$(this).addClass("gray-background")});$(this).mouseup(function(){$(this).removeClass("gray-background")})});var c=this;$(".sort-link").each(function(){$(this).click(function(){c.set_sort_condition($(this).attr("sort_key"));return false})});$(".categorical-filter > a").each(function(){$(this).click(function(){c.set_categorical_filter($(this).attr("filter_key"),$(this).attr("filter_val"));return false})});$(".text-filter-form").each(function(){$(this).submit(function(){var g=$(this).attr("column_key");var f=$("#input-"+g+"-filter");var h=f.val();f.val("");c.add_filter_condition(g,h,true);return false})});var d=$("#input-tags-filter");if(d.length){d.autocomplete(this.grid.history_tag_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}var e=$("#input-name-filter");if(e.length){e.autocomplete(this.grid.history_name_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}$(".advanced-search-toggle").each(function(){$(this).click(function(){$("#standard-search").slideToggle("fast");$("#advanced-search").slideToggle("fast");return false})})},init_grid_elements:function(){$(".grid").each(function(){var j=$(this).find("input.grid-row-select-checkbox");var i=$(this).find("span.grid-selected-count");var q=function(){i.text($(j).filter(":checked").length)};$(j).each(function(){$(this).change(q)});q()});if($(".community_rating_star").length!==0){$(".community_rating_star").rating({})}var p=this.grid.attributes;var o=this;$(".page-link > a").each(function(){$(this).click(function(){o.set_page($(this).attr("page_num"));return false})});$(".use-inbound").each(function(){$(this).click(function(i){o.execute({href:$(this).attr("href"),inbound:true});return false})});$(".use-outbound").each(function(){$(this).click(function(i){o.execute({href:$(this).attr("href")});return false})});for(var h in p.items){var k=$("#grid-"+h+"-popup");k.off();var d=new PopupMenu(k);var n=p.items[h];for(var g in p.operations){var e=p.operations[g];var l=e.label;var c=n.operation_config[l];var f=n.encode_id;if(c.allowed&&e.allow_popup){var m={html:e.label,href:c.url_args,target:c.target,confirmation_text:e.confirm,inbound:e.inbound};m.func=function(q){q.preventDefault();var j=$(q.target).html();var i=this.findItemByHtml(j);o.execute(i)};d.addItem(m)}}}},add_filter_condition:function(f,h,c){if(h===""){return false}this.grid.add_filter(f,h,c);var g=$("<span>"+h+"<a href='javascript:void(0);'><span class='delete-search-icon' /></a></span>");g.addClass("text-filter-val");var e=this;g.click(function(){e.grid.remove_filter(f,h);$(this).remove();e.go_page_one();e.execute()});var d=$("#"+f+"-filtering-criteria");d.append(g);this.go_page_one();this.execute()},set_sort_condition:function(h){var g=this.grid.get("sort_key");var f=h;if(g.indexOf(h)!==-1){if(g.substring(0,1)!=="-"){f="-"+h}else{}}$(".sort-arrow").remove();var e=(f.substring(0,1)=="-")?"↑":"↓";var c=$("<span>"+e+"</span>").addClass("sort-arrow");var d=$("#"+h+"-header");d.append(c);this.grid.set("sort_key",f);this.go_page_one();this.execute()},set_categorical_filter:function(e,g){var d=this.grid.get("categorical_filters")[e],f=this.grid.get("filters")[e];var c=this;$("."+e+"-filter").each(function(){var k=$.trim($(this).text());var i=d[k];var j=i[e];if(j==g){$(this).empty();$(this).addClass("current-filter");$(this).append(k)}else{if(j==f){$(this).empty();var h=$("<a href='#'>"+k+"</a>");h.click(function(){c.set_categorical_filter(e,j)});$(this).removeClass("current-filter");$(this).append(h)}}});this.grid.add_filter(e,g);this.go_page_one();this.execute()},set_page:function(c){var d=this;$(".page-link").each(function(){var i=$(this).attr("id"),g=parseInt(i.split("-")[2],10),e=d.grid.get("cur_page"),h;if(g===c){h=$(this).children().text();$(this).empty();$(this).addClass("inactive-link");$(this).text(h)}else{if(g===e){h=$(this).text();$(this).empty();$(this).removeClass("inactive-link");var f=$("<a href='#'>"+h+"</a>");f.click(function(){d.set_page(g)});$(this).append(f)}}});if(c==="all"){this.grid.set("cur_page",c)}else{this.grid.set("cur_page",parseInt(c,10))}this.execute()},submit_operation:function(f,g){var e=$('input[name="id"]:checked').length;if(!e>0){return false}var d=$(f).val();var c=[];$("input[name=id]:checked").each(function(){c.push($(this).val())});this.execute({operation:d,id:c,confirmation_text:g});return true},execute:function(l){var f=null;var e=null;var g=null;var c=null;var k=null;if(l){e=l.href;g=l.operation;f=l.id;c=l.confirmation_text;k=l.inbound;if(e!==undefined&&e.indexOf("operation=")!=-1){var j=e.split("?");if(j.length>1){var i=j[1];var d=i.split("&");for(var h=0;h<d.length;h++){if(d[h].indexOf("operation")!=-1){g=d[h].split("=")[1];g=g.replace(/\+/g," ")}else{if(d[h].indexOf("id")!=-1){f=d[h].split("=")[1]}}}}}}if(g&&f){if(c&&c!=""&&c!="None"){if(!confirm(c)){return false}}g=g.toLowerCase();this.grid.set({operation:g,item_ids:f});if(this.grid.can_async_op(g)){this.update_grid()}else{this.go_to(k,"")}return false}if(e){this.go_to(k,e);return false}if(this.grid.get("async")){this.update_grid()}else{this.go_to(k,"")}return false},go_to:function(f,d){var e=this.grid.get("async");this.grid.set("async",false);if(!d){d=this.grid.get("url_base")+"?"+$.param(this.grid.get_url_data())}this.grid.set({operation:undefined,item_ids:undefined,async:e});if(f){var c=$(".grid-header").closest(".inbound");if(c.length!==0){c.load(d);return}}window.location=d},update_grid:function(){var d=(this.grid.get("operation")?"POST":"GET");$(".loading-elt-overlay").show();var c=this;$.ajax({type:d,url:c.grid.get("url_base"),data:c.grid.get_url_data(),error:function(e){alert("Grid refresh failed")},success:function(f){var e=f.split("*****");$("#grid-table-body").html(e[0]);$("#grid-table-footer").html(e[1]);$("#grid-table-body").trigger("update");$(".loading-elt-overlay").hide();var g=$.trim(e[2]);if(g!==""){$("#grid-message").html(g).show();setTimeout(function(){$("#grid-message").hide()},5000)}},complete:function(){c.grid.set({operation:undefined,item_ids:undefined})}})},check_all_items:function(){var c=document.getElementById("check_all"),d=document.getElementsByTagName("input"),f=0,e;if(c.checked===true){for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=true;f++}}}else{for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=false}}}this.init_grid_elements()},go_page_one:function(){var c=this.grid.get("cur_page");if(c!==null&&c!==undefined&&c!=="all"){this.grid.set("cur_page",1)}}});return{Grid:a,GridView:b}});
\ No newline at end of file
diff -r 5dfc0b3bf0351e7274cd3a5bdeab921752215973 -r 9165deb8008461d43107c2b1cd99b750bcb0508f static/scripts/packed/mvc/ui.js
--- a/static/scripts/packed/mvc/ui.js
+++ b/static/scripts/packed/mvc/ui.js
@@ -1,1 +1,1 @@
-var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b||$("<div/>");this.options=a||[];var c=this;this.$button.click(function(d){c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body");this.$el.css(this._getShownPosition(a));this._setUpCloseBehavior();this.$el.show()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var b=this;var a=function(c){c.one("click.close_popup",function(){b.remove()})};a($(window.document));a($(window.top.document));_.each(window.top.frames,function(c){a($(c.document))})},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((a.target)?(' target="'+a.target+'"'):("")),' href="',((a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};var searchInput=function(k){var a=27,h=13,i=$("<div/>"),b={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onsearch:function(l){},minSearchLen:0,escWillClear:true,oninit:function(){}};if(jQuery.type(k)==="object"){k=jQuery.extend(true,b,k)}function d(l){var m=$(this).parent().children("input");m.val("");m.trigger("clear:searchInput");k.onclear()}function j(m,l){$(this).trigger("search:searchInput",l);k.onsearch(l)}function c(){return['<input type="text" name="',k.name,'" placeholder="',k.placeholder,'" ','class="search-query ',k.classes,'" ',"/>"].join("")}function g(){return $(c()).css({width:"100%","padding-right":"24px"}).focus(function(l){$(this).select()}).keyup(function(m){if(m.which===a&&k.escWillClear){d.call(this,m)}else{var l=$(this).val();if((m.which===h)||(k.minSearchLen&&l.length>=k.minSearchLen)){j.call(this,m,l)}else{if(!l.length){d.call(this,m)}}}}).val(k.initialVal)}function f(){return'<span class="search-clear fa fa-times-circle"></span>'}function e(){return $(f()).css({position:"absolute",right:"15px","font-size":"1.4em","line-height":"23px",color:"grey"}).click(function(l){d.call(this,l)})}return i.append([g(),e()])};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b};
\ No newline at end of file
+var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b||$("<div/>");this.options=a||[];var c=this;this.$button.click(function(d){c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body");this.$el.css(this._getShownPosition(a));this._setUpCloseBehavior();this.$el.show()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").mousedown(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var b=this;var a=function(c){c.one("mousedown.close_popup",function(){b.remove()})};a($(window.document));a($(window.top.document));_.each(window.top.frames,function(c){a($(c.document))})},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((a.target)?(' target="'+a.target+'"'):("")),' href="',((a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};var searchInput=function(k){var a=27,h=13,i=$("<div/>"),b={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onsearch:function(l){},minSearchLen:0,escWillClear:true,oninit:function(){}};if(jQuery.type(k)==="object"){k=jQuery.extend(true,b,k)}function d(l){var m=$(this).parent().children("input");m.val("");m.trigger("clear:searchInput");k.onclear()}function j(m,l){$(this).trigger("search:searchInput",l);k.onsearch(l)}function c(){return['<input type="text" name="',k.name,'" placeholder="',k.placeholder,'" ','class="search-query ',k.classes,'" ',"/>"].join("")}function g(){return $(c()).css({width:"100%","padding-right":"24px"}).focus(function(l){$(this).select()}).keyup(function(m){if(m.which===a&&k.escWillClear){d.call(this,m)}else{var l=$(this).val();if((m.which===h)||(k.minSearchLen&&l.length>=k.minSearchLen)){j.call(this,m,l)}else{if(!l.length){d.call(this,m)}}}}).val(k.initialVal)}function f(){return'<span class="search-clear fa fa-times-circle"></span>'}function e(){return $(f()).css({position:"absolute",right:"15px","font-size":"1.4em","line-height":"23px",color:"grey"}).click(function(l){d.call(this,l)})}return i.append([g(),e()])};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b};
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
24 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5dfc0b3bf035/
Changeset: 5dfc0b3bf035
User: guerler
Date: 2013-11-25 06:16:41
Summary: Fix tagging mako
Affected #: 1 file
diff -r 6d8062a02641e8be1d1df7b9e87519662ac9c2d5 -r 5dfc0b3bf0351e7274cd3a5bdeab921752215973 templates/tagging_common.mako
--- a/templates/tagging_common.mako
+++ b/templates/tagging_common.mako
@@ -135,7 +135,6 @@
## Build script that augments tags using progressive javascript.
<script type="text/javascript">
- $(function() {
//
// Set up autocomplete tagger.
//
@@ -213,8 +212,6 @@
};
$('#${elt_id}').autocomplete_tagging(options);
-
- });
</script>
## Use style to hide/display the tag area.
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
23 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6d8062a02641/
Changeset: 6d8062a02641
User: guerler
Date: 2013-11-23 23:02:46
Summary: Grids: Fix for toolshed
Affected #: 2 files
diff -r 59c4b30557cd889472ad7162b1f1b5be3e01973a -r 6d8062a02641e8be1d1df7b9e87519662ac9c2d5 templates/webapps/tool_shed/category/grid.mako
--- a/templates/webapps/tool_shed/category/grid.mako
+++ b/templates/webapps/tool_shed/category/grid.mako
@@ -7,6 +7,7 @@
## TODO: This is very similar to this directory's valid_grid.mako, so see if we can re-use this code in a better way.
<%def name="render_grid_header( grid, repo_grid, render_title=True)">
${init()}
+ ${grid_javascripts()}
<div class="grid-header">
%if render_title:
${grid_title()}
diff -r 59c4b30557cd889472ad7162b1f1b5be3e01973a -r 6d8062a02641e8be1d1df7b9e87519662ac9c2d5 templates/webapps/tool_shed/category/valid_grid.mako
--- a/templates/webapps/tool_shed/category/valid_grid.mako
+++ b/templates/webapps/tool_shed/category/valid_grid.mako
@@ -6,6 +6,7 @@
## Render grid header.
<%def name="render_grid_header( grid, repo_grid, render_title=True)">
${init()}
+ ${grid_javascripts()}
<div class="grid-header">
%if render_title:
${grid_title()}
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
23 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/59c4b30557cd/
Changeset: 59c4b30557cd
User: guerler
Date: 2013-11-23 22:49:54
Summary: Grids: Fix for Toolshed
Affected #: 2 files
diff -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c -r 59c4b30557cd889472ad7162b1f1b5be3e01973a templates/webapps/tool_shed/category/grid.mako
--- a/templates/webapps/tool_shed/category/grid.mako
+++ b/templates/webapps/tool_shed/category/grid.mako
@@ -48,7 +48,7 @@
${render_grid_table( grid, show_item_checkboxes )}
</%def>
-<%def name="grid_body( grid )">
+<%def name="grid_body()"><%
from tool_shed.grids.repository_grids import RepositoryGrid
repo_grid = RepositoryGrid()
diff -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c -r 59c4b30557cd889472ad7162b1f1b5be3e01973a templates/webapps/tool_shed/category/valid_grid.mako
--- a/templates/webapps/tool_shed/category/valid_grid.mako
+++ b/templates/webapps/tool_shed/category/valid_grid.mako
@@ -47,7 +47,7 @@
${render_grid_table( grid, show_item_checkboxes )}
</%def>
-<%def name="grid_body( grid )">
+<%def name="grid_body()"><%
from tool_shed.grids.repository_grids import ValidRepositoryGrid
repo_grid = ValidRepositoryGrid()
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: Grids: Unify operation handling, use new popups, refactor, bug fixes
by commits-noreply@bitbucket.org 23 Nov '13
by commits-noreply@bitbucket.org 23 Nov '13
23 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/3f630f92f598/
Changeset: 3f630f92f598
User: guerler
Date: 2013-11-23 22:14:59
Summary: Grids: Unify operation handling, use new popups, refactor, bug fixes
Affected #: 19 files
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py
+++ b/lib/galaxy/web/framework/helpers/grids.py
@@ -323,7 +323,7 @@
def __init__( self, label, key=None, model_class=None, method=None, format=None, \
link=None, attach_popup=False, visible=True, nowrap=False, \
# Valid values for filterable are ['standard', 'advanced', None]
- filterable=None, sortable=True, label_id_prefix=None ):
+ filterable=None, sortable=True, label_id_prefix=None, inbound=False ):
"""Create a grid column."""
self.label = label
self.key = key
@@ -331,6 +331,7 @@
self.method = method
self.format = format
self.link = link
+ self.inbound = inbound
self.nowrap = nowrap
self.attach_popup = attach_popup
self.visible = visible
@@ -734,7 +735,7 @@
class GridOperation( object ):
def __init__( self, label, key=None, condition=None, allow_multiple=True, allow_popup=True,
target=None, url_args=None, async_compatible=False, confirm=None,
- global_operation=None ):
+ global_operation=None, inbound=False ):
self.label = label
self.key = key
self.allow_multiple = allow_multiple
@@ -743,6 +744,7 @@
self.target = target
self.url_args = url_args
self.async_compatible = async_compatible
+ self.inbound = inbound
# if 'confirm' is set, then ask before completing the operation
self.confirm = confirm
# specify a general operation that acts on the full grid
@@ -772,9 +774,10 @@
return { 'action' : 'display_by_username_and_slug', 'username' : item.user.username, 'slug' : item.slug }
class GridAction( object ):
- def __init__( self, label=None, url_args=None ):
+ def __init__( self, label=None, url_args=None, inbound=False ):
self.label = label
self.url_args = url_args
+ self.inbound = inbound
class GridColumnFilter( object ):
def __init__( self, label, args=None ):
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -99,8 +99,8 @@
columns = [
grids.TextColumn( "Name", key="name",
# Link name to dataset's history.
- link=( lambda item: iff( item.history.deleted, None, dict( operation="switch", id=item.id ) ) ), filterable="advanced", attach_popup=True ),
- HistoryColumn( "History", key="history", sortable=False,
+ link=( lambda item: iff( item.history.deleted, None, dict( operation="switch", id=item.id ) ) ), filterable="advanced", attach_popup=True, inbound=True ),
+ HistoryColumn( "History", key="history", sortable=False, inbound=True,
link=( lambda item: iff( item.history.deleted, None, dict( operation="switch_history", id=item.id ) ) ) ),
grids.IndividualTagsColumn( "Tags", key="tags", model_tag_association_class=model.HistoryDatasetAssociationTagAssociation, filterable="advanced", grid_name="HistoryDatasetAssocationListGrid" ),
StatusColumn( "Status", key="deleted", attach_popup=False ),
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -34,14 +34,14 @@
for state in ( 'ok', 'running', 'queued', 'error' ):
count = state_count_dict.get( state, 0 )
if count:
- rval += '<div class="count-box state-color-%s">%s</div>' % (state, count)
+ rval += '<div class="count-box state-color-%s">%s</div> ' % (state, count)
return rval
class HistoryListNameColumn( NameColumn ):
def get_link( self, trans, grid, history ):
link = None
if not history.deleted:
- link = dict( operation="Switch", id=history.id, use_panels=grid.use_panels )
+ link = dict( operation="Switch", id=history.id, use_panels=grid.use_panels, async_compatible=True )
return link
@@ -85,10 +85,10 @@
key="free-text-search", visible=False, filterable="standard" )
)
operations = [
- grids.GridOperation( "Switch", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ),
- grids.GridOperation( "View", allow_multiple=False ),
+ grids.GridOperation( "Switch", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=True ),
+ grids.GridOperation( "View", allow_multiple=False, inbound=True ),
grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ),
- grids.GridOperation( "Rename", condition=( lambda item: not item.deleted ), async_compatible=False ),
+ grids.GridOperation( "Rename", condition=( lambda item: not item.deleted ), async_compatible=False, inbound=True ),
grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), async_compatible=True ),
grids.GridOperation( "Delete Permanently", condition=( lambda item: not item.purged ), confirm="History contents will be removed from disk, this cannot be undone. Continue?", async_compatible=True ),
grids.GridOperation( "Undelete", condition=( lambda item: item.deleted and not item.purged ), async_compatible=True ),
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c lib/galaxy/webapps/galaxy/controllers/page.py
--- a/lib/galaxy/webapps/galaxy/controllers/page.py
+++ b/lib/galaxy/webapps/galaxy/controllers/page.py
@@ -95,7 +95,6 @@
# Grid definition.
show_item_checkboxes = True
template = "/page/select_items_grid.mako"
- async_template = "/page/select_items_grid_async.mako"
default_filter = { "deleted" : "False" , "sharing" : "All" }
default_sort_key = "-update_time"
use_async = True
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -56,7 +56,7 @@
datasets_action = 'list_history_datasets'
datasets_param = "f-history"
columns = [
- NameColumn( "History Name", key="name", filterable="standard" ),
+ NameColumn( "History Name", key="name", filterable="standard", inbound=True ),
grids.GridColumn( "Last Updated", key="update_time", format=time_ago, visible=False ),
DbKeyPlaceholderColumn( "Dbkey", key="dbkey", model_class=model.HistoryDatasetAssociation, visible=False )
]
@@ -77,7 +77,7 @@
datasets_action = 'list_library_datasets'
datasets_param = "f-library"
columns = [
- NameColumn( "Library Name", key="name", filterable="standard" )
+ NameColumn( "Library Name", key="name", filterable="standard", inbound=True )
]
num_rows_per_page = 10
use_async = True
@@ -196,15 +196,15 @@
key="free-text-search", visible=False, filterable="standard" )
)
global_actions = [
- grids.GridAction( "Create new visualization", dict( action='create' ) )
+ grids.GridAction( "Create new visualization", dict( action='create' ), inbound=True )
]
operations = [
grids.GridOperation( "Open", allow_multiple=False, url_args=get_url_args ),
grids.GridOperation( "Open in Circster", allow_multiple=False, condition=( lambda item: item.type == 'trackster' ), url_args=dict( action='circster' ) ),
- grids.GridOperation( "Edit Attributes", allow_multiple=False, url_args=dict( action='edit') ),
- grids.GridOperation( "Copy", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False, url_args=dict( action='copy') ),
+ grids.GridOperation( "Edit Attributes", allow_multiple=False, url_args=dict( action='edit'), inbound=True),
+ grids.GridOperation( "Copy", allow_multiple=False, condition=( lambda item: not item.deleted )),
grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ),
- grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), async_compatible=True, confirm="Are you sure you want to delete this visualization?" ),
+ grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), confirm="Are you sure you want to delete this visualization?" ),
]
def apply_query_filter( self, trans, query, **kwargs ):
return query.filter_by( user=trans.user, deleted=False )
@@ -327,6 +327,7 @@
@web.expose
@web.require_login( "use Galaxy visualizations", use_panels=True )
def list( self, trans, *args, **kwargs ):
+
# Handle operation
if 'operation' in kwargs and 'id' in kwargs:
session = trans.sa_session
@@ -338,6 +339,8 @@
item.deleted = True
if operation == "share or publish":
return self.sharing( trans, **kwargs )
+ if operation == "copy":
+ self.copy( trans, **kwargs )
session.flush()
# Build list of visualizations shared with user.
@@ -350,8 +353,7 @@
.all()
return trans.fill_template( "visualization/list.mako", grid=self._user_list_grid( trans, *args, **kwargs ), shared_by_others=shared_by_others )
-
-
+
#
# -- Functions for operating on visualizations. --
#
@@ -364,7 +366,7 @@
@web.expose
@web.require_login()
- def copy(self, trans, id, *args, **kwargs):
+ def copy(self, trans, id, **kwargs):
visualization = self.get_visualization( trans, id, check_ownership=False )
user = trans.get_user()
owner = ( visualization.user == user )
@@ -381,7 +383,7 @@
# Display the management page
trans.set_message( 'Created new visualization with name "%s"' % copied_viz.title )
- return self.list( trans )
+ return
@web.expose
@web.require_login( "use Galaxy visualizations" )
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c static/scripts/galaxy.grids.js
--- a/static/scripts/galaxy.grids.js
+++ b/static/scripts/galaxy.grids.js
@@ -4,6 +4,9 @@
// not appended to the identifier of a nested array.
jQuery.ajaxSettings.traditional = true;
+// dependencies
+define(['mvc/ui'], function() {
+
/**
* A Galaxy grid.
*/
@@ -137,8 +140,7 @@
// Initialize
initialize: function(grid)
{
- this.grid = grid;
- this.init_grid_elements();
+ this.init_grid(grid);
this.init_grid_controls();
// Initialize text filters to select text on click and use normal font when user is typing.
@@ -147,7 +149,14 @@
.keyup(function () { $(this).css("font-style", "normal"); });
});
},
-
+
+ // Initialize
+ init_grid: function(grid)
+ {
+ this.grid = grid;
+ this.init_grid_elements();
+ },
+
// Initialize grid controls
init_grid_controls: function() {
// Initialize submit image elements.
@@ -174,14 +183,6 @@
});
});
- // Initialize page links.
- $('.page-link > a').each( function() {
- $(this).click( function() {
- self.set_page( $(this).attr('page_num') );
- return false;
- });
- });
-
// Initialize categorical filters.
$('.categorical-filter > a').each( function() {
$(this).click( function() {
@@ -227,7 +228,6 @@
// Initialize grid elements.
init_grid_elements : function() {
-
// Initialize grid selection checkboxes.
$(".grid").each( function() {
var checkboxes = $(this).find("input.grid-row-select-checkbox");
@@ -242,34 +242,94 @@
update_checked();
});
- // Initialize item labels.
- var self = this;
- $(".label").each( function() {
- // If href has an operation in it, do operation when clicked. Otherwise do nothing.
- var href = $(this).attr('href');
- if ( href !== undefined && href.indexOf('operation=') != -1 ) {
- $(this).click( function() {
- self.do_operation_from_href( $(this).attr('href') );
- return false;
- });
- }
- });
-
// Initialize ratings.
if ($('.community_rating_star').length !== 0)
$('.community_rating_star').rating({});
+
+ // get options
+ var options = this.grid.attributes;
+ var self = this;
- // Initialize item menu operations.
- make_popup_menus();
- },
-
- // Go back to page one; this is useful when a filter is applied.
- go_page_one: function () {
- // Need to go back to page 1 if not showing all.
- var cur_page = this.grid.get('cur_page');
- if (cur_page !== null && cur_page !== undefined && cur_page !== 'all') {
- this.grid.set('cur_page', 1);
- }
+ //
+ // add page click events
+ //
+ $('.page-link > a').each( function() {
+ $(this).click( function() {
+ self.set_page( $(this).attr('page_num') );
+ return false;
+ });
+ });
+
+ //
+ // add inbound/outbound events
+ //
+ $(".use-inbound").each( function() {
+ $(this).click( function(e) {
+ self.execute({
+ href : $(this).attr('href'),
+ inbound : true
+ });
+ return false;
+
+ });
+ });
+
+ $(".use-outbound").each( function() {
+ $(this).click( function(e) {
+ self.execute({
+ href : $(this).attr('href')
+ });
+ return false;
+ });
+ });
+
+ //
+ // add operation popup menus
+ //
+ for (var i in options['items'])
+ {
+ // get identifiers
+ var button = $('#grid-' + i + '-popup');
+ button.off();
+ var popup = new PopupMenu(button);
+
+ // load details
+ var item = options['items'][i];
+ for (var j in options['operations'])
+ {
+ // get operation details
+ var operation = options['operations'][j];
+ var operation_id = operation['label'];
+ var operation_settings = item['operation_config'][operation_id];
+ var encode_id = item['encode_id'];
+
+ // check
+ if (operation_settings['allowed'] && operation['allow_popup'])
+ {
+ // popup configuration
+ var popupConfig =
+ {
+ html : operation['label'],
+ href : operation_settings['url_args'],
+ target : operation_settings['target'],
+ confirmation_text : operation['confirm'],
+ inbound : operation['inbound']
+ };
+
+ // add popup function
+ popupConfig.func = function(e)
+ {
+ e.preventDefault();
+ var label = $(e.target).html();
+ var options = this.findItemByHtml(label);
+ self.execute(options);
+ };
+
+ // add item
+ popup.addItem(popupConfig);
+ }
+ }
+ }
},
// Add a condition to the grid filter; this adds the condition and refreshes the grid.
@@ -294,14 +354,14 @@
$(this).remove();
self.go_page_one();
- self.update_grid();
+ self.execute();
});
var container = $('#' + name + "-filtering-criteria");
container.append(t);
this.go_page_one();
- this.update_grid();
+ this.execute();
},
// Set sort condition for grid.
@@ -331,7 +391,7 @@
// Update grid.
this.grid.set('sort_key', new_sort);
this.go_page_one();
- this.update_grid();
+ this.execute();
},
// Set new value for categorical filter.
@@ -366,7 +426,7 @@
// Update grid.
this.grid.add_filter(name, new_value);
this.go_page_one();
- this.update_grid();
+ this.execute();
},
// Set page to view.
@@ -394,88 +454,160 @@
$(this).removeClass("inactive-link");
var t = $("<a href='#'>" + text + "</a>");
t.click(function() {
- set_page(page_num);
+ self.set_page(page_num);
});
$(this).append(t);
}
});
- var maintain_page_links = true;
if (new_page === "all") {
this.grid.set('cur_page', new_page);
- maintain_page_links = false;
} else {
this.grid.set('cur_page', parseInt(new_page, 10));
}
- this.update_grid(maintain_page_links);
+ this.execute();
},
- // Perform a grid operation.
- do_operation: function (operation, item_ids) {
- operation = operation.toLowerCase();
-
- // Update grid.
- this.grid.set({
- operation: operation,
- item_ids: item_ids
+ // confirmation/submission of operation request
+ submit_operation: function (selected_button, confirmation_text)
+ {
+ // verify in any item is selected
+ var number_of_checked_ids = $('input[name="id"]:checked').length;
+ if (!number_of_checked_ids > 0)
+ return false;
+
+ // collect ids
+ var operation_name = $(selected_button).val();
+ var item_ids = [];
+ $('input[name=id]:checked').each(function() {
+ item_ids.push( $(this).val() );
+ });
+ this.execute({
+ operation: operation_name,
+ id: item_ids,
+ confirmation_text: confirmation_text
});
- // Do operation. If operation cannot be performed asynchronously, redirect to location.
- if (this.grid.can_async_op(operation)) {
- this.update_grid(true);
+ // return
+ return true;
+ },
+
+ // execute operations and hyperlink requests
+ execute: function (options) {
+ // get url
+ var id = null;
+ var href = null;
+ var operation = null;
+ var confirmation_text = null;
+ var inbound = null;
+
+ // check for options
+ if (options)
+ {
+ // get options
+ href = options.href;
+ operation = options.operation;
+ id = options.id;
+ confirmation_text = options.confirmation_text;
+ inbound = options.inbound;
+
+ // check if input contains the operation tag
+ if (href !== undefined && href.indexOf('operation=') != -1) {
+ // Get operation, id in hyperlink's href.
+ var href_parts = href.split("?");
+ if (href_parts.length > 1) {
+ var href_parms_str = href_parts[1];
+ var href_parms = href_parms_str.split("&");
+ for (var index = 0; index < href_parms.length; index++) {
+ if (href_parms[index].indexOf('operation') != -1) {
+ // Found operation parm; get operation value.
+ operation = href_parms[index].split('=')[1];
+ operation = operation.replace (/\+/g, ' ');
+ } else if (href_parms[index].indexOf('id') != -1) {
+ // Found id parm; get id value.
+ id = href_parms[index].split('=')[1];
+ }
+ }
+ }
+ }
}
- else {
- this.go_to_URL();
+
+ // check for operation details
+ if (operation && id) {
+ // show confirmation box
+ if (confirmation_text && confirmation_text != '' && confirmation_text != 'None')
+ if(!confirm(confirmation_text))
+ return false;
+
+ // use small characters for operation?!
+ operation = operation.toLowerCase();
+
+ // Update grid.
+ this.grid.set({
+ operation: operation,
+ item_ids: id
+ });
+
+ // Do operation. If operation cannot be performed asynchronously, redirect to location.
+ if (this.grid.can_async_op(operation)) {
+ this.update_grid();
+ } else {
+ this.go_to(inbound, '');
+ }
+
+ // done
+ return false;
}
+
+ // check for href details
+ if (href)
+ {
+ this.go_to(inbound, href);
+ return false;
+ }
+
+ // refresh grid
+ if (this.grid.get('async')) {
+ this.update_grid();
+ } else {
+ this.go_to(inbound, '');
+ }
+
+ // done
+ return false;
},
- // Perform a hyperlink click that initiates an operation. If there is no operation, ignore click.
- do_operation_from_href: function (href) {
- // Get operation, id in hyperlink's href.
- var href_parts = href.split("?");
- if (href_parts.length > 1) {
- var href_parms_str = href_parts[1];
- var href_parms = href_parms_str.split("&");
- var operation = null;
- var id = -1;
- for (var index = 0; index < href_parms.length; index++) {
- if (href_parms[index].indexOf('operation') != -1) {
- // Found operation parm; get operation value.
- operation = href_parms[index].split('=')[1];
- } else if (href_parms[index].indexOf('id') != -1) {
- // Found id parm; get id value.
- id = href_parms[index].split('=')[1];
- }
- }
- // Do operation.
- this.do_operation(operation, id);
- return false;
- }
- },
-
- // Navigate window to the URL defined by url_args. This method can be used to short-circuit grid AJAXing.
- go_to_URL: function () {
- // Not async request.
+ // go to url
+ go_to: function (inbound, href) {
+
+ var async = this.grid.get('async');
this.grid.set('async', false);
- // Go.
- window.location = this.grid.get('url_base') + "?" + $.param(this.grid.get_url_data());
-
+ // get default url
+ if(!href)
+ href = this.grid.get('url_base') + "?" + $.param(this.grid.get_url_data());
+
// Clear grid of transient request attributes.
this.grid.set({
operation: undefined,
- item_ids: undefined
+ item_ids: undefined,
+ async: async
});
+
+ if (inbound) {
+ // this currently assumes that there is only a single grid shown at a time
+ var $div = $('.grid-header').closest('.inbound');
+ if ($div.length !== 0) {
+ $div.load(href);
+ return;
+ }
+ }
+
+ window.location = href;
},
// Update grid.
- update_grid: function (maintain_page_links) {
- // If grid is not using async, then go to URL.
- if (!this.grid.get('async')) {
- this.go_to_URL();
- return;
- }
-
+ update_grid: function () {
// If there's an operation, do POST; otherwise, do GET.
var method = (this.grid.get('operation') ? "POST" : "GET" );
$('.loading-elt-overlay').show(); // Show overlay to indicate loading and prevent user actions.
@@ -484,7 +616,7 @@
type: method,
url: self.grid.get('url_base'),
data: self.grid.get_url_data(),
- error: function() { alert( "Grid refresh failed" ); },
+ error: function(response) { alert( "Grid refresh failed" );},
success: function(response_text) {
// HACK: use a simple string to separate the elements in the
// response: (1) table body; (2) number of pages in table; and (3) message.
@@ -498,11 +630,7 @@
// Trigger custom event to indicate grid body has changed.
$('#grid-table-body').trigger('update');
-
- // Init grid.
- self.init_grid_elements();
- make_popup_menus();
-
+
// Hide loading overlay.
$('.loading-elt-overlay').hide();
@@ -546,29 +674,20 @@
}
this.init_grid_elements();
},
-
- // confirmation/submission of operation request
- submit_operation: function (selected_button, confirmation_text)
- {
- // verify in any item is selected
- var number_of_checked_ids = $('input[name="id"]:checked').length;
- if (!number_of_checked_ids > 0)
- return false;
-
- // show confirmation box
- if (confirmation_text != 'None' && confirmation_text != '')
- if(!confirm(confirmation_text))
- return false;
-
- // collect ids
- var operation_name = $(selected_button).val();
- var item_ids = [];
- $('input[name=id]:checked').each(function() {
- item_ids.push( $(this).val() );
- });
- this.do_operation(operation_name, item_ids);
-
- // return
- return true;
+
+ // Go back to page one; this is useful when a filter is applied.
+ go_page_one: function () {
+ // Need to go back to page 1 if not showing all.
+ var cur_page = this.grid.get('cur_page');
+ if (cur_page !== null && cur_page !== undefined && cur_page !== 'all') {
+ this.grid.set('cur_page', 1);
+ }
}
});
+
+return {
+ Grid : Grid,
+ GridView : GridView
+};
+
+});
\ No newline at end of file
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c static/scripts/mvc/ui.js
--- a/static/scripts/mvc/ui.js
+++ b/static/scripts/mvc/ui.js
@@ -232,7 +232,7 @@
// if the option has 'func', call that function when the anchor is clicked
if( option.func ){
- $( this ).children( 'a.popupmenu-option' ).click( function( event ){
+ $( this ).children( 'a.popupmenu-option' ).mousedown( function( event ){
option.func.call( menu, event, option );
// bubble up so that an option click will call the close behavior
//return false;
@@ -292,7 +292,7 @@
// function to close popup and unbind itself
var menu = this;
var closePopupWhenClicked = function( $elClicked ){
- $elClicked.one( "click.close_popup", function(){
+ $elClicked.one( "mousedown.close_popup", function(){
menu.remove();
});
};
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/admin/requests/sample_datasets_grid.mako
--- a/templates/admin/requests/sample_datasets_grid.mako
+++ b/templates/admin/requests/sample_datasets_grid.mako
@@ -2,8 +2,8 @@
<%namespace file="/requests/common/common.mako" import="common_javascripts" /><%namespace file="/requests/common/common.mako" import="transfer_status_updater" />
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${common_javascripts()}
- ${transfer_status_updater()}
+<%def name="load()">
+ ${parent.load()}
+ ${common_javascripts()}
+ ${transfer_status_updater()}
</%def>
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/base.mako
--- a/templates/base.mako
+++ b/templates/base.mako
@@ -10,7 +10,7 @@
${self.stylesheets()}
${self.javascripts()}
</head>
- <body>
+ <body class="inbound">
${next.body()}
</body></html>
@@ -50,7 +50,8 @@
"libs/backbone/backbone-relational",
"libs/handlebars.runtime",
"galaxy.base",
- "mvc/ui"
+ "mvc/ui",
+ 'libs/require'
)}
<script type="text/javascript">
@@ -69,6 +70,16 @@
error : function(){},
assert : function(){}
};
+
+ ## configure require
+ require.config({
+ baseUrl: "${h.url_for('/static/scripts') }",
+ shim: {
+ "libs/underscore": { exports: "_" },
+ "libs/backbone/backbone": { exports: "Backbone" },
+ "libs/backbone/backbone-relational": ["libs/backbone/backbone"]
+ }
+ });
</script>
%if not form_input_auto_focus is UNDEFINED and form_input_auto_focus:
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -341,7 +341,7 @@
</div></div><!--end left-->
%endif
- <div id="center">
+ <div id="center" class="inbound">
${self.center_panel()}
</div><!--end center-->
%if self.has_right_panel:
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/grid_base.mako
--- a/templates/grid_base.mako
+++ b/templates/grid_base.mako
@@ -16,6 +16,20 @@
<%namespace file="/refresh_frames.mako" import="handle_refresh_frames" /><%namespace file="/display_common.mako" import="get_class_plural" />
+<%def name="load(embedded = False)">
+<%
+ self.grid_javascripts()
+ if embedded:
+ self.init()
+ self.stylesheets()
+ self.render_grid_header( grid, False )
+ self.render_grid_table( grid, show_item_checkboxes=show_item_checkboxes )
+ else:
+ self.make_grid( grid )
+ endif
+%>
+</%def>
+
<%def name="init()"><%
self.has_left_panel = False
@@ -47,7 +61,8 @@
'get_class_plural' : get_class_plural( grid.model_class ).lower(),
'use_paging' : grid.use_paging,
'legend' : grid.legend,
- 'current_item_id' : ''
+ 'current_item_id' : False,
+ 'use_panels' : context.get('use_panels')
}
## add current item if exists
@@ -94,6 +109,7 @@
'target' : operation.target,
'label' : operation.label,
'confirm' : operation.confirm,
+ 'inbound' : operation.inbound,
'global_operation' : False
})
if operation.allow_multiple:
@@ -107,7 +123,8 @@
for action in grid.global_actions:
self.grid_config['global_actions'].append({
'url_args' : url(**action.url_args),
- 'label' : action.label
+ 'label' : action.label,
+ 'inbound' : action.inbound
})
endfor
@@ -144,6 +161,9 @@
link = None
endif
+ ## inbound
+ inbound = column.inbound
+
## get value
value = column.get_value( trans, grid, item )
@@ -158,7 +178,8 @@
## Item dictionary
item_dict['column_config'][column.label] = {
'link' : link,
- 'value' : value
+ 'value' : value,
+ 'inbound' : inbound
}
endif
endfor
@@ -181,36 +202,29 @@
##
<%def name="center_panel()">
- ${self.grid_body( grid )}
+ ${self.grid_body()}
</%def>
## Render the grid's basic elements. Each of these elements can be subclassed.
<%def name="body()">
- ${self.grid_body( grid )}
+ ${self.grid_body()}
</%def>
## Because body() is special and always exists even if not explicitly defined,
## it's not possible to override body() in the topmost template in the chain.
## Because of this, override grid_body() instead.
-<%def name="grid_body( grid )">
- ${self.make_grid( grid )}
+<%def name="grid_body()">
+ ${self.load()}
</%def><%def name="title()">${self.grid_config['title']}</%def>
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${self.grid_javascripts()}
-</%def>
-
<%def name="grid_javascripts()">
- ${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging", "libs/jquery/jquery.rating", "galaxy.grids" )}
+ ${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging", "libs/jquery/jquery.rating" )}
${handle_refresh_frames()}
<script type="text/javascript">
-
var gridView = null;
-
function add_tag_to_grid_filter (tag_name, tag_value)
{
// Put tag name and value together.
@@ -218,23 +232,6 @@
$('#advanced-search').show('fast');
gridView.add_filter_condition("tags", tag, true);
};
-
- $(function() {
- ## get configuration
- var grid_config = ${ h.to_json_string( self.grid_config ) };
-
- // Create grid.
- var grid = new Grid(grid_config);
-
- // strip protocol and domain
- var url = grid.get('url_base');
- url = url.replace(/^.*\/\/[^\/]+/, '');
- grid.set('url_base', url);
-
- // Create view.
- gridView = new GridView(grid);
- });
-
</script></%def>
@@ -290,16 +287,25 @@
%if self.grid_config['global_actions']:
<ul class="manage-table-actions">
- %if len( self.grid_config['global_actions'] ) < 3:
- %for action in self.grid_config['global_actions']:
- <li><a class="action-button" href="${action['url_args']}">${action['label']}</a></li>
- %endfor
- %else:
- <li><a class="action-button" id="action-8675309-popup" class="menubutton">Actions</a></li>
- <div popupmenu="action-8675309-popup">
- %for action in self.grid_config['global_actions']:
- <a class="action-button" href="${action['url_args']}">${action['label']}</a>
- %endfor
+ <%
+ show_popup = len( self.grid_config['global_actions'] ) >= 3
+ %>
+ %if show_popup:
+ <li><a class="action-button" id="popup-global-actions" class="menubutton">Actions</a></li>
+ <div popupmenu="popup-global-actions">
+ %endif
+ %for action in self.grid_config['global_actions']:
+ <%
+ label_cls = ""
+ if action['inbound']:
+ label_cls = "use-inbound"
+ else:
+ label_cls = "use-outbound"
+ endif
+ %>
+ <li><a class="action-button ${label_cls}" href="${action['url_args']}" onclick="return false;">${action['label']}</a></li>
+ %endfor
+ %if show_popup:
</div>
%endif
</ul>
@@ -396,23 +402,21 @@
# load attributes
link = column_settings['link']
value = column_settings['value']
+ inbound = column_settings['inbound']
# check if formatting is defined
value = str(value).replace('//', '/')
# Attach popup menu?
id = ""
+ cls = ""
if column['attach_popup']:
id = 'grid-%d-popup' % i
- endif
-
- # Determine appropriate class
- cls = ""
- if column['attach_popup']:
cls = "menubutton"
if link:
cls += " split"
endif
+ cls += " popup"
endif
%><td ${nowrap}>
@@ -420,7 +424,16 @@
%if len(self.grid_config['operations']) != 0:
<div id="${id}" class="${cls}" style="float: left;">
%endif
- <a class="label" href="${link}">${value}</a>
+
+ <%
+ label_class = ""
+ if inbound:
+ label_class = "use-inbound"
+ else:
+ label_class = "use-outbound"
+ endif
+ %>
+ <a class="label ${label_class}" href="${link}" onclick="return false;">${value}</a>
%if len(self.grid_config['operations']) != 0:
</div>
%endif
@@ -430,32 +443,33 @@
</td>
%endif
%endfor
- ## Actions column
- <td>
- <div popupmenu="${popupmenu_id}">
- %for operation in self.grid_config['operations']:
- <%
- operation_id = operation['label']
- operation_settings = item['operation_config'][operation_id]
- %>
- %if operation_settings['allowed'] and operation['allow_popup']:
- <%
- target = ""
- if operation['target']:
- target = "target='" + operation['target'] + "'"
- %>
- %if operation['confirm']:
- <a class="action-button" ${target} confirm="${operation['confirm']}" href="${operation_settings['url_args']}">${operation_id}</a>
- %else:
- <a class="action-button" ${target} href="${operation_settings['url_args']}">${operation_id}</a>
- %endif
- %endif
- %endfor
- </div>
- </td></tr><% num_rows_rendered += 1 %>
%endfor
+
+ ## update configuration
+ <script type="text/javascript">
+ $(function() {
+ require(['galaxy.grids'], function(mod_grids) {
+ ## get configuration
+ var grid_config = ${ h.to_json_string( self.grid_config ) };
+
+ // Create grid.
+ var grid = new mod_grids.Grid(grid_config);
+
+ // strip protocol and domain
+ var url = grid.get('url_base');
+ url = url.replace(/^.*\/\/[^\/]+/, '');
+ grid.set('url_base', url);
+
+ // Create view.
+ if (!gridView)
+ gridView = new mod_grids.GridView(grid);
+ else
+ gridView.init_grid(grid);
+ });
+ });
+ </script></%def>
## Render grid table footer contents.
@@ -510,24 +524,24 @@
%>
Page:
% if min_page > 1:
- <span class='page-link' id="page-link-1"><a href="${url( page=1 )}" page_num="1">1</a></span> ...
+ <span class='page-link' id="page-link-1"><a href="${url( page=1 )}" page_num="1" onclick="return false;">1</a></span> ...
% endif
%for page_index in range(min_page, max_page + 1):
%if page_index == cur_page_num:
<span class='page-link inactive-link' id="page-link-${page_index}">${page_index}</span>
%else:
<% args = { 'page' : page_index } %>
- <span class='page-link' id="page-link-${page_index}"><a href="${url( args )}" page_num='${page_index}'>${page_index}</a></span>
+ <span class='page-link' id="page-link-${page_index}"><a href="${url( args )}" onclick="return false;" page_num='${page_index}'>${page_index}</a></span>
%endif
%endfor
%if max_page < num_pages:
...
- <span class='page-link' id="page-link-${num_pages}"><a href="${url( page=num_pages )}" page_num="${num_pages}">${num_pages}</a></span>
+ <span class='page-link' id="page-link-${num_pages}"><a href="${url( page=num_pages )}" onclick="return false;" page_num="${num_pages}">${num_pages}</a></span>
%endif
</span>
## Show all link
- <span class='page-link' id='show-all-link-span'> | <a href="${url( page='all' )}" page_num="all">Show All</a></span>
+ <span class='page-link' id='show-all-link-span'> | <a href="${url( page='all' )}" onclick="return false;" page_num="all">Show All</a></span></td></tr>
%endif
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/tagging_common.mako
--- a/templates/tagging_common.mako
+++ b/templates/tagging_common.mako
@@ -135,6 +135,7 @@
## Build script that augments tags using progressive javascript.
<script type="text/javascript">
+ $(function() {
//
// Set up autocomplete tagger.
//
@@ -212,6 +213,8 @@
};
$('#${elt_id}').autocomplete_tagging(options);
+
+ });
</script>
## Use style to hide/display the tag area.
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/user/openid_manage.mako
--- a/templates/user/openid_manage.mako
+++ b/templates/user/openid_manage.mako
@@ -1,19 +1,10 @@
## Template generates a grid that enables user to select items.
-<%namespace file="../grid_base.mako" import="make_grid" />
+<%inherit file="../grid_base.mako" />
+
<%namespace file="login.mako" import="render_openid_form" />
-<%inherit file="../grid_base.mako" />
-
-<%def name="grid_body( grid )">
- ${make_grid( grid )}
+<%def name="load()">
+ ${parent.load()}
<h2>Associate more OpenIDs</h2>
${render_openid_form( kwargs['redirect'], True, kwargs['openid_providers'] )}
-</%def>
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%">
- <div class="page-container" style="padding: 10px;">
- ${grid_body( grid )}
- </div>
- </div>
-</%def>
+</%def>
\ No newline at end of file
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/history/grid.mako
--- a/templates/webapps/galaxy/history/grid.mako
+++ b/templates/webapps/galaxy/history/grid.mako
@@ -1,7 +1,7 @@
<%inherit file="../grid_base.mako"/>
-<%def name="grid_body( grid )">
- ${self.make_grid( grid )}
+<%def name="load()">
+ ${parent.load()}
<br/><div class="toolParamHelp" style="clear: both;">
Histories that have been deleted for more than a time period specified by the Galaxy administrator(s) may be permanently deleted.
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/page/select_items_grid.mako
--- a/templates/webapps/galaxy/page/select_items_grid.mako
+++ b/templates/webapps/galaxy/page/select_items_grid.mako
@@ -1,7 +1,3 @@
## Template generates a grid that enables user to select items.
<%namespace file="../grid_base.mako" import="*" />
-${init()}
-${grid_javascripts()}
-${stylesheets()}
-${render_grid_header( grid, False )}
-${render_grid_table( grid, show_item_checkboxes=True )}
+${load(True)}
\ No newline at end of file
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/page/select_items_grid_async.mako
--- a/templates/webapps/galaxy/page/select_items_grid_async.mako
+++ /dev/null
@@ -1,9 +0,0 @@
-<%namespace file="../grid_base.mako" import="*" />
-<%namespace file="/display_common.mako" import="render_message" />
-${init()}
-## Always show item checkboxes so that users can select items.
-${render_grid_table_body_contents( grid, show_item_checkboxes=show_item_checkboxes )}
-*****
-${num_pages}
-*****
-${render_message( message, status )}
\ No newline at end of file
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/tracks/add_to_viz.mako
--- a/templates/webapps/galaxy/tracks/add_to_viz.mako
+++ b/templates/webapps/galaxy/tracks/add_to_viz.mako
@@ -1,8 +1,3 @@
## Template generates a grid that enables user to add tracks
<%namespace file="../grid_base.mako" import="*" />
-${init()}
-${stylesheets()}
-${grid_javascripts()}
-${render_grid_header( grid, False )}
-${render_grid_table( grid, show_item_checkboxes=True )}
-
+${load(True)}
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/tracks/add_tracks.mako
--- a/templates/webapps/galaxy/tracks/add_tracks.mako
+++ b/templates/webapps/galaxy/tracks/add_tracks.mako
@@ -1,7 +1,3 @@
## Template generates a grid that enables user to add tracks
<%namespace file="../grid_base.mako" import="*" />
-${init()}
-${stylesheets()}
-${grid_javascripts()}
-${render_grid_header( grid, False )}
-${render_grid_table( grid, show_item_checkboxes=True )}
\ No newline at end of file
+${load(True)}
\ No newline at end of file
diff -r 82e91d215acf573d96d3d377620ed8815368c86d -r 3f630f92f5983c28e1aedff312e7ff7e598fe23c templates/webapps/galaxy/tracks/history_select_grid.mako
--- a/templates/webapps/galaxy/tracks/history_select_grid.mako
+++ b/templates/webapps/galaxy/tracks/history_select_grid.mako
@@ -3,19 +3,15 @@
## can be easily subclassed. Importing methods like this template does
## not make it possible to easily subclass templates.
##
-<%namespace file="../grid_base.mako" import="*" />
-${init()}
-${stylesheets()}
-${grid_javascripts()}
+<%namespace name="grid_base" file="../grid_base.mako" import="*" /><%def name="select_header()"><script type="text/javascript">
// Load all grid URLs into modal-body element so that
// grid + links stays embedded.
$(document).ready(function() {
- $(".addtracktab, #grid-table a").off();
- $(".addtracktab, #grid-table a").click(function() {
- var modal_body = $(".modal-body");
+ $(".addtracktab").click(function() {
+ var modal_body = $(this).closest('.inbound');
if (modal_body.length !== 0) {
modal_body.load($(this).attr("href"));
return false;
@@ -78,12 +74,11 @@
<div class="divider"></div></%def>
-${select_header()}
## Need to define title so that it can be overridden by child templates.
<%def name="title()"></%def>
-${self.title()}
-
-${render_grid_header( grid, False )}
-${render_grid_table( grid, show_item_checkboxes=show_item_checkboxes )}
-
+<div class='inbound'>
+ ${select_header()}
+ ${self.title()}
+ ${grid_base.load(True)}
+</div>
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: greg: Fix for tool shed install and test framework.
by commits-noreply@bitbucket.org 23 Nov '13
by commits-noreply@bitbucket.org 23 Nov '13
23 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/82e91d215acf/
Changeset: 82e91d215acf
User: greg
Date: 2013-11-23 19:17:30
Summary: Fix for tool shed install and test framework.
Affected #: 1 file
diff -r 13bd960b94141a2974d0c968c26fc046e05e1d14 -r 82e91d215acf573d96d3d377620ed8815368c86d test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -672,12 +672,12 @@
repository_status_dict[ 'installation_errors' ][ 'current_repository' ] = error_message
# Even if the repository failed to install, execute the uninstall method, in case a dependency did succeed.
- log.debug( 'Attempting to uninstall repository %s' % str( name ) )
+ log.debug( 'Attempting to uninstall repository %s owned by %s.' % ( name, owner ) )
try:
repository = test_db_util.get_installed_repository_by_name_owner_changeset_revision( name, owner, changeset_revision )
- except:
- log.exception( 'No installed repository found.' )
- error_message = '%s\n%s' % ( error_message, extract_log_data( result, from_tool_test=False ) )
+ except Exception, e:
+ error_message = 'Unable to find installed repository %s owned by %s: %s.' % ( name, owner, str( e ) )
+ log.exception( error_message )
test_result = dict( tool_shed=galaxy_tool_shed_url,
name=name,
owner=owner,
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: Dave Bouvier: Correct typo in test framework.
by commits-noreply@bitbucket.org 22 Nov '13
by commits-noreply@bitbucket.org 22 Nov '13
22 Nov '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/13bd960b9414/
Changeset: 13bd960b9414
User: Dave Bouvier
Date: 2013-11-23 06:37:44
Summary: Correct typo in test framework.
Affected #: 1 file
diff -r a73e13655a942f83d9c475d522a861fb32b0148d -r 13bd960b94141a2974d0c968c26fc046e05e1d14 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -506,7 +506,7 @@
( str( dependency.name ), str( dependency.type ), str( dependency.version ), unicodify( dependency.error_message ) ) )
test_result = dict( type=dependency.type,
name=dependency.name,
- version=sdependency.version,
+ version=dependency.version,
error_message=dependency.error_message )
repository_status_dict[ 'installation_errors' ][ 'tool_dependencies' ].append( test_result )
for dependency in repository.missing_repository_dependencies:
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