mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Cache defeat for css/js
This commit is contained in:
@@ -27,14 +27,17 @@ def css( *args ):
|
||||
Take a list of stylesheet names (no extension) and return appropriate string
|
||||
of link tags.
|
||||
|
||||
TODO: This has a hardcoded "?v=1" to defeat caching. This should be done
|
||||
TODO: This has a hardcoded "?v=2" to defeat caching. This should be done
|
||||
in a better way.
|
||||
"""
|
||||
return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=1" ) for name in args ] )
|
||||
return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=2" ) for name in args ] )
|
||||
|
||||
def js( *args ):
|
||||
"""
|
||||
Take a list of javascript names (no extension) and return appropriate
|
||||
string of script tags.
|
||||
|
||||
TODO: This has a hardcoded "?v=2" to defeat caching. This should be done
|
||||
in a better way.
|
||||
"""
|
||||
return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js" ) for name in args ] )
|
||||
return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=2" ) for name in args ] )
|
||||
|
||||
+1
-4
@@ -27,9 +27,6 @@ ${self.javascripts()}
|
||||
## <!--[if lt IE 7]>
|
||||
## <script type='text/javascript' src="/static/scripts/IE7.js"> </script>
|
||||
## <![endif]-->
|
||||
<script type="text/javascript" src="${h.url_for('/static/scripts/jquery.js')}"></script>
|
||||
<script type="text/javascript" src="${h.url_for('/static/scripts/galaxy.base.js')}"></script>
|
||||
|
||||
|
||||
${h.js( "jquery", "galaxy.base" )}
|
||||
</%def>
|
||||
|
||||
|
||||
@@ -25,17 +25,17 @@
|
||||
<!--[if IE]>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"> </script>
|
||||
<![endif]-->
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/jquery.js')}"> </script>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/jquery.event.drag.js')}"> </script>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/jquery.event.drop.js')}"> </script>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/jquery.event.hover.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.jstore-all.js')}"> </script>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/json2.js')}"> </script>
|
||||
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/galaxy.base.js')}"> </script>
|
||||
<script type='text/javascript' src="${h.url_for('/static/scripts/galaxy.workflow_editor.canvas.js')}"> </script>
|
||||
|
||||
${h.js( "jquery",
|
||||
"jquery.event.drag",
|
||||
"jquery.event.drop",
|
||||
"jquery.event.hover",
|
||||
"jquery.form",
|
||||
"jquery.jstore-all",
|
||||
"json2",
|
||||
"galaxy.base",
|
||||
"galaxy.workflow_editor.canvas" )}
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<script type='text/javascript'>
|
||||
window.lt_ie_7 = true;
|
||||
|
||||
Reference in New Issue
Block a user