Commit 00be44e1 authored by Sam's avatar Sam

Dev Included limescript widget.

Dev Simplified limescript widget.
parent e8f3a7a1
......@@ -7,6 +7,8 @@
{
public function run()
{
App()->getClientScript()->registerScriptFile(App()->getAssetManager()->publish(Yii::getPathOfAlias('ext.LimeScript.assets'). '/script.js'));
$data = array();
$data['baseUrl'] = Yii::app()->getBaseUrl(true);
$data['showScriptName'] = Yii::app()->urlManager->showScriptName;
......@@ -14,7 +16,9 @@
$data['layoutPath'] = Yii::app()->getLayoutPath();
$data['adminImageUrl'] = Yii::app()->getConfig('adminimageurl');
$data['replacementFields']['path'] = App()->createUrl("admin/limereplacementfields/sa/index/");
$this->render('script', compact('data'));
$json = json_encode($data, JSON_FORCE_OBJECT);
$script = "LS.data = $json";
App()->getClientScript()->registerScript('LimeScript', $script);
}
}
......
<?php
$json = json_encode($data, JSON_FORCE_OBJECT);
echo "LS.data = $json";
App()->getClientScript()->registerScriptFile(App()->getAssetManager()->publish(Yii::getPathOfAlias('ext.LimeScript.assets'). '/script.js'));
?>
\ No newline at end of file
......@@ -37,7 +37,7 @@
<link rel="icon" href="<?php echo App()->baseUrl; ?>styles/favicon.ico" type="image/x-icon" />
<?php //echo $firebug ?>
<?php $this->widget('ext.LimeScript.LimeScript'); ?>
<title>Limesurvey Administration</title>
</head>
......
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