You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
When i try to use this widget i get the yii\base\Exception with this message: plugin 'align' is not supported, if you trying to set custom plugin, please set 'js' and 'css' options for your plugin.
When i read a source code i found next two fragments of code:
publicfunctionregisterPlugin($pluginName, $checkJs = true, $checkCss = true)
{
$jsFile = "js/plugins/$pluginName.min.js";
if ($checkJs && $this->isPluginJsFileExist($pluginName)) {
$this->addJs($jsFile);
$cssFile = "css/plugins/$pluginName.min.css";
if (!$checkCss || $this->isPluginCssFileExist($pluginName)) {
$this->addCss($cssFile);
}
} else {
$thirdPartyJsFile = "js/third_party/$pluginName.min.js";
if($checkJs && $this->isThirdPartyPluginJsFileExist($pluginName)) {
$this->addJs($thirdPartyJsFile);
$thirdPartyCssFile = "css/third_party/$pluginName.min.css";
if (!$checkCss || $this->isThirdPartyPluginCssFileExist($pluginName)) {
$this->addCss($thirdPartyCssFile);
}
}
else {
thrownewException("plugin '$pluginName' is not supported, if you trying to set custom plugin, please set 'js' and 'css' options for your plugin");
}
}
}
In method registerPlugin, when we call it with $checkJs = false we will always throw an exception.
I think, we can change the registerPlugins call to use $checkJs = true:
Hi!
When i try to use this widget i get the
yii\base\Exception
with this message:plugin 'align' is not supported, if you trying to set custom plugin, please set 'js' and 'css' options for your plugin
.When i read a source code i found next two fragments of code:
and
In method
registerPlugin
, when we call it with $checkJs = false we will always throw an exception.I think, we can change the
registerPlugins
call to use $checkJs = true:After this changing plugins starts ti work. I can make a pull request.
The text was updated successfully, but these errors were encountered: