Fixed: Naming settings resetting when changing fields/saving

This commit is contained in:
Mark McDowall 2014-03-05 13:14:47 -08:00
parent 6109704fb0
commit 9f92fb3fc1
3 changed files with 7 additions and 5 deletions

View File

@ -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;
}

View File

@ -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',

View File

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