Got rid of auto-hiding notebook "rename" link, since it didn't work reliably. The link is now back in the link area on the left.
This commit is contained in:
parent
d687d2b1c8
commit
461ae4f467
|
@ -391,16 +391,6 @@ Wiki.prototype.populate = function ( startup_notes, current_notes, note_read_wri
|
|||
self.start_notebook_rename();
|
||||
event.stop();
|
||||
} );
|
||||
|
||||
var notebook_header_area = getElement( "notebook_header_area" );
|
||||
if ( notebook_header_area ) {
|
||||
connect( notebook_header_area, "onmouseover", function ( event ) {
|
||||
removeElementClass( "notebook_header_links", "invisible" );
|
||||
} );
|
||||
connect( notebook_header_area, "onmouseout", function ( event ) {
|
||||
setTimeout( function () { addElementClass( "notebook_header_links", "invisible" ); }, 1000 );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
var delete_notebook_link = getElement( "delete_notebook_link" );
|
||||
|
@ -2827,8 +2817,6 @@ Wiki.prototype.start_notebook_rename = function () {
|
|||
);
|
||||
|
||||
replaceChildNodes( "notebook_header_name", rename_form );
|
||||
disconnectAll( "notebook_header_area" );
|
||||
addElementClass( "notebook_header_links", "invisible" );
|
||||
|
||||
var self = this;
|
||||
connect( rename_form, "onsubmit", function ( event ) {
|
||||
|
@ -2865,7 +2853,6 @@ Wiki.prototype.end_notebook_rename = function ( new_notebook_name, prevent_renam
|
|||
createDOM( "strong", {}, new_notebook_name )
|
||||
);
|
||||
replaceChildNodes( "notebook_header_name", notebook_header_name );
|
||||
removeElementClass( "notebook_header_links", "invisible" );
|
||||
} else {
|
||||
var notebook_header_name = createDOM(
|
||||
"span",
|
||||
|
@ -2873,7 +2860,6 @@ Wiki.prototype.end_notebook_rename = function ( new_notebook_name, prevent_renam
|
|||
createDOM( "strong", {}, new_notebook_name )
|
||||
);
|
||||
replaceChildNodes( "notebook_header_name", notebook_header_name );
|
||||
removeElementClass( "notebook_header_links", "invisible" );
|
||||
|
||||
var self = this;
|
||||
connect( notebook_header_name, "onclick", function ( event ) {
|
||||
|
@ -2882,14 +2868,6 @@ Wiki.prototype.end_notebook_rename = function ( new_notebook_name, prevent_renam
|
|||
} );
|
||||
}
|
||||
|
||||
var notebook_header_area = getElement( "notebook_header_area" );
|
||||
connect( notebook_header_area, "onmouseover", function ( event ) {
|
||||
removeElementClass( "notebook_header_links", "invisible" );
|
||||
} );
|
||||
connect( notebook_header_area, "onmouseout", function ( event ) {
|
||||
setTimeout( function () { addElementClass( "notebook_header_links", "invisible" ); }, 1000 );
|
||||
} );
|
||||
|
||||
// rename the notebook link on the right side of the page
|
||||
var notebook_link = getElement( "notebook_" + this.notebook.object_id );
|
||||
if ( notebook_link ) {
|
||||
|
|
|
@ -87,13 +87,13 @@ class Link_area( Div ):
|
|||
|
||||
( notebook.read_write == Notebook.READ_WRITE ) and Span(
|
||||
Div(
|
||||
A(
|
||||
( notebook.name != u"trash" ) and A(
|
||||
u"import",
|
||||
href = u"#",
|
||||
id = u"import_link",
|
||||
title = u"Import %ss from other software into Luminotes." % note_word,
|
||||
),
|
||||
u"|",
|
||||
) or None,
|
||||
( notebook.name != u"trash" ) and u"|" or None,
|
||||
A(
|
||||
u"export",
|
||||
href = u"#",
|
||||
|
@ -103,7 +103,7 @@ class Link_area( Div ):
|
|||
class_ = u"link_area_item",
|
||||
) or None,
|
||||
|
||||
Div(
|
||||
( notebook.name != u"trash" ) and Div(
|
||||
notebook.trash_id and A(
|
||||
u"trash",
|
||||
href = u"/notebooks/%s?parent_id=%s" % ( notebook.trash_id, notebook.object_id ),
|
||||
|
@ -118,9 +118,20 @@ class Link_area( Div ):
|
|||
title = u"Move this %s to the trash." % notebook_word,
|
||||
) or None,
|
||||
class_ = u"link_area_item",
|
||||
),
|
||||
) or None,
|
||||
|
||||
( notebook.owner and user.username and rate_plan.get( u"notebook_sharing" ) ) and Div(
|
||||
( notebook.owner and notebook.name != u"trash" ) and Div(
|
||||
A(
|
||||
u"rename",
|
||||
href = u"#",
|
||||
id = u"rename_notebook_link",
|
||||
title = u"Change the name of this %s." % notebook_word,
|
||||
),
|
||||
class_ = u"link_area_item",
|
||||
) or None,
|
||||
|
||||
( notebook.owner and notebook.name != u"trash" and
|
||||
user.username and rate_plan.get( u"notebook_sharing" ) ) and Div(
|
||||
A(
|
||||
u"share",
|
||||
href = u"#",
|
||||
|
|
|
@ -191,11 +191,7 @@ class Main_page( Page ):
|
|||
u" | ",
|
||||
A( u"go back", href = u"/notebooks/%s" % parent_id ),
|
||||
id = u"notebook_header_links",
|
||||
) or Span(
|
||||
A( u"rename", href = u"#", id = u"rename_notebook_link", title = u"Rename this notebook." ),
|
||||
id = u"notebook_header_links",
|
||||
class_ = u"invisible",
|
||||
),
|
||||
) or None,
|
||||
( notebook.name == u"Luminotes" and title == u"source code" ) and \
|
||||
Strong( "%s %s" % ( notebook.name, VERSION ) ) or \
|
||||
Span(
|
||||
|
|
Reference in New Issue