Example #1
0
use yii\helpers\Url;
use yii\bootstrap\ActiveForm;
use kartik\file\FileInput;
use yii\web\View;
use yii\web\JsExpression;
use frontend\assets\UsuarioAsset;
use common\components\Vista;
use common\components\ImagenHelper;
use common\extensions\cmsAB\dropzone\DropZone;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $model common\models\Mensajes */
/* @var $articulo common\models\Mensajes */
/* @var $usuario common\models\Mensajes */
/* @var $form yii\widgets\ActiveForm */
UsuarioAsset::register($this);
$this->registerJs('$("document").ready(function(){
        $("#mensaje-usuario").on("pjax:end", function() {
             //$("#mensaje").trigger("reset");
            $.pjax.reload({container:"#conversacion-usuarios"});  //Reload ListView
            //window.cmsAB.Animaciones._publicarArticulo("mostrar");
            $("form[id=mensaje]").find("textarea").each( function(){
                  $(this).val("");
             });
        });
    });');
?>


<?php 
Pjax::begin(['id' => 'mensaje-usuario']);
Example #2
0
use common\components\Vista;
use common\components\ImagenHelper;
use common\extensions\cmsAB\dropzone\DropZone;
/* @var $this yii\web\View */
/* @var $model common\models\forms\CrearEditarArticuloForm */
/* @var $articulo common\models\Articulos */
/* @var $listadocategorias common\models\Articulos */
/* @var $form yii\widgets\ActiveForm */
//$this->registerJsFile('@web/js/core/demo/PublicarArticulosForm.js', ['depends' => [BackendAsset::className()]]);
//$this->registerJsFile('@web/js/core/demo/DemoFormEditors.js', ['depends' => [BackendAsset::className()]]);
//$this->registerJsFile('@web/js/core/demo/DemoFormComponents.js', ['depends' => [BackendAsset::className()]]);
//$this->registerJsFile('@web/js/core/demo/DemoUIMessages.js', ['depends' => [BackendAsset::className()]]);
//$this->registerJsFile('@web/js/libs/crop/cropper.js', ['depends' => [BackendAsset::className()]]);
//$this->registerJsFile('@web/js/libs/crop/main.js', ['depends' => [BackendAsset::className()]]);
UsuarioAsset::register($this);
$baseUrl = UsuarioAsset::register($this)->baseUrl;
$inputOpciones = ['template' => "{input}\n{label}\n{hint}\n{error}\n", 'options' => ['class' => 'form-group floating-label']];
$inputDineroOpciones = ['template' => "{label}\n{input}<i class=\"zmdi zmdi-money form-control-feedback l-h-34\"></i>\n{hint}\n{error}\n", 'options' => ['class' => 'form-group has-feedback']];
$inputReadOpciones = ['template' => "{label}\n{input}\n{hint}\n{error}\n", 'options' => ['class' => 'form-group floating-label']];
$inputRadioListOpciones = ['style' => 'margin-top: 10px;', 'tag' => 'div', 'item' => function ($index, $label, $name, $checked, $value) {
    $seleccion = $checked == true ? 'checked' : '';
    $html = '<div class="radio radio-primary radio-inline">
                    <input id="' . $index . '_' . $name . '" type="radio" name="' . $name . '" value="' . $value . '" ' . $seleccion . '>
                    <label for="' . $index . '_' . $name . '">' . $label . '</label>
                 </div>';
    return $html;
}, 'itemOptions' => ['labelOptions' => []]];
$inputCheckBoxListOpciones = ['style' => 'margin-top: 10px;', 'tag' => 'div', 'class' => 'control-group', 'item' => function ($index, $label, $name, $checked, $value) {
    $seleccion = $checked == true ? 'checked' : '';
    $html = '<div class="checkbox checkbox-primary checkbox-inline">
                    <input id="' . $index . '_' . $name . '" type="checkbox" name="' . $name . '" value="' . $value . '" ' . $seleccion . '>
Example #3
0
use yii\bootstrap\ActiveForm;
use yii\widgets\Pjax;
use yii\grid\GridView;
use yii\grid\DataColumn;
use yii\helpers\Url;
use himiklab\thumbnail\EasyThumbnailImage;
use frontend\assets\UsuarioAsset;
use karpoff\icrop\CropImageUpload;
use common\components\ImagenHelper;
use common\extensions\cmsAB\mapaLocalizacion\MapLocalizacion;
/* @var $this yii\web\View */
/* @var $model */
/* @var $searchModel common\models\UsuariosBuscador */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->registerJsFile('libreria/plugins/crop/cropper.js', ['depends' => [UsuarioAsset::className()]]);
$this->registerJsFile('libreria/plugins/crop/main.js', ['depends' => [UsuarioAsset::className()]]);
$this->title = Yii::t('app', 'Mi Perfil');
$this->params['breadcrumbs'][] = $this->title;
$baseUrl = Yii::getAlias('@libreriaImg/');
$avatar = ImagenHelper::obtenerImagenPerfil($model->foto);
$inputOpciones = ['template' => "{input}\n{label}\n{hint}\n{error}\n", 'options' => ['class' => 'input-field']];
$inputRadioListOpciones = ['tag' => 'div', 'class' => 'col-sm-6', 'item' => function ($index, $label, $name, $checked, $value) {
    $seleccion = $checked == true ? 'checked' : '';
    $html = '<div class="radiobox checkbox-pink">
                 <input type="radio" name="' . $name . '" value="' . $value . '" ' . $seleccion . '>
                 <label class="radio-styled">' . $label . '</label>
                 </div>';
    return $html;
}, 'itemOptions' => ['labelOptions' => ['class' => 'radio-styled']]];
?>