diff --git a/application/config/internal.php b/application/config/internal.php index f1c72fcbaf6..e87e73bd4d0 100644 --- a/application/config/internal.php +++ b/application/config/internal.php @@ -98,20 +98,7 @@ 'clientScript'=>array( 'packages' => array_merge( require('third_party.php'), - array( - 'limesurvey-public'=>array( - 'basePath' => 'core.limesurvey', - 'css'=> array( - 'survey.css', - ), - 'js'=>array( - 'survey.js', - ), - 'depends' => array( - 'bootstrap', - ) - ) - ) + require('packages.php') ) ), diff --git a/application/config/packages.php b/application/config/packages.php new file mode 100644 index 00000000000..0006367dc6d --- /dev/null +++ b/application/config/packages.php @@ -0,0 +1,22 @@ +array( + 'basePath' => 'core.limesurvey', + 'css'=> array( + 'survey.css', + ), + 'js'=>array( + 'survey.js', + ), + 'depends' => array( + //'bootstrap', + ) + ) +); diff --git a/application/config/third_party.php b/application/config/third_party.php index b9b5633504d..0e536cf872c 100755 --- a/application/config/third_party.php +++ b/application/config/third_party.php @@ -5,7 +5,8 @@ * Defining them here allows for easy inclusion in views. */ - +/* Please : comment the reason, mantis bug link: ajax don't need any package if i don't make error */ +/* Ajax must renderPartial (better : always return json) and never render and don't registerScript (IMHO) / Shnoulle on 2016-11-16 */ if (!isset($_GET['isAjax'])) { $aJquery = array( @@ -303,6 +304,7 @@ 'css' => array( 'css/emoji.css', 'css/ss-emoji.css' + ), ), 'jquery-datatable' => array( 'basePath' => 'third_party.jquery-datatable', @@ -317,6 +319,4 @@ 'bootstrap' ) ) - - ); diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index 294367e6100..39a2a338357 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -2074,7 +2074,10 @@ function do_ranking($ia) $inputnames[]=$myfname; } + App()->getClientScript()->registerPackage('jqueryui'); + App()->getClientScript()->registerPackage('jquery-touch-punch'); App()->getClientScript()->registerPackage('jquery-actual'); // Needed to with jq1.9 ? + Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."ranking.js"); Yii::app()->getClientScript()->registerCssFile(Yii::app()->getConfig('publicstyleurl') . "ranking.css"); diff --git a/templates/default/config.xml b/templates/default/config.xml index 9681c47911f..9d4043a7a6a 100644 --- a/templates/default/config.xml +++ b/templates/default/config.xml @@ -112,8 +112,10 @@ + fontawesome limesurvey-public