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
- 15302 discussions
galaxy-dist commit 7698203440de: Fix functional tests as they think dynamically created jQuery elements are real
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1286227378 14400
# Node ID 7698203440dec7457f6fd273a36f30ed89e05821
# Parent 8f2e21b079864cb02b2c4e5bfc3343cbf867e259
Fix functional tests as they think dynamically created jQuery elements are real
--- a/templates/tool_form.mako
+++ b/templates/tool_form.mako
@@ -23,8 +23,8 @@ from galaxy.util.expressions import Expr
var file_name = $(this).attr("name");
file.attr( { name: 'replaced_file_input_' + file_name, disabled: true } );
// create a new hidden field which stores the filename and has the original name of the file input
- var new_file_input = $('<input type="hidden" />');
- new_file_input.attr( { "value": file_value, "name": file_name } );
+ var new_file_input = $(document.createElement('input'));
+ new_file_input.attr( { "type", "hidden", "value": file_value, "name": file_name } );
file.after(new_file_input);
}
});
1
0
galaxy-dist commit 41cf53bdcca2: Visual tweaks to new search UI
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1286332784 14400
# Node ID 41cf53bdcca21a255c94ae90d20a9bd492cf6741
# Parent 269c46003857daaf034a41d1f0cd690e0b60df72
Visual tweaks to new search UI
--- a/templates/grid_base.mako
+++ b/templates/grid_base.mako
@@ -91,6 +91,10 @@
%endif
%endif
+ $(".search-box-input").live("click", function() {
+ $(this).css("font-style", "normal");
+ });
+
//
// Code to handle grid operations: filtering, sorting, paging, and operations.
//
@@ -304,7 +308,7 @@
}
// Add button that displays filter and provides a button to delete it.
- var t = $("<span>" + value + "<a href='#'><img class='delete-search-icon' /></a></span>");
+ var t = $("<span>" + value + "<a href='javascript:void(0);'><span class='delete-search-icon' /></a></span>");
t.addClass('text-filter-val');
t.click(function() {
// Remove filter condition.
@@ -623,12 +627,11 @@
}
.text-filter-val {
border: solid 1px #AAAAAA;
- padding: 1px 3px 1px 3px;
+ padding: 1px 2px 1px 3px;
margin-right: 5px;
-moz-border-radius: .5em;
-webkit-border-radius: .5em;
font-style: italic;
-
}
.page-link a, .inactive-link {
padding: 0px 7px 0px 7px;
@@ -652,20 +655,26 @@
#more-search-options td {
padding: 3px;
}
+ #more-search-options table {
+ border-collapse: separate;
+ }
.delete-search-icon {
background: url(${h.url_for("/static/images/delete_tag_icon_gray.png")}) center no-repeat;
display: inline-block;
width: 10px;
cursor: pointer;
- height: 16px;
+ height: 18px;
vertical-align: middle;
+ margin-left: 2px;
+
}
.search-box-input {
border: 0;
- margin: 0;
- margin-left: 2px;
- padding: 0;
+ margin: 1px 0 0 2px;
float: left;
+ outline: medium none;
+ font-style: italic;
+ font-size: inherit;
}
.search-box {
vertical-align: bottom;
1
0
galaxy-dist commit 7b431b0dbc68: Fixed broken indentation.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Richard Burhans <burhans(a)bx.psu.edu>
# Date 1285872631 14400
# Node ID 7b431b0dbc687c1496ef5fba92dd443476d61d60
# Parent 51aaa9eac8182b25dbbffd1de902b78c916cb0f5
Fixed broken indentation.
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -646,10 +646,10 @@ class TwillTestCase( unittest.TestCase )
s2 = os.path.getsize(local_name)
if abs(s1-s2) > int(delta):
raise Exception, 'Files %s=%db but %s=%db - compare (delta=%s) failed' % (temp_name,s1,local_name,s2,delta)
- else:
- raise Exception, 'Unimplemented Compare type: %s' % compare
- if extra_files:
- self.verify_extra_files_content( extra_files, elem.get( 'id' ) )
+ else:
+ raise Exception, 'Unimplemented Compare type: %s' % compare
+ if extra_files:
+ self.verify_extra_files_content( extra_files, elem.get( 'id' ) )
except AssertionError, err:
errmsg = 'History item %s different than expected, difference (using %s):\n' % ( hid, compare )
errmsg += str( err )
1
0
galaxy-dist commit 8f2e21b07986: Enable export history jobs to work when application option 'outputs_to_working_directory' is set to true. This will enable export history jobs to work on galaxy main and, more generally, when galaxy datasets are mounted read-only.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1286208862 14400
# Node ID 8f2e21b079864cb02b2c4e5bfc3343cbf867e259
# Parent 06d6ce09e0f152d38c632dae7ccba9337f25bab5
Enable export history jobs to work when application option 'outputs_to_working_directory' is set to true. This will enable export history jobs to work on galaxy main and, more generally, when galaxy datasets are mounted read-only.
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -321,6 +321,20 @@ class JobWrapper( object ):
inp_data = dict( [ ( da.name, da.dataset ) for da in job.input_datasets ] )
out_data = dict( [ ( da.name, da.dataset ) for da in job.output_datasets ] )
out_data.update( [ ( da.name, da.dataset ) for da in job.output_library_datasets ] )
+
+ # Set up output dataset association for export history jobs. Because job
+ # uses a Dataset rather than an HDA or LDA, it's necessary to set up a
+ # fake dataset association that provides the needed attributes for
+ # preparing a job.
+ class FakeDatasetAssociation ( object ):
+ def __init__( self, dataset=None ):
+ self.dataset = dataset
+ self.file_name = dataset.file_name
+ self.metadata = dict()
+ self.children = []
+ jeha = self.sa_session.query( model.JobExportHistoryArchive ).filter_by( job=job ).first()
+ if jeha:
+ out_data[ "output_file" ] = FakeDatasetAssociation( dataset=jeha.dataset )
# These can be passed on the command line if wanted as $userId $userEmail
if job.history and job.history.user: # check for anonymous user!
userId = '%d' % job.history.user.id
@@ -632,13 +646,21 @@ class JobWrapper( object ):
return self.false_path
job = self.sa_session.query( model.Job ).get( self.job_id )
+ # Job output datasets are combination of output datasets, library datasets, and jeha datasets.
+ jeha = self.sa_session.query( model.JobExportHistoryArchive ).filter_by( job=job ).first()
if self.app.config.outputs_to_working_directory:
self.output_paths = []
for name, data in [ ( da.name, da.dataset.dataset ) for da in job.output_datasets + job.output_library_datasets ]:
false_path = os.path.abspath( os.path.join( self.working_directory, "galaxy_dataset_%d.dat" % data.id ) )
self.output_paths.append( DatasetPath( data.id, data.file_name, false_path ) )
+ if jeha:
+ false_path = os.path.abspath( os.path.join( self.working_directory, "galaxy_dataset_%d.dat" % jeha.dataset.id ) )
+ self.output_paths.append( DatasetPath( jeha.dataset.id, jeha.dataset.file_name, false_path ) )
else:
self.output_paths = [ DatasetPath( da.dataset.dataset.id, da.dataset.file_name ) for da in job.output_datasets + job.output_library_datasets ]
+ if jeha:
+ self.output_paths.append( DatasetPath( jeha.dataset.id, jeha.dataset.file_name ) )
+
return self.output_paths
def get_output_file_id( self, file ):
--- a/lib/galaxy/tools/imp_exp/__init__.py
+++ b/lib/galaxy/tools/imp_exp/__init__.py
@@ -15,12 +15,15 @@ def load_history_imp_exp_tools( toolbox
<tool id="__EXPORT_HISTORY__" name="Export History" version="0.1" tool_type="export_history"><type class="ExportHistoryTool" module="galaxy.tools"/><action module="galaxy.tools.actions.history_imp_exp" class="ExportHistoryToolAction"/>
- <command>$__SET_EXPORT_HISTORY_COMMAND_LINE__</command>
+ <command>$__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__ $output_file</command><inputs><param name="__HISTORY_TO_EXPORT__" type="hidden"/><param name="compress" type="boolean"/>
- <param name="__SET_EXPORT_HISTORY_COMMAND_LINE__" type="hidden"/>
+ <param name="__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__" type="hidden"/></inputs>
+ <outputs>
+ <data format="gzip" name="output_file"/>
+ </outputs></tool>
"""
tmp_name = tempfile.NamedTemporaryFile()
@@ -40,7 +43,9 @@ class JobExportHistoryArchiveWrapper( ob
# jeha = job_export_history_archive for the job.
""" Perform setup for job to export a history into an archive. Method generates
attribute files for export, sets the corresponding attributes in the jeha
- object, and returns a command line for running the job. """
+ object, and returns a command line for running the job. The command line
+ includes the command, inputs, and options; it does not include the output
+ file because it must be set at runtime. """
#
# Helper methods/classes.
@@ -199,10 +204,9 @@ class JobExportHistoryArchiveWrapper( ob
options = ""
if jeha.compressed:
options = "-G"
- return "python %s %s %s %s %s %s" % (
+ return "python %s %s %s %s %s" % (
os.path.join( os.path.abspath( os.getcwd() ), "lib/galaxy/tools/imp_exp/export_history.py" ), \
- options, history_attrs_filename, datasets_attrs_filename, jobs_attrs_filename, \
- jeha.dataset.file_name )
+ options, history_attrs_filename, datasets_attrs_filename, jobs_attrs_filename )
def cleanup_after_job( self, db_session ):
""" Remove temporary directory and attribute files generated during setup for this job. """
--- a/lib/galaxy/tools/actions/history_imp_exp.py
+++ b/lib/galaxy/tools/actions/history_imp_exp.py
@@ -61,7 +61,7 @@ class ExportHistoryToolAction( ToolActio
# Set additional parameters.
incoming[ '__HISTORY_TO_EXPORT__' ] = history.id
- incoming[ '__SET_EXPORT_HISTORY_COMMAND_LINE__' ] = cmd_line
+ incoming[ '__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__' ] = cmd_line
for name, value in tool.params_to_strings( incoming, trans.app ).iteritems():
job.add_parameter( name, value )
1
0
galaxy-dist commit 4990d7b95b72: Bug fix for signature of lib.galaxy_utils.sequence.transform.?NA_reverse_complement method.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1285944317 14400
# Node ID 4990d7b95b7273ba7159bfb2db1931a4e74a980a
# Parent 7b431b0dbc687c1496ef5fba92dd443476d61d60
Bug fix for signature of lib.galaxy_utils.sequence.transform.?NA_reverse_complement method.
--- a/lib/galaxy_utils/sequence/transform.py
+++ b/lib/galaxy_utils/sequence/transform.py
@@ -19,10 +19,10 @@ def DNA_complement( sequence ):
def RNA_complement( sequence ):
return sequence.translate( RNA_COMPLEMENT )
#returns the reverse complement of the sequence
-def DNA_reverse_complement( self, sequence ):
+def DNA_reverse_complement( sequence ):
sequence = reverse( sequence )
return DNA_complement( sequence )
-def RNA_reverse_complement( self, sequence ):
+def RNA_reverse_complement( sequence ):
sequence = reverse( sequence )
return RNA_complement( sequence )
def to_DNA( sequence ):
1
0
galaxy-dist commit ba6f40c5b3d3: Refactored refresh_on_change javascript code to run in galaxy.base when the page is loaded. Fixed bug with autocomplete_select: when switching from a value within refresh_on_change_values to a value outside of it, the page did not refresh. Removed duplicate code from templates.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1285964434 14400
# Node ID ba6f40c5b3d3ee82aa6719f98f58d4285bcbd66d
# Parent 4990d7b95b7273ba7159bfb2db1931a4e74a980a
Refactored refresh_on_change javascript code to run in galaxy.base when the page is loaded. Fixed bug with autocomplete_select: when switching from a value within refresh_on_change_values to a value outside of it, the page did not refresh. Removed duplicate code from templates.
--- a/templates/requests/common/new_request.mako
+++ b/templates/requests/common/new_request.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#new_request" ).submit();
- }
- });
-});
-</script>
-
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
--- a/templates/user/register.mako
+++ b/templates/user/register.mako
@@ -9,30 +9,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#registration" ).submit();
- }
- });
- });
- </script></%def><%
--- a/templates/library/common/folder_info.mako
+++ b/templates/library/common/folder_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%
--- a/static/scripts/packed/galaxy.base.js
+++ b/static/scripts/packed/galaxy.base.js
@@ -1,1 +1,1 @@
-function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var e=$(this);var h=e.find("option").length;if((h<a)||(h>b)){return}if(e.attr("multiple")==true){return}if(e.hasClass("no-autocomplete")){return}var l=e.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",e.attr("name"));c.attr("id",e.attr("id"));c.click(function(){var m=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(m);$(this
).select()});var f=[];var i={};e.children("option").each(function(){var n=$(this).text();var m=$(this).attr("value");f.push(n);i[n]=m;i[m]=m;if(m==l){c.attr("value",n)}});if(l==""||l=="?"){c.attr("value","Click to Search or Select")}if(e.attr("name")=="dbkey"){f=f.sort(naturalSort)}var g={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(f,g);e.replaceWith(c);var k=function(){var n=c.attr("value");var m=i[n];if(m!==null&&m!==undefined){c.attr("value",m)}else{if(l!=""){c.attr("value",l)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(e.attr("refresh_on_change")=="true"){var d=e.attr("refresh_on_change_values");if(d!==undefined){d=d.split(",")}var j=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){refresh=false;if(d!==undefined){for(var m=0;m<d.length;m++){if(n==d[m]){refresh=true;break}}}else{refres
h=true}if(refresh){c.attr("value",n);c.parents("form").submit()}}};c.bind("result",j);c.keyup(function(m){if(m.keyCode===13){j()}});c.keydown(function(m){if(m.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();retur
n})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state"
,k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(t
his).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}function GalaxyAsync(a){this.url_dict={};this.log_action=(a===undefined?false:a)}GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset t
o browser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
+function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this
).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).
trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}funct
ion init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}retu
rn false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show
()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset to br
owser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
--- a/templates/library/common/library_info.mako
+++ b/templates/library/common/library_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%
--- a/templates/tool_form.mako
+++ b/templates/tool_form.mako
@@ -13,43 +13,24 @@ from galaxy.util.expressions import Expr
${h.css( "base", "autocomplete_tagging" )}
${h.js( "jquery", "galaxy.base", "jquery.autocomplete" )}
<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
+$(function() {
+ $(window).bind("refresh_on_change", function() {
+ $(':file').each( function() {
+ var file = $(this);
+ var file_value = file.val();
+ if (file_value) {
+ // disable file input, since we don't want to upload the file on refresh
+ var file_name = $(this).attr("name");
+ file.attr( { name: 'replaced_file_input_' + file_name, disabled: true } );
+ // create a new hidden field which stores the filename and has the original name of the file input
+ var new_file_input = $('<input type="hidden" />');
+ new_file_input.attr( { "value": file_value, "name": file_name } );
+ file.after(new_file_input);
}
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( ':file' ).each( function() {
- var file_value = $( this )[0].value;
- if ( file_value ) {
- //disable file input, since we don't want to upload the file on refresh
- var file_name = $( this )[0].name;
- $( this )[0].name = 'replaced_file_input_' + file_name
- $( this )[0].disable = true;
- //create a new hidden field which stores the filename and has the original name of the file input
- var new_file_input = document.createElement( 'input' );
- new_file_input.type = 'hidden';
- new_file_input.value = file_value;
- new_file_input.name = file_name;
- document.getElementById( 'tool_form' ).appendChild( new_file_input );
- }
- } );
- $( "#tool_form" ).submit();
- }
- });
+ });
+ });
});
+
%if not add_frame.debug:
if( window.name != "galaxy_main" ) {
location.replace( '${h.url_for( controller='root', action='index', tool_id=tool.id )}' );
--- a/templates/requests/common/find.mako
+++ b/templates/requests/common/find.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#find_request" ).submit();
- }
- });
-});
-</script>
-
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
--- a/static/scripts/galaxy.base.js
+++ b/static/scripts/galaxy.base.js
@@ -119,7 +119,7 @@ function make_popup_menus() {
}
// Alphanumeric/natural sort fn
-function naturalSort(a, b){
+function naturalSort(a, b) {
// setup temp-scope variables for comparison evauluation
var re = /(-?[0-9\.]+)/g,
x = a.toString().toLowerCase() || '',
@@ -249,45 +249,24 @@ function replace_big_select_inputs(min_l
$(document).bind("convert_dbkeys", function() { submit_hook(); } );
// If select is refresh on change, mirror this behavior.
- if (select_elt.attr('refresh_on_change') == 'true')
- {
+ if (select_elt.attr('refresh_on_change') == 'true') {
// Get refresh vals.
- var refresh_vals = select_elt.attr('refresh_on_change_values');
- if (refresh_vals !== undefined)
- refresh_vals = refresh_vals.split(",");
-
+ var ref_on_change_vals = select_elt.attr('refresh_on_change_values'),
+ last_selected_value = select_elt.attr("last_selected_value");
+ if (ref_on_change_vals !== undefined)
+ ref_on_change_vals = ref_on_change_vals.split(',');
+
// Function that attempts to refresh based on the value in the text element.
- var try_refresh_fn = function()
- {
- //
- // If value entered can be matched to value, do so and refresh by submitting parent form.
- //
-
+ var try_refresh_fn = function() {
// Get new value and see if it can be matched.
- var cur_value = text_input_elt.attr('value');
- var new_value = select_mapping[cur_value];
- if (new_value !== null && new_value !== undefined)
- {
- // Do refresh if new value is refresh value or if there are no refresh values.
- refresh = false;
- if (refresh_vals !== undefined)
- {
- for (var i= 0; i < refresh_vals.length; i++ )
- if (new_value == refresh_vals[i])
- {
- refresh = true;
- break;
- }
+ var new_value = select_mapping[text_input_elt.attr('value')];
+ if (new_value !== null && new_value !== undefined) {
+ if ($.inArray(new_value, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
}
- else
- // Refresh for all values.
- refresh = true;
-
- if (refresh)
- {
- text_input_elt.attr('value', new_value);
- text_input_elt.parents('form').submit();
- }
+ text_input_elt.attr('value', new_value);
+ $(window).trigger("refresh_on_change");
+ text_input_elt.parents('form').submit();
}
};
@@ -295,15 +274,17 @@ function replace_big_select_inputs(min_l
// case a user may have manually entered a value that needs to be refreshed).
text_input_elt.bind("result", try_refresh_fn);
text_input_elt.keyup( function(e) {
- if ( e.keyCode === 13 ) // Return key
+ if (e.keyCode === 13) { // Return key
try_refresh_fn();
+ }
});
- // Disable return key so that it does not submit the form automatically. This is done because elememnt should behave like a
+ // Disable return key so that it does not submit the form automatically. This is done because element should behave like a
// select (enter = select), not text input (enter = submit form).
text_input_elt.keydown( function(e) {
- if ( e.keyCode === 13 ) // Return key
+ if (e.keyCode === 13) { // Return key
return false;
+ }
});
}
});
@@ -482,13 +463,13 @@ function commatize( number ) {
}
// Reset tool search to start state.
-function reset_tool_search( initValue )
-{
+function reset_tool_search( initValue ) {
// Function may be called in top frame or in tool_menu_frame;
// in either case, get the tool menu frame.
var tool_menu_frame = $("#galaxy_tools").contents();
- if (tool_menu_frame.length == 0)
+ if (tool_menu_frame.length == 0) {
tool_menu_frame = $(document);
+ }
// Remove classes that indicate searching is active.
$(this).removeClass("search_active");
@@ -499,18 +480,18 @@ function reset_tool_search( initValue )
tool_menu_frame.find(".toolTitle").show();
tool_menu_frame.find(".toolPanelLabel").show();
tool_menu_frame.find(".toolSectionWrapper").each( function() {
- if ($(this).attr('id') != 'recently_used_wrapper')
+ if ($(this).attr('id') != 'recently_used_wrapper') {
// Default action.
$(this).show();
- else if ($(this).hasClass("user_pref_visible"))
+ } else if ($(this).hasClass("user_pref_visible")) {
$(this).show();
+ }
});
tool_menu_frame.find("#search-no-results").hide();
// Reset search input.
tool_menu_frame.find("#search-spinner").hide();
- if (initValue)
- {
+ if (initValue) {
var search_input = tool_menu_frame.find("#tool-search-query");
search_input.val("search tools");
search_input.css("font-style", "italic");
@@ -518,20 +499,17 @@ function reset_tool_search( initValue )
}
// Create GalaxyAsync object.
-function GalaxyAsync(log_action)
-{
+var GalaxyAsync = function(log_action) {
this.url_dict = {};
this.log_action = (log_action === undefined ? false : log_action);
}
-GalaxyAsync.prototype.set_func_url = function( func_name, url )
-{
- this.url_dict[func_name] = url;
+GalaxyAsync.prototype.set_func_url = function( func_name, url ) {
+ this.url_dict[func_name] = url;
};
// Set user preference asynchronously.
-GalaxyAsync.prototype.set_user_pref = function( pref_name, pref_value )
-{
+GalaxyAsync.prototype.set_user_pref = function( pref_name, pref_value ) {
// Get URL.
var url = this.url_dict[arguments.callee];
if (url === undefined) { return false; }
@@ -544,8 +522,7 @@ GalaxyAsync.prototype.set_user_pref = fu
};
// Log user action asynchronously.
-GalaxyAsync.prototype.log_user_action = function( action, context, params )
-{
+GalaxyAsync.prototype.log_user_action = function( action, context, params ) {
if (!this.log_action) { return; }
// Get URL.
@@ -588,7 +565,24 @@ GalaxyAsync.prototype.log_user_action =
});
+
$(document).ready( function() {
+ $("select[refresh_on_change='true']").change( function() {
+ var select_field = $(this),
+ select_val = select_field.val(),
+ refresh = false,
+ ref_on_change_vals = select_field.attr("refresh_on_change_values");
+ if (ref_on_change_vals) {
+ ref_on_change_vals = ref_on_change_vals.split(',');
+ var last_selected_value = select_field.attr("last_selected_value");
+ if ($.inArray(select_val, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
+ }
+ }
+ $(window).trigger("refresh_on_change");
+ select_field.get(0).form.submit();
+ });
+
// Links with confirmation
$( "a[confirm]" ).click( function() {
return confirm( $(this).attr("confirm") );
--- a/templates/requests/common/edit_request.mako
+++ b/templates/requests/common/edit_request.mako
@@ -5,31 +5,6 @@
${render_msg( message, status )}
%endif
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_request" ).submit();
- }
- });
-});
-</script>
-
<br/><br/><ul class="manage-table-actions">
--- a/templates/webapps/galaxy/user/info.mako
+++ b/templates/webapps/galaxy/user/info.mako
@@ -2,31 +2,6 @@
<%namespace file="/user/info.mako" import="render_user_info" /><%namespace file="/message.mako" import="render_msg" />
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#user_info" ).submit();
- }
- });
-});
-</script>
-
%if message:
${render_msg( message, status )}
%endif
--- a/templates/admin/forms/edit_form.mako
+++ b/templates/admin/forms/edit_form.mako
@@ -6,31 +6,6 @@
%endif
<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_form" ).submit();
- }
- });
-});
-</script>
-
-<script type="text/javascript">
$(document).ready(function(){
//hide the all of the element with class msg_body
$(".msg_body").hide();
--- a/templates/library/common/upload.mako
+++ b/templates/library/common/upload.mako
@@ -14,31 +14,6 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
-
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#upload_library_dataset" ).submit();
- }
- });
- });
- </script></%def><%def name="stylesheets()">
--- a/templates/library/common/ldda_edit_info.mako
+++ b/templates/library/common/ldda_edit_info.mako
@@ -6,30 +6,6 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def><%def name="stylesheets()">
--- a/templates/library/common/library_dataset_info.mako
+++ b/templates/library/common/library_dataset_info.mako
@@ -4,30 +4,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def>
%if library_dataset == library_dataset.library_dataset_dataset_association.library_dataset:
--- a/templates/requests/common/show_request.mako
+++ b/templates/requests/common/show_request.mako
@@ -19,29 +19,6 @@
<%def name="javascripts()">
${parent.javascripts()}
<script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#show_request" ).submit();
- }
- });
- });
-
function showContent(vThis)
{
// http://www.javascriptjunkie.com
--- a/templates/library/common/select_template.mako
+++ b/templates/library/common/select_template.mako
@@ -5,30 +5,6 @@
from galaxy.web.form_builder import CheckboxField
inheritable_check_box = CheckboxField( 'inheritable' )
%>
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#select_template" ).submit();
- }
- });
-});
-</script><br/><br/><ul class="manage-table-actions">
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -25,30 +25,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( "#edit_info" ).submit();
- }
- });
- });
- </script></%def>
%if current_version:
1
0
galaxy-dist commit 06d6ce09e0f1: Fix for checking whether the current user can access a specified library item.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1286207081 14400
# Node ID 06d6ce09e0f152d38c632dae7ccba9337f25bab5
# Parent 8774252ac0531343953428a44a5a2b07e6fe514e
Fix for checking whether the current user can access a specified library item.
--- a/lib/galaxy/web/controllers/library_common.py
+++ b/lib/galaxy/web/controllers/library_common.py
@@ -2246,22 +2246,30 @@ class LibraryCommon( BaseController, Use
message=message,
status=status ) )
def _check_access( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
+ can_access = True
if isinstance( item, trans.model.HistoryDatasetAssociation ):
- # Deny that the dataset exists if the user does not have the DATASET_ACCESS permission.
- if not item or \
- not ( trans.app.security_agent.can_access_dataset( current_user_roles, item.dataset ) and item.history.user==trans.user ):
- message = "Invalid history dataset id (%s) specified." % str( item.id )
- return trans.response.send_redirect( web.url_for( controller='library_common',
- action='browse_library',
- cntrller=cntrller,
- id=library_id,
- show_deleted=show_deleted,
- message=util.sanitize_text( message ),
- status='error' ) )
- # Deny that the item exists if the user does not have the LIBRARY_ACCESS permission on its parent library,
- # or if they are not able to access the item itself.
- if not item or ( not is_admin and not trans.app.security_agent.can_access_library_item( current_user_roles, item, trans.user ) ):
- message = "Invalid item id (%s) specified." % str( item.id )
+ # Make sure the user has the DATASET_ACCESS permission on the history_dataset_association.
+ if not item:
+ message = "Invalid history dataset (%s) specified." % str( item )
+ can_access = False
+ elif not trans.app.security_agent.can_access_dataset( current_user_roles, item.dataset ) and item.history.user==trans.user:
+ message = "You do not have permission to access the history dataset with id (%s)." % str( item.id )
+ can_access = False
+ else:
+ # Make sure the user has the LIBRARY_ACCESS permission on the library item.
+ if not item:
+ message = "Invalid library item (%s) specified." % str( item )
+ can_access = False
+ elif not ( is_admin or trans.app.security_agent.can_access_library_item( current_user_roles, item, trans.user ) ):
+ if isinstance( item, trans.model.Library ):
+ item_type = 'data library'
+ elif isinstance( item, trans.model.LibraryFolder ):
+ item_type = 'folder'
+ else:
+ item_type = '(unknown item type)'
+ message = "You do not have permission to access the %s with id (%s)." % ( item_type, str( item.id ) )
+ can_access = False
+ if not can_access:
if cntrller == 'api':
return 400, message
if isinstance( item, trans.model.Library ):
@@ -2282,7 +2290,7 @@ class LibraryCommon( BaseController, Use
def _check_add( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
# Deny access if the user is not an admin and does not have the LIBRARY_ADD permission.
if not ( is_admin or trans.app.security_agent.can_add_library_item( current_user_roles, item ) ):
- message = "You are not authorized to add an item to '%s'." % item.name
+ message = "You are not authorized to add an item to (%s)." % item.name
# Redirect to the real parent library since we know we have access to it.
if cntrller == 'api':
return 403, message
@@ -2300,7 +2308,7 @@ class LibraryCommon( BaseController, Use
if not ( is_admin or \
( trans.app.security_agent.can_manage_library_item( current_user_roles, item ) and
trans.app.security_agent.can_manage_dataset( current_user_roles, library_dataset.library_dataset_dataset_association.dataset ) ) ):
- message = "You are not authorized to manage permissions on library dataset '%s'." % library_dataset.name
+ message = "You are not authorized to manage permissions on library dataset (%s)." % library_dataset.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
@@ -2312,7 +2320,7 @@ class LibraryCommon( BaseController, Use
status='error' ) )
# Deny access if the user is not an admin and does not have the LIBRARY_MANAGE permission.
if not ( is_admin or trans.app.security_agent.can_manage_library_item( current_user_roles, item ) ):
- message = "You are not authorized to manage permissions on '%s'." % item.name
+ message = "You are not authorized to manage permissions on (%s)." % item.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
@@ -2325,7 +2333,7 @@ class LibraryCommon( BaseController, Use
def _check_modify( self, trans, cntrller, is_admin, item, current_user_roles, use_panels, library_id, show_deleted ):
# Deny modification if the user is not an admin and does not have the LIBRARY_MODIFY permission.
if not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, item ) ):
- message = "You are not authorized to modify '%s'." % item.name
+ message = "You are not authorized to modify (%s)." % item.name
if cntrller == 'api':
return 403, message
return trans.response.send_redirect( web.url_for( controller='library_common',
1
0
galaxy-dist commit 51aaa9eac818: Updates to LPS tool help text.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Richard Burhans <burhans(a)bx.psu.edu>
# Date 1285871526 14400
# Node ID 51aaa9eac8182b25dbbffd1de902b78c916cb0f5
# Parent ddf70ed04c8b24f9095d4b16f6041907f7c6d428
Updates to LPS tool help text.
--- a/tools/human_genome_variation/lps.xml
+++ b/tools/human_genome_variation/lps.xml
@@ -120,7 +120,7 @@
<param name="c1" type="float" value="1e-3" help="Parameter defining the margin by which the first-order step is required to decrease before being taken."><validator type="in_range" message="0.0 < c1 < 1.0" min="0.0" max="1.0"/></param>
- <param name="maxIter" type="integer" value="10000" label="Maximum number of iterations"/>
+ <param name="maxIter" type="integer" value="10000" label="Maximum number of iterations" help="Terminate with error if we exceed this."/><param name="stopTol" type="float" value="1e-6" label="Stop tolerance" help="Convergence tolerance for target value of lambda."/><param name="intermediateTol" type="float" value="1e-4" label="Intermediate tolerance" help="Convergence tolerance for intermediate values of lambda."/><param name="finalOnly" type="select" format="integer" label="Final only">
@@ -132,8 +132,8 @@
</inputs><outputs>
- <data name="output_file" format="tabular"/>
- <data name="log_file" format="txt"/>
+ <data name="output_file" format="tabular" label="${tool.name} on ${on_string}: results"/>
+ <data name="log_file" format="txt" label="${tool.name} on ${on_string}: log"/></outputs><requirements>
@@ -188,28 +188,52 @@ There is a second output dataset (a log)
**What it does**
-The LASSO-Patternsearch algorithm efficiently identifies patterns of multiple
-dichotomous risk factors for outcomes of interest in demographic and genomic
-studies. It is designed for the case where there is a possibly very large
-number of candidate patterns but it is believed that only a relatively small
-number are important.
+The LASSO-Patternsearch algorithm fits your dataset to an L1-regularized
+logistic regression model. A benefit of using L1-regularization is
+that it typically yields a weight vector with relatively few non-zero
+coefficients.
-If the "risky" direction (with respect to the outcome of interest) is known
-for all or almost all variables, the results are readily interpretable.
-If the risky direction is coded correctly for all of the variables, the
-fitted model can be expected to be sparser than that for any other coding.
-However, if a small number of risky variables are coded in the "wrong" way,
-this usually can be detected.
+For example, say you have a dataset containing M rows (subjects)
+and N columns (attributes) where one of these N attributes is binary,
+indicating whether or not the subject has some property of interest P.
+In simple terms, LPS calculates a weight for each of the other attributes
+in your dataset. This weight indicates how "relevant" that attribute
+is for predicting whether or not a given subject has property P.
+The L1-regularization causes most of these weights to be equal to zero,
+which means LPS will find a "small" subset of the remaining N-1 attributes
+in your dataset that can be used to predict P.
-The input file is tabular with rows representing individuals and columns
-representing variables. There is one special column, the label column,
-containing +1 for cases, and -1 for controls. The other columns should be
-0 or 1, with 1 representing the expected riskier value for each variable.
-For instance with SNPs the column would have a 1 if the individual (row)
-has the risk allele, or a 0 otherwise. The output file has one line for each
-variable, or "feature" in the input file, with a single column containing the
-calculated score for that feature. The log file provides information about
-the input and the internal values obtained during the computation process.
+In other words, LPS can be used for feature selection.
+
+The input dataset is tabular, and must contain a label column which
+indicates whether or not a given row has property P. In the current
+version of this tool, P must be encoded using +1 and -1. The Lambda_fac
+parameter ranges from 0 to 1, and controls how sparse the weight
+vector will be. At the low end, when Lambda_fac = 0, there will be
+no regularization. At the high end, when Lambda_fac = 1, there will be
+"too much" regularization, and all of the weights will equal zero.
+
+The LPS tool creates two output datasets. The first, called the results
+file, is a tabular dataset containing one column of weights for each
+value of the regularization parameter lambda that was tried. The weight
+columns are in order from left to right by decreasing values of lambda.
+The first N-1 rows in each column are the weights for the N-1 attributes
+in your input dataset. The final row is a constant, the intercept.
+
+Let **x** be a row from your input dataset and let **b** be a column
+from the results file. To compute the probability that row **x** has
+a label value of +1:
+
+ Probability(row **x** has label value = +1) = 1 / [1 + exp{**x** \* **b**\[1..n-1\] + **b**\[n\]}]
+
+where **x** \* **b**\[1..n-1\] represents matrix multiplication.
+
+The second output dataset, called the log file, is a text file which
+contains additional data about the fitted L1-regularized logistic
+regression model. These data include the number of features, the
+computed value of lambda_max, the actual values of lambda used, the
+optimal values of the log-likelihood and regularized log-likelihood
+functions, the number of non-zeros, and the number of iterations.
Website: http://pages.cs.wisc.edu/~swright/LPS/
@@ -235,11 +259,16 @@ Website: http://pages.cs.wisc.edu/~swrig
- output log file::
- Data set has 100 vectors with 50 features
- calculateLambdaMax: n=50, m=100, m+=50, m-=50
- computed value of lambda_max: 5.0000e-01
- lambda=2.50e-02 solution has 10 nonzeros.
- It required 546 iterations
+ Data set has 100 vectors with 50 features.
+ calculateLambdaMax: n=50, m=100, m+=50, m-=50
+ computed value of lambda_max: 5.0000e-01
+
+ lambda=2.96e-02 solution:
+ optimal log-likelihood function value: 6.46e-01
+ optimal *regularized* log-likelihood function value: 6.79e-01
+ number of nonzeros at the optimum: 5
+ number of iterations required: 43
+ etc.
-----
--- a/test-data/lps_arrhythmia_log.txt
+++ b/test-data/lps_arrhythmia_log.txt
@@ -1,5 +1,4 @@
-Data set has 452 vectors with 279 features
-
+Data set has 452 vectors with 279 features.
Sampled 452 points out of 452
calculateLambdaMax: n=279, m=452, m+=245, m-=207
computed value of lambda_max: 1.8231e+02
@@ -52,36 +51,147 @@ iter 1, gpnorm=1.7618e-09, nonzero=
**** Initial point: nz=1, f= 0.689609056404, lambda= 5.469e+00
iter 1, gpnorm=1.7618e-09, nonzero= 1 ( 0.4%), function=6.896090564044e-01, alpha=3.2768e-01
Function evals = 2, Gradient evals = 1.0
-lambda=1.64e+02 solution has 1 nonzeros.
-It required 6 iterations
-lambda=1.17e+02 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.64e+02 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 6
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=8.31e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.17e+02 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=5.91e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=8.31e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=4.21e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=5.91e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=3.00e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=4.21e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=2.13e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=3.00e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=1.52e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=2.13e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=1.08e+01 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.52e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=7.68e+00 solution has 1 nonzeros.
-It required 1 iterations
+lambda=1.08e+01 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
-lambda=5.47e+00 solution has 1 nonzeros.
-It required 1 iterations
+lambda=7.68e+00 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
+lambda=5.47e+00 solution:
+ optimal log-likelihood function value: 6.90e-01
+ optimal *regularized* log-likelihood function value: 6.90e-01
+ number of non-zeros at the optimum: 1
+ number of iterations required: 1
+ prediction using this solution:
+ 54.20% of vectors were correctly predicted.
+ 245 correctly predicted.
+ 207 in +1 predicted to be in -1.
+ 0 in -1 predicted to be in +1.
+ 0 in +1 with 50/50 chance.
+ 0 in -1 with 50/50 chance.
+
1
0
galaxy-dist commit 8774252ac053: sample_tracking: migration script to modify the 'file_path' field type in 'sample_dataset' table to 'TEXT' so that it can support large file paths exceeding 255 characters
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1286199759 14400
# Node ID 8774252ac0531343953428a44a5a2b07e6fe514e
# Parent e32d77e1f47b1fc94b3e7511094e4b0d760f1e97
sample_tracking: migration script to modify the 'file_path' field type in 'sample_dataset' table to 'TEXT' so that it can support large file paths exceeding 255 characters
--- /dev/null
+++ b/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py
@@ -0,0 +1,59 @@
+"""
+Migration script to modify the 'file_path' field type in 'sample_dataset' table
+to 'TEXT' so that it can support large file paths exceeding 255 characters
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+from sqlalchemy.exc import *
+
+from galaxy.model.custom_types import *
+from galaxy.util.json import from_json_string, to_json_string
+
+import datetime
+now = datetime.datetime.utcnow
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+ try:
+ SampleDataset_table = Table( "sample_dataset", metadata, autoload=True )
+ except NoSuchTableError, e:
+ SampleDataset_table = None
+ log.debug( "Failed loading table 'sample_dataset'" )
+
+ if SampleDataset_table:
+ cmd = "SELECT id, file_path FROM sample_dataset"
+ result = db_session.execute( cmd )
+ filepath_dict = {}
+ for r in result:
+ id = int(r[0])
+ filepath_dict[id] = r[1]
+ # remove the 'file_path' column
+ try:
+ SampleDataset_table.c.file_path.drop()
+ except Exception, e:
+ log.debug( "Deleting column 'file_path' from the 'sample_dataset' table failed: %s" % ( str( e ) ) )
+ # create the column again
+ try:
+ col = Column( "file_path", TEXT )
+ col.create( SampleDataset_table )
+ assert col is SampleDataset_table.c.file_path
+ except Exception, e:
+ log.debug( "Creating column 'file_path' in the 'sample_dataset' table failed: %s" % ( str( e ) ) )
+
+ for id, file_path in filepath_dict.items():
+ cmd = "update sample_dataset set file_path='%s' where id=%i" % (file_path, id)
+ db_session.execute( cmd )
+
+def downgrade():
+ pass
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -620,7 +620,7 @@ SampleDataset.table = Table('sample_data
Column( "update_time", DateTime, default=now, onupdate=now ),
Column( "sample_id", Integer, ForeignKey( "sample.id" ), index=True ),
Column( "name", TrimmedString( 255 ), nullable=False ),
- Column( "file_path", TrimmedString( 255 ), nullable=False ),
+ Column( "file_path", TEXT ),
Column( "status", TrimmedString( 255 ), nullable=False ),
Column( "error_msg", TEXT ),
Column( "size", TrimmedString( 255 ) ) )
1
0
galaxy-dist commit e32d77e1f47b: Make links in split menubuttons take the link instead of popping up the menu options. Use new menubutton style in data libraries and sharing_base.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1286147560 14400
# Node ID e32d77e1f47b1fc94b3e7511094e4b0d760f1e97
# Parent ba6f40c5b3d3ee82aa6719f98f58d4285bcbd66d
Make links in split menubuttons take the link instead of popping up the menu options. Use new menubutton style in data libraries and sharing_base.
--- a/templates/sharing_base.mako
+++ b/templates/sharing_base.mako
@@ -241,8 +241,7 @@
<% user = association.user %><tr><td>
- ${user.email}
- <a id="user-${i}-popup" class="popup-arrow" style="display: none;">▼</a>
+ <div class="menubutton popup" id="user-${i}-popup">${user.email}</div></td><td><div popupmenu="user-${i}-popup">
--- a/static/scripts/packed/galaxy.base.js
+++ b/static/scripts/packed/galaxy.base.js
@@ -1,1 +1,1 @@
-function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).click(c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=
g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this
).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).
trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}funct
ion init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}retu
rn false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show
()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-url"),dataType:"html",error:function(){alert("Could not add this dataset to br
owser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
+function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return fa
lse};$(b).bind("click",c)}function make_popupmenu(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");if(obj_length(b)<=0){$("<li/>").html("No options").appendTo(a)}$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));a.find("a").bind("click",function(b){b.stopPropagation();return true});make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}funct
ion naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=g.toString().toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).split(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")==true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).
val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m==""||m=="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!=""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_dbkeys",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(n!==null&&n!==undefined){if
($.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!=""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}}
)}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");i
f(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length==0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrappe
r"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(".trackster-add").live("click",function(){var b=this,a=$(this);$.ajax({url:a.attr("data-
url"),dataType:"html",error:function(){alert("Could not add this dataset to browser.")},success:function(c){var d=window.parent;d.show_modal("Add to Browser:",c,{"Insert into selected":function(){$(d.document).find("input[name=id]:checked").each(function(){var e=$(this).val();d.location=a.attr("action-url")+"&id="+e})},"Insert into new browser":function(){d.location=a.attr("new-url")},Cancel:function(){d.hide_modal()}})}})});$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500)});
--- a/templates/library/common/browse_library.mako
+++ b/templates/library/common/browse_library.mako
@@ -50,7 +50,7 @@
<%def name="grid_javascripts()"><script type="text/javascript">
- $( document ).ready( function () {
+ $(function () {
$("#library-grid").each( function() {
// Recursively fill in children and descendents of each row
var process_row = function( q, parents ) {
@@ -70,7 +70,7 @@
// remembering folder states, we'll need something
// more sophisticated here.
var visible = false;
- $(q).find( "span.expandLink").click( function() {
+ var expand_fn = function() {
if ( visible ) {
descendents.hide();
descendents.removeClass( "expanded" );
@@ -81,7 +81,9 @@
q.addClass( "expanded" );
visible = true;
}
- });
+ };
+ $(q).find("span.expandLink").click(expand_fn);
+ $(q).find("span.expandLink a").click(expand_fn);
// Check/uncheck boxes in subfolders.
q.children( "td" ).children( "input[type=checkbox]" ).click( function() {
if ( $(this).is(":checked") ) {
@@ -103,6 +105,17 @@
});
});
});
+
+ // For view info links, use a modal popup
+ /*$(".view-info").live("click", function() {
+ $.get( $(this).attr("href"), function(info) {
+ show_modal("View Information", info, {
+ "Close": function() { hide_modal(); }
+ });
+ });
+ return false;
+ });*/
+
function checkForm() {
if ( $("select#action_on_datasets_select option:selected").text() == "delete" ) {
if ( confirm( "Click OK to delete these datasets?" ) ) {
@@ -198,55 +211,56 @@
%endif
id="libraryItem-${ldda.id}"><td style="padding-left: ${pad+20}px;">
+ <input style="float: left;" type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}"
%if selected:
- <input type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}" checked/>
- %else:
- <input type="checkbox" name="ldda_ids" value="${trans.security.encode_id( ldda.id )}"/>
+ checked="checked"
%endif
+ />
%if ldda.library_dataset.deleted:
<span class="libraryItem-error">
- %endif
- <a href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">${ldda.name[:50]}</a>
- %if ldda.library_dataset.deleted:
- </span>
- %endif
- %if not library.deleted:
- <a id="dataset-${ldda.id}-popup" class="popup-arrow" style="display: none;">▼</a>
- <div popupmenu="dataset-${ldda.id}-popup">
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
- %else:
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and not info_association:
- <a class="action-button" href="${h.url_for( controller='library_common', action='add_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add template</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and info_association:
- <a class="action-button" href="${h.url_for( controller='library_common', action='edit_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit template</a>
- <a class="action-button" href="${h.url_for( controller='library_common', action='delete_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Delete template</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_manage:
- %if not trans.app.security_agent.dataset_is_public( ldda.dataset ):
- <a class="action-button" href="${h.url_for( controller='library_common', action='make_library_item_public', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_type='ldda', id=trans.security.encode_id( ldda.dataset.id ), use_panels=use_panels, show_deleted=show_deleted )}">Make public</a>
- %endif
- <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_permissions', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit permissions</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
- <a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), replace_id=trans.security.encode_id( library_dataset.id ), show_deleted=show_deleted )}">Upload a new version of this dataset</a>
- %endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data:
- <a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a>
- <a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels )}">Download this dataset</a>
- %endif
- %if can_modify:
- %if not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.deleted:
- <a class="action-button" confirm="Click OK to delete dataset '${ldda.name}'." href="${h.url_for( controller='library_common', action='delete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Delete this dataset</a>
- %elif not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.purged and ldda.library_dataset.deleted:
- <a class="action-button" href="${h.url_for( controller='library_common', action='undelete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Undelete this dataset</a>
- %endif
- %endif
- </div>
- %endif
+ %endif
+ <div style="float: left; margin-left: 1px;" class="menubutton split popup" id="dataset-${ldda.id}-popup">
+ <a class="view-info" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">${ldda.name[:50]}</a>
+ </div>
+ %if ldda.library_dataset.deleted:
+ </span>
+ %endif
+ %if not library.deleted:
+ <div popupmenu="dataset-${ldda.id}-popup">
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
+ %else:
+ <a class="action-button" class="view-info" href="${h.url_for( controller='library_common', action='ldda_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and not info_association:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='add_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add template</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify and info_association:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='edit_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit template</a>
+ <a class="action-button" href="${h.url_for( controller='library_common', action='delete_template', cntrller=cntrller, item_type='ldda', library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), ldda_id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Delete template</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_manage:
+ %if not trans.app.security_agent.dataset_is_public( ldda.dataset ):
+ <a class="action-button" href="${h.url_for( controller='library_common', action='make_library_item_public', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_type='ldda', id=trans.security.encode_id( ldda.dataset.id ), use_panels=use_panels, show_deleted=show_deleted )}">Make public</a>
+ %endif
+ <a class="action-button" href="${h.url_for( controller='library_common', action='ldda_permissions', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit permissions</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), replace_id=trans.security.encode_id( library_dataset.id ), show_deleted=show_deleted )}">Upload a new version of this dataset</a>
+ %endif
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a>
+ <a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels )}">Download this dataset</a>
+ %endif
+ %if can_modify:
+ %if not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.deleted:
+ <a class="action-button" confirm="Click OK to delete dataset '${ldda.name}'." href="${h.url_for( controller='library_common', action='delete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Delete this dataset</a>
+ %elif not library.deleted and not branch_deleted( folder ) and not ldda.library_dataset.purged and ldda.library_dataset.deleted:
+ <a class="action-button" href="${h.url_for( controller='library_common', action='undelete_library_item', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), item_id=trans.security.encode_id( library_dataset.id ), item_type='library_dataset', show_deleted=show_deleted )}">Undelete this dataset</a>
+ %endif
+ %endif
+ </div>
+ %endif
</td><td id="libraryItemInfo">${render_library_item_info( ldda )}</td><td>${uploaded_by}</td>
@@ -266,12 +280,12 @@
if root_folder:
pad = folder_pad
- expander = "/static/images/silk/resultset_bottom.png"
- folder_img = "/static/images/silk/folder_page.png"
+ expander = h.url_for("/static/images/silk/resultset_bottom.png")
+ folder_img = h.url_for("/static/images/silk/folder_page.png")
else:
pad = folder_pad + 20
- expander = "/static/images/silk/resultset_next.png"
- folder_img = "/static/images/silk/folder.png"
+ expander = h.url_for("/static/images/silk/resultset_next.png")
+ folder_img = h.url_for("/static/images/silk/folder.png")
if created_ldda_ids:
created_ldda_ids = util.listify( created_ldda_ids )
if str( folder.id ) in hidden_folder_ids:
@@ -311,14 +325,16 @@
%if folder.deleted:
<span class="libraryItem-error">
%endif
- <span class="expandLink"><span class="rowIcon"></span><a style="margin-left: 5px;" href="javascript:void(0);">${folder.name}</a></span>
+ <span class="expandLink"><span class="rowIcon"></span>
+ <div style="float: left; margin-left: 2px;" class="menubutton split popup" id="folder_img-${folder.id}-popup">
+ <a href="javascript:void(0);">${folder.name}</a>
+ </div>
%if folder.deleted:
</span>
%endif
%if not branch_deleted( folder ):
%if not library.deleted:
- <a id="folder_img-${folder.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="folder_img-${folder.id}-popup">
%if not branch_deleted( folder ) and can_add:
<a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), use_panels=use_panels, show_deleted=show_deleted )}">Add datasets</a>
@@ -328,7 +344,7 @@
%if can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
%else:
- <a class="action-button" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
+ <a class="action-button" class="view-info" href="${h.url_for( controller='library_common', action='folder_info', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">View information</a>
%endif
%endif
%if not branch_deleted( folder ) and can_modify and not info_association:
--- a/static/june_2007_style/blue/library.css
+++ b/static/june_2007_style/blue/library.css
@@ -13,7 +13,7 @@ pre.peek{background:white;color:black;wi
pre.peek th{color:white;background:#023858;}
span.expandLink{padding-left:20px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png) no-repeat;}
.folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png) no-repeat;}
-.folderRow span.rowIcon{width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png);}
+.folderRow span.rowIcon{float:left;width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png);}
.libraryItem-error{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AA6666;background:#FFCCCC;}
.libraryItem-queued{margin-right:2px;padding:0 2px 0 2px;border:1px solid #888888;background:#EEEEEE;}
.libraryItem-running{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AAAA66;background:#FFFFCC;}
--- a/static/scripts/galaxy.base.js
+++ b/static/scripts/galaxy.base.js
@@ -43,7 +43,7 @@ function attach_popupmenu( button_elemen
$("#popup-helper").unbind( "click.popupmenu" ).hide();
// $(document).unbind( "click.popupmenu" );
};
- var click = function( e ) {
+ var click_handler = function( e ) {
// var o = $(button_element).offset();
$("#popup-helper").bind( "click.popupmenu", clean ).show();
// $(document).bind( "click.popupmenu", clean );
@@ -62,7 +62,7 @@ function attach_popupmenu( button_elemen
} );
return false;
};
- $( button_element ).click( click );
+ $(button_element).bind("click", click_handler);
}
function make_popupmenu( button_element, options ) {
@@ -112,6 +112,10 @@ function make_popup_menus() {
};
});
var b = $( "#" + $(this).attr( 'popupmenu' ) );
+ b.find("a").bind("click", function(e) {
+ e.stopPropagation(); // Stop bubbling so clicking on the link goes through
+ return true;
+ });
make_popupmenu( b, options );
$(this).remove();
b.addClass( "popup" ).show();
--- a/static/june_2007_style/library.css.tmpl
+++ b/static/june_2007_style/library.css.tmpl
@@ -76,6 +76,7 @@ span.expandLink {
}
.folderRow span.rowIcon {
+ float: left;
width: 16px;
height: 16px;
display: inline-block;
--- a/templates/library/common/library_info.mako
+++ b/templates/library/common/library_info.mako
@@ -34,9 +34,10 @@
<div class="toolForm"><div class="toolFormTitle">
- <a href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}"><b>${library.name[:50]}</b></a>
+ <div class="menubutton split popup" id="library-${library.id}-popup">
+ <a href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">${library.name[:50]}</a>
+ </div>
%if can_add or can_modify or can_manage:
- <a id="library-${library.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="library-${library.id}-popup">
%if not library.deleted:
%if can_add and not library.info_association:
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -46,9 +46,8 @@
<div class="toolForm"><div class="toolFormTitle">
- Information about ${ldda.name}
+ Information about <div class="menubutton popup" id="dataset-${ldda.id}-popup">${ldda.name}</div>
%if not library.deleted and not branch_deleted( ldda.library_dataset.folder ) and not ldda.library_dataset.deleted:
- <a id="dataset-${ldda.id}-popup" class="popup-arrow" style="display: none;">▼</a><div popupmenu="dataset-${ldda.id}-popup">
%if can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), id=trans.security.encode_id( ldda.id ), use_panels=use_panels, show_deleted=show_deleted )}">Edit information</a>
1
0