Registers the required js files and script to initialize echarts plugin.
426937
protected function registerClientScript()
    {
        $id = $this->options['id'];
        $view = $this->getView();
        $option = !empty($this->pluginOptions['option']) ? Json::encode($this->pluginOptions['option']) : '{}';

        if ($this->theme) {
            $js = "var {$this->clientId} = echarts.init(document.getElementById('{$id}'), " . $this->quote($this->theme) . ");";
        } else {
            $js = "var {$this->clientId} = echarts.init(document.getElementById('{$id}'));";
        }
        $js .= "{$this->clientId}.setOption({$option});";
        if (isset($this->pluginOptions['group'])) {
            $js .= "{$this->clientId}.group = " . $this->quote($this->pluginOptions['group']) . ";";
        }
        if ($this->responsive) {
            $js .= "$(window).resize(function () {{$this->clientId}.resize()});";
        }
        foreach ($this->pluginEvents as $name => $handlers) {
            $handlers = (array) $handlers;
            foreach ($handlers as $handler) {
                $js .= "{$this->clientId}.on(" . $this->quote($name) . ", $handler);";
            }
        }

        EChartsAsset::register($view);
        $view->registerJs($js);
    }
866676
protected function registerPlugins()
    {
        if (isset($this->clientOptions['plugins']) && count($this->clientOptions['plugins'])) {
            foreach ($this->clientOptions['plugins'] as $plugin) {
                $js = 'plugins/' . $plugin . '/' . $plugin . '.js';
                if (file_exists($this->sourcePath . DIRECTORY_SEPARATOR . $js)) {
                    $this->assetBundle->js[] = $js;
                }
                $css = 'plugins/' . $plugin . '/' . $plugin . '.css';
                if (file_exists($this->sourcePath . DIRECTORY_SEPARATOR . $css)) {
                    $this->assetBundle->css[] = $css;
                }
            }
        }
    }
445260
protected function registerAssets()
    {
        $view = $this->getView();
        SelectizeAsset::register($view);
        $js = '$("#' . $this->getInputId() . '").selectize(' . $this->getPluginOptions() . ');';
        $view->registerJs($js, $view::POS_END);
    }
336270
private function registerWidgetScripts()
    {
        $view = $this->getView();
        $asset = Yii::$container->get(Asset::className());
        $asset::register($view);
        $this->widgetSettings = Json::encode($this->widgetSettings);
        $view->registerJs("var audioWidget = new AudioWidget(" . $this->widgetSettings . "); audioWidget.init();", $view::POS_READY);
    }
391112
public function registerFormScripts() {
        $view = $this->getView();
        $view->registerJsFile($this->stripeJs, ['position' => \yii\web\View::POS_HEAD]);

        $js = "Stripe.setPublishableKey('" . Yii::$app->stripe->publicKey . "');";
        $view->registerJs($js, \yii\web\View::POS_BEGIN);

        //form scripts
        $view->registerJs($this->stripeResponseHandler, \yii\web\View::POS_READY);
        $view->registerJs($this->stripeRequestHandler, \yii\web\View::POS_READY);
    }
1155830
public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();

        $cs->registerScriptFile($assetsUrl . '/js/ace.js', CClientScript::POS_END);

        $id = TbArray::getValue('id', $this->htmlOptions, $this->getId());

        /* Global value that will hold the editor */
        $cs->registerScript(uniqid(__CLASS__ . '#' . $id, true), 'var ' . $id . ';', CClientScript::POS_HEAD);

        ob_start();
        /* initialize plugin */
        $selector = TbArray::getValue('id', $this->htmlOptions, $this->getId());

        echo $selector . '= ace.edit("' . $id . '");' . PHP_EOL;
        echo $selector . '.setTheme("ace/theme/' . $this->theme . '");' . PHP_EOL;
        echo $selector . '.getSession().setMode(' . (is_array($this->mode) ? CJavaScript::encode(
                $this->mode
            ) : '"ace/mode/' . $this->mode . '"') . ');' . PHP_EOL;
        echo $selector . '.setValue($("#' . $this->htmlOptions['textareaId'] . '").val());' . PHP_EOL;
        echo $selector . '.getSession().on("change", function(){
                var theVal = ' . $selector . '.getSession().getValue();
                $("#' . $this->htmlOptions['textareaId'] . '").val(theVal);
            });';

        if (!empty($this->events) && is_array($this->events)) {
            foreach ($this->events as $name => $handler) {
                $handler = ($handler instanceof CJavaScriptExpression)
                    ? $handler
                    : new CJavaScriptExpression($handler);

                echo $id . ".getSession().on('{$name}', {$handler});" . PHP_EOL;
            }
        }

        if (!empty($this->pluginOptions))
            echo $selector . '.setOptions(' . CJavaScript::encode($this->pluginOptions) . ')';

        $cs->registerScript(uniqid(__CLASS__ . '#ReadyJS' . $id, true), ob_get_clean());
    }
287323
public function registerClientScript()
	{
		$assets = Booster::getBooster()->cs;

		$assets->registerPackage('redactor');

		$baseUrl = $assets->packages['redactor']['baseUrl'];

		// Prepend language file to scripts package.
		if ($this->editorOptions['lang'] != 'en') {
			$assets->registerScriptFile($baseUrl . '/lang/' . $this->editorOptions['lang'] . '.js');
		}

		if (isset($this->editorOptions['plugins'])) {
			foreach ($this->editorOptions['plugins'] as $name) {
				$filepath = Yii::getPathOfAlias('booster.assets.redactor.plugins') . '/' . $name . '/' . $name;
				$url = $baseUrl . '/plugins/' . $name . '/' . $name;

				if (file_exists($filepath . '.css'))
					$assets->registerCssFile($url.'.css');

				if (file_exists($filepath . '.js'))
					$assets->registerScriptFile($url.'.js');
			}
		}

		$options = $this->editorOptions
			? CJavaScript::encode($this->editorOptions)
			: '';

		$assets->registerScript(
			uniqid(__CLASS__ . '#', true),
			"jQuery('{$this->selector}').redactor({$options});"
		);
	}
1271358
def register_plugin(self):
        """"""
        main = self.main
        main.add_dockwidget(self)

        #if getattr(main.projectexplorer, 'sig_project_closed', False):
        #    pe = main.projectexplorer
        #    pe.condamanager = self
        #    pe.sig_project_closed.connect(self.project_closed)
        #    pe.sig_project_loaded.connect(self.project_loaded)
        #    self.sig_worker_ready.connect(self._after_load)
        #    self.sig_environment_created.connect(pe.sig_environment_created)

        self.sig_channels_updated.connect(self._save_channel_settings)
324483
protected function registerAssets()
    {
        $view = $this->getView();
        $clientOptions = Json::encode($this->clientOptions);
        $js = 'jQuery("div#' . $this->options['id'] . '").raty(' . $clientOptions . ');';
        $view->registerJs($js);
    }
1359852
protected function registerScript()
    {
        $id = $this->options['id'];
        $clientOptions = (count($this->clientOptions)) ? Json::encode($this->clientOptions) : '{}';

        $this->getView()->registerJs("CKEDITOR.replace('$id', $clientOptions);", View::POS_END);
    }
715353
protected function registerClientScript()
	{
		$assets = Booster::getBooster()->cs;

		$assets->registerPackage('highcharts');

		$baseUrl = $assets->packages['highcharts']['baseUrl'];

		$this->options = CMap::mergeArray(array('exporting' => array('enabled' => true)), $this->options);

		if (isset($this->options['exporting']) && @$this->options['exporting']['enabled']) {
			$assets->registerScriptFile($baseUrl . '/modules/exporting.js');
		}
		if (isset($this->options['theme'])) {
			$assets->registerScriptFile($baseUrl . '/themes/' . $this->options['theme'] . '.js');
		}

		$options = CJavaScript::encode($this->options);

		$assets->registerScript(
			__CLASS__ . '#' . $this->getId(),
			"var highchart{$this->getId()} = new Highcharts.Chart({$options});"
		);
	}
1279885
protected function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();

        $cs->registerScriptFile($assetsUrl . '/js/highcharts.js');

        /* register required files */
        $defaultOptions = array('exporting' => array('enabled' => true));

        $this->pluginOptions = CMap::mergeArray($defaultOptions, $this->pluginOptions);

        if (isset($this->pluginOptions['exporting']) && @$this->pluginOptions['exporting']['enabled']) {
            $cs->registerScriptFile($assetsUrl . '/js/modules/exporting.js');
        }

        if ($theme = TbArray::getValue('theme', $this->pluginOptions)) {
            $cs->registerScriptFile($assetsUrl . '/js/themes/' . $theme . '.js');
        }

        $options = CJavaScript::encode($this->pluginOptions);

        $cs->registerScript(
            __CLASS__ . '#' . $this->getId(),
            "var highchart{$this->getId()} = new Highcharts.Chart({$options});"
        );
    }
1013609
public function registerClientScript()
    {
        $path = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /** @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();
        $cs->registerCssFile($assetsUrl . '/css/bootstrap-relational.css');

        if ($this->afterAjaxUpdate !== null) {
            if ((!$this->afterAjaxUpdate instanceof CJavaScriptExpression) && strpos(
                    $this->afterAjaxUpdate,
                    'js:'
                ) !== 0
            )
                $this->afterAjaxUpdate = new CJavaScriptExpression($this->afterAjaxUpdate);
        } else
            $this->afterAjaxUpdate = 'js:$.noop';

        $this->ajaxErrorMessage = CHtml::encode($this->ajaxErrorMessage);
        $afterAjaxUpdate = CJavaScript::encode($this->afterAjaxUpdate);
        $span = count($this->grid->columns);
        $loadingPic = CHtml::image(Yii::app()->yiiwheels->getAssetsUrl() . '/img/loading.gif');
        $cache = $this->cacheData ? 'true' : 'false';
        $data = !empty($this->submitData) && is_array(
            $this->submitData
        ) ? $this->submitData : 'js:{}';
        $data = CJavascript::encode($data);

        $js = <<<EOD
$(document).on('click','.{$this->cssClass}', function(){
	var span = $span;
	var that = $(this);
	var status = that.data('status');
	var rowid = that.data('rowid');
	var tr = $('#relatedinfo'+rowid);
	var parent = that.parents('tr').eq(0);
	var afterAjaxUpdate = {$afterAjaxUpdate};

	if (status && status=='on'){return}
	that.data('status','on');

	if (tr.length && !tr.is(':visible') && {$cache})
	{
		tr.slideDown();
		that.data('status','off');
		return;
	}else if (tr.length && tr.is(':visible'))
	{
		tr.slideUp();
		that.data('status','off');
		return;
	}
	if (tr.length)
	{
		tr.find('td').html('{$loadingPic}');
		if (!tr.is(':visible')){
			tr.slideDown();
		}
	}
	else
	{
		var td = $('<td/>').html('{$loadingPic}').attr({'colspan':$span});
		tr = $('<tr/>').prop({'id':'relatedinfo'+rowid}).append(td);
		/* we need to maintain zebra styles :) */
		var fake = $('<tr class="hide"/>').append($('<td/>').attr({'colspan':$span}));
		parent.after(tr);
		tr.after(fake);
	}
	var data = $.extend({$data}, {id:rowid});
	$.ajax({
		url: '{$this->url}',
		data: data,
		success: function(data){
			tr.find('td').html(data);
			that.data('status','off');
			if ($.isFunction(afterAjaxUpdate))
			{
				afterAjaxUpdate(tr,rowid,data);
			}
		},
		error: function()
		{
			tr.find('td').html('{$this->ajaxErrorMessage}');
			that.data('status','off');
		}
	});
});
EOD;
        $cs->registerScript(__CLASS__ . '#' . $this->id, $js);
    }
1273445
public function registerClientScript()
    {
        if (!empty($this->pluginOptions)) {
            $options = \CJavaScript::encode($this->pluginOptions);
            \Yii::app()->clientScript
                ->registerScript('Orbit#' . $this->getId(), "$(document).foundation('orbit', {$options});");
        }

        if (!empty($this->events)) {
            $this->registerEvents("#{$this->getId()}", $this->events);
        }
    }
134612
protected function registerClientScript()
    {
        $js = array();

        $function = CJavaScript::encode(TbArray::popValue('click', $this->toggleOptions, ''));

        $class = preg_replace('/\s+/', '.', $this->toggleOptions['htmlOptions']['class']);
        $js[] = "$(document).off('click').on('click','#{$this->grid->id} a.{$class}',$function);";

        Yii::app()->getClientScript()->registerScript($this->name . '#ReadyJS', implode("\n", $js));
    }
1124708
protected function registerAssets()
    {
        $view = $this->getView();
        PieAsset::register($view);

        $js = 'var pie' . ucfirst($this->getId()) . ' = new d3pie(' . $this->getId() . ', ' . Json::encode($this->pieOptions) . ');';
        $view->registerJs($js);

    }
631673
public function registerClientScript()
    {
        $view = $this->getView();
        $selector = Json::encode($this->selector);
        $asset = TrumbowygAsset::register($view);

        if (isset($this->settings['lang'])) {
            $asset->language = $this->settings['lang'];
        }

        if (isset($this->settings['plugins'])) {
            $asset->plugins = $this->settings['plugins'];
        }

        $settings = !empty($this->settings) ? Json::encode($this->settings) : '';

        $view->registerJs("jQuery($selector).trumbowyg($settings);");
    }