- Actualización del estado de un candidato a través de una ventana modal.
- Actualización framework YII git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@72 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
23e0eb0681
commit
89fd23a7f6
@ -23,22 +23,6 @@ echo $form->dropDownList(
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
<?php
|
|
||||||
//echo CHtml::ajaxSubmitButton(Yii::t('intranet', 'Choose'), "");
|
|
||||||
/*,
|
|
||||||
CHtml::normalizeUrl(array('candidato/update', 'id' => $model->id)),
|
|
||||||
array(
|
|
||||||
"data"=>array("id"=>$model->id),
|
|
||||||
"success"=>"function(data){
|
|
||||||
if (data.status == \"failure\") {
|
|
||||||
alert(\"mal\");
|
|
||||||
} else {
|
|
||||||
alert(\"bien\");
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
)
|
|
||||||
);*/
|
|
||||||
|
|
||||||
?>
|
|
||||||
<?php $this->endWidget(); ?>
|
<?php $this->endWidget(); ?>
|
||||||
|
|
||||||
|
|||||||
@ -37,12 +37,10 @@ $('.search-form form').submit(function(){
|
|||||||
$updateJS = CHtml::ajax( array(
|
$updateJS = CHtml::ajax( array(
|
||||||
'url' => "js:url",
|
'url' => "js:url",
|
||||||
'data' => "js:form.serialize()",
|
'data' => "js:form.serialize()",
|
||||||
'type' => 'post',
|
'type' => "post",
|
||||||
'dataType' => 'json',
|
'dataType' => "json",
|
||||||
'success' => "function( data )
|
'success' => "function( data ) {
|
||||||
{
|
|
||||||
if( data.status == 'failure' ) {
|
if( data.status == 'failure' ) {
|
||||||
jQuery.blur(div.grid-view);
|
|
||||||
setTimeout( \"jQuery( '#dlg-updateestado' ).dialog( 'close' );\", 1000 );
|
setTimeout( \"jQuery( '#dlg-updateestado' ).dialog( 'close' );\", 1000 );
|
||||||
} else {
|
} else {
|
||||||
if( data.status == 'success' ) // Update all grid views on success
|
if( data.status == 'success' ) // Update all grid views on success
|
||||||
@ -66,7 +64,6 @@ function updateEstado( url )
|
|||||||
if(!url) {
|
if(!url) {
|
||||||
//action = '&action=' + act;
|
//action = '&action=' + act;
|
||||||
url = form.attr( 'action' );
|
url = form.attr( 'action' );
|
||||||
console.log('url => ' + url);
|
|
||||||
}
|
}
|
||||||
{$updateJS}
|
{$updateJS}
|
||||||
}");
|
}");
|
||||||
@ -172,13 +169,10 @@ $this->endWidget('zii.widgets.jui.CJuiDialog');
|
|||||||
CHtml::encode($data->estado),
|
CHtml::encode($data->estado),
|
||||||
array("candidato/updateEstado"),
|
array("candidato/updateEstado"),
|
||||||
array(
|
array(
|
||||||
"data"=>array("id"=>$data->id),
|
"data" => array("id" => $data->id),
|
||||||
"success"=>"function(data){
|
"success" => "function(data){
|
||||||
if (data.status == \"failure\") {
|
jQuery(\"#dlg-updateestado\").html(data);
|
||||||
} else {
|
jQuery(\"#dlg-updateestado\").dialog(\"open\");
|
||||||
jQuery(\"#dlg-updateestado\").html(data);
|
|
||||||
jQuery(\"#dlg-updateestado\").dialog(\"open\");
|
|
||||||
}
|
|
||||||
}",
|
}",
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user