Navigation Menu

Skip to content

Commit

Permalink
Dev: Include Cint CSS on all controller actions, for the Cint icon
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jul 29, 2016
1 parent 500597b commit 202c0df
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions application/core/plugins/CintLink/CintLink.php
Expand Up @@ -51,6 +51,7 @@ public function init()
$this->subscribe('beforeToolsMenuRender');
$this->subscribe('afterQuickMenuLoad');
$this->subscribe('newDirectRequest');
$this->subscribe('beforeControllerAction'); // To load Cint icon

// Login session key from com_api at limesurvey.org
$limesurveyOrgKey = Yii::app()->user->getState('limesurveyOrgKey');
Expand Down Expand Up @@ -213,6 +214,16 @@ public function afterQuickMenuLoad()
$event->append('quickMenuItems', array($button));
}

/**
* Register Cint icon css
*
* @return void
*/
public function beforeControllerAction() {
$assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/css');
App()->clientScript->registerCssFile("$assetsUrl/cintlink.css");
}

/**
* @return string
*/
Expand Down Expand Up @@ -279,9 +290,6 @@ protected function registerCssAndJs() {
App()->clientScript->registerScriptFile('/framework/zii/widgets/assets/gridview/jquery.yiigridview.js');
App()->clientScript->registerScriptFile('/framework/web/js/source/jquery.ba-bbq.min.js');

$assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/css');
App()->clientScript->registerCssFile("$assetsUrl/cintlink.css");

}

/**
Expand Down

0 comments on commit 202c0df

Please sign in to comment.