Merge branch 'master' of github.com:standardnotes/web into ivs

This commit is contained in:
Mo Bitar
2017-03-18 15:48:42 -05:00
20 changed files with 179 additions and 130 deletions

View File

@@ -46,7 +46,12 @@ angular.module('app.frontend')
} }
}.bind(this), false); }.bind(this), false);
$rootScope.$on("tag-changed", function(){
this.loadTagsString();
}.bind(this));
this.setNote = function(note, oldNote) { this.setNote = function(note, oldNote) {
this.noteReady = false;
var currentEditor = this.customEditor; var currentEditor = this.customEditor;
this.customEditor = null; this.customEditor = null;
this.showExtensions = false; this.showExtensions = false;
@@ -56,6 +61,7 @@ angular.module('app.frontend')
var setEditor = function(editor) { var setEditor = function(editor) {
this.customEditor = editor; this.customEditor = editor;
this.postNoteToExternalEditor(); this.postNoteToExternalEditor();
this.noteReady = true;
}.bind(this) }.bind(this)
var editor = this.editorForNote(note); var editor = this.editorForNote(note);
@@ -71,6 +77,7 @@ angular.module('app.frontend')
} }
} else { } else {
this.customEditor = null; this.customEditor = null;
this.noteReady = true;
} }
if(note.safeText().length == 0 && note.dummy) { if(note.safeText().length == 0 && note.dummy) {

View File

@@ -91,18 +91,19 @@ angular.module('app.frontend')
$scope.tagsSave = function(tag, callback) { $scope.tagsSave = function(tag, callback) {
if(!tag.title || tag.title.length == 0) { if(!tag.title || tag.title.length == 0) {
$scope.notesRemoveTag(tag); $scope.removeTag(tag);
return; return;
} }
tag.setDirty(true); tag.setDirty(true);
syncManager.sync(callback); syncManager.sync(callback);
$rootScope.$broadcast("tag-changed");
} }
/* /*
Notes Ctrl Callbacks Notes Ctrl Callbacks
*/ */
$scope.notesRemoveTag = function(tag) { $scope.removeTag = function(tag) {
var validNotes = Note.filterDummyNotes(tag.notes); var validNotes = Note.filterDummyNotes(tag.notes);
if(validNotes == 0) { if(validNotes == 0) {
modelManager.setItemToBeDeleted(tag); modelManager.setItemToBeDeleted(tag);

View File

@@ -4,8 +4,7 @@ angular.module('app.frontend')
scope: { scope: {
addNew: "&", addNew: "&",
selectionMade: "&", selectionMade: "&",
tag: "=", tag: "="
removeTag: "&"
}, },
templateUrl: 'frontend/notes.html', templateUrl: 'frontend/notes.html',
@@ -69,11 +68,6 @@ angular.module('app.frontend')
this.selectFirstNote(createNew); this.selectFirstNote(createNew);
} }
this.selectedTagDelete = function() {
this.showMenu = false;
this.removeTag()(this.tag);
}
this.selectFirstNote = function(createNew) { this.selectFirstNote = function(createNew) {
var visibleNotes = this.sortedNotes.filter(function(note){ var visibleNotes = this.sortedNotes.filter(function(note){
return note.visible; return note.visible;

View File

@@ -9,7 +9,8 @@ angular.module('app.frontend')
save: "&", save: "&",
tags: "=", tags: "=",
allTag: "=", allTag: "=",
updateNoteTag: "&" updateNoteTag: "&",
removeTag: "&"
}, },
templateUrl: 'frontend/tags.html', templateUrl: 'frontend/tags.html',
replace: true, replace: true,
@@ -32,7 +33,7 @@ angular.module('app.frontend')
} }
} }
}) })
.controller('TagsCtrl', function (modelManager) { .controller('TagsCtrl', function (modelManager, $timeout) {
var initialLoad = true; var initialLoad = true;
@@ -68,11 +69,6 @@ angular.module('app.frontend')
this.addNew()(this.newTag); this.addNew()(this.newTag);
} }
var originalTagName = "";
this.onTagTitleFocus = function(tag) {
originalTagName = tag.title;
}
this.tagTitleDidChange = function(tag) { this.tagTitleDidChange = function(tag) {
this.editingTag = tag; this.editingTag = tag;
} }
@@ -98,6 +94,23 @@ angular.module('app.frontend')
}.bind(this)); }.bind(this));
} }
function inputElementForTag(tag) {
return document.getElementById("tag-" + tag.uuid);
}
var originalTagName = "";
this.selectedRenameTag = function($event, tag) {
originalTagName = tag.title;
this.editingTag = tag;
$timeout(function(){
inputElementForTag(tag).focus();
})
}
this.selectedDeleteTag = function(tag) {
this.removeTag()(tag);
}
this.noteCount = function(tag) { this.noteCount = function(tag) {
var validNotes = Note.filterDummyNotes(tag.notes); var validNotes = Note.filterDummyNotes(tag.notes);
return validNotes.length; return validNotes.length;

View File

@@ -98,11 +98,17 @@ class AccountMenu {
} }
$scope.submitRegistrationForm = function() { $scope.submitRegistrationForm = function() {
var confirmation = prompt("Please confirm your password. Note that because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.") $scope.formData.confirmPassword = true;
}
$scope.submitPasswordConfirmation = function() {
let confirmation = $scope.formData.pw_confirmation;
if(confirmation !== $scope.formData.user_password) { if(confirmation !== $scope.formData.user_password) {
alert("The two passwords you entered do not match. Please try again."); alert("The two passwords you entered do not match. Please try again.");
return; return;
} }
$scope.formData.confirmPassword = false;
$scope.formData.status = "Generating Account Keys..."; $scope.formData.status = "Generating Account Keys...";
$timeout(function(){ $timeout(function(){

View File

@@ -92,6 +92,10 @@ class ExtensionManager {
*/ */
retrieveExtensionFromServer(url, callback) { retrieveExtensionFromServer(url, callback) {
this.httpManager.getAbsolute(url, {}, function(response){ this.httpManager.getAbsolute(url, {}, function(response){
if(typeof response !== 'object') {
callback(null);
return;
}
var ext = this.handleExtensionLoadExternalResponseItem(url, response); var ext = this.handleExtensionLoadExternalResponseItem(url, response);
if(callback) { if(callback) {
callback(ext); callback(ext);

View File

@@ -28,7 +28,9 @@ class HttpManager {
if (xmlhttp.readyState == 4) { if (xmlhttp.readyState == 4) {
var response = xmlhttp.responseText; var response = xmlhttp.responseText;
if(response) { if(response) {
response = JSON.parse(response); try {
response = JSON.parse(response);
} catch(e) {}
} }
if(xmlhttp.status >= 200 && xmlhttp.status <= 299){ if(xmlhttp.status >= 200 && xmlhttp.status <= 299){

View File

@@ -10,7 +10,7 @@ class SyncManager {
} }
get serverURL() { get serverURL() {
return localStorage.getItem("server") || "https://n3.standardnotes.org"; return localStorage.getItem("server") || window._default_sf_server;
} }
get masterKey() { get masterKey() {

View File

@@ -5,6 +5,7 @@ $heading-height: 75px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: hidden; overflow-y: hidden;
background-color: white;
&.fullscreen { &.fullscreen {
width: 100%; width: 100%;
@@ -15,24 +16,19 @@ $heading-height: 75px;
padding: 0; padding: 0;
} }
.section-title-bar {
border-bottom: none !important;
height: $heading-height !important;
}
.section-menu { .section-menu {
flex: 1 0 28px; flex: 1 0 28px;
max-height: 28px; max-height: 28px;
} }
} }
.editor-heading { #editor-title-bar {
width: 100%; width: 100%;
padding: 15px; padding: 20px;
padding-top: 0px;
background-color: white; background-color: white;
border-bottom: none;
height: $heading-height;
min-height: $heading-height; min-height: $heading-height;
padding-right: 10px; padding-right: 10px;
@@ -63,8 +59,8 @@ $heading-height: 75px;
} }
.save-status { #save-status {
width: 20% !important; width: 20%;
float: right; float: right;
position: absolute; position: absolute;
@@ -73,12 +69,11 @@ $heading-height: 75px;
text-transform: none; text-transform: none;
font-weight: normal; font-weight: normal;
margin-top: 4px; margin-top: 4px;
width: 120px;
text-align: right; text-align: right;
color: rgba(black, 0.23); color: rgba(black, 0.23);
} }
.tags { .editor-tags {
clear: left; clear: left;
width: 100%; width: 100%;
height: 25px; height: 25px;
@@ -125,6 +120,8 @@ $heading-height: 75px;
padding: 85px 10%; padding: 85px 10%;
max-width: 1200px; max-width: 1200px;
display: inline-block; display: inline-block;
margin-left: auto;
margin-right: auto;
} }
} }
} }

View File

@@ -13,7 +13,7 @@ h2 {
margin-top: 0px; margin-top: 0px;
} }
.footer-bar { #footer-bar {
position: relative; position: relative;
width: 100%; width: 100%;
padding: 5px; padding: 5px;
@@ -23,7 +23,6 @@ h2 {
z-index: 100; z-index: 100;
font-size: 10px; font-size: 10px;
color: $dark-gray; color: $dark-gray;
border-bottom: 1px solid rgba(#979799, 0.4);
.medium-text { .medium-text {
font-size: 14px; font-size: 14px;
@@ -35,11 +34,11 @@ h2 {
color: $blue-color; color: $blue-color;
&.gray { &.gray {
color: $dark-gray !important; color: $dark-gray;
} }
&.block { &.block {
display: block !important; display: block;
} }
} }
@@ -59,14 +58,14 @@ h2 {
h3 { h3 {
font-size: 14px !important; font-size: 14px ;
margin-top: 4px !important; margin-top: 4px ;
margin-bottom: 3px !important; margin-bottom: 3px;
} }
h4 { h4 {
margin-bottom: 4px !important; margin-bottom: 4px;
font-size: 13px !important; font-size: 13px;
} }
section { section {
@@ -88,7 +87,7 @@ h2 {
} }
} }
.footer-bar-link { #footer-bar .footer-bar-link {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
margin-left: 8px; margin-left: 8px;
@@ -161,11 +160,6 @@ button.light {
border: 1px solid rgba(gray, 0.2); border: 1px solid rgba(gray, 0.2);
} }
.item.last-refreshed {
font-weight: normal !important;
cursor: default !important;
}
a.disabled { a.disabled {
pointer-events: none; pointer-events: none;
} }

View File

@@ -180,7 +180,7 @@ button:focus {outline:0;}
background-image: none; background-image: none;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: 0;
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
} }

View File

@@ -8,12 +8,12 @@
$notes-title-bar-height: 130px; $notes-title-bar-height: 130px;
.notes-title-bar { #notes-title-bar {
color: rgba(black, 0.40); color: rgba(black, 0.40);
padding-top: 16px !important; padding-top: 16px;
height: $notes-title-bar-height !important; height: $notes-title-bar-height;
font-weight: normal !important; font-weight: normal;
font-size: 18px !important; font-size: 18px;
} }
.tag-menu-bar { .tag-menu-bar {

View File

@@ -1,31 +1,30 @@
.tags { .tags {
// width: 15%;
flex: 1 10%; flex: 1 10%;
max-width: 180px; max-width: 180px;
min-width: 100px; min-width: 100px;
$tags-title-bar-height: 55px; $tags-title-bar-height: 55px;
.tags-title-bar { #tags-title-bar {
color: black; color: black;
height: $tags-title-bar-height !important; height: $tags-title-bar-height;
padding-left: 12px !important; padding-left: 12px;
padding-right: 12px !important; padding-right: 12px;
font-size: 12px !important; font-size: 12px;
color: rgba(black, 0.8); color: rgba(black, 0.8);
} }
.content { #tags-content {
background-color: #f6f6f6 !important; background-color: #f6f6f6;
} }
.tag-add-button { #tag-add-button {
margin-top: -6px; margin-top: -6px;
background-color: #d7d7d7 !important; background-color: #d7d7d7;
float: right; float: right;
&:hover { &:hover {
background-color: rgba(#d7d7d7, 0.8) !important; background-color: rgba(#d7d7d7, 0.8);
} }
} }
@@ -34,36 +33,54 @@
} }
.tag { .tag {
height: 30px; min-height: 30px;
padding: 5px 12px; padding: 5px 12px;
cursor: pointer; cursor: pointer;
transition: height .1s ease-in-out; transition: height .1s ease-in-out;
position: relative; position: relative;
font-size: 14px; font-size: 14px;
> .icon { > .info {
float: left; height: 20px;
padding-top: 6px;
margin-right: 5px; > .title {
width: 80%;
background-color: transparent;
font-weight: 600;
float: left;
color: $main-text-color;
border: none;
cursor: pointer;
text-overflow: ellipsis;
width: 75%;
pointer-events: none;
}
> .count {
position: absolute;
right: 17px;
padding-top: 1px;
font-weight: bold;
}
} }
> .title { > .menu {
width: 80%; font-size: 11px;
background-color: transparent;
font-weight: 600;
float: left;
color: $main-text-color;
border: none;
cursor: pointer;
text-overflow: ellipsis;
width: 75%;
}
> .count { > .item {
position: absolute; margin-right: 2px;
right: 17px; }
padding-top: 1px;
opacity: 0.5;
font-weight: bold; font-weight: bold;
clear: both;
margin-top: 2px;
margin-bottom: 2px;
&:hover {
opacity: 1.0;
}
} }
$tags-selected-color: #dbdbdb; $tags-selected-color: #dbdbdb;

View File

@@ -1,26 +1,35 @@
.panel.panel-default.panel-right.account-data-menu .panel.panel-default.panel-right.account-data-menu
.panel-body.large-padding .panel-body.large-padding
%div{"ng-if" => "!user"} %div{"ng-if" => "!user"}
%p Enter your <a href="https://standardnotes.org" target="_blank">Standard File</a> account information. You can also register for free using the default server address. %div{"ng-if" => "!formData.confirmPassword"}
.small-v-space %p Enter your <a href="https://standardnotes.org" target="_blank">Standard File</a> account information. You can also register for free using the default server address.
.small-v-space
%form.account-form.mt-5{'name' => "loginForm"} %form.mt-5
%input.form-control{:name => 'server', :placeholder => 'Server URL', :required => true, :type => 'text', 'ng-model' => 'formData.url'} %input.form-control{:name => 'server', :placeholder => 'Server URL', :required => true, :type => 'text', 'ng-model' => 'formData.url'}
%input.form-control{:autofocus => 'autofocus', :name => 'email', :placeholder => 'Email', :required => true, :type => 'email', 'ng-model' => 'formData.email'} %input.form-control{:autofocus => 'autofocus', :name => 'email', :placeholder => 'Email', :required => true, :type => 'email', 'ng-model' => 'formData.email'}
%input.form-control{:placeholder => 'Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'formData.user_password'} %input.form-control{:placeholder => 'Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'formData.user_password'}
.checkbox{"ng-if" => "localNotesCount() > 0"} .checkbox{"ng-if" => "localNotesCount() > 0"}
%label %label
%input{"type" => "checkbox", "ng-model" => "formData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"} %input{"type" => "checkbox", "ng-model" => "formData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"}
Merge local notes ({{localNotesCount()}} notes) Merge local notes ({{localNotesCount()}} notes)
%div{"ng-if" => "!formData.status"} %div{"ng-if" => "!formData.status"}
%button.btn.dark-button.half-button{"ng-click" => "loginSubmitPressed()", "data-style" => "expand-right", "data-size" => "s", "state" => "buttonState"} %button.btn.dark-button.half-button{"ng-click" => "loginSubmitPressed()"}
%span Sign In %span Sign In
%button.btn.dark-button.half-button{"ng-click" => "submitRegistrationForm()", "data-style" => "expand-right", "data-size" => "s", "state" => "buttonState"} %button.btn.dark-button.half-button{"ng-click" => "submitRegistrationForm()"}
%span Register %span Register
%br %br
.block{"style" => "margin-top: 10px; font-size: 14px; font-weight: bold; text-align: center;"} .block{"style" => "margin-top: 10px; font-size: 14px; font-weight: bold; text-align: center;"}
%a.btn{"ng-click" => "showResetForm = !showResetForm"} Passwords cannot be forgotten. %a.btn{"ng-click" => "showResetForm = !showResetForm"} Passwords cannot be forgotten.
%div{"ng-if" => "formData.confirmPassword"}
%h3 Confirm your password.
%p.mt-5 Note that because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.
%form.mt-10
%input.form-control{:placeholder => 'Confirm Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'formData.pw_confirmation'}
%button.btn.dark-button.btn-block{"ng-click" => "submitPasswordConfirmation()"}
%span Confirm
%em.block.center-align.mt-10{"ng-if" => "formData.status", "style" => "font-size: 14px;"} {{formData.status}} %em.block.center-align.mt-10{"ng-if" => "formData.status", "style" => "font-size: 14px;"} {{formData.status}}

View File

@@ -1,11 +1,11 @@
.section.editor{"ng-class" => "{'fullscreen' : ctrl.fullscreen}"} .section.editor{"ng-class" => "{'fullscreen' : ctrl.fullscreen}"}
.section-title-bar.editor-heading{"ng-if" => "ctrl.note", "ng-class" => "{'fullscreen' : ctrl.fullscreen }"} #editor-title-bar.section-title-bar{"ng-if" => "ctrl.note", "ng-class" => "{'fullscreen' : ctrl.fullscreen }"}
.title .title
%input.input#note-title-editor{"ng-model" => "ctrl.note.title", "ng-keyup" => "$event.keyCode == 13 && ctrl.saveTitle($event)", %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()", "ng-change" => "ctrl.nameChanged()", "ng-focus" => "ctrl.onNameFocus()",
"select-on-click" => "true"} "select-on-click" => "true"}
.save-status{"ng-class" => "{'red bold': ctrl.saveError}", "ng-bind-html" => "ctrl.noteStatus"} #save-status{"ng-class" => "{'red bold': ctrl.saveError}", "ng-bind-html" => "ctrl.noteStatus"}
.tags .editor-tags
%input.tags-input{"type" => "text", "ng-keyup" => "$event.keyCode == 13 && $event.target.blur();", %input.tags-input{"type" => "text", "ng-keyup" => "$event.keyCode == 13 && $event.target.blur();",
"ng-model" => "ctrl.tagsString", "placeholder" => "#tags", "ng-blur" => "ctrl.updateTagsFromTagsString($event, ctrl.tagsString)"} "ng-model" => "ctrl.tagsString", "placeholder" => "#tags", "ng-blur" => "ctrl.updateTagsFromTagsString($event, ctrl.tagsString)"}
.section-menu{"ng-if" => "ctrl.note"} .section-menu{"ng-if" => "ctrl.note"}
@@ -38,7 +38,7 @@
%span.sr-only %span.sr-only
%contextual-extensions-menu{"ng-if" => "ctrl.showExtensions", "item" => "ctrl.note"} %contextual-extensions-menu{"ng-if" => "ctrl.showExtensions", "item" => "ctrl.note"}
.editor-content{"ng-class" => "{'fullscreen' : ctrl.fullscreen }"} .editor-content{"ng-if" => "ctrl.noteReady", "ng-class" => "{'fullscreen' : ctrl.fullscreen }"}
%iframe#editor-iframe{"ng-if" => "ctrl.customEditor", "ng-src" => "{{ctrl.customEditor.url | trusted}}", "frameBorder" => "0", "style" => "width: 100%;"} %iframe#editor-iframe{"ng-if" => "ctrl.customEditor", "ng-src" => "{{ctrl.customEditor.url | trusted}}", "frameBorder" => "0", "style" => "width: 100%;"}
%textarea.editable#note-text-editor{"ng-if" => "!ctrl.customEditor", "ng-class" => "{'fullscreen' : ctrl.fullscreen }", "ng-model" => "ctrl.note.text", %textarea.editable#note-text-editor{"ng-if" => "!ctrl.customEditor", "ng-class" => "{'fullscreen' : ctrl.fullscreen }", "ng-model" => "ctrl.note.text",
"ng-change" => "ctrl.contentChanged()", "ng-click" => "ctrl.clickedTextArea()", "ng-focus" => "ctrl.onContentFocus()"} "ng-change" => "ctrl.contentChanged()", "ng-click" => "ctrl.clickedTextArea()", "ng-focus" => "ctrl.onContentFocus()"}

View File

@@ -1,4 +1,4 @@
.footer-bar #footer-bar
.pull-left .pull-left
.footer-bar-link{"click-outside" => "ctrl.showAccountMenu = false;", "is-open" => "ctrl.showAccountMenu"} .footer-bar-link{"click-outside" => "ctrl.showAccountMenu = false;", "is-open" => "ctrl.showAccountMenu"}
%a{"ng-click" => "ctrl.accountMenuPressed()", "ng-class" => "{red: ctrl.error}"} Account %a{"ng-click" => "ctrl.accountMenuPressed()", "ng-class" => "{red: ctrl.error}"} Account

View File

@@ -1,10 +1,9 @@
.main-ui-view .main-ui-view
.app .app
%tags-section{"save" => "tagsSave", "add-new" => "tagsAddNew", "will-select" => "tagsWillMakeSelection", "selection-made" => "tagsSelectionMade", "all-tag" => "allTag", %tags-section{"save" => "tagsSave", "add-new" => "tagsAddNew", "will-select" => "tagsWillMakeSelection", "selection-made" => "tagsSelectionMade", "all-tag" => "allTag",
"tags" => "tags"} "tags" => "tags", "remove-tag" => "removeTag"}
%notes-section{"remove-tag" => "notesRemoveTag", "add-new" => "notesAddNew", "selection-made" => "notesSelectionMade", %notes-section{"add-new" => "notesAddNew", "selection-made" => "notesSelectionMade", "tag" => "selectedTag"}
"tag" => "selectedTag"}
%editor-section{"note" => "selectedNote", "remove" => "deleteNote", "save" => "saveNote", "update-tags" => "updateTagsForNote"} %editor-section{"note" => "selectedNote", "remove" => "deleteNote", "save" => "saveNote", "update-tags" => "updateTagsForNote"}

View File

@@ -1,6 +1,6 @@
.section.notes .section.notes
.content .content
.section-title-bar.notes-title-bar .section-title-bar#notes-title-bar
.title {{ctrl.tag.title}} notes .title {{ctrl.tag.title}} notes
.add-button{"ng-click" => "ctrl.createNewNote()"} + .add-button{"ng-click" => "ctrl.createNewNote()"} +
%br %br
@@ -10,7 +10,7 @@
%ul.nav.nav-pills %ul.nav.nav-pills
%li.dropdown %li.dropdown
%a.dropdown-toggle{"ng-click" => "ctrl.showMenu = !ctrl.showMenu"} %a.dropdown-toggle{"ng-click" => "ctrl.showMenu = !ctrl.showMenu"}
Menu Sort
%span.caret %span.caret
%span.sr-only %span.sr-only
@@ -18,13 +18,11 @@
%li %li
%a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedSortByCreated()"} %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedSortByCreated()"}
%span.top.mt-5.mr-5{"ng-if" => "ctrl.sortBy == 'created_at'"} ✓ %span.top.mt-5.mr-5{"ng-if" => "ctrl.sortBy == 'created_at'"} ✓
Sort by date created By date added
%li %li
%a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedSortByUpdated()"} %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedSortByUpdated()"}
%span.top.mt-5.mr-5{"ng-if" => "ctrl.sortBy == 'updated_at'"} ✓ %span.top.mt-5.mr-5{"ng-if" => "ctrl.sortBy == 'updated_at'"} ✓
Sort by date updated By date modified
%li
%a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedTagDelete()"} Delete Tag
.scrollable .scrollable
.infinite-scroll{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"} .infinite-scroll{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"}

View File

@@ -1,18 +1,22 @@
.section.tags .section.tags
.content #tags-content.content
.section-title-bar.tags-title-bar #tags-title-bar.section-title-bar
.title Tags .title Tags
.add-button.tag-add-button{"ng-click" => "ctrl.clickedAddNewTag()"} + .add-button#tag-add-button{"ng-click" => "ctrl.clickedAddNewTag()"} +
{{ctrl.test}} {{ctrl.test}}
.scrollable .scrollable
.tag{"ng-if" => "ctrl.allTag", "ng-click" => "ctrl.selectTag(ctrl.allTag)", "ng-class" => "{'selected' : ctrl.selectedTag == ctrl.allTag}"} .tag{"ng-if" => "ctrl.allTag", "ng-click" => "ctrl.selectTag(ctrl.allTag)", "ng-class" => "{'selected' : ctrl.selectedTag == ctrl.allTag}"}
%input.title{"ng-disabled" => "true", "ng-model" => "ctrl.allTag.title"} .info
.count {{ctrl.noteCount(ctrl.allTag)}} %input.title{"ng-disabled" => "true", "ng-model" => "ctrl.allTag.title"}
.tag{"ng-repeat" => "tag in ctrl.tags", "ng-click" => "ctrl.selectTag(tag)", "ng-class" => "{'selected' : ctrl.selectedTag == tag}", .count {{ctrl.noteCount(ctrl.allTag)}}
"droppable" => true, "drop" => "ctrl.handleDrop", "tag" => "tag"} .tag{"ng-repeat" => "tag in ctrl.tags", "ng-click" => "ctrl.selectTag(tag)", "ng-class" => "{'selected' : ctrl.selectedTag == tag}"}
.info
%input.title{"ng-disabled" => "tag != ctrl.selectedTag", "ng-model" => "tag.title", %input.title{"ng-attr-id" => "tag-{{tag.uuid}}", "ng-click" => "ctrl.selectTag(tag)", "ng-model" => "tag.title",
"ng-keyup" => "$event.keyCode == 13 && ctrl.saveTag($event, tag)", "mb-autofocus" => "true", "should-focus" => "ctrl.newTag", "ng-keyup" => "$event.keyCode == 13 && ctrl.saveTag($event, tag)", "mb-autofocus" => "true", "should-focus" => "ctrl.newTag || ctrl.editingTag == tag",
"ng-change" => "ctrl.tagTitleDidChange(tag)", "ng-focus" => "ctrl.onTagTitleFocus(tag)", "ng-blur" => "ctrl.saveTag($event, tag)"} "ng-change" => "ctrl.tagTitleDidChange(tag)", "ng-blur" => "ctrl.saveTag($event, tag)", "spellcheck" => "false"}
.count {{ctrl.noteCount(tag)}} .count {{ctrl.noteCount(tag)}}
.menu{"ng-if" => "ctrl.selectedTag == tag"}
%a.item{"ng-click" => "ctrl.selectedRenameTag($event, tag)", "ng-if" => "!ctrl.editingTag"} Rename
%a.item{"ng-click" => "ctrl.saveTag($event, tag)", "ng-if" => "ctrl.editingTag"} Save
%a.item{"ng-click" => "ctrl.selectedDeleteTag(tag)"} Delete

View File

@@ -28,6 +28,10 @@
<meta name="og:title" content="Standard Notes, a private and secure notes app."/> <meta name="og:title" content="Standard Notes, a private and secure notes app."/>
<meta name="og:description" content="Standard Notes is a basic notes app that delivers only the essentials in note taking. Because of its simplicity and resistance to growth, users can count on durability and convenience."/> <meta name="og:description" content="Standard Notes is a basic notes app that delivers only the essentials in note taking. Because of its simplicity and resistance to growth, users can count on durability and convenience."/>
<script>
window._default_sf_server = "<%= ENV['SF_DEFAULT_SERVER'] %>";
</script>
<% if Rails.env.development? %> <% if Rails.env.development? %>
<%= javascript_include_tag "compiled.js", debug: true %> <%= javascript_include_tag "compiled.js", debug: true %>
<% else %> <% else %>