initial commit

This commit is contained in:
git@daemon.de
2013-09-12 23:13:49 +02:00
parent 874ee3cdab
commit 5992bf159b
50 changed files with 69273 additions and 0 deletions

27
js/controllers_self.js Normal file
View File

@@ -0,0 +1,27 @@
App.SelfController = Ember.ObjectController.extend({
isEditing: false,
errors: {},
edit: function() {
// prepare order to the actual object, not id
this.set('isEditing', true);
},
doneEditing: function() {
var validated = this.get('model').validate();
if(! validated.valid) {
this.set('errors', validated);
this.set('isEditing', true);
}
else {
this.set('isEditing', false);
this.get('model').get("store").commit();
}
},
cancelEditing: function() {
this.set('isEditing', false);
}
});