Fixed a bug in which discussion forum bylines ("Posted by...") were sometimes duplicated several times on a given post. Now bylines are displayed below each post rather than within it.
This commit is contained in:
parent
2d164ece5a
commit
882ccbc808
3
NEWS
3
NEWS
|
@ -10,6 +10,9 @@
|
||||||
unformatted.
|
unformatted.
|
||||||
* Fixed a bug in which toolbar buttons didn't depress based on the current
|
* Fixed a bug in which toolbar buttons didn't depress based on the current
|
||||||
location of the text cursor.
|
location of the text cursor.
|
||||||
|
* Fixed a bug in which discussion forum bylines ("Posted by...") were
|
||||||
|
sometimes duplicated several times on a given post. Now bylines are
|
||||||
|
displayed below each post rather than within it.
|
||||||
|
|
||||||
1.6.10: March 20, 2009
|
1.6.10: March 20, 2009
|
||||||
* Faster uploads and downloads for users of luminotes.com.
|
* Faster uploads and downloads for users of luminotes.com.
|
||||||
|
|
|
@ -436,6 +436,7 @@ h1 {
|
||||||
.note_controls {
|
.note_controls {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-right: 1.5em;
|
margin-right: 1.5em;
|
||||||
|
min-height: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note_button {
|
.note_button {
|
||||||
|
@ -1210,3 +1211,7 @@ h1 {
|
||||||
margin-left: 0.75em;
|
margin-left: 0.75em;
|
||||||
margin-right: 0.75em;
|
margin-right: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.byline {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
|
@ -830,11 +830,6 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi
|
||||||
'</form>' + note_text;
|
'</form>' + note_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( creation && note_text != "<h3></h3>" ) {
|
|
||||||
var note_id = id.split( ' ' )[ 0 ];
|
|
||||||
note_text = note_text + this.make_byline( username, creation, note_id );
|
|
||||||
}
|
|
||||||
|
|
||||||
var startup = this.startup_notes[ id ];
|
var startup = this.startup_notes[ id ];
|
||||||
var editor = new Editor( id, this.notebook.object_id, note_text, deleted_from_id, revision, read_write, startup, highlight, focus, position_after, dirty, own_notes_only );
|
var editor = new Editor( id, this.notebook.object_id, note_text, deleted_from_id, revision, read_write, startup, highlight, focus, position_after, dirty, own_notes_only );
|
||||||
if ( focus )
|
if ( focus )
|
||||||
|
@ -842,6 +837,11 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi
|
||||||
else if ( !read_write )
|
else if ( !read_write )
|
||||||
this.editor_focused( null );
|
this.editor_focused( null );
|
||||||
|
|
||||||
|
if ( creation && note_text != "<h3></h3>" ) {
|
||||||
|
var note_id = id.split( ' ' )[ 0 ];
|
||||||
|
appendChildNodes( editor.holder, this.make_byline( username, creation, note_id ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( this.notebook.read_write ) {
|
if ( this.notebook.read_write ) {
|
||||||
connect( editor, "state_changed", this, "editor_state_changed" );
|
connect( editor, "state_changed", this, "editor_state_changed" );
|
||||||
connect( editor, "title_changed", this, "editor_title_changed" );
|
connect( editor, "title_changed", this, "editor_title_changed" );
|
||||||
|
@ -1080,18 +1080,15 @@ Wiki.prototype.make_byline = function ( username, creation, note_id ) {
|
||||||
else
|
else
|
||||||
var timestamp = '';
|
var timestamp = '';
|
||||||
|
|
||||||
return '<div class="byline small_text">Posted' + by + timestamp +
|
return createDOM(
|
||||||
' | <a href="' + window.location.pathname + '?note_id=' + note_id + '" target="_top">permalink</a>';
|
"span",
|
||||||
}
|
{ "class": "byline small_text" },
|
||||||
|
'Posted' + by + timestamp + ' | ',
|
||||||
Wiki.prototype.remove_byline = function ( editor ) {
|
createDOM( "a", {
|
||||||
if ( editor.document && editor.read_write ) {
|
"href": window.location.pathname + '?note_id=' + note_id,
|
||||||
var byline = getFirstElementByTagAndClassName( "div", "byline", editor.document );
|
"target": "_top"
|
||||||
if ( byline ) {
|
}, "permalink" )
|
||||||
removeElement( byline );
|
);
|
||||||
editor.resize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.editor_mouse_hovered = function ( editor, target ) {
|
Wiki.prototype.editor_mouse_hovered = function ( editor, target ) {
|
||||||
|
@ -1138,8 +1135,6 @@ Wiki.prototype.key_pressed = function ( event ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.editor_key_pressed = function ( editor, event ) {
|
Wiki.prototype.editor_key_pressed = function ( editor, event ) {
|
||||||
this.remove_byline( editor );
|
|
||||||
|
|
||||||
var code = event.key().code;
|
var code = event.key().code;
|
||||||
|
|
||||||
if ( event.modifier().ctrl ) {
|
if ( event.modifier().ctrl ) {
|
||||||
|
@ -1795,7 +1790,6 @@ Wiki.prototype.save_editor = function ( editor, fire_and_forget, callback, synch
|
||||||
if ( editor && editor.read_write && !editor.closed &&
|
if ( editor && editor.read_write && !editor.closed &&
|
||||||
( ( !editor.empty() && editor.dirty() ) || position_after || position_before ) ) {
|
( ( !editor.empty() && editor.dirty() ) || position_after || position_before ) ) {
|
||||||
editor.scrape_title();
|
editor.scrape_title();
|
||||||
this.remove_byline( editor );
|
|
||||||
|
|
||||||
this.invoker.invoke( "/notebooks/save_note", "POST", {
|
this.invoker.invoke( "/notebooks/save_note", "POST", {
|
||||||
"notebook_id": this.notebook.object_id,
|
"notebook_id": this.notebook.object_id,
|
||||||
|
|
Reference in New Issue