refactor(desktop): rename searchEntered to searchSubmitted
Referencing issue standardnotes/web#263
This commit is contained in:
@@ -34,7 +34,7 @@ angular.module('app')
|
|||||||
.controller('NotesCtrl', function (authManager, $timeout, $rootScope, modelManager, storageManager, desktopManager) {
|
.controller('NotesCtrl', function (authManager, $timeout, $rootScope, modelManager, storageManager, desktopManager) {
|
||||||
|
|
||||||
this.panelController = {};
|
this.panelController = {};
|
||||||
this.searchEntered = false;
|
this.searchSubmitted = false;
|
||||||
|
|
||||||
$rootScope.$on("user-preferences-changed", () => {
|
$rootScope.$on("user-preferences-changed", () => {
|
||||||
this.loadPreferences();
|
this.loadPreferences();
|
||||||
@@ -107,7 +107,7 @@ angular.module('app')
|
|||||||
this.DefaultNotesToDisplayValue = (document.documentElement.clientHeight / MinNoteHeight) || 20;
|
this.DefaultNotesToDisplayValue = (document.documentElement.clientHeight / MinNoteHeight) || 20;
|
||||||
|
|
||||||
this.paginate = function() {
|
this.paginate = function() {
|
||||||
if (this.searchEntered) {
|
if (this.searchSubmitted) {
|
||||||
desktopManager.searchText(this.noteFilter.text);
|
desktopManager.searchText(this.noteFilter.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ angular.module('app')
|
|||||||
this.onFilterEnter = function() {
|
this.onFilterEnter = function() {
|
||||||
// For Desktop, performing a search right away causes input to lose focus.
|
// For Desktop, performing a search right away causes input to lose focus.
|
||||||
// We wait until user explicity hits enter before highlighting desktop search results.
|
// We wait until user explicity hits enter before highlighting desktop search results.
|
||||||
this.searchEntered = true;
|
this.searchSubmitted = true;
|
||||||
desktopManager.searchText(this.noteFilter.text);
|
desktopManager.searchText(this.noteFilter.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,8 +281,8 @@ angular.module('app')
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.filterTextChanged = function() {
|
this.filterTextChanged = function() {
|
||||||
if (this.searchEntered) {
|
if (this.searchSubmitted) {
|
||||||
this.searchEntered = false;
|
this.searchSubmitted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user