Menubar.Status.js 695 B

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