By popular demand, added a "save" button that becomes grayed out when everything is saved.
This commit is contained in:
parent
c04b888646
commit
ac5c8f6174
5
NEWS
5
NEWS
|
@ -1,3 +1,8 @@
|
||||||
|
1.4.20:
|
||||||
|
* By popular demand, added a "save" button that becomes grayed out when
|
||||||
|
everything is saved.
|
||||||
|
* Now displaying "saving" status text in addition to "loading".
|
||||||
|
|
||||||
1.4.19: July 29, 2008:
|
1.4.19: July 29, 2008:
|
||||||
* When scrolling to and then highlighting a note, do so serially instead of
|
* When scrolling to and then highlighting a note, do so serially instead of
|
||||||
in parallel.
|
in parallel.
|
||||||
|
|
|
@ -477,6 +477,14 @@ h1 {
|
||||||
background-color: #ffcc66;
|
background-color: #ffcc66;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note_button[disabled]:hover {
|
||||||
|
background-color: #d0e0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#save_button {
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.note_frame {
|
.note_frame {
|
||||||
margin: 0em;
|
margin: 0em;
|
||||||
padding: 0em;
|
padding: 0em;
|
||||||
|
|
|
@ -332,6 +332,14 @@ Wiki.prototype.populate = function ( startup_notes, current_notes, note_read_wri
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var save_button = getElement( "save_button" );
|
||||||
|
if ( save_button ) {
|
||||||
|
connect( save_button, "onclick", function ( event ) {
|
||||||
|
self.save_editor( null );
|
||||||
|
} );
|
||||||
|
save_button.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
var download_html_link = getElement( "download_html_link" );
|
var download_html_link = getElement( "download_html_link" );
|
||||||
if ( download_html_link ) {
|
if ( download_html_link ) {
|
||||||
connect( download_html_link, "onclick", function ( event ) {
|
connect( download_html_link, "onclick", function ( event ) {
|
||||||
|
@ -806,6 +814,14 @@ Wiki.prototype.editor_state_changed = function ( editor, link_clicked ) {
|
||||||
if ( !link_clicked )
|
if ( !link_clicked )
|
||||||
this.display_link_pulldown( editor );
|
this.display_link_pulldown( editor );
|
||||||
|
|
||||||
|
if ( editor.dirty() ) {
|
||||||
|
var save_button = getElement( "save_button" );
|
||||||
|
if ( save_button && save_button.disabled ) {
|
||||||
|
save_button.disabled = false;
|
||||||
|
save_button.value = "save";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
signal( this, "note_state_changed", editor );
|
signal( this, "note_state_changed", editor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1474,6 +1490,12 @@ Wiki.prototype.save_editor = function ( editor, fire_and_forget, callback, synch
|
||||||
self.display_storage_usage( result.storage_bytes );
|
self.display_storage_usage( result.storage_bytes );
|
||||||
editor.mark_clean();
|
editor.mark_clean();
|
||||||
|
|
||||||
|
var save_button = getElement( "save_button" );
|
||||||
|
if ( save_button ) {
|
||||||
|
save_button.disabled = true;
|
||||||
|
save_button.value = "saved";
|
||||||
|
}
|
||||||
|
|
||||||
if ( editor.startup )
|
if ( editor.startup )
|
||||||
self.startup_notes[ editor.id ] = true;
|
self.startup_notes[ editor.id ] = true;
|
||||||
else if ( self.startup_notes[ editor.id ] )
|
else if ( self.startup_notes[ editor.id ] )
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from Tags import Div, P, Span, H4, A, Strong, Img
|
from Tags import Div, P, Span, H4, A, Strong, Img, Input
|
||||||
from Rounded_div import Rounded_div
|
from Rounded_div import Rounded_div
|
||||||
from Search_form import Search_form
|
from Search_form import Search_form
|
||||||
|
|
||||||
|
@ -15,7 +15,18 @@ class Link_area( Div ):
|
||||||
self,
|
self,
|
||||||
Div(
|
Div(
|
||||||
Div(
|
Div(
|
||||||
H4( u"this notebook", id = u"this_notebook_area_title" ),
|
H4(
|
||||||
|
u"this notebook",
|
||||||
|
notebook.read_write and Input(
|
||||||
|
type = u"button",
|
||||||
|
class_ = u"note_button small_text",
|
||||||
|
id = u"save_button",
|
||||||
|
value = u"saved",
|
||||||
|
disabled = u"true",
|
||||||
|
title = u"save your work",
|
||||||
|
) or None,
|
||||||
|
id = u"this_notebook_area_title",
|
||||||
|
),
|
||||||
Div(
|
Div(
|
||||||
Search_form(),
|
Search_form(),
|
||||||
class_ = u"link_area_item",
|
class_ = u"link_area_item",
|
||||||
|
|
Reference in New Issue