Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
task Laverna#66 has been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwredfish committed Nov 6, 2013
1 parent a7c8d61 commit 32375ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/templates/notes/sidebarList.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="ui-s-content">
<form class="form-inline search-form">
<span class="glyphicon glyphicon-search input-append"></span>
<input type="text" placeholder="Search" class="input-append search-input"/>
<input type="text" id="search-input" placeholder="Search" class="input-append search-input"/>
</form>

<div class="main">
Expand Down
9 changes: 8 additions & 1 deletion app/scripts/views/composite/noteSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ define([
ui: {
prevPage: '#prevPage',
nextPage: '#nextPage',
searchInput: '#search-input'
},

events: {
Expand All @@ -41,7 +42,8 @@ define([
'c' : 'toCreate',
'g f' : 'showFavorites',
'g t' : 'showTrashed',
'g i' : 'showInbox'
'g i' : 'showInbox',
'/' : 'focusSearch'
},

initialize: function () {
Expand Down Expand Up @@ -72,6 +74,11 @@ define([
this.pagination(notes);
},

focusSearch: function(e) {
e.preventDefault();
this.ui.searchInput.focus();
},

showFavorites: function() {
return Backbone.history.navigate('/note/favorite/p1', true);
},
Expand Down

0 comments on commit 32375ab

Please sign in to comment.