Commit Graph

219 Commits

Author SHA1 Message Date
Robin Ward
f518065654 FIX: computed is part of @ember/object not @ember/object/computed 2019-11-13 11:58:09 -05: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
Bianca Nenciu
690db4fd36
FIX: Show poll voters in Oneboxed posts. (#7768) 2019-10-24 14:00:25 +03: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
Jarek Radosz
6a65e5312b FEATURE: Add a preview to the poll builder (#7988)
* FEATURE: Add a preview to the poll builder

* Use selectKit helper in the poll preview test

* Extract the mobile-specific poll builder form CSS
2019-08-13 09:49:40 -04:00
Penar Musaraj
78500fb770 UX: Improve layout of poll builder modal 2019-08-07 15:00:03 -04:00
Robin Ward
c322cccd53 FIX: Memory Leaks when decorating posts (#7749)
* Remove long-deprecated method

* FIX: Memory Leaks when decorating posts

Previously we'd keep creating mixins dynamically when decorating the
same class.

This code changes the API to recommend an `id` parameter for each
decorator which will avoid leaks. All plugins should be updated to
include this parameter, although if they don't in the meantime it'll
just mean a warning in the console (and a continued leak.)
2019-06-11 17:21:23 +02:00
Joffrey JAFFEUX
b98b994fe7
apply prettier on plugins (#7605) 2019-05-27 11:06:11 +02:00
Joffrey JAFFEUX
bfea922167
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
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
Joe
a342d2f150 UX: reduces white-space in polls (#6956)
* reduces white-space in polls and uses font-size variables
2019-02-05 10:47:22 +01: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
Joe
9c5b5243fc
UX: don't show 0 vote count in crawler or print view 2018-11-15 17:40:01 +08: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
Kris
6ec43f3472 FIX: poll avatar spacing too large 2018-08-29 09:11:03 -04:00
Kris
d6144c6d60 UX: More compact polls on mobile 2018-08-27 16:53:35 -04:00
Kris
84d822959a Reducing some specificity, color fix 2018-08-03 17:44:22 -04:00
Joe
27c018e75c
FIX: makes large images in polls responsive 2018-07-01 13:20:00 +08: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
Joffrey JAFFEUX
174d392e5a
DEV: adds prettier (#5956)
Run `prettier --write "app/assets/stylesheets/**/*.scss" "plugins/**/*.scss"` after making sure you installed it with `yarn`

It's recommended to configure your editor to run prettier on file save.
2018-06-08 11:49:31 +02:00
Joe
733ffc4bbf
FIX: add classes to input groups and move tips 2018-05-30 21:02:06 +08:00
Joe
ec7f597274
FIX: update poll-builder to new modal design 2018-05-30 21:00:54 +08:00
Joe
47a9b3427b
FIX: input tip causes modal to change width when present 2018-05-30 14:26: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
Bruno Perel
6750ff6873 (S)CSS cleanup: 0px => O and removal of duplicated properties (#5526) 2018-01-25 09:53:36 -05:00
Joffrey JAFFEUX
b295c03001
FIX: select single choice as default when building a poll 2018-01-03 09:23:15 +01:00