Similar to addAction but when button is clicked, modal is displayed
with the $title and $callback is executed through VirtualPage.

@param string|array|View $button
@param string            $title
@param callable          $callback function($page){ . .}
962716
public function addModalAction($button, $title, $callback)
    {
        if (!$this->actions) {
            $this->actions = $this->table->addColumn(null, 'Actions');
        }

        return $this->actions->addModal($button, $title, $callback, $this);
    }
884849
public function bind($eventName, $callback, $mode = EventsHandlerInterface::BINDING_MODE_LAST)
    {
        if ($eventsHandler = $this->getEventsHandler()) {
            $eventsHandler->bind($eventName, $callback, $mode);
        }
    }
528976
private function addTitle($title)
    {
        $this->seoPage->addTitle($title);
        $this->seoPage->addMeta('name', 'title', $title);
    }
74926
protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null)
    {
        if ($callback instanceof Closure) {
            $this->addEventListener($prefix.$view, $callback, $priority);

            return $callback;
        } else if (is_string($callback)) {
            return $this->addClassEvent($view, $callback, $prefix, $priority);
        }
    }
1326464
public function btEditText(Model $model, $link, $title)
    {
        $result = new AutoArray('');

        $modal = $this->modalDirector->build($title, 'Update', $result->getModelArray($model), $link, $this->BtModal);

        return $modal->modalHead.$modal->modalBody.$modal->modalFooter;
    }
229836
public static void showAlert(String title, String message, final Runnable callback) {

        final Window window = new Window();
        window.setModal(true);
        Panel panel = new Panel();
        panel.setCaption(title);
        panel.setWidth("500px");
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        panel.setContent(layout);
        layout.addComponent(new Label(message));
        Button okButton = new Button();
        okButton.addClickListener(new ClickListener() {

            /** The serial version id. */
            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                window.close();
                if (callback != null) {
                    callback.run();
                }
            }
        });
        layout.addComponent(okButton);
        layout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
        okButton.setCaption(
            org.opencms.workplace.Messages.get().getBundle(A_CmsUI.get().getLocale()).key(
                org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0));
        window.setContent(panel);
        window.setClosable(false);
        window.setResizable(false);
        A_CmsUI.get().addWindow(window);

    }
735293
public static function delete($title = null)
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $title   = (empty($title)) ? __d('core', 'Delete') : $title;

        $toolbar->appendButton('Core.action', $title, self::ACTION_DELETE, []);
    }
250238
function _button_wrapper(str, title){
	var b = new bbop.widget.display.text_button_sim(str, title, '');
	return b.to_string();
    }
172095
public function title($title)
    {
        if ($this->isNotSetOrEmpty($title)) {
            throw CouldNotCreateButton::titleNotProvided();
        } elseif (mb_strlen($title) > 20) {
            throw CouldNotCreateButton::titleLimitExceeded($title);
        }

        $this->payload['title'] = $title;

        return $this;
    }
1094658
function (title, content) {
            var t = this,
                prefix = t.o.prefix;

            // No open a modal box when exist other modal box
            if ($('.' + prefix + 'modal-box', t.$box).length > 0) {
                return false;
            }
            if (t.o.autogrowOnEnter) {
                t.autogrowOnEnterDontClose = true;
            }

            t.saveRange();
            t.showOverlay();

            // Disable all btnPane btns
            t.$btnPane.addClass(prefix + 'disable');

            // Build out of ModalBox, it's the mask for animations
            var $modal = $('<div/>', {
                class: prefix + 'modal ' + prefix + 'fixed-top'
            }).css({
                top: t.$box.offset().top + t.$btnPane.height(),
                zIndex: 99999
            }).appendTo($(t.doc.body));

            // Click on overlay close modal by cancelling them
            t.$overlay.one('click', function () {
                $modal.trigger(CANCEL_EVENT);
                return false;
            });

            // Build the form
            var $form = $('<form/>', {
                action: '',
                html: content
            })
                .on('submit', function () {
                    $modal.trigger(CONFIRM_EVENT);
                    return false;
                })
                .on('reset', function () {
                    $modal.trigger(CANCEL_EVENT);
                    return false;
                })
                .on('submit reset', function () {
                    if (t.o.autogrowOnEnter) {
                        t.autogrowOnEnterDontClose = false;
                    }
                });


            // Build ModalBox and animate to show them
            var $box = $('<div/>', {
                class: prefix + 'modal-box',
                html: $form
            })
                .css({
                    top: '-' + t.$btnPane.outerHeight() + 'px',
                    opacity: 0
                })
                .appendTo($modal)
                .animate({
                    top: 0,
                    opacity: 1
                }, 100);


            // Append title
            $('<span/>', {
                text: title,
                class: prefix + 'modal-title'
            }).prependTo($box);

            $modal.height($box.outerHeight() + 10);


            // Focus in modal box
            $('input:first', $box).focus();


            // Append Confirm and Cancel buttons
            t.buildModalBtn('submit', $box);
            t.buildModalBtn('reset', $box);


            $(window).trigger('scroll');

            return $modal;
        }
357418
public function addButtonCallback($name, $label = '%s', $link = '#', $binds = [], $method = 'post' )
    {
        return $this->addButton($name, $label, $link, $binds)->enableCallback($method);
    }
537479
protected function _setTitle()
    {
        if (empty($this->viewVars['title_for_layout'])) {
            $title = option('site_title');
            $this->assign('title', $title);
            $this->set('title_for_layout', $title);
        } else {
            $this->assign('title', $this->viewVars['title_for_layout']);
        }
    }
707934
public void setAppTitle(String title) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(title)) {
            if (m_titleLabel != null) {
                m_titleLabel.removeFromParent();
                m_titleLabel = null;
            }
        } else {

            if (m_titleLabel == null) {
                m_titleLabel = new Label();
                m_titleLabel.setStyleName(I_CmsLayoutBundle.INSTANCE.toolbarCss().title());
                m_buttonPanelLeft.insert(m_titleLabel, 0);
            }
            m_titleLabel.setText(title);
        }
    }
1240098
function add(id, text, title, fn) {
			if (!buttons[id]) {
				var button = renderer.text(
					text,
					0,
					0
				)
				.css(options.toolbar.itemStyle)
				.align({
					align: 'right',
					x: -marginRight - 20,
					y: plotTop + 30
				})
				.on('click', fn)
				/*.on('touchstart', function(e) {
					e.stopPropagation(); // don't fire the container event
					fn();
				})*/
				.attr({
					align: 'right',
					zIndex: 20
				})
				.add();
				buttons[id] = button;
			}
		}
889246
protected function valueModal($title, $content, $buttonLabel=null)
	{
		$randomId = Yii::$app->security->generateRandomString();
		return Button::widget([
			'label'=>$buttonLabel !== null ? $buttonLabel : Yii::t('app', 'Show'),
			'options'=>[
				'class'=>'btn btn-xs btn-primary',
				'onclick'=>new JsExpression("$('#" . $randomId . "').modal()"),
			],
		]) . str_replace(
			['{id}', '{title}', '{content}'],
			[$randomId, $title, $content],
			$this->modalCode);
	}
294167
public function showSuccess($view, $message, $title = null)
    {
        return $this->show($view, 'success', $message, $title);
    }
247912
public static function linkAction($action, $title = null, $parameters = array(), $attributes = array())
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }