diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
commit | eb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch) | |
tree | 71f449ccd6f15422717de3ac24f87d5e888ddd79 /public/js/old-app.js | |
parent | df6e17e48995f25e72509986f30700d778b179b6 (diff) | |
parent | 3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff) |
Merge branch 'develop'
Diffstat (limited to 'public/js/old-app.js')
-rw-r--r-- | public/js/old-app.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/public/js/old-app.js b/public/js/old-app.js new file mode 100644 index 0000000..7098e43 --- /dev/null +++ b/public/js/old-app.js @@ -0,0 +1,58 @@ +App = Ember.Application.create({ + LOG_TRANSITIONS: true +}); + +// App.Router.map(function() { +// this.resource("switchboards", { path: "/switchboards" }); +// }); + +// App.TablesRoute = Ember.Route.extend({ +// model: function() { +// return ; +// } +// }) + +// DS.RESTAdapter.configure("plurals", { +// switchboard_entry: "switchboard_entries" +// }); + + +App.Store = DS.Store.extend({ + adapter: 'DS.FixtureAdapter', + revision: 11 +}); + +App.Switchboard = DS.Model.extend({ + switchboard_entrys: DS.hasMany('App.SwitchboardEntry'), + name: DS.attr('string') +}); + +App.SwitchboardEntry = DS.Model.extend({ + name: DS.attr('string') +}); + +App.Router.map(function() { + this.resource('switchboard', { path: '/users/:user_id/switchboards/:switchboard_id' }); +}); + +App.SwitchboardsRoute = Ember.Route.extend({ + model: function(params) { + return App.Switchboard.find(params.switchboard_id); + } +}); + +App.Switchboard.FIXTURES = [{ + id: 1, + name: 'Erstes Ember Test Switchboard' +}, { + id: 2, + name: 'Zweites Switchboard' +}] + + +// var switchboard_view = Ember.View.create({ +// templateName: 'switchboard', +// name: "test" +// }); + +// switchboard_view.appendTo('#xxxyyy'); |