Menubar.Status.js 647 B

123456789101112131415161718192021222324252627282930313233
  1. Menubar.Status = function ( editor ) {
  2. var container = new UI.Panel();
  3. container.setClass( 'menu right' );
  4. var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) );
  5. checkbox.onChange( function () {
  6. editor.config.setKey( 'autosave', this.getValue() );
  7. } );
  8. container.add( checkbox );
  9. var title = new UI.Panel();
  10. title.setClass( 'title' );
  11. title.setTextContent( 'Autosave' );
  12. container.add( title );
  13. editor.signals.savingStarted.add( function () {
  14. title.setTextDecoration( 'underline' );
  15. } );
  16. editor.signals.savingFinished.add( function () {
  17. title.setTextDecoration( 'none' );
  18. } );
  19. return container;
  20. };