Now tracking conversions for subscriptions.
Notes in the trash can no longer be edited. They must be undeleted first.
This commit is contained in:
parent
50340cfe10
commit
4fd44700e1
7
NEWS
7
NEWS
|
@ -1,5 +1,8 @@
|
|||
1.1.1: ???
|
||||
*
|
||||
1.1.2: January ??, 2008
|
||||
* You can no longer edit notes in the trash. You have to undelete them first.
|
||||
|
||||
1.1.1: January 17, 2008
|
||||
* Beefed up the tour and added some screenshots.
|
||||
|
||||
1.1.0: January 15, 2008
|
||||
* Users can now upgrade their Luminotes accounts to get additional features
|
||||
|
|
|
@ -23,7 +23,7 @@ settings = {
|
|||
"luminotes.http_proxy_ip": "127.0.0.1",
|
||||
"luminotes.https_proxy_ip": "127.0.0.2",
|
||||
"luminotes.support_email": "",
|
||||
"luminotes.payment_email": "",
|
||||
"luminotes.payment_email": "seller_1199677742_biz@luminotes.com",
|
||||
"luminotes.rate_plans": [
|
||||
{
|
||||
"name": "free",
|
||||
|
@ -38,6 +38,30 @@ settings = {
|
|||
"fee": 5,
|
||||
"button":
|
||||
"""
|
||||
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" class="subscribe_form">
|
||||
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but24.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
|
||||
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
<input type="hidden" name="cmd" value="_xclick-subscriptions">
|
||||
<input type="hidden" name="business" value="seller_1199677742_biz@luminotes.com">
|
||||
<input type="hidden" name="item_name" value="Luminotes Basic">
|
||||
<input type="hidden" name="item_number" value="1">
|
||||
<input type="hidden" name="no_shipping" value="1">
|
||||
<input type="hidden" name="no_note" value="1">
|
||||
<input type="hidden" name="currency_code" value="USD">
|
||||
<input type="hidden" name="lc" value="US">
|
||||
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
|
||||
<input type="hidden" name="a3" value="5.00">
|
||||
<input type="hidden" name="p3" value="1">
|
||||
<input type="hidden" name="t3" value="M">
|
||||
<input type="hidden" name="src" value="1">
|
||||
<input type="hidden" name="sra" value="1">
|
||||
<input type="hidden" name="custom" value="%s">
|
||||
<input type="hidden" name="modify" value="1">
|
||||
<input type="hidden" name="return" value="http://luminotes.com:8083/users/thanks">
|
||||
<input type="hidden" name="cancel_return" value="http://luminotes.com:8083/">
|
||||
<input type="hidden" name="rm" value="2">
|
||||
<input type="hidden" name="cbt" value="Return to Luminotes">
|
||||
</form>
|
||||
""",
|
||||
},
|
||||
{
|
||||
|
@ -47,6 +71,30 @@ settings = {
|
|||
"fee": 9,
|
||||
"button":
|
||||
"""
|
||||
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" class="subscribe_form">
|
||||
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but24.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
|
||||
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
<input type="hidden" name="cmd" value="_xclick-subscriptions">
|
||||
<input type="hidden" name="business" value="seller_1199677742_biz@luminotes.com">
|
||||
<input type="hidden" name="item_name" value="Luminotes Standard">
|
||||
<input type="hidden" name="item_number" value="2">
|
||||
<input type="hidden" name="no_shipping" value="1">
|
||||
<input type="hidden" name="no_note" value="1">
|
||||
<input type="hidden" name="currency_code" value="USD">
|
||||
<input type="hidden" name="lc" value="US">
|
||||
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
|
||||
<input type="hidden" name="a3" value="9.00">
|
||||
<input type="hidden" name="p3" value="1">
|
||||
<input type="hidden" name="t3" value="M">
|
||||
<input type="hidden" name="src" value="1">
|
||||
<input type="hidden" name="sra" value="1">
|
||||
<input type="hidden" name="custom" value="%s">
|
||||
<input type="hidden" name="modify" value="1">
|
||||
<input type="hidden" name="return" value="http://luminotes.com:8083/users/thanks">
|
||||
<input type="hidden" name="cancel_return" value="http://luminotes.com:8083/">
|
||||
<input type="hidden" name="rm" value="2">
|
||||
<input type="hidden" name="cbt" value="Return to Luminotes">
|
||||
</form>
|
||||
""",
|
||||
},
|
||||
# {
|
||||
|
@ -61,6 +109,9 @@ settings = {
|
|||
],
|
||||
"luminotes.unsubscribe_button":
|
||||
"""
|
||||
<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=seller_1199677742_biz%40luminotes%2ecom" target="_top">
|
||||
<img src="https://www.sandbox.paypal.com/en_US/i/btn/cancel_subscribe_gen_2_new.gif" border="0" alt="Unsubscribe">
|
||||
</a>
|
||||
""",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1112,6 +1112,7 @@ class Users( object ):
|
|||
# if the rate plan of the subscription matches the user's current rate plan, success
|
||||
elif rate_plan == result[ u"user" ].rate_plan:
|
||||
note = Thanks_note( self.__rate_plans[ rate_plan ][ u"name" ].capitalize() )
|
||||
result[ "conversion" ] = "subscribe_%s" % rate_plan
|
||||
# otherwise, display an auto-reloading "processing..." page
|
||||
else:
|
||||
note = Processing_note( rate_plan, retry_count )
|
||||
|
|
|
@ -3254,6 +3254,7 @@ class Test_users( Test_controller ):
|
|||
assert rate_plan[ u"name" ] == u"extra super"
|
||||
assert rate_plan[ u"storage_quota_bytes" ] == 31337
|
||||
|
||||
assert result[ u"conversion" ] == u"subscribe_1"
|
||||
assert result[ u"notebook" ].object_id == self.anon_notebook.object_id
|
||||
assert len( result[ u"startup_notes" ] ) == 1
|
||||
assert result[ u"startup_notes" ][ 0 ].object_id == self.startup_note.object_id
|
||||
|
@ -3277,6 +3278,7 @@ class Test_users( Test_controller ):
|
|||
), session_id = self.session_id )
|
||||
|
||||
assert result[ u"user" ].username == self.user.username
|
||||
assert result.get( u"conversion" ) == None
|
||||
assert len( result[ u"notebooks" ] ) == 5
|
||||
assert result[ u"notebooks" ][ 0 ].object_id == self.notebooks[ 0 ].object_id
|
||||
assert result[ u"notebooks" ][ 0 ].name == self.notebooks[ 0 ].name
|
||||
|
@ -3314,6 +3316,7 @@ class Test_users( Test_controller ):
|
|||
), session_id = self.session_id )
|
||||
|
||||
assert result[ u"user" ].username == self.user.username
|
||||
assert result.get( u"conversion" ) == None
|
||||
assert len( result[ u"notebooks" ] ) == 5
|
||||
assert result[ u"notebooks" ][ 0 ].object_id == self.notebooks[ 0 ].object_id
|
||||
assert result[ u"notebooks" ][ 0 ].name == self.notebooks[ 0 ].name
|
||||
|
@ -3351,6 +3354,7 @@ class Test_users( Test_controller ):
|
|||
), session_id = self.session_id )
|
||||
|
||||
assert result[ u"user" ].username == self.user.username
|
||||
assert result.get( u"conversion" ) == None
|
||||
assert len( result[ u"notebooks" ] ) == 5
|
||||
assert result[ u"notebooks" ][ 0 ].object_id == self.notebooks[ 0 ].object_id
|
||||
assert result[ u"notebooks" ][ 0 ].name == self.notebooks[ 0 ].name
|
||||
|
@ -3386,6 +3390,7 @@ class Test_users( Test_controller ):
|
|||
), session_id = self.session_id )
|
||||
|
||||
assert result[ u"user" ].username == self.user.username
|
||||
assert result.get( u"conversion" ) == None
|
||||
assert len( result[ u"notebooks" ] ) == 5
|
||||
assert result[ u"notebooks" ][ 0 ].object_id == self.notebooks[ 0 ].object_id
|
||||
assert result[ u"notebooks" ][ 0 ].name == self.notebooks[ 0 ].name
|
||||
|
|
|
@ -5,8 +5,9 @@ function Editor( id, notebook_id, note_text, deleted_from_id, revision, read_wri
|
|||
this.deleted_from_id = deleted_from_id || null;
|
||||
this.revision = revision;
|
||||
this.user_revisions = new Array(); // cache for this note's list of revisions, loaded from the server on-demand
|
||||
this.read_write = read_write;
|
||||
this.startup = startup || false; // whether this Editor is for a startup note
|
||||
this.read_write = read_write; // whether the user has read-write access to this Editor
|
||||
this.edit_enabled = read_write && !deleted_from_id; // whether editing is actually enabled for this Editor
|
||||
this.startup = startup || false; // whether this Editor is for a startup note
|
||||
this.init_highlight = highlight || false;
|
||||
this.init_focus = focus || false;
|
||||
this.closed = false;
|
||||
|
@ -109,14 +110,14 @@ Editor.prototype.init_document = function () {
|
|||
if ( this.iframe.contentDocument ) { // browsers such as Firefox
|
||||
this.document = this.iframe.contentDocument;
|
||||
|
||||
if ( this.read_write )
|
||||
if ( this.edit_enabled )
|
||||
this.document.designMode = "On";
|
||||
|
||||
setTimeout( function () { self.finish_init(); }, 1 );
|
||||
} else { // browsers such as IE
|
||||
this.document = this.iframe.contentWindow.document;
|
||||
|
||||
if ( this.read_write ) {
|
||||
if ( this.edit_enabled ) {
|
||||
this.document.designMode = "On";
|
||||
// work-around for IE bug: reget the document after designMode is turned on
|
||||
this.document = this.iframe.contentWindow.document;
|
||||
|
@ -133,7 +134,7 @@ Editor.prototype.finish_init = function () {
|
|||
this.insert_html( this.initial_text );
|
||||
|
||||
var self = this; // necessary so that the member functions of this editor object are used
|
||||
if ( this.read_write ) {
|
||||
if ( this.edit_enabled ) {
|
||||
connect( this.document, "onkeydown", function ( event ) { self.key_pressed( event ); } );
|
||||
connect( this.document, "onkeyup", function ( event ) { self.key_released( event ); } );
|
||||
}
|
||||
|
@ -234,7 +235,7 @@ Editor.prototype.finish_init = function () {
|
|||
} );
|
||||
|
||||
// browsers such as Firefox, but not Opera
|
||||
if ( this.iframe.contentDocument && !/Opera/.test( navigator.userAgent ) && this.read_write )
|
||||
if ( this.iframe.contentDocument && !/Opera/.test( navigator.userAgent ) && this.edit_enabled )
|
||||
this.exec_command( "styleWithCSS", false );
|
||||
|
||||
this.resize();
|
||||
|
@ -292,7 +293,7 @@ Editor.prototype.exec_command = function ( command, parameter ) {
|
|||
Editor.prototype.insert_html = function ( html ) {
|
||||
if ( html.length == 0 ) return;
|
||||
|
||||
if ( !this.read_write || /Safari/.test( navigator.userAgent ) ) {
|
||||
if ( !this.edit_enabled || /Safari/.test( navigator.userAgent ) ) {
|
||||
this.document.body.innerHTML = html;
|
||||
return;
|
||||
}
|
||||
|
@ -347,7 +348,7 @@ Editor.prototype.mouse_clicked = function ( event ) {
|
|||
this.link_started = null;
|
||||
|
||||
// update the state no matter what, in case the cursor has moved
|
||||
if ( this.read_write )
|
||||
if ( this.edit_enabled )
|
||||
signal( this, "state_changed", this );
|
||||
|
||||
// we only want to deal with left mouse button clicks
|
||||
|
@ -366,7 +367,7 @@ Editor.prototype.mouse_clicked = function ( event ) {
|
|||
// links with targets are considered to be external links pointing outside of this wiki
|
||||
if ( link.target ) {
|
||||
// if this is a read-only editor, bail and let the browser handle the link normally
|
||||
if ( !this.read_write ) return;
|
||||
if ( !this.edit_enabled ) return;
|
||||
|
||||
// otherwise, this is a read-write editor, so we've got to launch the external link ourselves.
|
||||
// note that this ignores what the link target actually contains and assumes it's "_new"
|
||||
|
@ -393,7 +394,7 @@ Editor.prototype.scrape_title = function () {
|
|||
var title = "";
|
||||
|
||||
// issue a signal that the title has changed and save off the new title
|
||||
if ( this.read_write )
|
||||
if ( this.edit_enabled )
|
||||
signal( this, "title_changed", this, this.title, title );
|
||||
this.title = title;
|
||||
}
|
||||
|
@ -553,7 +554,7 @@ Editor.prototype.contents = function () {
|
|||
// return true if the given state_name is currently enabled, optionally using a given list of node
|
||||
// names
|
||||
Editor.prototype.state_enabled = function ( state_name, node_names ) {
|
||||
if ( !this.read_write )
|
||||
if ( !this.edit_enabled )
|
||||
return false;
|
||||
|
||||
state_name = state_name.toLowerCase();
|
||||
|
@ -573,7 +574,7 @@ Editor.prototype.state_enabled = function ( state_name, node_names ) {
|
|||
Editor.prototype.current_node_names = function () {
|
||||
var node_names = new Array();
|
||||
|
||||
if ( !this.read_write )
|
||||
if ( !this.edit_enabled )
|
||||
return node_names;
|
||||
|
||||
// to determine whether the specified state is enabled, see whether the current selection is
|
||||
|
|
|
@ -110,7 +110,7 @@ class Main_page( Page ):
|
|||
Div(
|
||||
Div(
|
||||
Br(),
|
||||
Toolbar( hide_toolbar = not notebook.read_write ),
|
||||
Toolbar( hide_toolbar = parent_id or not notebook.read_write ),
|
||||
id = u"toolbar_area",
|
||||
),
|
||||
Link_area( notebooks, notebook, total_notes_count, parent_id, notebook_path, user ),
|
||||
|
|
Reference in New Issue