aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/extra.js
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2021-01-16 16:11:30 -0500
committerGravatar GitHub <noreply@github.com> 2021-01-16 22:11:30 +0100
commit5c18c64afbdc8b888fdedf2d7cc45e1930225f02 (patch)
tree3d20526df907da7c2435774ae4647841376ae821 /p/scripts/extra.js
parentbf639f9b984185e1fb8157a24cc11e2f49b827c7 (diff)
Change integration configuration page (#3372)
I've refactored the user query code to be able to use it also on the integration configuration page. Now, items can be re-organized as in the user query list.
Diffstat (limited to 'p/scripts/extra.js')
-rw-r--r--p/scripts/extra.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index 3cb7b93aa..a78b5b10d 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -93,46 +93,6 @@ function init_crypto_form() {
}
//</crypto form (Web login)>
-function init_share_observers() {
- let shares = document.querySelectorAll('.group-share').length;
- const shareAdd = document.querySelector('.share.add');
- if (shareAdd) {
- shareAdd.onclick = function (ev) {
- const s = this.parentElement.querySelector('select'),
- opt = s.options[s.selectedIndex];
- let row = this.closest('form').getAttribute('data-' + opt.getAttribute('data-form'));
- row = row.replace(/##label##/g, opt.text);
- row = row.replace(/##type##/g, opt.value);
- row = row.replace(/##help##/g, opt.getAttribute('data-help'));
- row = row.replace(/##key##/g, shares);
- row = row.replace(/##method##/g, opt.getAttribute('data-method'));
- row = row.replace(/##field##/g, opt.getAttribute('data-field'));
- this.closest('.form-group').insertAdjacentHTML('beforebegin', row);
- shares++;
- return false;
- };
- }
-}
-
-
-function init_remove_observers() {
- document.querySelectorAll('.post').forEach(function (div) {
- div.onclick = function (ev) {
- const a = ev.target.closest('a.remove');
- if (a) {
- const remove_what = a.getAttribute('data-remove');
- if (remove_what !== undefined) {
- const d = document.getElementById(remove_what);
- if (d) {
- d.remove();
- }
- }
- return false;
- }
- };
- });
-}
-
function init_password_observers() {
document.querySelectorAll('.toggle-password').forEach(function (a) {
a.onmousedown = function (ev) {
@@ -248,8 +208,6 @@ function init_extra() {
return;
}
init_crypto_form();
- init_share_observers();
- init_remove_observers();
init_password_observers();
init_select_observers();
init_slider_observers();