コード例 #1
0
ファイル: ActiveForm.php プロジェクト: Liv1020/cms
 /**
  * Initializes the widget.
  * This renders the form open tag.
  */
 public function init()
 {
     if ($classes = ArrayHelper::getValue($this->options, 'class')) {
         $this->options = ArrayHelper::merge($this->options, ['class' => $classes . ' sx-form-admin']);
     } else {
         $this->options = ArrayHelper::merge($this->options, ['class' => 'sx-form-admin']);
     }
     if ($this->usePjax) {
         Pjax::begin(ArrayHelper::merge(['id' => 'sx-pjax-form-' . $this->id], $this->pjaxOptions));
         $this->options = ArrayHelper::merge($this->options, ['data-pjax' => true]);
         echo \skeeks\cms\modules\admin\widgets\Alert::widget();
     }
     parent::init();
 }
コード例 #2
0
ファイル: payment.php プロジェクト: skeeks-cms/app-basic
$this->registerJs(<<<JS
    (function(sx, $, _)
    {
        new sx.classes.shop.FullCart(sx.Shop, 'sx-cart-full');
    })(sx, sx.$, sx._);
JS
);
?>


<!--=== Content Part ===-->
<section>
    <div class="container">

        <? \skeeks\cms\modules\admin\widgets\Pjax::begin([
            'id'                    => 'sx-cart-full',
        ]) ?>


        <? if (\Yii::$app->shop->shopFuser->isEmpty()) : ?>
            <!-- EMPTY CART -->
                <div class="panel panel-default">
                <div class="panel-body">
                    <strong>Ваша корзина пуста!</strong><br />
                    В вашей корзине нет покупок.<br />
                    Кликните <a href="/" data-pjax="0">сюда</a> для продолжения покупок. <br />
                    <!--<span class="label label-warning">this is just an empty cart example</span>-->
                </div>
            </div>
            <!-- /EMPTY CART -->
        <? else: ?>
コード例 #3
0
ファイル: index.php プロジェクト: skeeks-cms/cms-shop
<?php

/**
 * @author Semenov Alexander <*****@*****.**>
 * @link http://skeeks.com/
 * @copyright 2010 SkeekS (СкикС)
 * @date 02.06.2015
 */
/* @var $this yii\web\View */
/* @var $searchModel \skeeks\cms\models\Search */
/* @var $dataProvider yii\data\ActiveDataProvider */
?>

<? $pjax = \skeeks\cms\modules\admin\widgets\Pjax::begin(); ?>

    <?php 
echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => $pjax, 'adminController' => \Yii::$app->controller, 'columns' => ['id', ['attribute' => 'site_code', 'class' => \skeeks\cms\grid\SiteColumn::className()], ['attribute' => 'active', 'class' => \skeeks\cms\grid\BooleanColumn::className()], 'name', 'base_rate']]);
?>

<? $pjax::end(); ?>
コード例 #4
0
ファイル: model-storage-files.php プロジェクト: Liv1020/cms
        execute: function()
        {
            var ajaxQuery = sx.ajax.preparePostQuery(this.get('backendUrl'), this.toArray());
            new sx.classes.AjaxHandlerStandartRespose(ajaxQuery);
            ajaxQuery.execute();
        }

    });
})(sx, sx.\$, sx._);
JS
);
?>
<div class="sx-fromWidget-storageImages">
    <?php 
\skeeks\cms\modules\admin\widgets\Pjax::begin(['id' => 'pjax-storage-images-widget-' . $widget->id, 'blockPjaxContainer' => true]);
?>


    <div class="sx-group-images">
        <div class="row col-md-12">
            <?php 
if ($files = $widget->files) {
    ?>
                <?php 
    foreach ($files as $imageFile) {
        ?>
                    <?php 
        if ($imageFile instanceof \skeeks\cms\models\StorageFile) {
            ?>
                        <div class="sx-image">
コード例 #5
0
ファイル: index.php プロジェクト: Liv1020/cms
<?php 
echo $form->fieldSet(\Yii::t('app', 'Settings'));
?>

<?php 
echo \skeeks\cms\modules\admin\widgets\GridView::widget(['dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => [['name' => \Yii::t('app', 'Cache table structure'), 'value' => $db->enableSchemaCache ? "Y" : "N"], ['name' => \Yii::t('app', 'Cache query'), 'value' => $db->enableSchemaCache ? "Y" : "N"]]]), 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => 'value']]]);
echo $form->fieldSetEnd();
?>

<?php 
echo $form->fieldSet(\Yii::t('app', 'Backup'));
?>

    <?php 
\skeeks\cms\modules\admin\widgets\Pjax::begin(['id' => 'sx-backups']);
?>
        <?php 
$url = \skeeks\cms\helpers\UrlHelper::construct('admin/db/backup')->enableAdmin()->toString();
?>
        <?php 
echo \yii\helpers\Html::a("<i class=\"glyphicon glyphicon-save\"></i> " . \Yii::t('app', 'Make a backup'), $url, ['class' => 'btn btn-primary', 'onclick' => new \yii\web\JsExpression(<<<JS
    new sx.classes.Backup({'backend' : '{$url}'}); return false;
JS
)]);
?>

        <p><?php 
echo \Yii::t('app', "To create backups of the database used by the utility {mysqldump}, and this tool will only work if the utility is installed on your server.", ['mysqldump' => 'mysqldump']);
?>
</p>
コード例 #6
0
ファイル: EditedSelect.php プロジェクト: Liv1020/cms
 public function init()
 {
     $this->_pjaxId = 'pjax-' . $this->getId();
     Pjax::begin(['id' => $this->_pjaxId]);
     parent::init();
 }
コード例 #7
0
ファイル: index.php プロジェクト: Liv1020/cms
<?php

/**
 * @author Semenov Alexander <*****@*****.**>
 * @link http://skeeks.com/
 * @copyright 2010 SkeekS (СкикС)
 * @date 31.05.2015
 */
use skeeks\cms\modules\admin\widgets\Pjax;
?>

<?php 
Pjax::begin(['id' => 'sx-pjax-tree', 'blockPjaxContainer' => false, 'blockContainer' => '.sx-panel']);
?>
<div class="col-md-8">
<?php 
echo \skeeks\cms\modules\admin\widgets\Tree::widget(["models" => $models]);
?>
</div>

<?php 
Pjax::end();
コード例 #8
0
        <? endif; ?>


    <?php 
echo \yii\helpers\Html::submitButton("" . \Yii::t('app', $widget->btnSubmit), ['class' => $widget->btnSubmitClass]);
?>

<? \skeeks\cms\base\widgets\ActiveFormAjaxSubmit::end(); ?>


<hr />


<? if ($widget->enabledPjaxPagination == \skeeks\cms\components\Cms::BOOL_Y) : ?>
    <? \skeeks\cms\modules\admin\widgets\Pjax::begin([
        'id'        => $pjaxId,
    ]); ?>
<? endif; ?>

    <? echo \yii\widgets\ListView::widget([
        'dataProvider'      => $widget->dataProvider,
        'itemView'          => 'comment-item',
        'emptyText'          => '',
        'options'           =>
        [
            'tag'   => 'div',
        ],
        'itemOptions' => [
            'tag' => false
        ],
        'layout'            => "\n{items}{$summary}\n<p class=\"row\">{pager}</p>"