Browse Source

Introduced cache-busting code to make pages update more reliably after a new release.

Added initial (untested) support for Internet Explorer 8 beta.
Dan Helfman 9 years ago
parent
commit
e96235b197
10 changed files with 33 additions and 21 deletions
  1. 5
    0
      NEWS
  2. 1
    1
      config/Version.py
  3. 2
    1
      view/Blank_page.py
  4. 1
    1
      view/Download_page.py
  5. 5
    5
      view/Main_page.py
  6. 5
    3
      view/Page.py
  7. 3
    2
      view/Product_page.py
  8. 7
    6
      view/Progress_bar.py
  9. 2
    1
      view/Upgrade_page.py
  10. 2
    1
      view/Upload_page.py

+ 5
- 0
NEWS View File

@@ -1,3 +1,8 @@
1
+1.6.3: February 11, 2009
2
+ * Introduced cache-busting code to make pages update more reliably after a
3
+   new release.
4
+ * Added initial (untested) support for Internet Explorer 8 beta.
5
+
1 6
 1.6.2: February 11, 2009
2 7
  * Added drag-and-drop note reordering.
3 8
  * Fixed a visual bug in which a second title within a note had insufficient

+ 1
- 1
config/Version.py View File

@@ -1 +1 @@
1
-VERSION = u"1.6.2"
1
+VERSION = u"1.6.3"

+ 2
- 1
view/Blank_page.py View File

@@ -1,4 +1,5 @@
1 1
 from Tags import Html, Head, Body, Script
2
+from config.Version import VERSION
2 3
 
3 4
 
4 5
 class Blank_page( Html ):
@@ -7,7 +8,7 @@ class Blank_page( Html ):
7 8
       Html.__init__(
8 9
         self,
9 10
         Head(
10
-          Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ),
11
+          Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ),
11 12
         ),
12 13
         Body(
13 14
           Script( script, type = u"text/javascript" ),

+ 1
- 1
view/Download_page.py View File

@@ -19,7 +19,7 @@ class Download_page( Product_page ):
19 19
       logout_url,
20 20
       u"download", # note title
21 21
 
22
-      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ),
22
+      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ),
23 23
 
24 24
       Div(
25 25
         Div(

+ 5
- 5
view/Main_page.py View File

@@ -206,13 +206,13 @@ class Main_page( Page ):
206 206
     Page.__init__(
207 207
       self,
208 208
       title,
209
-      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ),
209
+      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css?%s" % VERSION ),
210 210
       updates_path and \
211 211
         Link( rel = u"alternate", type = u"application/rss+xml", title = notebook.name, href = updates_path ) or None,
212
-      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ) or None,
213
-      Script( type = u"text/javascript", src = u"/static/js/Invoker.js" ) or None,
214
-      Script( type = u"text/javascript", src = u"/static/js/Editor.js" ) or None,
215
-      Script( type = u"text/javascript", src = u"/static/js/Wiki.js" ) or None,
212
+      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ) or None,
213
+      Script( type = u"text/javascript", src = u"/static/js/Invoker.js?%s" % VERSION ) or None,
214
+      Script( type = u"text/javascript", src = u"/static/js/Editor.js?%s" % VERSION ) or None,
215
+      Script( type = u"text/javascript", src = u"/static/js/Wiki.js?%s" % VERSION ) or None,
216 216
       Input( type = u"hidden", name = u"user", id = u"user", value = json( user ) ),
217 217
       Input( type = u"hidden", name = u"rate_plan", id = u"rate_plan", value = json( rate_plan ) ),
218 218
       Input( type = u"hidden", name = u"yearly", id = u"yearly", value = json( signup_yearly ) ),

+ 5
- 3
view/Page.py View File

@@ -1,4 +1,5 @@
1 1
 from Tags import Html, Head, Link, Script, Meta, Title, Body, Div, A, H1
2
+from config.Version import VERSION
2 3
 
3 4
 
4 5
 class Page( Html ):
@@ -14,12 +15,13 @@ class Page( Html ):
14 15
     Html.__init__(
15 16
       self,
16 17
       Head(
17
-        Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css" ),
18
+        Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css?%s" % VERSION ),
18 19
         Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ),
19 20
         [ child for child in children if isinstance( child, head_types ) ],
20 21
         Title( title and u"%s: %s" % ( app_name, title ) or app_name ),
21
-        """<!--[if IE 6]><link href="/static/css/ie6.css" type="text/css" rel="stylesheet"></link><![endif]-->""",
22
-        """<!--[if IE 7]><link href="/static/css/ie7.css" type="text/css" rel="stylesheet"></link><![endif]-->""",
22
+        """<!--[if IE 6]><link href="/static/css/ie6.css?%s" type="text/css" rel="stylesheet"></link><![endif]-->""" % VERSION,
23
+        """<!--[if IE 7]><link href="/static/css/ie7.css?%s" type="text/css" rel="stylesheet"></link><![endif]-->""" % VERSION,
24
+        """<!--[if IE 8]><link href="/static/css/ie7.css?%s" type="text/css" rel="stylesheet"></link><![endif]-->""" % VERSION,
23 25
       ),
24 26
       Body(
25 27
         Div(

+ 3
- 2
view/Product_page.py View File

@@ -1,6 +1,7 @@
1 1
 from Page import Page
2 2
 from Header import Header
3 3
 from Tags import Link, Meta, Div, A, Span, Ul, Li, Br
4
+from config.Version import VERSION
4 5
 
5 6
 
6 7
 class Product_page( Page ):
@@ -8,8 +9,8 @@ class Product_page( Page ):
8 9
     Page.__init__(
9 10
       self,
10 11
       ( note_title != "home" ) and note_title or None, # use the default title for the "home" page
11
-      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ),
12
-      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css" ),
12
+      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css?%s" % VERSION ),
13
+      Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css?%s" % VERSION ),
13 14
       Meta( name = u"description", content = u"Luminotes is a WYSIWYG personal wiki notebook for organizing your notes and ideas." ),
14 15
       Meta( name = u"keywords", content = u"note taking, personal wiki, wysiwyg wiki, easy wiki, simple wiki, wiki notebook" ),
15 16
 

+ 7
- 6
view/Progress_bar.py View File

@@ -1,4 +1,5 @@
1 1
 import cgi
2
+from config.Version import VERSION
2 3
 
3 4
 
4 5
 def stream_progress( uploading_file, filename, fraction_reported ):
@@ -15,12 +16,12 @@ def stream_progress( uploading_file, filename, fraction_reported ):
15 16
     u"""
16 17
     <html>
17 18
     <head>
18
-      <link href="/static/css/upload.css" type="text/css" rel="stylesheet" />
19
-      <script type="text/javascript" src="/static/js/MochiKit.js"></script>
19
+      <link href="/static/css/upload.css?%s" type="text/css" rel="stylesheet" />
20
+      <script type="text/javascript" src="/static/js/MochiKit.js?%s"></script>
20 21
       <meta content="text/html; charset=UTF-8" http_equiv="content-type" />
21 22
     </head>
22 23
     <body>
23
-    """
24
+    """ % ( VERSION, VERSION )
24 25
 
25 26
   FILENAME_TRUNCATION_WIDTH = 40
26 27
   base_filename = filename.split( u"/" )[ -1 ].split( u"\\" )[ -1 ]
@@ -98,8 +99,8 @@ def stream_quota_error():
98 99
     u"""
99 100
     <html>
100 101
     <head>
101
-      <link href="/static/css/upload.css" type="text/css" rel="stylesheet" />
102
-      <script type="text/javascript" src="/static/js/MochiKit.js"></script>
102
+      <link href="/static/css/upload.css?%s" type="text/css" rel="stylesheet" />
103
+      <script type="text/javascript" src="/static/js/MochiKit.js?%s"></script>
103 104
       <meta content="text/html; charset=UTF-8" http_equiv="content-type" />
104 105
     </head>
105 106
     <body>
@@ -108,4 +109,4 @@ def stream_quota_error():
108 109
     </script>
109 110
     </body>
110 111
     </html>
111
-    """ % quota_error_script
112
+    """ % ( VERSION, VERSION, quota_error_script )

+ 2
- 1
view/Upgrade_page.py View File

@@ -1,5 +1,6 @@
1 1
 from Product_page import Product_page
2 2
 from Tags import Div, H1, Img, A, P, Table, Th, Tr, Td, Li, Span, I, Br, Ul, Li, Script, H4, B, Script
3
+from config.Version import VERSION
3 4
 
4 5
 
5 6
 class Upgrade_page( Product_page ):
@@ -18,7 +19,7 @@ class Upgrade_page( Product_page ):
18 19
       logout_url,
19 20
       u"pricing", # note title
20 21
 
21
-      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ),
22
+      Script( type = u"text/javascript", src = u"/static/js/MochiKit.js?%s" % VERSION ),
22 23
 
23 24
       Div(
24 25
         Div(

+ 2
- 1
view/Upload_page.py View File

@@ -1,4 +1,5 @@
1 1
 from Tags import Html, Head, Link, Meta, Body, P, Form, Span, Input
2
+from config.Version import VERSION
2 3
 
3 4
 
4 5
 class Upload_page( Html ):
@@ -6,7 +7,7 @@ class Upload_page( Html ):
6 7
     Html.__init__(
7 8
       self,
8 9
       Head(
9
-        Link( href = u"/static/css/upload.css", type = u"text/css", rel = u"stylesheet" ),
10
+        Link( href = u"/static/css/upload.css?%s" % VERSION, type = u"text/css", rel = u"stylesheet" ),
10 11
         Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ),
11 12
       ),
12 13
       Body(