When viewing the trash, header/border/etc have their own trash color.
This commit is contained in:
parent
41372a2df8
commit
cebc6458cb
|
@ -351,8 +351,8 @@ ol li {
|
||||||
-webkit-border-radius: 0.5em;
|
-webkit-border-radius: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trash_notebook_name {
|
.current_trash_notebook_name {
|
||||||
background-color: #c0c0c0;
|
background-color: #d0d0d0;
|
||||||
-moz-border-radius: 0.5em;
|
-moz-border-radius: 0.5em;
|
||||||
-webkit-border-radius: 0.5em;
|
-webkit-border-radius: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,13 +61,9 @@ Wiki.prototype.display_user = function ( result ) {
|
||||||
for ( var i in result.notebooks ) {
|
for ( var i in result.notebooks ) {
|
||||||
var notebook = result.notebooks[ i ];
|
var notebook = result.notebooks[ i ];
|
||||||
|
|
||||||
if ( notebook.object_id == this.notebook_id ) {
|
var div_class = "link_area_item";
|
||||||
var div_class = "link_area_item current_notebook_name";
|
if ( notebook.object_id == this.notebook_id )
|
||||||
var header_area = getElement( "notebook_header_area" );
|
div_class += " current_notebook_name";
|
||||||
replaceChildNodes( header_area, createDOM( "span", {}, notebook.name ) );
|
|
||||||
} else {
|
|
||||||
var div_class = "link_area_item";
|
|
||||||
}
|
|
||||||
|
|
||||||
appendChildNodes( span, createDOM( "div", {
|
appendChildNodes( span, createDOM( "div", {
|
||||||
"class": div_class
|
"class": div_class
|
||||||
|
@ -96,10 +92,13 @@ Wiki.prototype.populate = function ( result ) {
|
||||||
this.notebook = result.notebook;
|
this.notebook = result.notebook;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var header_area = getElement( "notebook_header_area" );
|
||||||
|
replaceChildNodes( header_area, createDOM( "span", {}, this.notebook.name ) );
|
||||||
|
|
||||||
var span = createDOM( "span" );
|
var span = createDOM( "span" );
|
||||||
replaceChildNodes( "this_notebook_area", span );
|
replaceChildNodes( "this_notebook_area", span );
|
||||||
|
|
||||||
appendChildNodes( span, createDOM( "h3", this.notebook.name ) );
|
appendChildNodes( span, createDOM( "h3", "this notebook" ) );
|
||||||
appendChildNodes( span, createDOM( "div", { "class": "link_area_item" },
|
appendChildNodes( span, createDOM( "div", { "class": "link_area_item" },
|
||||||
createDOM( "a", { "href": "/notebooks/" + this.notebook.object_id, "id": "recent_notes_link", "title": "View the most recently updated notes." }, "recent notes" )
|
createDOM( "a", { "href": "/notebooks/" + this.notebook.object_id, "id": "recent_notes_link", "title": "View the most recently updated notes." }, "recent notes" )
|
||||||
) );
|
) );
|
||||||
|
@ -113,8 +112,28 @@ Wiki.prototype.populate = function ( result ) {
|
||||||
|
|
||||||
if ( this.notebook.trash ) {
|
if ( this.notebook.trash ) {
|
||||||
appendChildNodes( span, createDOM( "div", { "class": "link_area_item" },
|
appendChildNodes( span, createDOM( "div", { "class": "link_area_item" },
|
||||||
createDOM( "a", { "href": "/notebooks/" + this.notebook.trash.object_id, "id": "trash_link", "title": "Look here for notes you've deleted." }, "trash" )
|
createDOM( "a", {
|
||||||
|
"href": "/notebooks/" + this.notebook.trash.object_id,
|
||||||
|
"id": "trash_link",
|
||||||
|
"title": "Look here for notes you've deleted."
|
||||||
|
}, "trash" )
|
||||||
) );
|
) );
|
||||||
|
} else if ( this.notebook.name == "trash" ) {
|
||||||
|
appendChildNodes( span, createDOM( "div", { "class": "link_area_item current_trash_notebook_name" },
|
||||||
|
createDOM( "a", {
|
||||||
|
"href": "/notebooks/" + this.notebook.object_id,
|
||||||
|
"id": "trash_link",
|
||||||
|
"title": "Look here for notes you've deleted."
|
||||||
|
}, "trash" )
|
||||||
|
) );
|
||||||
|
|
||||||
|
var header_area = getElement( "notebook_header_area" )
|
||||||
|
removeElementClass( header_area, "current_notebook_name" );
|
||||||
|
addElementClass( header_area, "current_trash_notebook_name" );
|
||||||
|
|
||||||
|
var border = getElement( "notebook_border" )
|
||||||
|
removeElementClass( border, "current_notebook_name" );
|
||||||
|
addElementClass( border, "current_trash_notebook_name" );
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( window, "onunload", function ( event ) { self.editor_focused( null, true ); } );
|
connect( window, "onunload", function ( event ) { self.editor_focused( null, true ); } );
|
||||||
|
|
Reference in New Issue
Block a user