Added permalinks to blog and discussion forum posts.
This commit is contained in:
parent
8f4cdd662d
commit
25b2f2fe84
2
NEWS
2
NEWS
|
@ -1,5 +1,5 @@
|
||||||
1.5.6:
|
1.5.6:
|
||||||
*
|
* Added permalinks to blog and discussion forum posts.
|
||||||
|
|
||||||
1.5.5: November 6, 2008
|
1.5.5: November 6, 2008
|
||||||
* Improved speed of Luminotes Desktop by adding some database indices. This
|
* Improved speed of Luminotes Desktop by adding some database indices. This
|
||||||
|
|
|
@ -813,7 +813,8 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( creation ) {
|
if ( creation ) {
|
||||||
note_text = this.make_byline( username, creation ) + note_text;
|
var note_id = id.split( ' ' )[ 0 ];
|
||||||
|
note_text = this.make_byline( username, creation, note_id ) + note_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startup = this.startup_notes[ id ];
|
var startup = this.startup_notes[ id ];
|
||||||
|
@ -1003,14 +1004,6 @@ Wiki.prototype.update_link_with_suggestion = function ( editor, link, note ) {
|
||||||
Wiki.prototype.editor_focused = function ( editor, synchronous ) {
|
Wiki.prototype.editor_focused = function ( editor, synchronous ) {
|
||||||
if ( editor ) {
|
if ( editor ) {
|
||||||
addElementClass( editor.iframe, "focused_note_frame" );
|
addElementClass( editor.iframe, "focused_note_frame" );
|
||||||
|
|
||||||
if ( editor.document && editor.read_write ) {
|
|
||||||
var byline = getFirstElementByTagAndClassName( "p", "byline", editor.document );
|
|
||||||
if ( byline ) {
|
|
||||||
removeElement( byline );
|
|
||||||
editor.resize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.focused_editor && this.focused_editor != editor ) {
|
if ( this.focused_editor && this.focused_editor != editor ) {
|
||||||
|
@ -1037,7 +1030,7 @@ Wiki.prototype.editor_focused = function ( editor, synchronous ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.make_byline = function ( username, creation ) {
|
Wiki.prototype.make_byline = function ( username, creation, note_id ) {
|
||||||
if ( username == "anonymous" )
|
if ( username == "anonymous" )
|
||||||
username = "admin";
|
username = "admin";
|
||||||
|
|
||||||
|
@ -1051,7 +1044,8 @@ Wiki.prototype.make_byline = function ( username, creation ) {
|
||||||
else
|
else
|
||||||
var timestamp = '';
|
var timestamp = '';
|
||||||
|
|
||||||
return '<p class="byline small_text">Posted' + by + timestamp;
|
return '<p class="byline small_text">Posted' + by + timestamp +
|
||||||
|
' | <a href="' + window.location.pathname + '?note_id=' + note_id + '" target="_top">permalink</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.editor_mouse_hovered = function ( editor, target ) {
|
Wiki.prototype.editor_mouse_hovered = function ( editor, target ) {
|
||||||
|
@ -1078,6 +1072,14 @@ Wiki.prototype.key_pressed = function ( event ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.editor_key_pressed = function ( editor, event ) {
|
Wiki.prototype.editor_key_pressed = function ( editor, event ) {
|
||||||
|
if ( editor.document && editor.read_write ) {
|
||||||
|
var byline = getFirstElementByTagAndClassName( "p", "byline", editor.document );
|
||||||
|
if ( byline ) {
|
||||||
|
removeElement( byline );
|
||||||
|
editor.resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var code = event.key().code;
|
var code = event.key().code;
|
||||||
|
|
||||||
if ( event.modifier().ctrl ) {
|
if ( event.modifier().ctrl ) {
|
||||||
|
|
Reference in New Issue