Пример #1
0
    <?php 
    }
    ?>
</div>
<?php 
}
?>

<?php 
Modal::begin(['header' => '<h4>' . Yii::t('cms', 'Select image') . '</h4>', 'footer' => '<button type="button" class="btn btn-default" data-dismiss="modal">' . Yii::t('cms', 'Close') . '</button>', 'id' => 'image-modal', 'size' => Modal::SIZE_LARGE]);
?>

<?php 
echo FileManager::widget(['onClickCallback' => 'function(file){
        $("#image-modal").on("hidden.bs.modal", function(){
            $("#" + curImage).val(file.url);
        }).modal("hide");
    }']);
?>

<?php 
Modal::end();
?>

<?php 
Modal::begin(['header' => '<h4>' . Yii::t('cms', 'Select content') . '</h4>', 'footer' => '<button type="button" class="btn btn-default" data-dismiss="modal">' . Yii::t('cms', 'Close') . '</button>', 'id' => 'url-modal', 'size' => Modal::SIZE_LARGE]);
?>

<?php 
echo BigSearch::widget(['dynamicUrls' => true, 'onClickCallback' => 'function(e){
        e.preventDefault();
Пример #2
0
 /**
  * Updates the file manager UI.
  *
  * @return string
  */
 public function actionUpdate()
 {
     FileManager::widget(['state' => FileManager::STATE_UPDATE]);
 }
Пример #3
0
        <?php 
if ($model->id) {
    ?>
        <div class="col-md-6">
            <fieldset>
                <legend><?php 
    echo Yii::t('cms', 'User management');
    ?>
</legend>
                <?php 
    echo $form->field($model, 'reset_password')->dropDownList([0 => Yii::t('cms', 'No'), 1 => Yii::t('cms', 'Yes')])->label($model->getAttributeLabel('reset_password'), ['data' => $tooltipOptions + ['title' => Yii::t('cms', 'Whether to reset the user password. An email will be sent to the user.')]]);
    ?>
            </fieldset>
        </div>
        <?php 
}
?>
    </div>

<?php 
ActiveForm::end();
?>

<?php 
Modal::begin(['id' => 'modal', 'header' => 'Vælg billede', 'footer' => '<button type="button" class="btn btn-default" data-dismiss="modal">' . Yii::t('cms', 'Close') . '</button>', 'size' => Modal::SIZE_LARGE]);
echo FileManager::widget(['onClickCallback' => 'function(file){
        $("#user-avatar").val(file.url);
        $("#avatar-image").attr("src", file.baseUrl + file.url);
        $("#modal").modal("hide");
    }']);
Modal::end();
Пример #4
0
        <strong><?php 
echo Yii::t('cms', 'Content');
?>
</strong>
    </div>

    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <?php 
echo $form->field($model, 'content[text]')->widget(Editor::className(), ['useReadMore' => false])->label(false);
?>
            </div>
        </div>
    </div>
</div>

<?php 
Modal::begin(['header' => '<h4>' . Yii::t('cms', 'Select image') . '</h4>', 'footer' => '<button type="button" class="btn btn-default" data-dismiss="modal">' . Yii::t('cms', 'Close') . '</button>', 'id' => 'modal', 'size' => Modal::SIZE_LARGE]);
?>

<?php 
echo FileManager::widget(['onClickCallback' => 'function(file){
        $("#modal").on("hidden.bs.modal", function(){
            $("#block-content-image").val(file.url);
        }).modal("hide");
    }']);
?>

<?php 
Modal::end();
Пример #5
0
                                    <span class="input-group-btn">
                                        <button id="btn-select-content" class="btn btn-info btn-block" data-toggle="modal" data-target="#modal-wrapper">
                                            <span class="glyphicon glyphicon-search"></span>
                                        </button>
                                    </span>
                                </div>
                            </div>
                            '])->label(false);
?>
                </div>

            </div>
        </div>  
    </div>
</div>

<?php 
Modal::begin(['header' => '<h4>' . Yii::t('cms', 'Select image') . '</h4>', 'footer' => '<button type="button" class="btn btn-default" data-dismiss="modal">' . Yii::t('cms', 'Close') . '</button>', 'id' => 'modal-wrapper', 'size' => Modal::SIZE_LARGE]);
?>

<?php 
echo FileManager::widget(['onClickCallback' => 'function(file){
        var url = "image:" + file.url;
        $("#modal-wrapper").on("hidden.bs.modal", function(){
            $("#block-brand").val(url);
        }).modal("hide");
    }']);
?>

<?php 
Modal::end();
Пример #6
0
<?php

/**
 * @link http://www.bigbrush-agency.com/
 * @copyright Copyright (c) 2015 Big Brush Agency ApS
 * @license http://www.bigbrush-agency.com/license/
 */
use bigbrush\big\widgets\filemanager\FileManager;
$this->title = Yii::t('cms', 'File manager');
?>
<div class="row">
    <div class="col-md-12">
    	<h1><?php 
echo $this->title;
?>
</h1>
        <?php 
echo FileManager::widget();
?>
    </div>
</div>
Пример #7
0
">
    <title><?php 
echo Yii::t('cms', 'Insert media');
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>
<?php 
$this->beginBody();
?>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <?php 
echo FileManager::widget(['onClickCallback' => 'function(file){
                    top.tinymce.activeEditor.windowManager.getParams().setUrl(file.url);
                }']);
?>
        </div>
    </div>
</div>
<?php 
$this->endBody();
?>
</body>
</html>
<?php 
$this->endPage();
Пример #8
0
 /**
  * Triggers a search in Big and renders multiple [[yii\grid\GridView]] on the same page. Only one grid is visible at a time
  * and a dropdown menu can be used to switch between the grids.
  *
  * @return string the rendering result.
  */
 public function run()
 {
     $view = $this->getView();
     // Register js script that handles the drop down menu.
     // When a sub menu is clicked the selected section is shown.
     $view->registerJs('
         $(".section-wrapper").first().addClass("selected-section").show();
         $("#sections-dropdown .section-selector").click(function(e){
             e.preventDefault();
             $(".selected-section").removeClass("selected-section").hide();
             var section = $(this).data("section");
             $("#"+section).addClass("selected-section").show();
         });
     ');
     // register script that handles when a user clicks on a search result
     if ($this->onClickCallback !== null) {
         if (is_string($this->onClickCallback)) {
             $this->onClickCallback = new JsExpression($this->onClickCallback);
         }
         $view->registerJs('$("#all-sections-wrap").on("click", ".insert-on-click", ' . Json::encode($this->onClickCallback) . ');');
     }
     $sections = static::search($this->value, $this->dynamicUrls);
     $buttons = array_keys($sections);
     if (is_array($this->fileManager)) {
         $this->fileManager = FileManager::widget($this->fileManager);
     }
     if ($this->fileManager) {
         $buttons[] = Yii::t('big', 'Media');
     }
     return $this->render($this->viewFile, ['sections' => $sections, 'buttons' => $this->createDropDownButtons($buttons), 'fileManager' => $this->fileManager]);
 }