Don't toggle a cell if it's disabled

This commit is contained in:
Toby Zerner 2015-03-28 16:31:36 +10:30
parent 52a7b536c4
commit 5028f6e877

View File

@ -65,9 +65,11 @@ export default Ember.Component.extend({
var user = this.get('user');
var component = this;
cells.forEach(function(cell) {
cell.set('loading', true);
cell.set('enabled', enabled);
user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled);
if (!cell.get('disabled')) {
cell.set('loading', true);
cell.set('enabled', enabled);
user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled);
}
});
user.save().then(function() {
cells.forEach(function(cell) {