dev-master
9999999-dev https://github.com/demogorgorn/yii2-vex-dialogYii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)
BSD 3-Clause
The Requires
- bower-asset/vex *
extension yii2 widget modal dialog vex
Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)
Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex), (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist demogorgorn/yii2-vex-dialog "*"
or add, (*4)
"demogorgorn/yii2-vex-dialog": "*"
to the require section of your composer.json
file., (*5)
On your view file., (*6)
registerJs($js); ?>
After that just call your function (in this example "showModal")., (*7)
For example, common use with demogorgorn/yii2-ajax-submit-button (https://github.com/demogorgorn/yii2-ajax-submit-button) :, (*8)
The same view file:, (*9)
'delete-button', 'label' => Yii::t('modules/payments/common', 'Visit'), 'ajaxOptions' => [ 'type'=>'POST', 'url'=> \yii\helpers\Url::toRoute(['/payments/category/count-children']), 'beforeSend' => new \yii\web\JsExpression('function (xhr) { var idurl = getTreeSelectedItem(); if (idurl == null) { xhr.abort(); showModal(); } this.url = this.url + "&id=" + idurl; }'), 'success' => new \yii\web\JsExpression('function(html){ showModal(); }'), ], 'options' => ['class' => 'button large danger', 'type' => 'submit', 'disabled' => true], ]); \demogorgorn\ajax\AjaxSubmitButton::end(); ?>
Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)
BSD 3-Clause
extension yii2 widget modal dialog vex