<?php

/**
 * @var yii\web\View $this
 * @var string $CKEditor
 * @var string $CKEditorFuncNum
 * @var string $langCode
 */
$iframeId = 'iframe-select';
$this->registerAssetBundle(\gromver\widgets\ModalIFrameAsset::className());
$this->registerJs("yii.gromverIframe.dataHandler = function(data){\n    window.opener.CKEDITOR.tools.callFunction({$CKEditorFuncNum}, data.link);\n    window.close();\n}");
?>
<style>
    body {
        padding: 15px 0;
        height: 100%;
    }
    body > .container-fluid {
        height: 100%;
    }
</style>

<iframe src="<?php 
echo \yii\helpers\Url::toRoute(['select', 'MenuItemSearch[link_type]' => \gromver\platform\core\modules\menu\models\MenuItem::LINK_ROUTE]);
?>
" id="<?php 
echo $iframeId;
?>
" name="<?php 
echo $iframeId;
?>
Beispiel #2
0
    /**
     * Поставить задачу на обновление страницы после закрытия модального окна
     * @throws \yii\base\InvalidConfigException
     */
    public static function refreshParentOnClose()
    {
        Yii::$app->view->registerAssetBundle(ModalIFrameAsset::className());
        Yii::$app->view->registerJs(<<<JS
\$(yii.gromverIframe).on('closePopup.grom.iframe', function() {
    yii.gromverIframe.refreshParent();
});
JS
);
    }