Register script that will handle its behavior
500427
public function registerClientScript() {
		
        Booster::getBooster()->registerAssetCss('bootstrap-relational.css');

		/** @var $cs CClientScript */
		$cs = Yii::app()->getClientScript();
		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(Booster::getBooster()->getAssetsUrl() . '/img/loading.gif');
		$cache = $this->cacheData ? 'true' : 'false';
		$data = !empty($this->submitData) && is_array($this->submitData) ? $this->submitData : 'js:{}';
		$data = CJavascript::encode($data);
		list($parentId) = explode('_',$this->id);
		$_id = $this->cssClass.'_'.$this->id;
		$js = <<<EOD
$(document).on('click','#{$parentId} .{$_id}', function() {
	var span = $span;
	var that = $(this);
	var status = that.data('status');
	var rowid = that.data('rowid');
	var colid = that.data('colid');
	var tr = $('#relatedinfo'+rowid+colid);
	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[id^=relatedinfo"+rowid+"]").not(tr).hide(); // .slideUp();
		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[id^=relatedinfo"+rowid+"]").not(tr).hide(); // .slideUp();
		tr.find('td').html('{$loadingPic}');
		if (!tr.is(':visible')){
			tr.slideDown();
		}
	}
	else
	{
		$("tr[id^=relatedinfo"+rowid+"]").hide(); // .slideUp();
		var td = $('<td/>').html('{$loadingPic}').attr({'colspan':$span});
		tr = $('<tr/>').prop({'id':'relatedinfo'+rowid+colid}).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);
	}
738994
public function registerClientScript()
	{
		$id=$this->htmlOptions['id'];

		$acOptions=$this->getClientOptions();
		$options=$acOptions===array()?'{}' : CJavaScript::encode($acOptions);

		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('autocomplete');
		if($this->data!==null)
			$data=CJavaScript::encode($this->data);
		else
		{
			$url=CHtml::normalizeUrl($this->url);
			$data='"'.$url.'"';
		}
		$cs->registerScript('Yii.CAutoComplete#'.$id,"jQuery(\"#{$id}\").legacyautocomplete($data,{$options}){$this->methodChain};");

		if($this->cssFile!==false)
			self::registerCssFile($this->cssFile);
	}
782546
protected function registerClientScript()
    {

        $path      = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

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

        $cs->registerCoreScript('jquery');

        $cs->registerCssFile($assetsUrl . '/css/bootstrap-toggle-buttons.css');
        $cs->registerScriptFile($assetsUrl . '/js/jquery.toggle.buttons.js');

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

        $this->getApi()->registerPlugin(
            'toggleButtons',
            $selector,
            $this->getConfiguration(),
            CClientScript::POS_READY
        );

    }
895646
public function registerClientScript()
	{
		$id=$this->htmlOptions['id'];
		$miOptions=$this->getClientOptions();
		$options=$miOptions!==array() ? ','.CJavaScript::encode($miOptions) : '';
		$js='';
		if(is_array($this->charMap))
			$js.='jQuery.mask.definitions='.CJavaScript::encode($this->charMap).";\n";
		$js.="jQuery(\"#{$id}\").mask(\"{$this->mask}\"{$options});";

		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('maskedinput');
		$cs->registerScript('Yii.CMaskedTextField#'.$id,$js);
	}
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);
    }
297160
public function registerClientScript() {
        $view = $this->getView();

        FancyBoxAsset::register($view);

        if ($this->mouse) {
            MousewheelAsset::register($view);
        }

        if ($this->helpers) {
            FancyBoxHelpersAsset::register($view);
        }
    }
118621
public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);
        $id = TbArray::getValue('id', $this->htmlOptions, $this->getId());

        $jsFile = !empty($this->scales)
            ? 'jQAllRangeSliders-withRuler-min.js'
            : 'jQAllRangeSliders-min.js';

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

        $cs->registerCoreScript('jquery');
        $cs->registerCoreScript('jquery.ui');
        $this->getYiiWheels()->registerAssetJs('jquery.mousewheel.min.js', CClientScript::POS_HEAD);

        $cs->registerCssFile($assetsUrl . '/css/' . $this->theme . '.css');
        $cs->registerScriptFile($assetsUrl . '/js/' . $jsFile);

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

        $inputValSet = "$('#{$id}').val(data.values.min+','+data.values.max);";

        //inserting trigger
        if (isset($this->events['valuesChanged'])) {
            $orig = $this->events['valuesChanged'];
            if (strpos($orig, 'js:') === 0) {
                $orig = substr($orig, 3);
            }
            $orig = "\n($orig).apply(this, arguments);";
        } else {
            $orig = '';
        }
        $this->events['valuesChanged'] = "js: function(id, data) {
			$inputValSet $orig
		}";

        ob_start();
        echo "jQuery('#slider_{$id}').{$this->type}Slider({$options})";
        foreach ($this->events as $event => $handler) {
            echo ".on('{$event}', " . CJavaScript::encode($handler) . ")";
        }

        $cs->registerScript(__CLASS__ . '#' . $this->getId(), ob_get_clean() . ';');
    }
735986
public function registerClientScript()
	{
		$id=$this->htmlOptions['id'];

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

		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('multifile');
		$cs->registerScript('Yii.CMultiFileUpload#'.$id,"jQuery(\"#{$id}\").MultiFile({$options});");
	}
373006
public function registerClientScript()
    {
        $view = $this->view;
        
        if ($this->_katex) {
            $katexAsset = KatexAsset::register($view);
            $katexAsset->version = $this->katexVersion;
        }

        if ($this->_highlight) {
            $highlightAsset = HighlightAsset::register($view);
            $highlightAsset->version = $this->highlightVersion;
            $highlightAsset->style = $this->highlightStyle;
        }
        
        $asset = QuillAsset::register($view);
        $asset->theme = $this->theme;
        $asset->version = $this->quillVersion;
        
        $configs = Json::encode($this->_quillConfiguration);
        $editor = 'q_' . preg_replace('~[^0-9_\p{L}]~u', '_', $this->id);
        
        $js = "var $editor=new Quill(\"#editor-{$this->id}\",$configs);";
        $js .= "document.getElementById(\"editor-{$this->id}\").onclick=function(e){document.querySelector(\"#editor-{$this->id} .ql-editor\").focus();};";
        $js .= "$editor.on('text-change',function(){document.getElementById(\"{$this->_fieldId}\").value=$editor.root.innerHTML;});";

        if (!empty($this->js)) {
            $js .= str_replace('{quill}', $editor, $this->js);
        }

        $view->registerJs($js, View::POS_END);
    }
1347113
public function registerClientScript()
	{
		$id=$this->getId();

		if($this->ajaxUpdate===false)
			$ajaxUpdate=array();
		else
			$ajaxUpdate=array_unique(preg_split('/\s*,\s*/',$this->ajaxUpdate.','.$id,-1,PREG_SPLIT_NO_EMPTY));
		$options=array(
			'ajaxUpdate'=>$ajaxUpdate,
			'ajaxVar'=>$this->ajaxVar,
			'pagerClass'=>$this->pagerCssClass,
			'loadingClass'=>$this->loadingCssClass,
			'sorterClass'=>$this->sorterCssClass,
			'enableHistory'=>$this->enableHistory
		);
		if($this->ajaxUrl!==null)
			$options['url']=CHtml::normalizeUrl($this->ajaxUrl);
		if($this->ajaxType!==null)
			$options['ajaxType']=strtoupper($this->ajaxType);
		if($this->updateSelector!==null)
			$options['updateSelector']=$this->updateSelector;
		foreach(array('beforeAjaxUpdate', 'afterAjaxUpdate', 'ajaxUpdateError') as $event)
		{
			if($this->$event!==null)
			{
				if($this->$event instanceof CJavaScriptExpression)
					$options[$event]=$this->$event;
				else
					$options[$event]=new CJavaScriptExpression($this->$event);
			}
		}

		$options=CJavaScript::encode($options);
		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('jquery');
		$cs->registerCoreScript('bbq');
		if($this->enableHistory)
			$cs->registerCoreScript('history');
		$cs->registerScriptFile($this->baseScriptUrl.'/jquery.yiilistview.js',CClientScript::POS_END);
		$cs->registerScript(__CLASS__.'#'.$id,"jQuery('#$id').yiiListView($options);");
	}
1355029
def register_plugin(self):
        """"""
        self.main.add_dockwidget(self)

        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.edit_goto.connect(self.main.editor.load)
        self.edit_goto[str, int, str, bool].connect(
                         lambda fname, lineno, word, processevents:
                         self.main.editor.load(fname, lineno, word,
                                               processevents=processevents))
        self.main.editor.breakpoints_saved.connect(self.set_spyder_breakpoints)
        self.main.editor.run_in_current_ipyclient.connect(self.run_script)
        self.main.editor.run_cell_in_ipyclient.connect(self.run_cell)
        self.main.workingdirectory.set_current_console_wd.connect(
                                     self.set_current_client_working_directory)

        self.tabwidget.currentChanged.connect(self.update_working_directory)

        self._remove_old_stderr_files()
680072
private function registerScripts() {
        $view = $this->getView();

        $view->registerJsFile($this->stripeJs, ['position' => \yii\web\View::POS_END]);

        if (!self::$handlerRegistered) {
            $js = "var handler = StripeCheckout.configure({
                key: '" . Yii::$app->stripe->publicKey . "'
            });";
            $view->registerJs($js);
            $js = 'jQuery("window").on("popstate", function(e) {
                handler.close();
            });';
            $view->registerJs($js);

            self::$handlerRegistered = true;
        }

        $js = 'jQuery("#' . $this->buttonOptions['id'] . '").on("click", function(e) {
                    handler.open({
                        name: "' . $this->name . '",
                        description: "' . $this->description . '",
                        amount: ' . $this->amount . ',
                        image: "' . $this->image . '",
                        currency: "' . $this->currency . '",
                        panelLabel: "' . $this->panelLabel . '",
                        zipCode: "' . $this->validateZipCode . '",
                        email: "' . $this->userEmail . '",
                        allowRememberMe: "' . $this->allowRemember . '",
                        token: ' . $this->tokenFunction . ',
                        opened: ' . $this->openedFunction . ',
                        closed: ' . $this->closedFunction . '
                    });
                    e.preventDefault();
         });';
        $view->registerJs($js);

    }
279122
protected function registerClientScript()
    {
        $view = $this->grid->getView();
        switch ($this->type) {
            case 'address':
                EditableAddressAsset::register($view);
                break;
            case 'combodate':
                EditableComboDateAsset::register($view);
                break;
            case 'date':
                EditableDatePickerAsset::register($view);
                break;
            case 'datetime':
                EditableDateTimePickerAsset::register($view);
                break;
            default:
                EditableBootstrapAsset::register($view);
        }

        $rel = $this->options['rel'];
        $selector = "a[rel=\"$rel\"]";
        $js[] = ";jQuery('$selector').editable({$this->getClientOptions()});";
        $view->registerJs(implode("\n", $js));
    }
498397
public static IAction register(boolean asGlobal, String id, String label, String script) {
        return register(asGlobal, new Action(id, label, script));
    }
298514
public function registerScripts()
    {
        $view = $this->getView();

        Asset::register($view);
        if ($this->crop === true) {
            CropAsset::register($view);
        }

        $view->registerJs(
            'jQuery(\'#' . $this->getSelector() . '\').fileapi(' . Json::encode($this->settings) .');'
        );

        $this->registerCallbacks();
    }
422716
public function registerClientScript()
	{
		$chart = Yii::createComponent(
			array(
				'class' => 'booster.widgets.TbGoogleVisualizationChart',
				'visualization' => 'PieChart',
				'containerId' => $this->getId(),
				'data' => $this->data,
				'options' => $this->chartOptions
			)
		);
		$chart->init();
		$chart->run();

		/**
		 * create custom chart update by using the global chart variable
		 * @see TbGoogleVisualizationChart
		 */
		$this->column->grid->componentsAfterAjaxUpdate[__CLASS__] =
			'var $el = $("#' . $this->getId() . '");var data = $el.data("data");var opts = $el.data("options");
			data = google.visualization.arrayToDataTable(data);
			' . $chart->getId() . '=new google.visualization.PieChart(document.getElementById("' . $this->getId() . '"));
			' . $chart->getId() . '.draw(data,opts);';
	}
638060
public function registerClientScript()
    {
    	$view = $this->getView();
    	PNotifyAsset::register($view);

    	$options = empty($this->pluginOptions) ? '' : Json::encode($this->pluginOptions);
    	$js = "new PNotify(".$options.");";

    	$view->registerJs($js);
    }