Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds navigation view

  • Loading branch information...
commit 17fb9f3afbf1bcc415cb9965469f401cd4c21758 1 parent d7f31f8
Dominik Guzei authored
View
3  app/assets/javascripts/app/App.js.coffee
@@ -15,5 +15,8 @@ App.mediators = {}
App.states = {}
App.templates = {}
+# provides namespace for pages
+App.views.pages = {}
+
# export App to global namespace
@App = App
View
1  app/assets/javascripts/app/states/BrowsingState.js.coffee
@@ -1,6 +1,5 @@
#= require app/mediators/authenticationMediator
#= require app/mediators/pagesMediator
-#= require app/views/PagesView
#= require app/views/pages/ListNotesView
#= require app/views/pages/CreateNoteView
View
1  app/assets/javascripts/app/templates/app.js.hjs
@@ -1,2 +1,3 @@
+{{view App.views.NavigationView}}
{{view App.views.PagesView}}
View
5 app/assets/javascripts/app/templates/navigation.js.hjs
@@ -0,0 +1,5 @@
+
+<ul>
+ <li><a href="#notes">List</a></li>
+ <li><a href="#notes/create">Create</a></li>
+</ul>
View
2  app/assets/javascripts/app/views/AppView.js.coffee
@@ -1,5 +1,7 @@
#= require app/templates/app
+#= require app/views/PagesView
+#= require app/views/NavigationView
App = @App
View
11 app/assets/javascripts/app/views/NavigationView.js.coffee
@@ -0,0 +1,11 @@
+
+#= require app/templates/navigation
+
+App = @App
+
+App.views.NavigationView = SC.View.extend {
+
+ templateName: 'app_templates_navigation'
+ elementId: 'navigation'
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.