mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Only make manual import cells clickable when previous steps have been done
This commit is contained in:
parent
9d980a8ac7
commit
213f905767
@ -4,7 +4,7 @@ var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
var SelectEpisodeLayout = require('../Episode/SelectEpisodeLayout');
|
||||
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'episodes-cell editable',
|
||||
className : 'episodes-cell',
|
||||
|
||||
events : {
|
||||
'click' : '_onClick'
|
||||
|
@ -3,7 +3,7 @@ var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
var SelectSeasonLayout = require('../Season/SelectSeasonLayout');
|
||||
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'season-cell editable',
|
||||
className : 'season-cell',
|
||||
|
||||
events : {
|
||||
'click' : '_onClick'
|
||||
|
@ -10,11 +10,13 @@ module.exports = Backgrid.Row.extend({
|
||||
this._originalInit.apply(this, arguments);
|
||||
|
||||
this.listenTo(this.model, 'change', this._setError);
|
||||
this.listenTo(this.model, 'change', this._setClasses);
|
||||
},
|
||||
|
||||
render : function () {
|
||||
this._originalRender.apply(this, arguments);
|
||||
this._setError();
|
||||
this._setClasses();
|
||||
|
||||
return this;
|
||||
},
|
||||
@ -30,5 +32,10 @@ module.exports = Backgrid.Row.extend({
|
||||
else {
|
||||
this.$el.addClass('manual-import-error');
|
||||
}
|
||||
},
|
||||
|
||||
_setClasses : function () {
|
||||
this.$el.toggleClass('has-series', this.model.has('series'));
|
||||
this.$el.toggleClass('has-season', this.model.has('seasonNumber'));
|
||||
}
|
||||
});
|
12
src/UI/ManualImport/manualimport.less
vendored
12
src/UI/ManualImport/manualimport.less
vendored
@ -11,6 +11,18 @@
|
||||
min-width : 80px;
|
||||
}
|
||||
|
||||
.has-series {
|
||||
.season-cell {
|
||||
.clickable();
|
||||
}
|
||||
}
|
||||
|
||||
.has-season {
|
||||
.episodes-cell {
|
||||
.clickable();
|
||||
}
|
||||
}
|
||||
|
||||
.editable {
|
||||
.clickable();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user