Commit Graph

174 Commits

Author SHA1 Message Date
Joffrey JAFFEUX 1d784c7a18
FEATURE: adds support for dates in polls (#7450) 2019-04-29 10:01:19 +02:00
Bianca Nenciu 3cf922a58a FIX: URL to user profile in poll results. (#7315) 2019-04-03 22:17:05 +02:00
Kris be5e889b1b UX: Poll style fix, button classes 2019-03-06 20:27:40 -05:00
Régis Hanol 0a708ba064 FIX: preload poll voters 2019-02-27 17:00:21 +01:00
Sam 79841cf7dd FEATURE: add missing autocomplete suppressions
Following 1f4ace4f add a couple more autocomplete suppressions (in polls
and invite ui)
2019-02-21 16:37:26 +11:00
Régis Hanol cba6bdaf52 UX: use solid circle to indicate selected option in polls 2019-01-24 12:25:37 +01:00
Bianca Nenciu d589c66f3e FIX: Fix URL to user profile. (#6881) 2019-01-23 18:27:21 +01:00
Joffrey JAFFEUX 80d42b4ea2
icons deprecations fixes (#6920) 2019-01-22 12:02:02 +01:00
Joffrey JAFFEUX 502b1316d0
DEV: s/this._super()/this._super(...arguments) (#6908) 2019-01-19 10:05:51 +01:00
Joffrey JAFFEUX 1a3655b787
DEV: s/Em/Ember (#6874) 2019-01-11 17:54:23 +01:00
Joffrey JAFFEUX f9648de897
DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808)
Co-Authored-By: Bianca Nenciu <nbianca@users.noreply.github.com>
Co-Authored-By: David Taylor <david@taylorhq.com>
2019-01-10 11:06:01 +01:00
Bianca Nenciu e49bcebb35 FIX: Validate poll arguments. (#6740)
* FIX: Validate number poll.
* FEATURE: Poll's min can be 0.
* FIX: Fix URL to user profile.
2018-12-31 10:48:30 +01:00
Bianca Nenciu 285ff3bfbd FIX: Show every voter only once. (#6746)
Each voter is represented by an object and Set does not properly check for equality.
2018-12-11 14:00:28 +01:00
Penar Musaraj 03deda2147
Upgrade to FontAwesome 5 (take two) (#6673)
* Add missing icons to set

* Revert FA5 revert

 This reverts commit 42572ff

* use new SVG syntax in locales

* Noscript page changes (remove login button, center "powered by" footer text)

* Cast wider net for SVG icons in settings

- include any _icon setting for SVG registry (offers better support for plugin settings)

- let themes store multiple pipe-delimited icons in a setting

- also replaces broken onebox image icon with SVG reference in cooked post processor

* interpolate icons in locales

* Fix composer whisper icon alignment

* Add support for stacked icons

* SECURITY: enforce hostname to match discourse hostname

This ensures that the hostname rails uses for various helpers always matches
the Discourse hostname

* load SVG sprite with pre-initializers

* FIX: enable caching on SVG sprites

* PERF: use JSONP for SVG sprites so they are served from CDN

This avoids needing to deal with CORS for loading of the SVG

Note, added the svg- prefix to the filename so we can quickly tell in
dev tools what the file is

* Add missing SVG sprite JSONP script to CSP

* Upgrade to FA 5.5.0

* Add support for all FA4.7 icons

- adds complete frontend and backend for renamed FA4.7 icons

- improves performance of SvgSprite.bundle and SvgSprite.all_icons

* Fix group avatar flair preview

- adds an endpoint at /svg-sprites/search/:keyword

- adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset

* Remove FA 4.7 font files
2018-11-26 16:49:57 -05:00
Joffrey JAFFEUX 95d8a421be
fixes linting 2018-11-19 16:29:15 +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
Sam 42572ff138 Revert font awesome 5 changes
We are still pushing ahead on this 100% just need a bit longer to prepare
all plugins
2018-11-08 16:12:18 +11:00
Penar Musaraj 005e1ecb9b
FEATURE: Update Font Awesome to v5.4.1 and SVGs (#6557)
* First take on subsetting svg icons

* FontAwesome 5 svg subset WIP

* Include icons from plugins/badges into svg sprite subset

* add svg icon support to themes

* Add spec for SvgSprite

* Misc. SVG icon fixes

* Use FA5 svgs in local-dates plugin

* CSS adjustments, fix SVG icons in group flair

* Use SVG icons in poll plugin

* Add SVG icons to /wizard
2018-11-07 13:05:43 -05:00
Neil Lalonde 6e54af1091 FIX: error if decorateCooked is called without a helper for a post with a poll 2018-06-18 12:35:19 -04: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
Joe 733ffc4bbf
FIX: add classes to input groups and move tips 2018-05-30 21:02:06 +08:00
Guo Xiang Tan c1fb111951 FIX: Show poll options when user is in a PM with a bot.
https://meta.discourse.org/t/discobot-dont-take-users-through-the-poll-tutorial-if-its-not-enabled/76604/9
2018-05-30 11:16:20 +08:00
Régis Hanol ef87944a34 UX: show close date on automatically closed polls 2018-05-12 02:14:58 +02:00
Régis Hanol 9ff2d540ba fix the build 2018-05-03 10:32:01 +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
Joffrey JAFFEUX b295c03001
FIX: select single choice as default when building a poll 2018-01-03 09:23:15 +01:00
Joffrey JAFFEUX 316d814130
FIX: staff should always be allowed to create polls if they are enabled 2017-12-05 00:03:56 +01:00
Joffrey JAFFEUX 76bc173d47
FEATURE: adds poll_allow_staff_to_create
This setting will bypass poll_minimum_trust_level_to_create if set to true
2017-12-04 18:12:17 +01:00
Joffrey JAFFEUX 63bab32816 FEATURE: introduces minimum trust level for polls (#5391)
* FEATURE: introduces minimum trust level for polls

This commit makes `poll_enabled` less misleading and introduces `poll_minimum_trust_level_to_create`. If poll are enabled they will always be cooked, and if you have the required trust level you can create polls. As a side effect, it also fixes a bug where rebaking a post created by staff member when `poll_enabled=false` would end up not cooking it.

It also adds more tests to ensure settings are respected.

* admins should be whitelisted

* checks for admin in post validation

* test for >= instead of == trust level
2017-12-04 14:47:11 +01: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
Angus McLeod c8a6e5cbb3 If there is a specific error it should be shown to the user (#5323)
e.g. post_is_deleted, or topic_must_be_open_to_vote
2017-11-17 12:12:13 +01:00
Robin Ward e87125b63c FEATURE: Plugins can overwrite and add support for new icons 2017-07-26 13:21:17 -04:00
Sam 9b4f5710e6 api cleanup for before / after rules 2017-07-21 16:12:11 -04:00
Sam b7f58fe880 regression polls could not be closed properly 2017-07-18 14:52:58 -04:00
Sam 1661a8745b correct issues with poll specs
fixes regression where an error message is missing from a poll
with one option
2017-07-17 17:44:48 -04:00
Sam 8921058c67 FIX: medium URL with @ incorrectly handled as mention
Also:

- remove unused code
- rename bbcode_ruler to bbcode.ruler
- add md.core.textPostProcess.ruler to apply at end of chain (excluding links)
2017-07-17 17:44:48 -04:00
Sam 5d139e461c FIX: multi option poll not working (new engine) 2017-07-11 14:43:34 -04:00
Sam 6200d7d6ab correct bug where only a single poll per topic worked 2017-06-28 15:36:19 -04:00
Sam 234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
Robin Ward 8ae445766f Upgrade Ember to 2.13 2017-06-15 10:12:07 -04: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
Guo Xiang Tan 0988420b48 Fix broken qunit tests. 2017-02-03 12:09:30 +08:00
Guo Xiang Tan 40fae186c9 Remove stray `console.log`. 2017-02-02 17:38:23 +08:00
Guo Xiang Tan 1bc87bca65 Remove debugging code. 2017-02-02 13:49:26 +08:00
Guo Xiang Tan 8bd8f07ce0 FIX: Public polls should not make a request per option. 2017-01-31 17:27:43 +08:00
Guo Xiang Tan 1da6fc8e3c UX: Highlight user's vote in polls. 2017-01-25 12:02:19 +08:00
Guo Xiang Tan 115a1c8680 FIX: Sort is destructive and that is not what we want. 2017-01-16 23:42:31 +08:00
Guo Xiang Tan d4b2a635c7 FIX: Live updates for polls was broken. 2017-01-16 16:57:46 +08:00