styles
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
angular.module('app.frontend')
|
||||
.directive("editorSection", function($timeout){
|
||||
.directive("editorSection", function($timeout, $sce){
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
@@ -153,13 +153,13 @@ angular.module('app.frontend')
|
||||
status += " (offline)";
|
||||
}
|
||||
this.saveError = false;
|
||||
this.noteStatus = status;
|
||||
this.noteStatus = $sce.trustAsHtml(status);
|
||||
}.bind(this), 200)
|
||||
} else {
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
statusTimeout = $timeout(function(){
|
||||
this.saveError = true;
|
||||
this.noteStatus = "Error saving"
|
||||
this.noteStatus = $sce.trustAsHtml("Error syncing<br>(changed saved offline)")
|
||||
}.bind(this), 200)
|
||||
}
|
||||
}.bind(this));
|
||||
@@ -179,7 +179,7 @@ angular.module('app.frontend')
|
||||
if(saveTimeout) $timeout.cancel(saveTimeout);
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
saveTimeout = $timeout(function(){
|
||||
this.noteStatus = "Saving...";
|
||||
this.noteStatus = $sce.trustAsHtml("Saving...");
|
||||
this.saveNote();
|
||||
}.bind(this), 275)
|
||||
}
|
||||
|
||||
@@ -107,7 +107,9 @@ angular.module('app.frontend')
|
||||
$scope.didShowErrorAlert = true;
|
||||
alert("There was an error saving your note. Please try again.");
|
||||
}
|
||||
callback(false);
|
||||
if(callback) {
|
||||
callback(false);
|
||||
}
|
||||
} else {
|
||||
note.hasChanges = false;
|
||||
if(callback) {
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
.save-status {
|
||||
width: 20% !important;
|
||||
float: right;
|
||||
position: absolute;
|
||||
|
||||
right: 20px;
|
||||
font-size: 12px;
|
||||
text-transform: none;
|
||||
font-weight: normal;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%input.input#note-title-editor{"ng-model" => "ctrl.note.title", "ng-keyup" => "$event.keyCode == 13 && ctrl.saveTitle($event)",
|
||||
"ng-change" => "ctrl.nameChanged()", "ng-focus" => "ctrl.onNameFocus()",
|
||||
"select-on-click" => "true"}
|
||||
.save-status{"ng-class" => "{'red bold': ctrl.saveError}"} {{ctrl.noteStatus}}
|
||||
.save-status{"ng-class" => "{'red bold': ctrl.saveError}", "ng-bind-html" => "ctrl.noteStatus"}
|
||||
.tags
|
||||
%input.tags-input{"type" => "text", "ng-keyup" => "$event.keyCode == 13 && ctrl.updateTagsFromTagsString($event, ctrl.tagsString)",
|
||||
"ng-model" => "ctrl.tagsString", "placeholder" => "#tags", "ng-blur" => "ctrl.updateTagsFromTagsString($event, ctrl.tagsString)"}
|
||||
|
||||
Reference in New Issue
Block a user