From e96235b197922f1bbb3fe5e4064f183121f76a98 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 11 Feb 2009 01:58:14 -0800 Subject: [PATCH] Introduced cache-busting code to make pages update more reliably after a new release. Added initial (untested) support for Internet Explorer 8 beta. --- NEWS | 5 +++++ config/Version.py | 2 +- view/Blank_page.py | 3 ++- view/Download_page.py | 2 +- view/Main_page.py | 10 +++++----- view/Page.py | 8 +++++--- view/Product_page.py | 5 +++-- view/Progress_bar.py | 13 +++++++------ view/Upgrade_page.py | 3 ++- view/Upload_page.py | 3 ++- 10 files changed, 33 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index f65c3e7..b9f4895 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +1.6.3: February 11, 2009 + * Introduced cache-busting code to make pages update more reliably after a + new release. + * Added initial (untested) support for Internet Explorer 8 beta. + 1.6.2: February 11, 2009 * Added drag-and-drop note reordering. * Fixed a visual bug in which a second title within a note had insufficient diff --git a/config/Version.py b/config/Version.py index 46ae9f1..3d328e5 100644 --- a/config/Version.py +++ b/config/Version.py @@ -1 +1 @@ -VERSION = u"1.6.2" +VERSION = u"1.6.3" diff --git a/view/Blank_page.py b/view/Blank_page.py index 05a72e9..d9329c3 100644 --- a/view/Blank_page.py +++ b/view/Blank_page.py @@ -1,4 +1,5 @@ from Tags import Html, Head, Body, Script +from config.Version import VERSION class Blank_page( Html ): @@ -7,7 +8,7 @@ class Blank_page( Html ): Html.__init__( self, Head( - Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ), + Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ), ), Body( Script( script, type = u"text/javascript" ), diff --git a/view/Download_page.py b/view/Download_page.py index 05bb0f7..181828b 100644 --- a/view/Download_page.py +++ b/view/Download_page.py @@ -19,7 +19,7 @@ class Download_page( Product_page ): logout_url, u"download", # note title - Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ), + Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ), Div( Div( diff --git a/view/Main_page.py b/view/Main_page.py index e295b3d..37f00be 100644 --- a/view/Main_page.py +++ b/view/Main_page.py @@ -206,13 +206,13 @@ class Main_page( Page ): Page.__init__( self, title, - Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ), + Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css?%s" % VERSION ), updates_path and \ Link( rel = u"alternate", type = u"application/rss+xml", title = notebook.name, href = updates_path ) or None, - Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ) or None, - Script( type = u"text/javascript", src = u"/static/js/Invoker.js" ) or None, - Script( type = u"text/javascript", src = u"/static/js/Editor.js" ) or None, - Script( type = u"text/javascript", src = u"/static/js/Wiki.js" ) or None, + Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ) or None, + Script( type = u"text/javascript", src = u"/static/js/Invoker.js?%s" % VERSION ) or None, + Script( type = u"text/javascript", src = u"/static/js/Editor.js?%s" % VERSION ) or None, + Script( type = u"text/javascript", src = u"/static/js/Wiki.js?%s" % VERSION ) or None, Input( type = u"hidden", name = u"user", id = u"user", value = json( user ) ), Input( type = u"hidden", name = u"rate_plan", id = u"rate_plan", value = json( rate_plan ) ), Input( type = u"hidden", name = u"yearly", id = u"yearly", value = json( signup_yearly ) ), diff --git a/view/Page.py b/view/Page.py index 694795c..599db91 100644 --- a/view/Page.py +++ b/view/Page.py @@ -1,4 +1,5 @@ from Tags import Html, Head, Link, Script, Meta, Title, Body, Div, A, H1 +from config.Version import VERSION class Page( Html ): @@ -14,12 +15,13 @@ class Page( Html ): Html.__init__( self, Head( - Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css" ), + Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css?%s" % VERSION ), Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ), [ child for child in children if isinstance( child, head_types ) ], Title( title and u"%s: %s" % ( app_name, title ) or app_name ), - """""", - """""", + """""" % VERSION, + """""" % VERSION, + """""" % VERSION, ), Body( Div( diff --git a/view/Product_page.py b/view/Product_page.py index 3bf26a6..b73cc88 100644 --- a/view/Product_page.py +++ b/view/Product_page.py @@ -1,6 +1,7 @@ from Page import Page from Header import Header from Tags import Link, Meta, Div, A, Span, Ul, Li, Br +from config.Version import VERSION class Product_page( Page ): @@ -8,8 +9,8 @@ class Product_page( Page ): Page.__init__( self, ( note_title != "home" ) and note_title or None, # use the default title for the "home" page - Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ), - Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css" ), + Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css?%s" % VERSION ), + Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css?%s" % VERSION ), Meta( name = u"description", content = u"Luminotes is a WYSIWYG personal wiki notebook for organizing your notes and ideas." ), Meta( name = u"keywords", content = u"note taking, personal wiki, wysiwyg wiki, easy wiki, simple wiki, wiki notebook" ), diff --git a/view/Progress_bar.py b/view/Progress_bar.py index a73a0a3..cb65fe7 100644 --- a/view/Progress_bar.py +++ b/view/Progress_bar.py @@ -1,4 +1,5 @@ import cgi +from config.Version import VERSION def stream_progress( uploading_file, filename, fraction_reported ): @@ -15,12 +16,12 @@ def stream_progress( uploading_file, filename, fraction_reported ): u""" - - + + - """ + """ % ( VERSION, VERSION ) FILENAME_TRUNCATION_WIDTH = 40 base_filename = filename.split( u"/" )[ -1 ].split( u"\\" )[ -1 ] @@ -98,8 +99,8 @@ def stream_quota_error(): u""" - - + + @@ -108,4 +109,4 @@ def stream_quota_error(): - """ % quota_error_script + """ % ( VERSION, VERSION, quota_error_script ) diff --git a/view/Upgrade_page.py b/view/Upgrade_page.py index 2662fb1..e8e22e9 100644 --- a/view/Upgrade_page.py +++ b/view/Upgrade_page.py @@ -1,5 +1,6 @@ from Product_page import Product_page from Tags import Div, H1, Img, A, P, Table, Th, Tr, Td, Li, Span, I, Br, Ul, Li, Script, H4, B, Script +from config.Version import VERSION class Upgrade_page( Product_page ): @@ -18,7 +19,7 @@ class Upgrade_page( Product_page ): logout_url, u"pricing", # note title - Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ), + Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ), Div( Div( diff --git a/view/Upload_page.py b/view/Upload_page.py index 446ca20..123e398 100644 --- a/view/Upload_page.py +++ b/view/Upload_page.py @@ -1,4 +1,5 @@ from Tags import Html, Head, Link, Meta, Body, P, Form, Span, Input +from config.Version import VERSION class Upload_page( Html ): @@ -6,7 +7,7 @@ class Upload_page( Html ): Html.__init__( self, Head( - Link( href = u"/static/css/upload.css", type = u"text/css", rel = u"stylesheet" ), + Link( href = u"/static/css/upload.css?%s" % VERSION, type = u"text/css", rel = u"stylesheet" ), Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ), ), Body(