File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ openNote . controller ( "tagController" , function ( $scope ,
3+ $rootScope ,
4+ $location ,
5+ $routeParams ,
6+ storageService ,
7+ config ,
8+ tagService ) {
9+ /**
10+ * Load a note
11+ * @param note - load a note
12+ */
13+ $scope . loadNote = function ( note ) {
14+ $ ( ".note" ) . fadeTo ( config . fadeSpeedShort ( ) , 0 , function ( ) {
15+ $location . url ( "/note/" + note . _id ) ;
16+ $scope . $apply ( ) ;
17+ } ) ;
18+ } ;
19+
20+ /**
21+ * Load tags
22+ */
23+ var loadTags = function ( ) {
24+ tagService . getMap ( ) . then ( function ( map ) {
25+ var tags = map . tags [ $scope . tag ] ;
26+ var db = storageService . database ( ) ;
27+ tags . forEach ( function ( tag ) {
28+ db . get ( tag ) . then ( function ( note ) {
29+ $scope . notes . push ( note ) ;
30+ $scope . $apply ( ) ;
31+ } ) ;
32+ } ) ;
33+ } ) ;
34+ } ;
35+ $scope . notes = [ ] ;
36+ $scope . tag = $routeParams . tag ;
37+ loadTags ( ) ;
38+ } ) ;
Original file line number Diff line number Diff line change 1+ < div class ="tagPartial ">
2+ < div id ="folderTitleBar ">
3+ < ol class ="breadcrumb ">
4+ < li class ="active ">
5+ {{tag}}
6+ </ li >
7+ </ ol >
8+ </ div >
9+
10+ < div ng-repeat ="note in notes | orderBy: 'title' "
11+ class ="startHidden box randomFadeInDirective note "
12+ ng-click ="loadNote(note); ">
13+ < h4 >
14+ {{note.title}}
15+ </ h4 >
16+ < p class ="box_description "> </ p >
17+ < p class ="options ">
18+ < span class ="right "> Note</ span >
19+ </ p >
20+ </ div >
21+ </ div >
You can’t perform that action at this time.
0 commit comments