2016-07-20 12:25:51 +02:00
|
|
|
/**
|
|
|
|
* File: edit.js
|
|
|
|
* Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
|
|
|
|
* Date: 11.07.2016
|
|
|
|
* Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
|
|
|
|
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
|
|
|
|
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
|
|
**********************************************************************************/
|
|
|
|
|
2016-06-28 10:00:38 +02:00
|
|
|
import Ember from 'ember';
|
|
|
|
|
|
|
|
export default Ember.Controller.extend({
|
|
|
|
actions: {
|
2016-07-11 22:03:47 +02:00
|
|
|
saveEdit() {
|
2016-06-28 10:00:38 +02:00
|
|
|
// save the changes
|
|
|
|
var user = this.get('model');
|
2016-07-11 22:03:47 +02:00
|
|
|
var controller = this;
|
|
|
|
|
|
|
|
user.save().then(function() {
|
|
|
|
controller.transitionToRoute('/user/');
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
cancelEdit() {
|
|
|
|
this.transitionToRoute('/user/');
|
2016-06-28 10:00:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|