Registers the Bootstrap Popover plugin.
@param string $selector the CSS selector.
@param array $options the JavaScript options for the plugin.
@see http://twitter.github.com/bootstrap/javascript.html#popover
768554
public function registerPopover($selector = 'body', $options = array())
    {
        TbArray::defaultValue('selector', 'a[rel=popover]', $options);
        $this->registerPlugin(self::PLUGIN_POPOVER, $selector, $options);
    }
575061
public function registerClientScript()
    {
        $selector = '#' . $this->htmlOptions['id'];

        // do we render a button? If so, bootstrap will handle its behavior through its
        // mark-up, otherwise, register the plugin.
        if (empty($this->buttonOptions)) {
            $this->registerPlugin(TbApi::PLUGIN_MODAL, $selector, $this->options);
        }

        $this->registerEvents($selector, $this->events);
    }
642755
function Overlay(options) {
	if (!(this instanceof Overlay)) return new Overlay(options);

	Emitter.call(this);

	extend(this, options);

	if (!this.container) {
		this.container = document.body || document.documentElement;
	}

	//create overlay element
	this.element = document.createElement('div');
	this.element.classList.add('popoff-overlay');

	if (this.closable) {
		this.element.addEventListener('click', e => {
			this.hide();
		});
		this.element.classList.add('popoff-closable');
	}
}
985181
function Plugin(element, options) {
    this.element = element;

    this.options = $.extend(true, {}, defaults, options);
    this.options.share = options.share; //simple solution to allow order of buttons

    this._defaults = defaults;
    this._name = pluginName;

    this.init();
  }
301805
public function registerScript($selector, $options = array(), $callback = null) {
		
		Yii::app()->clientScript->registerScript(
				uniqid(__CLASS__ . '#', true),
				'$("' . $selector . '").daterangepicker(' . CJavaScript::encode($options) . ($callback
						? ', ' . CJavaScript::encode($callback) : '') . ');'
		);
	}
947820
public static function registerEvents($selector, $events, $position = \CClientScript::POS_READY)
    {
        if (empty($events)) {
            return;
        }

        $script = '';
        foreach ($events as $name => $handler) {
            $handler = ($handler instanceof \CJavaScriptExpression)
                ? $handler
                : new \CJavaScriptExpression($handler);

            $script .= ";jQuery('{$selector}').on('{$name}', {$handler});";
        }
        \Yii::app()->clientScript->registerScript(static::getUniqueScriptId(), $script, $position);
    }
978453
function Plugin(element, options) {
    this.element = element;
    this.settings = $.extend({}, defaults, options);
    this.periodOptions = {
      title: this.settings.periodTitle,
      backgroundColor: this.settings.periodBackgroundColor,
      borderColor: this.settings.periodBorderColor,
      textColor: this.settings.periodTextColor
    };
    this.init();
  }
295532
public function init() {
		
		parent::init();

        $booster = Booster::getBooster();
		$popover = $booster->popoverSelector;
		$tooltip = $booster->tooltipSelector;

		$afterAjaxUpdate = "js:function() {
			jQuery('.popover').remove();
			jQuery('{$popover}').popover();
			jQuery('.tooltip').remove();
			jQuery('{$tooltip}').tooltip();
		}";

		if (!isset($this->afterAjaxUpdate)) {
			$this->afterAjaxUpdate = $afterAjaxUpdate;
		}
	}
36689
public function setSelector(string $selector)
    {
        if (empty($selector)) {
            Throw new TokenException('Empty selectors are not allowed.');
        }

        $this->selector = $selector;
    }
872232
public function with($selector, Closure $callback)
    {
        $browser = new static(
            $this->driver, new ElementResolver($this->driver, $this->resolver->format($selector))
        );

        if ($this->page) {
            $browser->onWithoutAssert($this->page);
        }

        if ($selector instanceof Component) {
            $browser->onComponent($selector, $this->resolver);
        }

        call_user_func($callback, $browser);

        return $this;
    }
1211587
public function mouseover(string $selector = null): Element
    {
        if ($selector === null) {
            $element = $this->remote;
        } else {
            $element = $this->resolver->findOrFail($selector);
        }

        $this->driver->getMouse()->mouseMove($element->getCoordinates());

        return $this;
    }
167333
public function toggleField($selector = '.jsToggleField', $widget = 'JBZoo.FieldToggle', array $options = [])
    {
        $this->jqueryFactory();

        $this->Html->script('Core.admin/widget/field-toggle.js', $this->_setOptions([
            'alias'  => __FUNCTION__,
            'weight' => self::WEIGHT_WIDGET
        ]));

        $options = Hash::merge(['token' => $this->request->getCookie('csrfToken')], $options);
        $this->Js->widget($selector, $widget, $options);

        return $this;
    }
658256
public function registerEvents($selector, $events, $position = \CClientScript::POS_READY)
    {
        Foundation::registerEvents($selector, $events, $position);
    }
1248162
public function register($provider, $options = [], $force = false)
    {
        if (! $provider instanceof ServiceProvider) {
            $provider = $this->resolveProvider($provider);
        }

        if (\array_key_exists($providerName = \get_class($provider), $this->loadedProviders)) {
            return;
        }

        $this->loadedProviders[$providerName] = $provider;

        if (\method_exists($provider, 'register')) {
            $provider->register();
        }

        if ($this->booted) {
            $this->bootProvider($provider);
        }
    }
410421
public function lselectLocalizedOptionWithJavascript($selector, $option) {
        $localizedOption = $this->localizeTarget($option);
        $this->selectOptionWithJavascript($selector, $localizedOption);
    }
1194073
function(options) {
        if (typeof options.trigger === 'undefined') {
            return;
        }

        this.$container = $('<div style="display:none;"></div>');
        this.$container.addClass(defaultClass + ' ' + options.customClass)
            .appendTo('body')
            .append(this.$main.show());

        this.$trigger = $(options.trigger);
        var self = this;
        this.$trigger.on('click.bizDropDown', function() {
            self.toggle();
        });
    }
721204
public static function caption($selector = 'img.caption')
	{
		if (isset(self::$loaded[__METHOD__][$selector]))
		{
			return;
		}

		self::framework(true);

		App::get('document')->addScriptDeclaration(
			"jQuery(document).ready(function($){
				$('" . $selector . "').tooltip({
					position: {
						my: 'center bottom',
						at: 'center top'
					},
					create: function(event, ui) {
						var tip = $(this),
							tipText = tip.attr('title');

						if (tipText.indexOf('::') != -1) {
							var parts = tipText.split('::');
							tip.attr('title', parts[1]);
						}
					},
					tooltipClass: 'tooltip'
				});
			});"
		);

		// Set static array
		self::$loaded[__METHOD__][$selector] = true;
	}