Commit 1479c5b3 authored by Chenu Denis's avatar Chenu Denis

[fix] 3.X compatibility

parent 88dd965b
Pipeline #32798116 failed with stages
in 1 minute and 10 seconds
......@@ -3,9 +3,9 @@
* select2package add a package select2 for public survey
*
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2017 Denis Chenu <www.sondages.pro>
* @copyright 2017-2018 Denis Chenu <www.sondages.pro>
* @license AGPL v3
* @version 0.1.0
* @version 0.2.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
......@@ -17,7 +17,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
class select2package extends \ls\pluginmanager\PluginBase
class select2package extends PluginBase
{
static protected $description = 'Use select2 on dropdown and helper for other plugin';
......@@ -47,7 +47,6 @@ class select2package extends \ls\pluginmanager\PluginBase
*/
public function beforeSurveyPage()
{
Yii::app()->getClientScript()->registerPackage('select2-bootstrap-theme');
$script="$('.dropdown-item select').select2({ theme: 'bootstrap', minimumResultsForSearch: 15 });";
Yii::app()->getClientScript()->registerScript('select2package',$script,CClientScript::POS_READY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment