mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-24 22:39:31 +00:00
fix javascript linter failures (#24309)
This commit is contained in:
parent
69931c3639
commit
529f00cda4
|
@ -64,7 +64,7 @@ pipeline:
|
|||
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
|
||||
- sleep 3
|
||||
- fluxbox > /dev/null 2>&1 &
|
||||
- cd /drone/src/github.com/joomla/joomla-cms && npm run lint:js
|
||||
- npm run lint:js
|
||||
|
||||
javascript-tests:
|
||||
image: joomlaprojects/docker-systemtests:develop
|
||||
|
|
|
@ -24,7 +24,7 @@ window.customElements.define('joomla-toolbar-button', class extends HTMLElement
|
|||
if (!Joomla) {
|
||||
throw new Error('Joomla API is not properly initiated');
|
||||
}
|
||||
|
||||
|
||||
this.onChange = this.onChange.bind(this);
|
||||
|
||||
this.addEventListener('click', event => this.executeTask(event));
|
||||
|
@ -118,4 +118,4 @@ window.customElements.define('joomla-toolbar-button', class extends HTMLElement
|
|||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
3478
package-lock.json
generated
3478
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -31,7 +31,7 @@
|
|||
"chosen-js": "1.6.2",
|
||||
"codemirror": "5.38.0",
|
||||
"cropperjs": "1.2.2",
|
||||
"css-vars-ponyfill": "^1.9.0",
|
||||
"css-vars-ponyfill": "^1.17.2",
|
||||
"diff": "3.4.0",
|
||||
"dragula": "3.7.2",
|
||||
"focus-visible": "^4.1.4",
|
||||
|
@ -46,25 +46,25 @@
|
|||
"tinymce": "4.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-transform-classes": "^7.2.2",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/core": "^7.4.0",
|
||||
"@babel/plugin-transform-classes": "^7.4.0",
|
||||
"@babel/preset-env": "^7.4.2",
|
||||
"@gfx/zopfli": "^1.0.11",
|
||||
"autoprefixer": "^9.4.7",
|
||||
"autoprefixer": "^9.5.0",
|
||||
"babel-plugin-add-header-comment": "^1.0.3",
|
||||
"babel-preset-minify": "^0.4.3",
|
||||
"babelify": "^10.0.0",
|
||||
"commander": "^2.19.0",
|
||||
"copy-dir": "^0.4.0",
|
||||
"cssnano": "^4.1.8",
|
||||
"eslint": "^5.12.1",
|
||||
"cssnano": "^4.1.10",
|
||||
"eslint": "^5.15.3",
|
||||
"eslint-config-airbnb-base": "^13.1.0",
|
||||
"eslint-plugin-import": "^2.16.0",
|
||||
"fs": "0.0.1-security",
|
||||
"fs-extra": "^7.0.1",
|
||||
"ini": "^1.3.5",
|
||||
"jasmine-core": "^3.3.0",
|
||||
"karma": "^4.0.0",
|
||||
"karma": "^4.0.1",
|
||||
"karma-coverage": "^1.1.2",
|
||||
"karma-firefox-launcher": "^1.1.0",
|
||||
"karma-fixture": "^0.2.6",
|
||||
|
|
|
@ -106,6 +106,36 @@ class PlgSystemStats extends CMSPlugin
|
|||
|
||||
// Load plugin language files only when needed (ex: they are not needed in site client).
|
||||
$this->loadLanguage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener for the `onAfterDispatch` event
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function onAfterDispatch()
|
||||
{
|
||||
if (!$this->app->isClient('administrator') || !$this->isAllowedUser())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$this->isDebugEnabled() && !$this->isUpdateRequired())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Uri::getInstance()->getVar('tmpl') === 'component')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->app->getDocument()->getType() !== 'html')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HTMLHelper::_('script', 'plg_system_stats/stats-message.js', array('version' => 'auto', 'relative' => true));
|
||||
}
|
||||
|
@ -450,11 +480,11 @@ class PlgSystemStats extends CMSPlugin
|
|||
$this->params->set('interval', $interval ?: 12);
|
||||
|
||||
$query = $this->db->getQuery(true)
|
||||
->update($this->db->quoteName('#__extensions'))
|
||||
->set($this->db->quoteName('params') . ' = ' . $this->db->quote($this->params->toString('JSON')))
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
|
||||
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote('system'))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote('stats'));
|
||||
->update($this->db->quoteName('#__extensions'))
|
||||
->set($this->db->quoteName('params') . ' = ' . $this->db->quote($this->params->toString('JSON')))
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
|
||||
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote('system'))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote('stats'));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user