Compare commits
No commits in common. "38d18873b84edab15413212d1f227b2e94b4e392" and "be521a42ee61d5e463b78dbe4c86bb0d5b93c7a9" have entirely different histories.
38d18873b8
...
be521a42ee
@ -528,6 +528,10 @@ p.paginateContainer > *:not(:last-child) {
|
|||||||
border-right: solid #869ab9 1px;
|
border-right: solid #869ab9 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.choices__inner {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 424px) {
|
@media screen and (max-width: 424px) {
|
||||||
div.gridContainer {
|
div.gridContainer {
|
||||||
grid-template-columns: auto;
|
grid-template-columns: auto;
|
||||||
|
@ -1,31 +1,17 @@
|
|||||||
(function () {
|
(function () {
|
||||||
const element = document.getElementById('newMember').elements['user_id'];
|
const element = document.getElementById('newMember').elements['user_id'];
|
||||||
const select = new TomSelect(element, {
|
const choices = new Choices(element, {
|
||||||
placeholder: 'User',
|
noResultsText: 'No users found',
|
||||||
valueField: 'value',
|
noChoicesText: 'Start typing to search users'
|
||||||
labelField: 'label',
|
|
||||||
searchField: 'label',
|
|
||||||
loadThrottle: 300,
|
|
||||||
load: function (query, callback) {
|
|
||||||
var self = this;
|
|
||||||
RVR.httpRequest('GET', searchUserUrl.replace('QUERY', encodeURIComponent(query)), function () {
|
|
||||||
self.clearOptions();
|
|
||||||
callback(this.response.results);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
select.on('change', function (value) {
|
element.addEventListener('search', RVR.debounce(async function (e) {
|
||||||
this.clearOptions();
|
RVR.httpRequest('GET', searchUserUrl.replace('QUERY', encodeURIComponent(e.detail.value)), function () {
|
||||||
|
choices.setChoices(this.response.results, 'value', 'label', true);
|
||||||
});
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
select.on('blur', function (value) {
|
element.addEventListener('choice', function () {
|
||||||
this.clearOptions();
|
choices.setChoices([], 'value', 'label', true);
|
||||||
});
|
|
||||||
|
|
||||||
select.on('type', function (value) {
|
|
||||||
if (value === '') {
|
|
||||||
this.clearOptions();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
@ -196,7 +196,7 @@ var RVR = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
form.elements['submit_button'].disabled = !anyChanged;
|
form.elements.submit.disabled = !anyChanged;
|
||||||
},
|
},
|
||||||
|
|
||||||
observeInputsInForm: function (form, observedInputs) {
|
observeInputsInForm: function (form, observedInputs) {
|
||||||
@ -219,7 +219,7 @@ var RVR = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
form.onreset = function () {
|
form.onreset = function () {
|
||||||
form.elements['submit_button'].disabled = true;
|
form.elements.submit.disabled = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
51
public/static/package-lock.json
generated
51
public/static/package-lock.json
generated
@ -2,18 +2,33 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@orchidjs/sifter": {
|
"@babel/runtime": {
|
||||||
"version": "1.0.3",
|
"version": "7.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@orchidjs/sifter/-/sifter-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
|
||||||
"integrity": "sha512-zCZbwKegHytfsPm8Amcfh7v/4vHqTAaOu6xFswBYcn8nznBOuseu6COB2ON7ez0tFV0mKL0nRNnCiZZA+lU9/g==",
|
"integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@orchidjs/unicode-variants": "^1.0.4"
|
"regenerator-runtime": "^0.13.11"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@orchidjs/unicode-variants": {
|
"choices.js": {
|
||||||
"version": "1.0.4",
|
"version": "10.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@orchidjs/unicode-variants/-/unicode-variants-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/choices.js/-/choices.js-10.2.0.tgz",
|
||||||
"integrity": "sha512-NvVBRnZNE+dugiXERFsET1JlKZfM5lJDEpSMilKW4bToYJ7pxf0Zne78xyXB2ny2c2aHfJ6WLnz1AaTNHAmQeQ=="
|
"integrity": "sha512-8PKy6wq7BMjNwDTZwr3+Zry6G2+opJaAJDDA/j3yxvqSCnvkKe7ZIFfIyOhoc7htIWFhsfzF9tJpGUATcpUtPg==",
|
||||||
|
"requires": {
|
||||||
|
"deepmerge": "^4.2.2",
|
||||||
|
"fuse.js": "^6.6.2",
|
||||||
|
"redux": "^4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deepmerge": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="
|
||||||
|
},
|
||||||
|
"fuse.js": {
|
||||||
|
"version": "6.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.6.2.tgz",
|
||||||
|
"integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA=="
|
||||||
},
|
},
|
||||||
"leaflet": {
|
"leaflet": {
|
||||||
"version": "1.9.3",
|
"version": "1.9.3",
|
||||||
@ -25,14 +40,18 @@
|
|||||||
"resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/leaflet.markercluster/-/leaflet.markercluster-1.5.3.tgz",
|
||||||
"integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA=="
|
"integrity": "sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA=="
|
||||||
},
|
},
|
||||||
"tom-select": {
|
"redux": {
|
||||||
"version": "2.2.2",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tom-select/-/tom-select-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz",
|
||||||
"integrity": "sha512-igGah1yY6yhrnN2h/Ky8I5muw/nE/YQxIsEZoYu5qaA4bsRibvKto3s8QZZosKpOd0uO8fNYhRfAwgHB4IAYew==",
|
"integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@orchidjs/sifter": "^1.0.3",
|
"@babel/runtime": "^7.9.2"
|
||||||
"@orchidjs/unicode-variants": "^1.0.4"
|
}
|
||||||
}
|
},
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.13.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
||||||
|
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"leaflet": "^1.6.0",
|
"leaflet": "^1.6.0",
|
||||||
"leaflet.markercluster": "^1.4.1",
|
"leaflet.markercluster": "^1.4.1",
|
||||||
"tom-select": "^2.2.2"
|
"choices.js": "^10.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@css(/static/node_modules/tom-select/dist/css/tom-select.min.css)
|
@css(node_modules/choices.js/public/assets/styles/choices.min.css)
|
||||||
@js(/static/node_modules/tom-select/dist/js/tom-select.base.min.js)
|
@js(node_modules/choices.js/public/assets/scripts/choices.js)
|
||||||
@js(js/communities/community_members.js)
|
@js(js/communities/community_members.js)
|
||||||
|
|
||||||
@extends(templates/layout_normal)
|
@extends(templates/layout_normal)
|
||||||
|
Loading…
Reference in New Issue
Block a user