aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/index.html1
-rw-r--r--www/js/app.js2
-rw-r--r--www/js/router.js8
-rw-r--r--www/js/views/details.js9
4 files changed, 18 insertions, 2 deletions
diff --git a/www/index.html b/www/index.html
index 20e2db6..d66700b 100644
--- a/www/index.html
+++ b/www/index.html
@@ -37,6 +37,7 @@
<script type="text/javascript" src="js/views/home.js"></script>
<script type="text/javascript" src="js/views/around.js"></script>
<script type="text/javascript" src="js/views/photo.js"></script>
+ <script type="text/javascript" src="js/views/details.js"></script>
<script type="text/javascript" src="js/router.js"></script>
<script type="text/javascript" src="js/app.js"></script>
diff --git a/www/js/app.js b/www/js/app.js
index 94ed26a..5595a08 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -38,7 +38,7 @@ var tpl = {
;(function (FMS, Backbone, _, $) {
_.extend(FMS, {
templates: [
- 'home', 'around', 'photo'
+ 'home', 'around', 'photo', 'details'
],
initialized: 0,
diff --git a/www/js/router.js b/www/js/router.js
index 4c7430c..05b5d33 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -7,7 +7,8 @@
'': 'home',
'home': 'home',
'around': 'around',
- 'photo': 'photo'
+ 'photo': 'photo',
+ 'details': 'details'
},
initialize: function() {
@@ -34,6 +35,11 @@
this.changeView(photoView);
},
+ details: function(){
+ var detailsView = new FMS.DetailsView();
+ this.changeView(detailsView);
+ },
+
changeView: function(view) {
console.log( 'change View to ' + view.id );
$(view.el).attr('data-role', 'page');
diff --git a/www/js/views/details.js b/www/js/views/details.js
new file mode 100644
index 0000000..2c16c43
--- /dev/null
+++ b/www/js/views/details.js
@@ -0,0 +1,9 @@
+;(function (FMS, Backbone, _, $) {
+ _.extend( FMS, {
+ DetailsView: FMS.FMSView.extend({
+ template: 'details',
+ id: 'details-page',
+ prev: 'photo'
+ })
+ });
+})(FMS, Backbone, _, $);