correct transitioning to theme CSS editing

This commit is contained in:
Sam 2017-04-13 11:09:31 -04:00
parent 679b6548e6
commit ee950b419f
2 changed files with 5 additions and 2 deletions

View File

@ -106,7 +106,7 @@ export default Ember.Controller.extend({
},
editTheme() {
let edit = ()=>this.transitionToRoute('adminCustomizeThemes.edit', {model: this.get('model')});
let edit = ()=>this.transitionToRoute('adminCustomizeThemes.edit', this.get('model.id'), 'common', 'scss');
if (this.get("model.remote_theme")) {
bootbox.confirm(I18n.t("admin.customize.theme.edit_confirm"), result => {

View File

@ -2,7 +2,10 @@ export default Ember.Route.extend({
model(params) {
const all = this.modelFor('adminCustomizeThemes');
const model = all.findBy('id', parseInt(params.theme_id));
return model ? { model, target: params.target, field_name: params.field_name} : this.replaceWith('adminCustomizeThemes.index');
return model ? { model,
target: params.target,
field_name: params.field_name
} : this.replaceWith('adminCustomizeThemes.index');
},
serialize(wrapper) {