Add "select" control to inlineEditor (WIP, RFC)

Review Request #6197 — Created Aug. 5, 2014 and discarded

Information

Djblets
master
3eacb42...

Reviewers

Somewhat messy, but tested, addition of drop-down and combo boxes. If selectOptions is set, multiline determines whether the multiple property is set. Hijacked some of the options, which seems messy; please advise on preferred methods. (I am not a JavaScript programmer.)

In a Review Board extension, created fields with options CSS class. For multiline, added multiple class. They work as expected.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
    
    
  2. 
      
AH
AH
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.inlineEditor.js
    
    
  2. 
      
david
  1. I'm kind of wary about adding such a different mode to what is already an incredibly complicated control (although it is a surprisingly small amount of code). Did you consider making a completely new control instead?

    1. Yeah, I think I'll have to learn how to do that. I'm using this implementation, and it's pretty messy. I'm going to discard this request.

    2. I think we may have had some discussion over e-mail involving this, but for what it's worth, I think we shouldn't lump all the editable fields for a review request behind an inline editor. We should probably just embed a select control directly when the field is editable, rather than wrapping it.

      The inline editor is great when you want to have "begin editing," "cancel editing," and "save edited content" actions, which works well for text. A select field is much simpler.

    3. Agreed. This was the shortest route to shoehorning a feature in when I needed it quickly, but it's not a good solution.

  2. 
      
AH
Review request changed
Status:
Discarded