witten
/
luminotes
Archived
1
0
Fork 0

Passing new yearly parameter to main page.

This commit is contained in:
Dan Helfman 2008-05-08 19:29:11 +00:00
parent a6baa45435
commit 0323f6bc91
5 changed files with 9 additions and 1 deletions

3
NEWS
View File

@ -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.

View File

@ -113,6 +113,7 @@ class Root( object ):
result[ "after_login" ] = after_login
if plan:
result[ "signup_plan" ] = plan
result[ "signup_yearly" ] = yearly
return result

View File

@ -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 );

View File

@ -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 "" ),

View File

@ -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":