02/07
2014
dev-master
9999999-dev http://google.comAjaxButton
MIT
The Requires
- php >=5.4
- yiisoft/yii2 *
ajax button
Wallogit.com
2017 © Pedro Peláez
AjaxButton
Usage:, (*1)
\Apollo\AjaxButton::begin(['label'=>'label',
'elements'=>['id'=>array of id's] // generate code for id's as $( '#id1','#id2'.... ).click(function(event){...}
'ajaxOptions'=>[
'type'=>'POST',
'afterClick'=>new \yii\web\JsExpression('alert(Clicked)');
'url'=>'google',
'success'=>new \yii\web\JsExpression('function(){location.reload()}'),
'beforeSend'=> new \yii\web\JsExpression("function(){
var data=jQuery('#gridID').yiiGridView('getSelectedRows');
if(data=='')
{
alert('You do not choose!');
return false;
}
if (confirm('Are you sure you want to delete this items?')) {
return true;
} else {
return false;
}
}"
),
]]);
\Apollo\AjaxButton::end();
AjaxButton
MIT
ajax button