1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00

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 user = this.get('user');
var component = this; var component = this;
cells.forEach(function(cell) { cells.forEach(function(cell) {
if (!cell.get('disabled')) {
cell.set('loading', true); cell.set('loading', true);
cell.set('enabled', enabled); cell.set('enabled', enabled);
user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled); user.set('preferences.'+component.preferenceKey(cell.get('type.name'), cell.get('method.name')), enabled);
}
}); });
user.save().then(function() { user.save().then(function() {
cells.forEach(function(cell) { cells.forEach(function(cell) {