updates
This commit is contained in:
@@ -8,14 +8,6 @@ class BaseCtrl {
|
||||
// $auth.updatePassword(data);
|
||||
// apiController.setMk(new_keys.mk);
|
||||
// }
|
||||
|
||||
// var note = new Note();
|
||||
// note.content = {title: "hello", text: "world"};
|
||||
// console.log("note content", note.content);
|
||||
// console.log("note title", note.title);
|
||||
// console.log("note json", JSON.stringify(note));
|
||||
//
|
||||
// console.log("Copy", _.cloneDeep(note));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ angular.module('app.frontend')
|
||||
|
||||
this.setNote = function(note, oldNote) {
|
||||
this.editorMode = 'edit';
|
||||
if(note.content.text.length == 0) {
|
||||
if(note.content.text.length == 0 && note.dummy) {
|
||||
this.focusTitle(100);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,10 @@ angular.module('app.frontend')
|
||||
this.changesMade = function() {
|
||||
this.note.hasChanges = true;
|
||||
this.note.dummy = false;
|
||||
apiController.saveDraftToDisk(this.note);
|
||||
if(this.user.uuid) {
|
||||
// signed out users have local autosave, dont need draft saving
|
||||
apiController.saveDraftToDisk(this.note);
|
||||
}
|
||||
|
||||
if(saveTimeout) $timeout.cancel(saveTimeout);
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
|
||||
@@ -74,6 +74,7 @@ angular.module('app.frontend')
|
||||
$timeout(function(){
|
||||
apiController.login(this.loginData.email, this.loginData.user_password, function(response){
|
||||
if(response.errors) {
|
||||
console.log("login error", response.errors);
|
||||
this.loginData.status = response.errors[0];
|
||||
} else {
|
||||
this.onAuthSuccess(response.user);
|
||||
|
||||
@@ -122,7 +122,7 @@ angular.module('app.frontend')
|
||||
if(this.noteFilter.text.length == 0) {
|
||||
note.visible = true;
|
||||
} else {
|
||||
note.visible = note.title.toLowerCase().includes(this.noteFilter.text) || note.text.toLowerCase().includes(this.noteFilter.text);
|
||||
note.visible = note.content.title.toLowerCase().includes(this.noteFilter.text) || note.content.text.toLowerCase().includes(this.noteFilter.text);
|
||||
}
|
||||
return note.visible;
|
||||
}.bind(this)
|
||||
|
||||
Reference in New Issue
Block a user