Commit Graph

56 Commits

Author SHA1 Message Date
Gerhard Schlager
7177b9d771 UX: Translating poll chart types wasn't possible 2020-04-28 14:29:42 +02:00
Joffrey JAFFEUX
2c7d32e783
FIX: prevents everyone group to show as group option for polls (#8957) 2020-02-14 14:11:34 +01:00
Joffrey JAFFEUX
8ca9ad887d
FIX: replaces fake null value by clearable option (#8875) 2020-02-06 08:30:26 +01:00
Mark VanLandingham
5d97286fa7
FEATURE: Allow single option polls (#8853) 2020-02-05 08:03:27 -06:00
Joffrey JAFFEUX
0431942f3d
DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00
Bianca Nenciu
07222af7ab
FEATURE: Add 'groups' option to polls (#8469)
This options can be used to restrict polls to certain groups.
2020-01-28 14:30:04 +02:00
Jarek Radosz
fe588cc7f8
DEV: Fix function prototype deprecations (#8681)
* DEV: Fix the function prototype observers deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details.

* DEV: Fix the function prototype event listeners deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details.

* DEV: Simplify `default as` imports

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-01-16 18:56:53 +01:00
Mark VanLandingham
44612f900e
FIX: Remove 'staff_only' results option for non-staff (#8565) 2019-12-17 13:43:15 -08:00
Mark VanLandingham
b92a8131c0
FEATURE: Pie chart option for poll results (#8352) 2019-11-25 11:51:01 -06:00
Jarek Radosz
5d4b240453
DEV: Provide radix argument to parseInt (#8281)
* DEV: Provide radix 10 argument to parseInt

* DEV: Provide radix 16 argument to parseInt

* DEV: Remove unnecessary parseInt calls

* Fix year formatting

parseInt was used here to convert decimals to ints
2019-11-12 10:47:42 +01:00
Robin Ward
e39d89ecd9 REFACTOR: Remove InputValidation which was simply an Ember.Object 2019-11-11 15:48:56 -05:00
Robin Ward
6287eccb35 REFACTOR: Remove Ember.Controller in favor of import 2019-10-23 13:06:54 -04:00
Kris
b005377d0a UX: add newline after closing poll tag for poll builder 2019-10-16 21:40:42 -04:00
Sam Saffron
096f932ef2 Lint files
Both needed some prettier tlc
2019-08-16 13:06:51 +10:00
Blake Erickson
69498a58e9
FEATURE: Staff only poll results (#7984)
* FEATURE: Staff only poll results

These changes allow only staff to see the results of a poll.

Non-staff users will be shown a screen like this:

1b8bd76013.png

The "Votes are public" message has been removed from the info section,
and the button to show the votes has been replaced with a message
stating the results will only be shown to staff.

* Update PR based on feedback

* Update plugins/poll/app/models/poll.rb

make sure we return a boolean

Co-Authored-By: Régis Hanol <regis@hanol.fr>
2019-08-15 12:27:18 -06:00
Joffrey JAFFEUX
bfea922167
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
Joffrey JAFFEUX
502b1316d0
DEV: s/this._super()/this._super(...arguments) (#6908) 2019-01-19 10:05:51 +01:00
Régis Hanol
4459665dee
REFACTOR: use tables instead of custom fields for polls (#6359)
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
2018-11-19 14:50:00 +01:00
Joffrey JAFFEUX
60ff0e9b8c
missing prettified files 2018-06-15 18:42:20 +02:00
Régis Hanol
5d445fb810 FIX: properly handle invalid auto close date for polls 2018-06-12 15:31:09 +02:00
Régis Hanol
ba14c80b9c FEATURE: automatically close a poll on a given date and time 2018-05-03 02:12:19 +02:00
Eric Berry
ab22c8cad4 FIX: Infinite loop when poll step is zero (#5380)
* Fix infinite loop when poll step is zero

* Add test for step minimum and for breaking test

* Remove trailing spaces (eslint)

* Remove extra space (eslint)

* Removed test call .twice
2017-11-30 17:04:41 +01:00
Rafael dos Santos Silva
8b383bb26a FIX: Poll builder validation was incorrect 2017-04-05 00:15:39 -03:00
Bianca Nenciu
c423544208 Changed combo-box to number inputs for min, max and step values. 2017-03-15 10:56:11 +08:00
Robin Ward
28061316ad Migrate poll plugin to use components 2016-11-21 14:49:46 -05:00
Robin Ward
fab36e6cf7 Fix more deprecations:
- Remove all `needs:` code
2016-10-21 17:28:37 -04:00
Guo Xiang Tan
85a91c8b81 Remove unused property. 2016-07-28 21:28:49 +08:00
Guo Xiang Tan
33a628b0b0 UX: Vote now button to show up as primary once options have been selected. 2016-07-21 06:05:06 +08:00
Guo Xiang Tan
5f481ec097 Merge pull request #4328 from dachary/wip-poll-empty-lines
FIX: poll builder should ignore empty lines
2016-07-17 09:24:36 +08:00
Loic Dachary
f152900969 FIX: poll builder should ignore empty lines
Although pollOptionsCount skips empty lines, pollOutput inserts empty
lines. Skip them instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-07-14 09:27:43 +02:00
Robin Ward
b8125b3512 REFACTOR: Remove Discourse.Ajax 2016-07-11 12:57:05 -04:00
Robin Ward
56f07529bb REFACTOR: Migrate more legacy JS to ES6 2016-07-11 12:57:05 -04:00
Guo Xiang Tan
3cb8bbb851 UX: Automatically generate poll name for poll builder. 2016-07-05 22:15:52 +08:00
Guo Xiang Tan
6416ea9e09
FIX: Make sure we reset poll builder after inserting a poll. 2016-06-20 18:16:18 +08:00
Guo Xiang Tan
01c563ca85
FIX: Use internal value for poll builder. 2016-06-20 12:40:44 +08:00
Guo Xiang Tan
4df224bb79
FIX: Trim whitespaces and do a global replace. 2016-06-16 16:35:23 +08:00
Guo Xiang Tan
e1cfe7536c
FIX: Add default values when no value has been selected. 2016-06-15 12:54:52 +08:00
Guo Xiang Tan
ae5a033469
Start checking eslint in plugins. 2016-06-15 11:14:24 +08:00
Guo Xiang Tan
8d46727d67
FEATURE: Poll UI Builder. 2016-06-15 11:14:24 +08:00
Guo Xiang Tan
a36203ff78
PERF: Paginate public polls. 2016-06-12 16:14:53 +08:00
Guo Xiang Tan
5a03eca74a
UX: Add info when poll is public. 2016-06-09 22:15:08 +08:00
Guo Xiang Tan
7b6fb17bbb
One line import. 2016-06-08 17:23:05 +08:00
Guo Xiang Tan
8ecde35df3
FEATURE: Add public type to polls. 2016-06-08 16:19:13 +08:00
Guo Xiang Tan
7aac5baeed
FIX: Make sure model is updated when polls change. 2016-06-08 14:42:23 +08:00
Régis Hanol
b575f97ece FIX: allows polls on closed topics 2016-03-21 12:12:25 +01:00
Sam Saffron
57944a0694 PERF: only subscribe to a topic once for polls
in the past as views were created and destroyed poll subscriptions would change

this caused a lot of load on messaging bus and uneeded traffic
2016-01-06 20:36:09 +11:00
Régis Hanol
cc75890cd4 UX: disable 'Hide results' button when poll is closed 2015-09-16 13:01:08 +02:00
Robin Ward
8be37193ee Trivial changes to poll plugin, including a small typo fix. 2015-07-07 10:51:51 -04:00
Régis Hanol
90c05ff045 FIX: two-column poll 2015-05-04 22:29:45 +02:00
Régis Hanol
86d7412f30 REFACTOR: rename "total_votes" poll field to the more accurate "voters"
FEATURE: automagically load plugin's migrations
2015-05-04 16:01:57 +02:00