Fix some state and interactivity issues with TextEditorView.

Review Request #6541 — Created Oct. 30, 2014 and submitted

Information

Review Board
release-2.0.x
82db5f3...

Reviewers

When canceling the editor, the Markdown checkbox wouldn't revert to the
original state. Toggling the Markdown state also failed to mark the
editor as dirty or emit a change signal.

These have been fixed, and unit tests added.

Canceled and saw the checkbox reset.

Toggled the checkbox and saved. Saw a request go out.

Unit tests pass.

Description From Last Updated

I think this might be more obvious as: return this._editor && (this._richTextDirty || this._editor.isDirty(initialValue));

daviddavid
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
        reviewboard/static/rb/js/ui/views/textEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
        reviewboard/static/rb/js/ui/views/textEditorView.js
    
    
  2. 
      
david
  1. 
      
  2. Show all issues

    I think this might be more obvious as:

    return this._editor &&
           (this._richTextDirty || this._editor.isDirty(initialValue));
    
  3. 
      
chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
        reviewboard/static/rb/js/ui/views/textEditorView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
        reviewboard/static/rb/js/ui/views/textEditorView.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to markdown-redesign (46059e5)