details:
http://www.bx.psu.edu/hg/galaxy/rev/472bc69143be
changeset: 2502:472bc69143be
user: James Taylor <james(a)jamestaylor.org>
date: Fri Jul 24 16:39:48 2009 -0400
description:
Force browsers to recache the CSS
3 file(s) affected in this change:
lib/galaxy/web/framework/helpers/__init__.py
templates/base.mako
templates/base_panels.mako
diffs (66 lines):
diff -r 0d7a8525da9e -r 472bc69143be lib/galaxy/web/framework/helpers/__init__.py
--- a/lib/galaxy/web/framework/helpers/__init__.py Fri Jul 24 16:26:32 2009 -0400
+++ b/lib/galaxy/web/framework/helpers/__init__.py Fri Jul 24 16:39:48 2009 -0400
@@ -19,9 +19,12 @@
def css( *args ):
"""
Take a list of stylesheet names (no extension) and return appropriate string
- of link tags.
+ of link tags.
+
+ TODO: This has a hardcoded "?v=1" to defeat caching. This should be done
+ in a better way.
"""
- return "\n".join( [ stylesheet_link_tag( "/static/style/" + name
+ ".css" ) for name in args ] )
+ return "\n".join( [ stylesheet_link_tag( "/static/style/" + name
+ ".css?v=1" ) for name in args ] )
def js( *args ):
"""
diff -r 0d7a8525da9e -r 472bc69143be templates/base.mako
--- a/templates/base.mako Fri Jul 24 16:26:32 2009 -0400
+++ b/templates/base.mako Fri Jul 24 16:39:48 2009 -0400
@@ -19,7 +19,7 @@
## Default stylesheets
<%def name="stylesheets()">
- <link href="${h.url_for('/static/style/base.css')}"
rel="stylesheet" type="text/css" />
+ ${h.css('base')}
</%def>
## Default javascripts
diff -r 0d7a8525da9e -r 472bc69143be templates/base_panels.mako
--- a/templates/base_panels.mako Fri Jul 24 16:26:32 2009 -0400
+++ b/templates/base_panels.mako Fri Jul 24 16:39:48 2009 -0400
@@ -20,8 +20,7 @@
## Default stylesheets
<%def name="stylesheets()">
- ## <link rel="stylesheet" type="text/css"
href="${h.url_for('/static/style/reset.css')}" />
- <link rel="stylesheet" type="text/css"
href="${h.url_for('/static/style/panel_layout.css')}" />
+ ${h.css('panel_layout')}
<style type="text/css">
#center {
%if not self.has_left_panel:
@@ -43,8 +42,7 @@
## Default javascripts
<%def name="javascripts()">
<!--[if lt IE 7]>
- <script type='text/javascript' src="/static/scripts/IE7.js">
</script>
- <script type='text/javascript'
src="/static/scripts/ie7-recalc.js"> </script>
+ ${h.js( 'IE7', 'ie7-recalc' )}
<![endif]-->
</%def>
@@ -52,11 +50,7 @@
<%def name="late_javascripts()">
## Scripts can be loaded later since they progressively add features to
## the panels, but do not change layout
- <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.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/galaxy.panels.js')}"></script>
+ ${h.js( 'jquery', 'jquery.event.drag', 'jquery.event.hover',
'jquery.form', 'galaxy.panels' )}
<script type="text/javascript">
ensure_dd_helper();