2017 © Pedro Peláez
 

yii2-extension yii2-vex-dialog

Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)

image

demogorgorn/yii2-vex-dialog

Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)

  • Wednesday, October 4, 2017
  • by demogorgorn
  • Repository
  • 2 Watchers
  • 1 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-vex-dialog

Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex), (*1)

Installation

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)

How to use

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(); ?>

The Versions

04/10 2017

dev-master

9999999-dev https://github.com/demogorgorn/yii2-vex-dialog

Yii2 wrapper for Vex, a modern dialog library (https://github.com/HubSpot/vex)

  Sources   Download

BSD 3-Clause

The Requires

  • bower-asset/vex *

 

extension yii2 widget modal dialog vex