mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 04:03:44 +08:00
964945a11f
The AdminPlugin JS model uses a similar pattern to chat models, where it is a plain JS class manually converting provided snake_case attributes from the serializer to JS camelCase. However this doesn't work when it comes to using `add_to_serializer` in plugins since core does not know about these new attributes. Instead, we can use a JS function to convert snake_case to camelCase and use that when initializing AdminPlugin. This commit also moves similar functions to a new case-converter.js file in discourse-common/lib. |
||
---|---|---|
.. | ||
attribute-hook.js | ||
avatar-utils.js | ||
case-converter.js | ||
debounce.js | ||
deprecated.js | ||
discourse-template-map.js | ||
dom-from-string.js | ||
escape.js | ||
get-owner.js | ||
get-url.js | ||
helpers.js | ||
icon-library.js | ||
later.js | ||
loader-shim.js | ||
object.js | ||
popular-themes.js | ||
raw-handlebars-helpers.js | ||
raw-handlebars.js | ||
raw-templates.js | ||
suffix-trie.js |