From 0323f6bc91e59f72b173a4507ed0eb7e33b8b709 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 8 May 2008 19:29:11 +0000 Subject: [PATCH] Passing new yearly parameter to main page. --- NEWS | 3 +++ controller/Root.py | 1 + static/js/Wiki.js | 3 ++- view/Main_page.py | 2 ++ view/Notebook_rss.py | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ebf848f..a34f8ee 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +1.3.21: May 8, 2008 + * Passing new yearly parameter to main page. + 1.3.20: May 8, 2008 * Made signup support yearly subscriptions. diff --git a/controller/Root.py b/controller/Root.py index cfe086d..86797a7 100644 --- a/controller/Root.py +++ b/controller/Root.py @@ -113,6 +113,7 @@ class Root( object ): result[ "after_login" ] = after_login if plan: result[ "signup_plan" ] = plan + result[ "signup_yearly" ] = yearly return result diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 8c9844a..a20a1a7 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -12,6 +12,7 @@ function Wiki( invoker ) { this.search_results_editor = null; // editor for display of search results this.invoker = invoker; this.rate_plan = evalJSON( getElement( "rate_plan" ).value ); + this.yearly = evalJSON( getElement( "yearly" ).value ); this.storage_usage_high = false; this.invites = evalJSON( getElement( "invites" ).value ); this.invite_id = getElement( "invite_id" ).value; @@ -725,9 +726,9 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi if ( url == "/users/signup" ) { args[ "invite_id" ] = self.invite_id; args[ "rate_plan" ] = self.signup_plan; + args[ "yearly" ] = self.yearly; } else if ( url == "/users/login" ) { args[ "invite_id" ] = self.invite_id; - args[ "after_login" ] = self.after_login; } self.invoker.invoke( url, "POST", args, callback, form ); diff --git a/view/Main_page.py b/view/Main_page.py index 8704c51..15afc78 100644 --- a/view/Main_page.py +++ b/view/Main_page.py @@ -34,6 +34,7 @@ class Main_page( Page ): invite_id = None, after_login = None, signup_plan = None, + signup_yearly = None, recent_notes = None, ): startup_note_ids = [ startup_note.object_id for startup_note in startup_notes ] @@ -129,6 +130,7 @@ class Main_page( Page ): Script( type = u"text/javascript", src = u"/static/js/Wiki.js" ) or None, Input( type = u"hidden", name = u"storage_bytes", id = u"storage_bytes", value = user.storage_bytes ), 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 ) ), Input( type = u"hidden", name = u"notebooks", id = u"notebooks", value = json( notebooks ) ), Input( type = u"hidden", name = u"notebook_id", id = u"notebook_id", value = notebook.object_id ), Input( type = u"hidden", name = u"parent_id", id = u"parent_id", value = parent_id or "" ), diff --git a/view/Notebook_rss.py b/view/Notebook_rss.py index 051215c..4f7811d 100644 --- a/view/Notebook_rss.py +++ b/view/Notebook_rss.py @@ -27,6 +27,7 @@ class Notebook_rss( Rss_channel ): invite_id = None, after_login = None, signup_plan = None, + signup_yearly = None, recent_notes = None, ): if notebook.name == u"Luminotes":