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

Commit

Permalink
tasks Laverna#64 Laverna#65 has been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwredfish committed Nov 6, 2013
1 parent 40a8b98 commit a7c8d61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/scripts/controllers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function(_, Backbone, Marionette, Modal, App, CollectionNotes, NoteForm, NoteIte
* Index page
*/
index: function (notebook, page) {
this.notesFilter = 'active';
this.noteInit(notebook, page);
console.log('index page');
},
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(['app', 'marionette', 'controllers/main'], function(App, Marionette, Cont
'note/trashed/p:page/show/:id' : 'noteTrashed',
// Notes with pagination :
'note/:notebook/p:page/show/:id' : 'noteShow',
'note/:notebook/p:page' : 'noteInit',
'note/:notebook/p:page' : 'index',
// Notebooks routes :
'notebook/add' : 'notebookAdd',
'notebook/edit/:id' : 'notebookEdit',
Expand Down
9 changes: 7 additions & 2 deletions app/scripts/views/composite/noteSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ define([
'j' : 'navigateBottom',
'k' : 'navigateTop',
'c' : 'toCreate',
'g+f' : 'showFavorites',
'g+t' : 'showTrashed'
'g f' : 'showFavorites',
'g t' : 'showTrashed',
'g i' : 'showInbox'
},

initialize: function () {
Expand Down Expand Up @@ -75,6 +76,10 @@ define([
return Backbone.history.navigate('/note/favorite/p1', true);
},

showInbox: function() {
return Backbone.history.navigate('/note/0/p1', true);
},

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

0 comments on commit a7c8d61

Please sign in to comment.