Skip to content

Commit

Permalink
Save settings on each change after 3 sec. elementor#1546.
Browse files Browse the repository at this point in the history
  • Loading branch information
kobizz committed Mar 29, 2017
1 parent 74e6599 commit cdd203f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@ module.exports = ControlsStack.extend( {
this.model = elementor.pageSettings.model;

this.collection = new Backbone.Collection( _.values( this.model.controls ) );
},

onDestroy: function() {
elementor.pageSettings.save();
}
} );
4 changes: 4 additions & 0 deletions assets/dev/js/editor/utils/page-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ module.exports = ViewModule.extend( {

this.initControlsCSSParser();

this.save = _.debounce( this.save, 3000 );

ViewModule.prototype.onInit.apply( this, arguments );
},

Expand All @@ -117,5 +119,7 @@ module.exports = ViewModule.extend( {
} );

self.updateStylesheet();

this.save();
}
} );
8 changes: 4 additions & 4 deletions assets/js/editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions assets/js/editor.min.js

Large diffs are not rendered by default.

0 comments on commit cdd203f

Please sign in to comment.