details: http://www.bx.psu.edu/hg/galaxy/rev/4ff4be2f436f changeset: 2616:4ff4be2f436f user: James Taylor <james@jamestaylor.org> date: Mon Aug 24 15:27:27 2009 -0400 description: Cache defeat for css/js 3 file(s) affected in this change: lib/galaxy/web/framework/helpers/__init__.py templates/base.mako templates/workflow/editor.mako diffs (70 lines): diff -r 168a6ef6a99a -r 4ff4be2f436f lib/galaxy/web/framework/helpers/__init__.py --- a/lib/galaxy/web/framework/helpers/__init__.py Sun Aug 23 17:13:04 2009 -0400 +++ b/lib/galaxy/web/framework/helpers/__init__.py Mon Aug 24 15:27:27 2009 -0400 @@ -27,14 +27,17 @@ 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 ] ) \ No newline at end of file + return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=2" ) for name in args ] ) diff -r 168a6ef6a99a -r 4ff4be2f436f templates/base.mako --- a/templates/base.mako Sun Aug 23 17:13:04 2009 -0400 +++ b/templates/base.mako Mon Aug 24 15:27:27 2009 -0400 @@ -27,9 +27,6 @@ ## <!--[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> diff -r 168a6ef6a99a -r 4ff4be2f436f templates/workflow/editor.mako --- a/templates/workflow/editor.mako Sun Aug 23 17:13:04 2009 -0400 +++ b/templates/workflow/editor.mako Mon Aug 24 15:27:27 2009 -0400 @@ -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;