57 Commits (0e319a58cbb6cf23d964a215b43884f9013ab2f8)

Author SHA1 Message Date
Julian Lam dadbcd731c feat: integrating basic client-side form validity checking in settings v1 and v2 2 years ago
Barış Soner Uşaklı d20b07cfea
Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <[email protected]>
3 years ago
Barış Soner Uşaklı dd02c49f43 refactor: use lang keys, fix typo 3 years ago
Barış Soner Uşaklı 1980feed46 refactor: use alerts module 3 years ago
gasoved b0a24d6dd5
refactor: var to const and let (#9885)
* refactor: var to const and let

* fix: missed global bootbox usage

* refactor: align with eslint expectations
3 years ago
psychobunny 66196d2caf feat: allow for settings.save/settings.load on client side
w/ optional data-socket-get / data-socket-set params on form element for custom calls
4 years ago
Julian Lam 5131eb6b90 fix: `action:admin.settingsLoaded` to use new hooks lib 4 years ago
Julian Lam 4029ec3713 fix: multiple sorted-lists do not save to the correct set 4 years ago
Julian Lam 8093142340 feat: ctrl-s now saves on settingsv1/v2 forms
... because nobody ever uses ctrl-s on a browser window.
5 years ago
Andrew Rodrigues 3c9689a5ac
feat: settings sorted list (#8170)
* feat: settings sorted list

see https://github.com/NodeBB/nodebb-plugin-quickstart/pull/9/files for sample
5 years ago
Barış Soner Uşaklı 09ef3999b0 fix lint 7 years ago
Barış Soner Uşaklı a4c24cb66b fix saving multiple selects as json arrays 7 years ago
Barış Soner Uşaklı 089769c107 closes #6302 7 years ago
Julian Lam e604d6e23e closes #5768 8 years ago
Barış Soner Uşaklı 29c0b8337e closes #5645 8 years ago
Peter Jaszkowiak 144fa8698c Eslint no-lonely-if 8 years ago
Peter Jaszkowiak 09e868ce5f ESlint no-useless-escape, no-else-return 8 years ago
Peter Jaszkowiak 04bb6513b0 ESlint no-cond-assign, no-void, valid-jsdoc 8 years ago
Peter Jaszkowiak 32dc7c23ea ESlint guard-for-in, no-nested-ternary
and operator-linebreak
8 years ago
Peter Jaszkowiak ac2f69f7af ESlint no-return-assign
and no-restricted-modules
8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces 8 years ago
Peter Jaszkowiak a5a3f3089a ESlint no-mixed-operators 8 years ago
Peter Jaszkowiak 3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
8 years ago
Peter Jaszkowiak b09b3aef7f ESlint no-undef, remove global comments 8 years ago
Peter Jaszkowiak 2ba46808a1 ESlint one-var, fix comma-dangle 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
Mathias Schreck ce9ee62fa0 Handle callback errors 9 years ago
Julian Lam e7386e20cf closes #4505 9 years ago
psychobunny 30c1001e5d #3522 also for settings v2 10 years ago
barisusakli 5e3e1f8781 #3430 10 years ago
psychobunny fdc66eb607 fixes checkboxes for settingsv2 (deja vu) 10 years ago
psychobunny 541fd474b3 fixes checkboxes for both settingsv1 and settingsv2 10 years ago
Julian Lam b4e39374bb firing 'change' event for all checkboxes after settingsv2 load 10 years ago
yariplus 1102f40873 Add object setting plugin
Allows objects to be added to a plugin's settings using a tag with a JSON-like syntax in data-attributes.
A complex object can be created by using an array or another object as a parent, the object will be added to the parent array or the parent object's declared property instead of as it's own data-key.
10 years ago
Julian Lam a3cadff1d3 updated settings module (v2) to fix multiple selects and checkboxes using name instead of id, which isn't always guaranteed to be set. 10 years ago
Julian Lam d096a639d6 fixed #2657 -- there's a slight chance this might break other ACP pages, but my limited testing tells me it is ok so far 10 years ago
Schamper 883422760d Fix settings save message 11 years ago
barisusakli fdf19f9025 closes #2022 11 years ago
Julian Lam 23c4b8ca35 only showing ACP setting saved alert if no callback is passed in 11 years ago
psychobunny 281aa0049c init, attempt to increase cold load speed 11 years ago
psychobunny f2a692add7 some linting of settings.js 11 years ago
psychobunny c3e4c7dea1 using var instead of const for < IE10 compatibility
@frissdiegurke
11 years ago
FrissDieGurke ab2c0cfa9f added number-type to settings framework. persist expanded object on server-side sync if changed 11 years ago
FrissDieGurke c4606e7009 minified settings-framework wrapper-length 11 years ago
FrissDieGurke c23df60e1b removed unnecessary method + doc within Settings Framework 11 years ago
Ole Reglitzki 4da8121827 jsbeautify 11 years ago
Ole Reglitzki d76ba519d4 added new settings-system 11 years ago