Registers client script for initialization of client side (+ extension options export to client side)
498927
private function _publishExtensionClientInit()
    {
        $extensionOptionsJson = json_encode(array(
            'hashMethod'                => is_string($this->hashMethod) ? $this->hashMethod : 'php callback function',
            'resourceTypes'             => $this->resourceTypes,
            'enableLog'                 => $this->enableLog,
            'activateOnAllPages'        => $this->activateOnAllPages,
            'alwaysReloadableResources' => $this->alwaysReloadableResources,
            'jsGlobalObjPublicPath'     => $this->jsGlobalObjPublicPath(),
            'clientVarName'             => $this->clientVarName,
        ));
        $this->_publishExtensionJs('%extensionObject%.initExtension(%optionsJson%); ', array(
            '%extensionObject%' => self::JS_GLOBAL_OBJ_PRIVATE_PATH,
            '%optionsJson%'     => $extensionOptionsJson,
        ));
    }
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});"
        );
    }
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);
        }
    }
142156
function(client) {
      var startCode = system.assets.startCode.map(function(ic) { return ic.content; }),
        entryInit = client.entryInitPath? 'require("' + client.entryInitPath + '");' : options.defaultEntryInit;

      if (typeof options.entryModuleName === 'string' || options.entryModuleName === null) {
        entryInit = options.entryModuleName? 'require("/'+options.entryModuleName+'");' : '';
      }

      startCode.push(entryInit);

      return [{ content: startCode.join('\n'), options: {}, type: 'start', includeType:'initCode' }];
    }
633869
function registerExtension(name, extension, options, mergeConfig) {
  var params = name;

  if (!isObject(name)) {
    params = {};
    params[name] = {
      extension: extension,
      options: options
    };
  }

  each(params, function (v, name) {
    if (v) {
      var _extension = v.extension,
          _options3 = v.options;

      if (_extension) {
        extensions[name] = _extension;
      } else if (!mergeConfig) {
        extensions[name] = v;
      }

      if (mergeConfig) {
        if (!extensionConfig[name]) {
          extensionConfig[name] = _config();
        }

        assign(extensionConfig[name], _options3);
      } else {
        extensionConfig[name] = _config(_options3);
      }
    }
  }, false);
}
5853
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-formhelpers.css');
        $cs->registerScriptFile($assetsUrl . '/js/bootstrap-formhelpers-timepicker.js');

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

    }
1025123
protected function registerClientScript()
    {
        $id = $this->getId();
        $options = Json::encode($this->ajaxOptions);
        $this->getView()->registerJs(/** @lang JavaScript */"
            $('.{$id}').on('change.updateChart', function (event) {
                var defaultOptions = {
                    url: $(this).attr('action'),
                    data: $(this).serializeArray(),
                    type: 'post',
                    success: function (html) {
                        $('.{$id}-chart-wrapper').closest('.box').find('.box-body').html(html);
                    }
                };
                event.preventDefault();
                var options = $.extend(defaultOptions, $options, true)
                $.ajax(options);
            });
            ");
    }
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});"
		);
	}
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);

    }
518874
function initialize() {
    /**
     * Get custom settings from the query string
     */
    var scripts = document.getElementsByTagName('script');
    var src = (scripts[scripts.length - 1] || {}).src || '';
    var arg = src.indexOf('?') !== -1 ? src.split('?').pop() : '';
    arg.replace(/(\w+)(?:=([^&]*))?/g, function(a, key, value) {
      settings[key] = (value || '').replace(/^(0|false)$/, '');
    });

    /**
     * hang up the event handler to listen to the events hashchange
     */
    addEvent(eventNamePrefix + 'hashchange', onHashChange, false);

    // a list of objects with pairs of descriptors/object
    var data = [locationDescriptors, locationObject, eventsDescriptors, global, historyDescriptors, historyObject];

    // if browser support object 'state' in interface 'History'
    if (isSupportStateObjectInHistory) {
      // remove state property from descriptor
      delete historyDescriptors['state'];
    }

    // initializing descriptors
    for(var i = 0; i < data.length; i += 2) {
      for(var prop in data[i]) {
        if (data[i].hasOwnProperty(prop)) {
          if (typeof data[i][prop] !== 'object') {
            // If the descriptor is a simple function, simply just assign it an object
            data[i + 1][prop] = data[i][prop];
          } else {
            // prepare the descriptor the required format
            var descriptor = prepareDescriptorsForObject(data[i], prop, data[i][prop]);
            // try to set the descriptor object
            if (!redefineProperty(data[i + 1], prop, descriptor, function(n, o) {
              // is satisfied if the failed override property
              if (o === historyObject) {
                // the problem occurs in Safari on the Mac
                global.history = historyObject = data[i + 1] = n;
              }
            })) {
              // if there is no possibility override.
              // This browser does not support descriptors, such as IE7

              // remove previously hung event handlers
              removeEvent(eventNamePrefix + 'hashchange', onHashChange, false);

              // fail to initialize :(
              return false;
            }

            // create a repository for custom handlers onpopstate/onhashchange
            if (data[i + 1] === global) {
              eventsList[prop] = eventsList[prop.substr(2)] = [];
            }
          }
        }
      }
    }

    // check settings
    historyObject['setup']();

    // redirect if necessary
    if (settings['redirect']) {
      historyObject['redirect']();
    }

    // initialize
    if (settings["init"]) {
      // You agree that you will use window.history.location instead window.location
      isUsedHistoryLocationFlag = 1;
    }

    // If browser does not support object 'state' in interface 'History'
    if (!isSupportStateObjectInHistory && JSON) {
      storageInitialize();
    }

    // track clicks on anchors
    if (!isSupportHistoryAPI) {
      document[addEventListenerName](eventNamePrefix + "click", onAnchorClick, false);
    }

    if (document.readyState === 'complete') {
      onLoad(true);
    } else {
      if (!isSupportHistoryAPI && parseURL()._relative !== settings["basepath"]) {
        isFireInitialState = true;
      }
      /**
       * Need to avoid triggering events popstate the initial page load.
       * Hang handler popstate as will be fully loaded document that
       * would prevent triggering event onpopstate
       */
      addEvent(eventNamePrefix + 'load', onLoad, false);
    }

    // everything went well
    return true;
  }
1209082
public function registerScripts() {
		$handle = 'bglib-license';

		wp_register_script(
			$handle,
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/js/license.js',
			'jQuery'
		);

		$translations = array(
			'unknownError' => __( 'Unknown error', 'boldgrid-library' ),
		);

		wp_localize_script( $handle, 'bglibLicense', $translations );
	}
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));
    }
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);
    }
357827
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlAnnotationType == null) {
			this.container = script;
			this.sarlAnnotationType = SarlFactory.eINSTANCE.createSarlAnnotationType();
			script.getXtendTypes().add(this.sarlAnnotationType);
			this.sarlAnnotationType.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlAnnotationType.setName(name);
			}
		}
	}
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);
    }
313561
public function init() {
		
		// Prevents the extension from registering scripts and publishing assets when ran from the command line.
		if ($this->isInConsoleMode() && !$this->isInTests())
			return;

        self::setBooster($this);

        $this->setRootAliasIfUndefined();

		$this->setAssetsRegistryIfNotDefined();

		$this->includeAssets();

		parent::init();
	}
649917
public function registerClientScript()
	{
		$id = $this->getId();

		if ($this->ajaxUpdate === false) {
			$ajaxUpdate = false;
		} 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,
			'summaryClass' => $this->summaryCssClass,
			'loadingClass' => $this->loadingCssClass,
			'filterClass' => $this->filterCssClass,
			'tableClass' => $this->itemsCssClass,
			'selectableRows' => $this->selectableRows,
			'enableHistory' => $this->enableHistory,
			'updateSelector' => $this->updateSelector,
			'cacheTTL' => $this->cacheTTL,
			'cacheTTLType' => $this->cacheTTLType,
			'localCache' => $this->localCache
		);
		if ($this->ajaxUrl !== null) {
			$options['url'] = CHtml::normalizeUrl($this->ajaxUrl);
		}
		if ($this->enablePagination) {
			$options['pageVar'] = $this->dataProvider->getPagination()->pageVar;
		}

		foreach (array('beforeAjaxUpdate', 'afterAjaxUpdate', 'ajaxUpdateError', 'selectionChanged') as $prop) {
			if ($this->{$prop} !== null) {
				if ((!$this->{$prop} instanceof CJavaScriptExpression) && strpos($this->{$prop}, 'js:') !== 0) {
					$options[$prop] = new CJavaScriptExpression($this->{$prop});
				} else {
					$options[$prop] = $this->{$prop};
				}
			}
		}

		$options = CJavaScript::encode($options);
		/** @var $cs CClientScript */
		$cs = Yii::app()->getClientScript();
		$cs->registerCoreScript('jquery');
		$cs->registerCoreScript('bbq');
		if ($this->enableHistory) {
			$cs->registerCoreScript('history');
		}

		$cs->registerPackage('json-grid-view');

		$cs->registerScript(__CLASS__ . '#' . $id, "jQuery('#$id').yiiJsonGridView($options);");
	}