Skip to content

Commit

Permalink
revert search tools add missing jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Jan 23, 2021
1 parent e3599b2 commit b8480ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('core')
->useScript('jquery')
->useScript('com_joomlaupdate.encryption')
->useScript('com_joomlaupdate.update')
->useScript('com_joomlaupdate.admin-update');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('core')
->useScript('jquery')
->useScript('form.validate')
->useScript('keepalive')
->useScript('field.passwordview');
Expand Down
6 changes: 4 additions & 2 deletions build/media_source/com_joomlaupdate/joomla.asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"type": "script",
"uri": "com_joomlaupdate/admin-update-default.min.js",
"dependencies": [
"core"
"core",
"jquery"
],
"attributes": {
"defer": true
Expand All @@ -21,7 +22,8 @@
"type": "script",
"uri": "com_joomlaupdate/default.min.js",
"dependencies": [
"core"
"core",
"jquery"
],
"attributes": {
"defer": true
Expand Down
16 changes: 1 addition & 15 deletions build/media_source/system/js/searchtools.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ Joomla = window.Joomla || {};
i.value = '';
self.checkFilter(i);

// Trigger an update
i.dispatchEvent(new Event('change'));
if (window.jQuery && window.jQuery.chosen) {
window.jQuery(i).trigger('chosen:updated');
}
Expand All @@ -263,8 +261,6 @@ Joomla = window.Joomla || {};
i.value = '';
self.checkFilter(i);

// Trigger an update
i.dispatchEvent(new Event('change'));
if (window.jQuery && window.jQuery.chosen) {
window.jQuery(i).trigger('chosen:updated');
}
Expand All @@ -273,12 +269,6 @@ Joomla = window.Joomla || {};
// Special case to limit box to the default config limit
document.querySelector('#list_limit').value = self.options.defaultLimit;

// Trigger an update
const listLimitEl = document.getElementById('list_limit');
if (listLimitEl) {
listLimitEl.dispatchEvent(new Event('change'));
}

if (window.jQuery && window.jQuery.chosen) {
window.jQuery('#list_limit').trigger('chosen:updated');
}
Expand Down Expand Up @@ -481,8 +471,6 @@ Joomla = window.Joomla || {};
}
});

// Trigger an update
this.orderField.dispatchEvent(new Event('change'));
if (window.jQuery && window.jQuery.chosen) {
window.jQuery(this.orderField).trigger('chosen:updated');
}
Expand Down Expand Up @@ -522,9 +510,7 @@ Joomla = window.Joomla || {};
}

field.value = newValue;

// Trigger an update
field.dispatchEvent(new Event('change'));
// Trigger the chosen update
if (window.jQuery && window.jQuery.chosen) {
field.trigger('chosen:updated');
}
Expand Down

0 comments on commit b8480ac

Please sign in to comment.