[hg] galaxy 1573: Add some missing 'url_for's.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[hg] galaxy 1573: Add some missing 'url_for's.

Nate Coraor (nate@bx.psu.edu)
details:   http://www.bx.psu.edu/hg/galaxy/rev/c278ca8f9b73
changeset: 1573:c278ca8f9b73
user:      Dan Blankenberg <[hidden email]>
date:      Fri Oct 24 11:41:23 2008 -0400
description:
Add some missing 'url_for's.

4 file(s) affected in this change:

lib/galaxy/web/controllers/root.py
lib/galaxy/web/controllers/tool_runner.py
templates/tool_form.tmpl
templates/workflow/editor.mako

diffs (80 lines):

diff -r f2ce31c74346 -r c278ca8f9b73 lib/galaxy/web/controllers/root.py
--- a/lib/galaxy/web/controllers/root.py Thu Oct 23 15:19:48 2008 -0400
+++ b/lib/galaxy/web/controllers/root.py Fri Oct 24 11:41:23 2008 -0400
@@ -114,7 +114,7 @@
     ## ---- Dataset display / editing ----------------------------------------
 
     @web.expose
-    def display(self, trans, id=None, hid=None, tofile=None, toext=".txt"):
+    def display( self, trans, id=None, hid=None, tofile=None, toext=".txt", **kwd ):
         """
         Returns data directly into the browser.
         Sets the mime-type according to the extension
diff -r f2ce31c74346 -r c278ca8f9b73 lib/galaxy/web/controllers/tool_runner.py
--- a/lib/galaxy/web/controllers/tool_runner.py Thu Oct 23 15:19:48 2008 -0400
+++ b/lib/galaxy/web/controllers/tool_runner.py Fri Oct 24 11:41:23 2008 -0400
@@ -30,7 +30,7 @@
     def index(self, trans, tool_id=None, from_noframe=None, **kwd):
         # No tool id passed, redirect to main page
         if tool_id is None:
-            return trans.response.send_redirect( "/static/welcome.html" )
+            return trans.response.send_redirect( url_for( "/static/welcome.html" ) )
         # Load the tool
         toolbox = self.get_toolbox()
         tool = toolbox.tools_by_id.get( tool_id, None )
diff -r f2ce31c74346 -r c278ca8f9b73 templates/tool_form.tmpl
--- a/templates/tool_form.tmpl Thu Oct 23 15:19:48 2008 -0400
+++ b/templates/tool_form.tmpl Fri Oct 24 11:41:23 2008 -0400
@@ -9,7 +9,7 @@
 <title>Galaxy</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <link href="$h.url_for('/static/style/base.css')" rel="stylesheet" type="text/css" />
-<script type='text/javascript' src="/static/scripts/jquery.js"> </script>
+<script type='text/javascript' src="$h.url_for('/static/scripts/jquery.js')"> </script>
 <script type="text/javascript">
 jQuery( function() {
     jQuery( "select[@refresh_on_change='true']").change( function() {
diff -r f2ce31c74346 -r c278ca8f9b73 templates/workflow/editor.mako
--- a/templates/workflow/editor.mako Thu Oct 23 15:19:48 2008 -0400
+++ b/templates/workflow/editor.mako Fri Oct 24 11:41:23 2008 -0400
@@ -3,7 +3,7 @@
 <%def name="title()">Galaxy Workflow Editor</%def>
 
 <%def name="late_javascripts()">
-    <script type='text/javascript' src="/static/scripts/galaxy.panels.js"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/galaxy.panels.js')}"> </script>
     <script type="text/javascript">
         ensure_dd_helper();
         make_left_panel( $("#left"), $("#center"), $("#left-border" ) );
@@ -17,16 +17,16 @@
     ${parent.javascripts()}
     
     <!--[if IE]>
-    <script type='text/javascript' src="/static/scripts/excanvas.js"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"> </script>
     <![endif]-->
-    <script type='text/javascript' src="/static/scripts/jquery.js"> </script>
-    <script type='text/javascript' src="/static/scripts/jquery.ui.js"> </script>
-    <script type='text/javascript' src="/static/scripts/galaxy.ui.scrollPanel.js"> </script>
-    <script type='text/javascript' src="/static/scripts/jquery.hoverIntent.js"> </script>
-    <script type='text/javascript' src="/static/scripts/jquery.form.js"> </script>
-    <script type='text/javascript' src="/static/scripts/jquery.json.js"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/jquery.js')}"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/jquery.ui.js')}"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/galaxy.ui.scrollPanel.js')}"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/jquery.hoverIntent.js')}"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/jquery.form.js')}"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/jquery.json.js')}"> </script>
 
-    <script type='text/javascript' src="/static/scripts/galaxy.workflow_editor.canvas.js"> </script>
+    <script type='text/javascript' src="${h.url_for('/static/scripts/galaxy.workflow_editor.canvas.js')}"> </script>
     
     <!--[if lt IE 7]>
     <script type='text/javascript'>
@@ -587,4 +587,4 @@
     <div class="unified-panel-body" style="overflow: auto;">
         <div id="right-content"></div>
     </div>
-</%def>
\ No newline at end of file
+</%def>