witten
/
luminotes
Archived
1
0
Fork 0

* Better support for RSS feeds of notebooks with unicode names.

* Now dynamically altering RSS feed link when notebook is renamed.
This commit is contained in:
Dan Helfman 2008-04-24 20:32:43 +00:00
parent 16ef54164a
commit 6124532500
5 changed files with 16 additions and 4 deletions

4
NEWS
View File

@ -1,3 +1,7 @@
1.3.4: April 24, 2008
* Better support for RSS feeds of notebooks with unicode names.
* Now dynamically altering RSS feed link when notebook is renamed.
1.3.3: April 22, 2008
* RSS subscription support for each wiki notebook.

View File

@ -1942,6 +1942,14 @@ Wiki.prototype.end_notebook_rename = function () {
document.createTextNode( new_notebook_name )
);
// rename the notebook within the rss link (if any)
var notebook_rss_link = getElement( "notebook_rss_link" );
if ( notebook_rss_link ) {
divider = "?rss&notebook_name=";
pieces = notebook_rss_link.href.split( divider );
notebook_rss_link.href = pieces[ 0 ] + divider + escape( new_notebook_name );
}
// if the name has changed, then send the new name to the server
if ( new_notebook_name == this.notebook.name )
return;

View File

@ -35,7 +35,7 @@ class Link_area( Div ):
A(
u"subscribe to rss",
href = u"%s?rss" % notebook_path,
id = u"rss link",
id = u"blog_rss_link",
title = u"Subscribe to the RSS feed for the Luminotes blog.",
),
A(
@ -48,7 +48,7 @@ class Link_area( Div ):
A(
u"subscribe to rss",
href = updates_path,
id = u"rss link",
id = u"notebook_rss_link",
title = u"Subscribe to the RSS feed for this notebook.",
),
A(

View File

@ -76,7 +76,7 @@ class Main_page( Page ):
updates_path = u"/notebooks/updates/%s?rss&%s" % (
notebook.object_id,
urlencode( [ ( u"notebook_name", notebook.name ) ] ),
urlencode( [ ( u"notebook_name", notebook.name.encode( "utf8" ) ) ] ),
)
if notebook.name == u"Luminotes":

View File

@ -41,7 +41,7 @@ class Updates_rss( Rss_channel ):
def note_link( notebook_id, notebook_name, note_id, revision, https_url ):
query = urlencode( [
( u"notebook_id", notebook_id ),
( u"notebook_name", notebook_name ),
( u"notebook_name", notebook_name.encode( "utf8" ) ),
( u"note_id", note_id ),
( u"revision", unicode( revision ) ),
] )