Fixed: Naming settings resetting when changing fields/saving

pull/6/head
Mark McDowall 11 years ago
parent 6109704fb0
commit 9f92fb3fc1

@ -2,11 +2,11 @@
define(
[
'underscore',
'vent',
'marionette',
'Config',
'Settings/MediaManagement/Naming/NamingSampleModel',
'Mixins/AsModelBoundView'
], function (_, vent, Marionette, NamingSampleModel, AsModelBoundView) {
], function (_, Marionette, Config, NamingSampleModel, AsModelBoundView) {
var view = Marionette.ItemView.extend({
template: 'Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate',
@ -35,6 +35,10 @@ define(
},
_buildFormat: function () {
if (Config.getValueBoolean(Config.Keys.AdvancedSettings)) {
return;
}
if (_.has(this.model.changed, 'standardEpisodeFormat') || _.has(this.model.changed, 'dailyEpisodeFormat')) {
return;
}

@ -3,12 +3,11 @@ define(
[
'underscore',
'marionette',
'Config',
'Settings/MediaManagement/Naming/NamingSampleModel',
'Settings/MediaManagement/Naming/Basic/BasicNamingView',
'Mixins/AsModelBoundView',
'Mixins/AsValidatedView'
], function (_, Marionette, Config, NamingSampleModel, BasicNamingView, AsModelBoundView, AsValidatedView) {
], function (_, Marionette, NamingSampleModel, BasicNamingView, AsModelBoundView, AsValidatedView) {
var view = Marionette.Layout.extend({
template: 'Settings/MediaManagement/Naming/NamingViewTemplate',

@ -245,4 +245,3 @@ define(
}
});
});

Loading…
Cancel
Save