poll widget: Clean up code and add edit controls.

NOTE: If you revert this commit, you want to revert
the immediately prior commit as well.  The history
is that Ishan made some improvements to the widget,
but there were some minor bugs.  I decided not
to squash the commits together so that the git
history is clear who did what.  (In particular, I
want questions about the JS code to come to me if
somebody does `git blame`.)

Anyway...

This is a fairly significant rewrite of the polling
widget, where I clean up the overall structure of
the code (including things from before the prior
fix) and try to polish the prior commit a bit as
well.

There are a few new features:

    * We tell "other" users to wait for the poll
      to start (if there's no question yet).
    * We tip the author to say "/poll foo" (as
      needed).
    * We add edit controls for the question.
    * We don't allow new choices until there's
      a question.
This commit is contained in:
Steve Howell
2019-01-09 16:55:42 +00:00
committed by Tim Abbott
parent 85535ae09c
commit bacf896228
5 changed files with 228 additions and 160 deletions

View File

@@ -87,7 +87,6 @@ enforce_fully_covered = {
'static/js/user_status.js',
'static/js/util.js',
'static/js/widgetize.js',
'static/js/poll_widget.js',
'static/js/search_pill.js',
'static/js/billing/billing.js',
}