This commit is contained in:
life
2015-05-10 01:57:14 +08:00
parent d6b35df9aa
commit f7c778b776
2 changed files with 5 additions and 4 deletions

View File

@@ -1805,6 +1805,10 @@ Note.toggleReadOnly = function() {
if(!note) {
return;
}
$('.created-time').html(goNowToDatetime(note.CreatedTime));
$('.updated-time').html(goNowToDatetime(note.UpdatedTime));
if(note.readOnly) {
return;
}
@@ -1816,9 +1820,6 @@ Note.toggleReadOnly = function() {
});
}
$('.created-time').html(goNowToDatetime(note.CreatedTime));
$('.updated-time').html(goNowToDatetime(note.UpdatedTime));
note.readOnly = true;
Note.readOnly = true;
};

View File

@@ -778,7 +778,7 @@ LeaAce = {
aceEditor.setOption("wrap", "free");
aceEditor.setShowInvisibles(false);
aceEditor.setAutoScrollEditorIntoView(true);
aceEditor.setReadOnly(true);
aceEditor.setReadOnly(Note.readOnly);
aceEditor.setOption("maxLines", 10000);
aceEditor.commands.addCommand({
name: "undo",