discourse/test/javascripts/helpers
Robin Ward 7fee3c61de
Support for custom messages and redirects when creating posts (#8434)
* Support for custom messages and redirects when creating posts

When a post/topic is created Discourse serializes a `NewPostResult`
object. Normally this contains a status like `created_post` or
errors describing why the post could not be created.

There are times when a plugin might want to take the inputted post
and do something in the background. In this case, the plugin
can return a custom `message` and `route_to` attribute in the
`NewPostResult`.

If present, the message will be displayed in an alert, and when "Ok" is
clicked the user will be routed to the new URL.

* Destroy the draft in parallel
2019-11-29 09:30:54 -05:00
..
assertions.js select-kit refactoring 2017-12-22 13:08:12 +01:00
component-test.js.es6 DEV: Remove some extra `Discourse.Site` uses 2019-11-13 16:00:58 -05:00
create-pretender.js.es6 Support for custom messages and redirects when creating posts (#8434) 2019-11-29 09:30:54 -05:00
create-store.js.es6 DEV: Support custom server-side names in rest models (#8265) 2019-10-30 15:25:42 +00:00
d-editor-helper.js.es6 DEV: d-editor helper should be synchronous (#7706) 2019-06-05 14:52:38 +02:00
fixture-pretender.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
html-helper.js.es6 DEV: adds a `stringToHTML` helper to be used in tests (#8424) 2019-11-27 17:36:45 +01:00
init-ember-qunit.js Split out common functions into `discourse-common` module 2016-09-22 09:52:19 -04:00
qunit-helpers.js.es6 DEV: Fix some more deprecated Discourse.User and Discourse.Site 2019-11-13 15:34:30 -05:00
review-pretender.js.es6 DEV: Provide radix argument to parseInt (#8281) 2019-11-12 10:47:42 +01:00
select-kit-helper.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
site-settings.js FIX: Don't convert :) into Emoji when emojis or emoji shurtcuts are disabled 2019-05-22 11:44:39 +02:00
site.js.es6 DEV: Remove handling of category top menu items 2019-11-11 17:36:29 +00:00
store-pretender.js.es6 DEV: Provide radix argument to parseInt (#8281) 2019-11-12 10:47:42 +01:00
textarea-selection-helper.js.es6 DEV: refactors textarea-selection helper to prevent leaking (#7709) 2019-06-05 19:20:46 +02:00
widget-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00