Files
ember-panda/addon/components/project/edit-active-project-scenario.js
T
2017-12-21 11:51:55 +01:00

31 lines
900 B
JavaScript

// Generated by CoffeeScript 1.12.5
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['ui', 'small', 'buttons', 'active-project-scenario-selector-component'],
project: null,
active_project_scenario: null,
actions: {
show_project_scenarios_grid: function(project) {
return this.modal('project/project-scenarios-show-grid', {
model: project
});
},
edit_selected_project_scenario: function() {
var project_scenario;
if (!(project_scenario = this.get('active_project_scenario'))) {
return;
}
return this.modal('project/edit-project-scenario', {
model: project_scenario,
closeOnOverlay: false,
destroy_callback: (function(_this) {
return function() {
return _this.set('active_project_scenario', null);
};
})(this)
});
}
}
});