Modální okno pro vytvoření nové stránky
@return AddModal
517376
protected function createComponentPageAddModal() : object
    {
        $control = $this->IPage_AddModal->create();

        $control->onOpen[] = function () use ($control)
        {
            $control->redrawControl('pageAddForm');
        };

        return $control;
    }
783746
function ( options ) {
    this.settings = $.extend({}, $.fn.modal.defaults)

    if ( typeof options == 'string' ) {
      this.settings.content = options
    } else if ( options ) {
      $.extend( this.settings, options )
    }

    return this
  }
570289
public function addGlobal()
    {
        $bottomRightNavbar = $this->menuBuilder->getBottomRightNavbar();

        $bottomRightNavbar
            ->addChild('<i class="fa fa-exclamation"></i>', [
                'route'           => 'victoire_404_index',
                'linkAttributes'  => [
                    'class' => 'v-btn v-btn--sm v-btn--transparent',
                    'id'    => 'v-404-link',
                ],
            ])->setLinkAttribute('data-toggle', 'vic-modal');

        $bottomRightNavbar
            ->addChild('<i class="fa fa-random"></i>', [
                'route'           => 'victoire_redirection_index',
                'linkAttributes'  => [
                    'class' => 'v-btn v-btn--sm v-btn--transparent',
                    'id'    => 'v-redirection-link',
                ],
            ])->setLinkAttribute('data-toggle', 'vic-modal');

        return $bottomRightNavbar;
    }
1257087
public function index() {
		$objects = $this->getInstances ( $totalCount );
		$modal = ($this->_getModelViewer ()->isModal ( $objects, $this->model )) ? "modal" : "no";
		$dt = $this->_getModelViewer ()->getModelDataTable ( $objects, $this->model, $totalCount );
		$this->jquery->getOnClick ( "#btAddNew", $this->_getBaseRoute () . "/newModel/" . $modal, "#frm-add-update", [ "hasLoader" => "internal" ] );
		$this->_getEvents ()->onDisplayElements ( $dt, $objects, false );
		$this->crudLoadView ( $this->_getFiles ()->getViewIndex (), [ "classname" => $this->model,"messages" => $this->jquery->semantic ()->matchHtmlComponents ( function ($compo) {
			return $compo instanceof HtmlMessage;
		} ) ] );
	}
942989
public function installPackage()
    {
        try {
            return $this->render('@bolt/extend/_action-modal.twig', $this->getRenderContext());
        } catch (\Exception $e) {
            return $this->getJsonException($e);
        }
    }
159245
protected function createComponentUrlForm() : Form
    {
        $form = new Form;

        $form->addText('url')
            ->setRequired('URL stránky je povinná.')
            ->addRule(Form::PATTERN, 'Povolené znaky pro URL: a-z, 0-9, lomítko, pomlčka.', PageRepository::URL_REGEX)
            ->addRule(Form::MIN_LENGTH, 'Minimální délka url je %d znaky.', 2)
            ->addRule(Form::MAX_LENGTH, 'Maximální délka url je %d znaků.', 255)
            ->addFilter(function ($value) {
                return $this->pageManager->webalizeUrl($value);
            });

        $form->addSubmit('save');

        $form->setDefaults([
            'url' => $this->activePage->getPageUrl()->getUrl()
        ]);


        $form->onValidate[] = function (Form $form) { $this->validate($form); };
        $form->onSuccess[] = function (Form $form) { $this->success($form); };


        if (!$this->presenter->user->isAllowed(PageAuthorizator::RES_URL_MODAL))
        {
            $this->setDisabledForm($form, TRUE);
        }

        return $form;
    }
426711
public function addActive()
    {
        $row = new FormCheckbox('active', 'Опубликован');
        $this->rows['active'] = $row->setTab('main', 'Дата, вес, активность')
            ->setValid('integer|max:1|nullable')->setDefaultValue(1)->setInTableAdminEditable()->setFillable()
            ->setCssClassGroup('uk-width-1-3');

        return $this;
    }
1193300
function Modal(opts) {
    var that = this;

    var body = $.div();
    body.addEventListener("scroll", onScroll.bind(this, body));
    const
        laterScroll = function() {
            window.setTimeout(function() {
                onScroll(body);
            });
        },
        header = $.tag('header', 'thm-fg', 'thm-ele8', 'thm-bgPD'),
        footer = $.tag('footer', "thm-bg0"),
        cell = $.div('cell', 'thm-ele24', 'thm-bg1', [header, body, footer]),
        elem = $.elem(this, 'div', 'wdg-modal', [$.div([cell])]);
    $.on(elem, function(evt) {
        if (evt.target.parentElement !== elem) return;
        that.visible = false;
    });

    DB.prop(this, 'content')(function(v) {
        $.clear(body);
        if (Array.isArray(v)) {
            v.forEach(function(itm) {
                $.add(body, itm);
            });
        } else if (typeof v !== 'undefined' && v !== null) {
            $.add(body, v);
        }
        laterScroll();
    });
    DB.prop(this, 'header')(function(v) {
        if (!v || (typeof v === 'string' && v.trim().length === 0)) {
            $.addClass(header, "hide");
            return;
        }
        $.removeClass(header, "hide");
        $.clear(header);
        if (Array.isArray(v)) {
            v.forEach(function(itm) {
                $.add(header, itm);
            });
        } else if (typeof v !== 'undefined' && v !== null) {
            $.add(header, v);
        }
        laterScroll();
    });
    DB.prop(this, 'footer')(function(v) {
        if (!v || (typeof v === 'string' && v.trim().length === 0)) {
            $.addClass(footer, "hide");
            return;
        }
        $.removeClass(footer, "hide");
        $.clear(footer);
        if (Array.isArray(v)) {
            v.forEach(function(itm) {
                $.add(footer, itm);
            });
        } else {
            $.add(footer, v);
        }
        laterScroll();
    });
    DB.propString(this, 'width')(function(v) {
        $.css(body, {
            'max-width': v
        });
        laterScroll();
    });
    DB.propAddClass(this, 'fullscreen');
    DB.propAddClass(this, 'padding');
    DB.propAddClass(this, 'scroll');
    DB.propAddClass(this, 'wide');
    DB.propBoolean(this, 'visible')(function(v) {
        if (v) {
            that.attach();
        } else {
            that.detach();
        }
    });

    opts = DB.extend({
        visible: false,
        header: null,
        content: [],
        footer: null,
        padding: true,
        scroll: true,
        wide: false,
        fullscreen: false,
        width: 'auto'
    }, opts, this);
}
694462
protected function createComponentUserAddModal() : object
    {
        $control = $this->IUser_AddModal->create();

        $control->onSave[] = function () use ($control)
        {
            $this->getComponent('userSummaryModal')->redrawControl('users');
            $control->redrawControl('addForm');
        };

        return $control;
    }
582454
public static void addModal(JDialog dialog, Component component,
							  ModalListener listener) {
	addModal_(dialog, component, listener, defaultModalDepth);
  }
821513
function openModal() {
  var $modal = getModal();
  _removeClass$getTopMargin$fadeIn$show$addClass.fadeIn(getOverlay(), 10);
  _removeClass$getTopMargin$fadeIn$show$addClass.show($modal);
  _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'showSweetAlert');
  _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($modal, 'hideSweetAlert');

  window.previousActiveElement = document.activeElement;
  var $okButton = $modal.querySelector('button.confirm');
  $okButton.focus();

  setTimeout(function () {
    _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'visible');
  }, 500);

  var timer = $modal.getAttribute('data-timer');

  if (timer !== 'null' && timer !== '') {
    $modal.timeout = setTimeout(function () {
      swal.close();
    }, timer);
  }
}
497821
public static function modalBody($content, $htmlOptions = array())
    {
        self::addCssClass('modal-body', $htmlOptions);
        return self::tag('div', $htmlOptions, $content);
    }
699608
public function setup() {

		$this->struct['modal'] = $this->get_base();
		$this->config();
		$this->struct['modal']['config']['view'] = $this->struct['modal']['config']['template'];
		unset( $this->struct['modal']['config']['template'] );
		add_action( 'uix_control_item_submit_' . $this->slug, $this->struct['modal']['config']['callback'], 100 );
		parent::setup();
		$this->set_submit();
	}
1045441
protected function addCampoObrigatorio()
    {
        $args = func_get_args();
        foreach ($args as $arg) {
            !is_array($arg) || call_user_func_array([$this, __FUNCTION__], $arg);
            !is_string($arg) || array_push($this->camposObrigatorios, $arg);
        }
        return $this;
    }
1341644
public function createMood()
    {
        if ($this->mood) {
            return $this->mood;
        }
        $mood = new Mood();
        $this->setMood($mood);
        return $this->mood;
    }
411252
protected function createComponentCategoryRemoveModal() : object
    {
        $control = $this->ICategory_RemoveModal->create();

        $control->onRemove[] = function ()
        {
            $this->getComponent('categoryModal')->redrawControl('modal'); // SA
            $this->getComponent('categoryModal')->redrawControl('form');
            $this->getComponent('categoryModal')->redrawControl('summary');

            $this->getComponent('structureRecipeModal')->redrawControl('form');
        };

        $control->onOpen[] = function () use ($control)
        {
            $control->redrawControl('modal');
        };

        return $control;
    }
1007684
function createModal(config) {

    var id = MODAL_JS_ID;
    var modalClassName = config.modalPrefixClass + MODAL_CLASS_SUFFIX;
    var modalClassWrapper = config.modalPrefixClass + MODAL_WRAPPER_CLASS_SUFFIX;
    var buttonCloseClassName = config.modalPrefixClass + MODAL_BUTTON_CLASS_SUFFIX;
    var buttonCloseInner = config.modalCloseImgPath ? '<img src="' + config.modalCloseImgPath + '" alt="' + config.modalCloseText + '" class="' + config.modalPrefixClass + MODAL_CLOSE_IMG_CLASS_SUFFIX + '" />' : '<span class="' + config.modalPrefixClass + MODAL_CLOSE_TEXT_CLASS_SUFFIX + '">\n                                          ' + config.modalCloseText + '\n                                         </span>';
    var contentClassName = config.modalPrefixClass + MODAL_CONTENT_CLASS_SUFFIX;
    var titleClassName = config.modalPrefixClass + MODAL_TITLE_CLASS_SUFFIX;
    var title = config.modalTitle !== '' ? '<h1 id="' + MODAL_TITLE_ID + '" class="' + titleClassName + '">\n                                          ' + config.modalTitle + '\n                                         </h1>' : '';
    var button_close = '<button type="button" class="' + MODAL_BUTTON_JS_CLASS + ' ' + buttonCloseClassName + '" id="' + MODAL_BUTTON_JS_ID + '" title="' + config.modalCloseTitle + '" ' + MODAL_BUTTON_CONTENT_BACK_ID + '="' + config.modalContentId + '" ' + MODAL_BUTTON_FOCUS_BACK_ID + '="' + config.modalFocusBackId + '">\n                               ' + buttonCloseInner + '\n                              </button>';
    var content = config.modalText;
    var describedById = config.modalDescribedById !== '' ? ATTR_DESCRIBEDBY + '="' + config.modalDescribedById + '"' : '';

    // If there is no content but an id we try to fetch content id
    if (content === '' && config.modalContentId) {
      var contentFromId = findById(config.modalContentId);
      if (contentFromId) {
        content = '<div id="' + MODAL_CONTENT_JS_ID + '">\n                              ' + contentFromId.innerHTML + '\n                             </div';
        // we remove content from its source to avoid id duplicates, etc.
        contentFromId.innerHTML = '';
      }
    }

    return '<dialog id="' + id + '" class="' + modalClassName + '" ' + ATTR_ROLE + '="' + MODAL_ROLE + '" ' + describedById + ' ' + ATTR_OPEN + ' ' + ATTR_LABELLEDBY + '="' + MODAL_TITLE_ID + '">\n                    <div role="document" class="' + modalClassWrapper + '">\n                      ' + button_close + '\n                      <div class="' + contentClassName + '">\n                        ' + title + '\n                        ' + content + '\n                      </div>\n                    </div>\n                  </dialog>';
  }