Register required script files
963475
public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

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

        $cs->registerCssFile($assetsUrl . '/css/bootstrap-wysihtml5.css');
        if (isset($this->pluginOptions['color'])) {
            $cs->registerCssFile($assetsUrl . '/css/wysiwyg-color.css');
        }

        $cs->registerScriptFile($assetsUrl . '/js/wysihtml5-0.3.0.js');
        $cs->registerScriptFile($assetsUrl . '/js/bootstrap-wysihtml5.js');

        if (in_array(@$this->pluginOptions['locale'], array('de-DE', 'es-ES', 'fr', 'fr-NL', 'pt-BR', 'sv-SE'))) {
            $cs->registerScriptFile(
                $assetsUrl . '/js/locale/bootstrap-wysihtml5.' . $this->pluginOptions['locale'] . '.js'
            );
        } elseif (in_array($this->lang, array('de-DE', 'es-ES', 'fr', 'fr-NL', 'pt-BR', 'sv-SE'))) {
            $cs->registerScriptFile($assetsUrl . '/js/locale/bootstrap-wysihtml5.' . $this->lang . '.js');
            $this->pluginOptions['locale'] = $this->lang;
        }

        $this->normalizeStylesheetsProperty();

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

        $this->getApi()->registerPlugin('wysihtml5', $selector, $this->pluginOptions);

    }
762775
def add_scripts(self):
        """"""
        common_script = self.node(self.defs, 'script', type='text/javascript')

        def get_js_dict():
            return dict(
                (k, getattr(self.graph.state, k))
                for k in dir(self.graph.config)
                if not k.startswith('_') and hasattr(self.graph.state, k)
                and not hasattr(getattr(self.graph.state, k), '__call__')
            )

        def json_default(o):
            if isinstance(o, (datetime, date)):
                return o.isoformat()
            if hasattr(o, 'to_dict'):
                return o.to_dict()
            return json.JSONEncoder().default(o)

        dct = get_js_dict()
        # Config adds
        dct['legends'] = [
            l.get('title') if isinstance(l, dict) else l
            for l in self.graph._legends + self.graph._secondary_legends
        ]

        common_js = 'window.pygal = window.pygal || {};'
        common_js += 'window.pygal.config = window.pygal.config || {};'
        if self.graph.no_prefix:
            common_js += 'window.pygal.config = '
        else:
            common_js += 'window.pygal.config[%r] = ' % self.graph.uuid

        common_script.text = common_js + json.dumps(dct, default=json_default)

        for js in self.graph.js:
            if js.startswith('file://'):
                script = self.node(self.defs, 'script', type='text/javascript')
                with io.open(js[len('file://'):], encoding='utf-8') as f:
                    script.text = f.read()
            else:
                if js.startswith('//') and self.graph.force_uri_protocol:
                    js = '%s:%s' % (self.graph.force_uri_protocol, js)
                self.node(self.defs, 'script', type='text/javascript', href=js)
1292141
public function registerClientScript() {
        $view = $this->getView();
        $assetBundle = $this->assetBundle instanceof AssetBundle ? $this->assetBundle : Asset::register($view);

        if (array_key_exists('language', $this->options) && $this->options['language'] !== null) {
            $assetBundle->language = $this->options['language'];
        }

        $selector = $this->selector === null ? '#' . $this->htmlOptions['id'] : $this->selector;
        $options = Json::encode($this->options);

        $view->registerJs("jQuery('$selector').gtreetable($options);");
    }
1115346
public function registerClientScript()
    {
        $this->registerGalleryScriptFiles();

        $items = CJavaScript::encode($this->items);
        $options = CJavaScript::encode($this->pluginOptions);
        $js = ";blueimp.Gallery({$items}, {$options});";

        Yii::app()->clientScript->registerScript(__CLASS__ . '#' . $this->getId(), $js);
    }
883625
public function registerClientScript()
    {
        $options = $this->getClientOptions();
        $options = empty($options) ? '' : Json::encode($options);
        $id = $this->imageOptions['id'];
        $view = $this->getView();
        CaptchaAsset::register($view);
        $view->registerJs("jQuery('#$id').yiiMbCaptcha($options);");
    }
263575
public function registerClientScript()
    {
        $view = $this->view;
        CodeMirrorAsset::register($view);
        $js = 'var CodeMirrorLabels = {
    bold: "' . Yii::t('podium/view', 'Bold') . '",
    italic: "' . Yii::t('podium/view', 'Italic') . '",
    header: "' . Yii::t('podium/view', 'Header') . '",
    inlinecode: "' . Yii::t('podium/view', 'Inline code') . '",
    blockcode: "' . Yii::t('podium/view', 'Block code') . '",
    quote: "' . Yii::t('podium/view', 'Quote') . '",
    bulletedlist: "' . Yii::t('podium/view', 'Bulleted list') . '",
    orderedlist: "' . Yii::t('podium/view', 'Ordered list') . '",
    link: "' . Yii::t('podium/view', 'Link') . '",
    image: "' . Yii::t('podium/view', 'Image') . '",
    help: "' . Yii::t('podium/view', 'Help') . '",
};var CodeMirrorSet = "' . $this->type . '";';
        $view->registerJs($js, View::POS_BEGIN);
    }
8488
function loadScripts(scripts, loadedCallback) {
    var srcs = [], property, count, i, src,
        countDown = function () {
          count -= 1;
          if (!count) {
            loadedCallback();
          }
        };

    for (property in scripts) {
      if (!(property in window)) {
        srcs.push(scripts[property]);
      }
    }

    count = srcs.length;
    if (!count) {
      loadedCallback();
    }

    for (i = 0; i < srcs.length; i += 1) {
      src = srcs[i];
      loadScript(src, countDown);
    }
  }
886767
protected function registerClientScripts()
	{
        $booster = Booster::getBooster();
        $booster->registerAssetCss('easy-pie-chart.css');
        $booster->registerAssetJs('jquery.easy.pie.chart.js');

		$options = CJavaScript::encode($this->chartOptions);
		Yii::app()->getClientScript()->registerScript(
			__CLASS__ . '#percent-of-type-operation-simple-pie',
			'
					   $("#' . $this->column->grid->id . ' .' . $this->column->grid->extendedSummaryCssClass . ' .' . $this->chartCssClass . '")
				.easyPieChart(' . $options . ');
		'
		);
		$this->column->grid->componentsReadyScripts[__CLASS__] =
		$this->column->grid->componentsAfterAjaxUpdate[__CLASS__] =
			'$("#' . $this->column->grid->id . ' .' . $this->column->grid->extendedSummaryCssClass . ' .' . $this->chartCssClass . '")
				.easyPieChart(' . $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});"
        );
    }
147036
public function registerScript()
    {
        ChosenBootstrapAsset::register($this->getView());
        $clientOptions = Json::encode($this->clientOptions);
        $id = $this->options['id'];
        $this->getView()->registerJs("jQuery('#$id').chosen({$clientOptions});");
    }
1305838
public function registerClientScript()
    {
        $view = $this->getView();
        $view->registerJsFile($this->baseUrl.'/swfobject.js',['position'=>View::POS_BEGIN]);
        if($this->enableHistory)
        {
            $view->registerCssFile($this->baseUrl.'/history/history.css');
            $view->registerJsFile($this->baseUrl.'/history/history.js');
        }
        if($this->allowWsBridge)
        {
            $view->registerJsFile($this->baseUrl.'/ws_bridge.js',['position'=>View::POS_END]);
        }
    }
300850
protected function registerAssets()
    {

        if (\is_array($this->ajaxSettings)) {
            $this->ajaxSettings = explode(',', $this->ajaxSettings);
        }

        $this->view->registerJs(<<<JS
$(document).on('click','button[data-ajax-button-id]', 'click', function() {
    var button = $(this);
    $.ajax({
        url : button.data('ajax-button-url'),
        type : button.data('ajax-button-method'),
        data : button.data('ajax-button-params'),
        {$this->jsCallback($this->errorExpression, 'error')}
        {$this->jsCallback($this->successExpression, 'success')}
        {$this->ajaxSettings}
    });
});
JS
        );
    }
92398
public function registerClientScript() {
		
		$url = CHtml::normalizeUrl($this->redirectRoute);

		Yii::app()->clientScript->registerScript(
			__CLASS__ . '#extended-filter' . $this->grid->id,
			<<<EOD
           		$(document).on('click', '#{$this->grid->id} .btn-extended-filter-save', function(e){
			e.preventDefault();
			bootbox.prompt("How do you wish to save this filter?", function(result){
				if ($.trim(result).length > 0)
				{
					$('#{$this->grid->id}').yiiGridView('update',{data:{{$this->saveFilterVar}:result}});
				}
			});
		});
		$(document).on('click', '#{$this->grid->id} .btn-extended-filter-apply', function(e) {
			e.preventDefault();
			var option = $('#{$this->getId()} select.select-extended-filter option:selected');
			if (!option.length || !option.data('filter')) {
				return false;
			}
			var data ={data:option.data('filter')};
			if (option.val()==-1) {
				data.url = "{$url}";
			}
			$('#{$this->grid->id}').yiiGridView('update',data);
		});

		$(document).on('click', '#{$this->grid->id} .btn-extended-filter-delete', function(e) {
			e.preventDefault();
			var option = $('#{$this->grid->id} select.select-extended-filter option:selected');
			if (!option.length || !option.data('key') || option.val()==-1) {
				return false;
			}
			bootbox.confirm('Delete "'+option.text()+'" filter?', function(confirmed){
				if (confirmed) {
					$('#{$this->grid->id}').yiiGridView('update',{data:{{$this->removeFilterVar}:option.data('key')}});
				}
			});
		});
EOD
		);
	}
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});"
		);
	}
222845
protected function registerClientScript()
    {
        $view = $this->getView();

        BootstrapTypeAheadAsset::register($view);

        $id = $this->options['id'];

        $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : 'null';

        foreach($this->dataSets as $dataSet) {
            if(empty($dataSet)) {
                continue;
            }
            $dataSets[] = Json::encode($dataSet);
        }

        $dataSets = !empty($dataSets) ? implode(", ", $dataSets) : '{}';

        foreach ($this->engines as $bloodhound) {
            if ($bloodhound instanceof BootstrapTypeAheadBloodhound) {
                $js[] = $bloodhound->getClientScript();
            }
        }
        $js[] = "jQuery('#$id').typeahead($options, $dataSets);";
        foreach ($this->clientEvents as $eventName => $handler) {
            $js[] = "jQuery('#$id').on('$eventName', $handler);";
        }
        $view->registerJs(implode("\n", $js));
    }
206967
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/jquery.mask.js');

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

        $options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '{}';
        $script = "jQuery('{$selector}').mask('{$this->mask}',{$options});";
        Yii::app()->clientScript->registerScript((uniqid(__CLASS__ . '#', true)), $script, CClientScript::POS_END);
    }
1073639
protected function registerConfigFiles()
    {
        if (isset($this->dir) and isset($this->configFiles) and is_array($this->configFiles)) {
            foreach ($this->configFiles as $key) {
                $path = $this->getConfigFilePath($key);
                //$this->mergeConfigFrom($this->getConfigFilePath($filename), $filename);
                $config = $this->app->make('config')->get($key, [ ]);
                $this->app->make('config')->set($key, array_replace_recursive(require $path, $config));
            }
        }
    }