/** * UI.Layout creates a 'page-layout' that has auto-sizing 'center pane' * surrounded by up to four collapsible and resizable 'border panes' * (north, south, east & west). It can also create multiple headers & * footers inside each pane. * @param string $layoutName The layout name * @param string $selector jQuery Selector * @param array() $configurations Array. See the options and events in * http://layout.jquery-dev.net/documentation.html#Options */ function ui_layout_configure_to($layoutName, $selector, $configurations = array()) { $configurations = get_default_widget_configuration('app_ys_jquery_ui_layout_defaults', $configurations); if (isset($configurations['yml'])) { $ymlItems = sfYaml::load($configurations['yml']); $ymlIndex = isset($configurations['ymlKey']) ? $configurations['ymlKey'] : 'layout'; $ymlConfigurations = isset($ymlItems[$ymlIndex]) ? $ymlItems[$ymlIndex] : array(); $configurations = array_merge($ymlConfigurations, $configurations); unset($configurations['yml'], $configurations['ymlKey']); } $support = core_init_javasacript_tag(); $support .= 'var ' . $layoutName . ';'; $pattern = ui_layout_pattern($configurations); $utilityMethods = ''; if (!is_array($configurations) || !sizeof($configurations) > 0) { $configurations = array('applyDefaultStyles' => true); } else { if (!isset($configurations['name'])) { $configurations['name'] = $layoutName; } $utilityMethods = ui_layout_utility_methods_pattern($layoutName, $configurations); } if (isset($configurations['cache']) && $configurations['cache'] === true) { echo add_jquery_support('window', 'unload', like_function("layoutState.save('{$layoutName}')")); $pattern = "\$.extend( {$pattern} , layoutState.load('{$layoutName}'))"; } $jsVar = like_function($layoutName . ' = ' . jquery_support($selector, 'layout', $pattern, true, $utilityMethods)); $support .= jquery_support($selector, 'ready', $jsVar); echo $support .= core_end_javasacript_tag(); }
/** * Set settings for all datepicker instances * @param array() $defaults The default values. see app.yml * ys_jquery_ui_datepicker_defaults index * @param boolean $isInternal if the helper is executed within a javascript function */ function ui_datepicker_set_defaults($defaults = array(), $isInternal = false) { $pattern = ''; $addDefaults = false; if (is_array($defaults) && sizeof($defaults) > 0) { $pattern = _ui_datepicker_pattern($defaults); $addDefaults = true; } $appDefaults = sfConfig::get('app_ys_jquery_ui_datepicker_defaults', array()); if (is_array($appDefaults) && sizeof($appDefaults) > 0) { $appDefaults = array_merge($defaults, $appDefaults); $pattern = _ui_datepicker_pattern($appDefaults); $addDefaults = true; } if ($addDefaults) { if ($isInternal) { return jquery_support(null, 'datepicker.setDefaults', $pattern); } else { return add_jquery_support('document', 'ready', like_function(jquery_support(null, 'datepicker.setDefaults', $pattern))); } } }
echo ui_button_pane_end(); ?> </fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroyAccordion", 'click', like_function(ui_accordion_destroy('#accordionId'))); echo add_jquery_support("#btnBuildAccordion", 'click', like_function(ui_accordion_build('#accordionId', array('event' => 'mouseover')))); echo add_jquery_support("#btnDisableAccordion", 'click', like_function(ui_accordion_disable('#accordionId'))); echo add_jquery_support("#btnEnableAccordion", 'click', like_function(ui_accordion_enable('#accordionId'))); echo add_jquery_support("#btnActivateAccordion", 'click', like_function(ui_accordion_activate('#accordionId', 0))); echo add_jquery_support("#btnGetAccordionOption", 'click', like_function("getAccordionOption()")); echo add_jquery_support("#btnSetAccordionOption", 'click', like_function("setAccordionOption()")); ?> <script type="text/javascript" language="javascript"> function getAccordionOption(){ option = <?php echo ui_accordion_get_option('#accordionId', 'event'); ?> alert('The accordion event is ' + option); } function setAccordionOption(){ <?php echo ui_accordion_set_options('#accordionId', array('collapsible' => true)); ?> alert('Now sections can be closed'); } </script>
?> </td> <td> OPERATIVO: </td> <td> <?php echo $operativo['operativo_id']->render(); ?> </td> <td> <input type="submit" value="Buscar" id ="btnBuscar" /> </td> </tr> </table> <?php echo jquery_autocomplete_support_to('#dat_sie_operativos_ue', array('url' => url_for('adultoshumanisticainformacion/autocompleteData'), 'max' => 20, 'width' => 300, 'highlight' => false, 'formatItem' => like_function('return row[0] + " - <strong> " + row[1] + "</strong>"', 'row'), 'formatResult' => like_function('return row[0].replace(/(<.+?>)/gi, "")', 'row'))); ?> </form> <?php echo ui_end_content(); echo ui_end_content_panel(); ?> </div> <?php echo jquery_ajax_form('#myForm', array('url' => url_for($ue), 'success' => like_function("\$('#divResults').html(data)", 'data'), 'condition' => '$("#dat_sie_operativos_ue").attr("value") != ""', 'onFailureCondition' => 'alert("Debe registrar el SIE de la unidad educativa")', 'type' => 'POST')); echo jquery_ajax_event('#dat_sie_operativos_ue', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#dat_sie_operativos_ue', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings')); ?>
<?php echo ui_button_pane_end(); ?> </fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroyProgressbar", 'click', like_function(ui_progressbar_destroy('#progressbar'))); echo add_jquery_support("#btnDisableProgressbar", 'click', like_function(ui_progressbar_disable('#progressbar'))); echo add_jquery_support("#btnEnableProgressbar", 'click', like_function(ui_progressbar_enable('#progressbar'))); echo add_jquery_support("#btnSetValueProgressbar", 'click', like_function('changeValue()')); echo add_jquery_support("#btnGetValueProgressbar", 'click', like_function('getValue()')); echo add_jquery_support("#btnAnimateProgressbar", 'click', like_function(ui_progressbar_animate('#progressbar2', 5))); ?> <script type="text/javascript" language="javascript"> function changeValue(){ value = Math.ceil(Math.random() * 99); <?php echo ui_progressbar_set_value('#progressbar', 'value'); ?> <?php echo jquery_support('#lblValue', 'html', "value + '%'"); ?> } function getValue(){ value = <?php
<select style="font-family: Arial;font-size: 12px;" id="unidad_educativa"> <option value="-999">[Seleccionar]</option> <?php foreach ($unidades as $unidad) { ?> <option value="<?php echo $unidad->getCodUe(); ?> "><?php echo $unidad->getCodUe() . ' - ' . $unidad->getDescUe(); ?> </option> <?php } ?> </select> <?php echo jquery_ajax(array('listener' => array('selector' => '#unidad_educativa', 'event' => 'change'), 'url' => url_for('adultoshumanisticacrear/subcentro'), 'success' => like_function("\$('#subcentro').html(data)", 'data'), 'data' => "'ue_id=' + " . jquery_get('this', 'val') . "+'&periodo_id='+document.getElementById('periodo_id').value", 'type' => 'POST')); ?> <?php echo jquery_ajax_event('#unidad_educativa', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#unidad_educativa', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings'));
<?php use_helper('JavascriptBase'); use_helper('ysJQueryRevolutions'); use_helper('ysJQueryUIDialog'); ?> <?php ui_dialog_init('dialogId', array('title' => 'Bienvenidos a Sifact', 'modal' => true, 'buttons' => array('Cerrar' => like_function(ui_dialog_close('this')))), 'class="myCustomClass" style=".myCustomStyle"'); ?> <p align="justify"> Sifact es el sistema de facturación electróica confiable, seguro y de alta disponibilidad el cual le ayudará de una manera sencilla e intuitiva a realizar todos sus movimientos de facturación de sus clientes. </p> <?php ui_dialog_end(); ?> <h1>Sistema de facturación electróica</h1> Para facturar, es necesario que siga los siguientes pasos: <ul> <li>Actualice sus datos en <a href="<?php echo url_for('@profile'); ?> ">Mi Perfil</a></li> <li>Registre la Información de sus <a href="<?php echo url_for('@client');
echo $page; ?> </a> <?php echo jquery_load('#result', array('listener' => array('selector' => '#page' . $page, 'event' => 'click'), 'url' => url_for($url), 'data' => array('page' => $page, 'ue_id' => $ue_id, 'subcea_id' => $subcea_id, 'modalidad_id' => $modalidad_id, 'nivel_id' => $nivel_id, 'ciclo_id' => $ciclo_id, 'paralelo_id' => $paralelo_id, 'turno_id' => $turno_id))); ?> <?php } ?> <?php } ?> <a href="#" id="next"> <img src="/images/next.png" alt="Siguiente Página" title="Siguiente Página" border="0" /> </a> <a href="#" id="last"> <img src="/images/last.png" alt="Ultima página" title="Ultima Página" border="0"/> </a> </div> <?php echo jquery_load('#result', array('listener' => array('selector' => '#first', 'event' => 'click'), 'url' => url_for($url), 'data' => array('page' => '1', 'ue_id' => $ue_id, 'subcea_id' => $subcea_id, 'modalidad_id' => $modalidad_id, 'nivel_id' => $nivel_id, 'ciclo_id' => $ciclo_id, 'paralelo_id' => $paralelo_id, 'turno_id' => $turno_id))); echo jquery_load('#result', array('listener' => array('selector' => '#previous', 'event' => 'click'), 'url' => url_for($url), 'data' => array('page' => $pager->getPreviousPage(), 'ue_id' => $ue_id, 'subcea_id' => $subcea_id, 'modalidad_id' => $modalidad_id, 'nivel_id' => $nivel_id, 'ciclo_id' => $ciclo_id, 'paralelo_id' => $paralelo_id, 'turno_id' => $turno_id))); echo jquery_load('#result', array('listener' => array('selector' => '#next', 'event' => 'click'), 'url' => url_for($url), 'data' => array('page' => $pager->getNextPage(), 'ue_id' => $ue_id, 'subcea_id' => $subcea_id, 'modalidad_id' => $modalidad_id, 'nivel_id' => $nivel_id, 'ciclo_id' => $ciclo_id, 'paralelo_id' => $paralelo_id, 'turno_id' => $turno_id))); echo jquery_load('#result', array('listener' => array('selector' => '#last', 'event' => 'click'), 'url' => url_for($url), 'data' => array('page' => $pager->getLastPage(), 'ue_id' => $ue_id, 'subcea_id' => $subcea_id, 'modalidad_id' => $modalidad_id, 'nivel_id' => $nivel_id, 'ciclo_id' => $ciclo_id, 'paralelo_id' => $paralelo_id, 'turno_id' => $turno_id))); ?> <?php echo jquery_ajax_event('#result', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#result', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings')); echo jquery_ajax_event('#result', 'ajaxError', like_function('$("#imagen").css("display","block")', 'event,request,settings'));
/** * Shows the progress in the progressbar. For use in an event. * @param string $selector jQuery Selector * @param integer $delay Delay in seconds. Default 5 sec. */ function ui_progressbar_init_animation($selector, $delay = 5) { $percentageChar = '%'; $pattern = _ui_progressbar_animation_pattern(); return jquery_support($selector, 'ready', like_function(sprintf($pattern, $selector, $percentageChar, $delay))); }
?> <?php ui_grid_td_init('style="text-align:left;width:32px;"'); ?> <?php //echo $estudiante['codigo_rude']; ?> <a href="#" id = <?php echo 'modal' . $i; ?> ><strong><?php echo $estudiante['codigo_rude']; ?> </strong></a> <?php echo jquery_ajax(array('listener' => array('selector' => '#modal' . $i, 'event' => 'click'), 'url' => url_for('estudiantealtbusqueda/listainscripciones'), 'success' => like_function("\$('#divUes').html(data)", 'data'), 'data' => "'codigo_rude='+'" . $estudiante['codigo_rude'] . "'", 'type' => 'GET')); ?> <?php ui_grid_td_end(); ?> <?php ui_grid_td_init('style="text-align:left;width:66px;"'); ?> <?php echo $estudiante['paterno']; ?> <?php ui_grid_td_end(); ?> <?php
</div> <?php echo ui_button_pane_init($type = 'single', array('btnExecuteSwitchClass' => array('value' => 'Execute Switch Class Effect'))); echo ui_button_pane_end(); ?> <?php echo ui_effects_switch_class('#testSwitchClass', array('listener' => array('selector' => '#btnExecuteSwitchClass', 'event' => 'click'), 'remove' => 'ui-widget-content', 'add' => 'ui-widget-header', 'duration' => 'slow')); ?> <br><br><br> <?php echo add_jquery_support('document', 'ready', like_function(jquery_toggle_event('#btnAnimate', array(like_function(jquery_execute_effect('.divToAnimate', 'animate', array('options' => array('backgroundColor' => '#aa0000', 'color' => '#fff', 'width' => 500), 'speed' => 1000))), like_function(jquery_execute_effect('.divToAnimate', 'animate', array('options' => array('backgroundColor' => '#fff', 'color' => '#000', 'width' => 240), 'speed' => 1000))))))); ?> <div class="divToAnimate" style="width:250px"> <br> <p>Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. </p> <br> </div> <br> <?php echo ui_button_pane_init($type = 'single', array('btnAnimate' => array('value' => 'Animate'))); echo ui_button_pane_end(); ?>
<?php use_helper('ysJQueryRevolutions'); ?> Frameworks: <strong><span id="divResults"></span></strong> <hr> <h3>Ajax events - example</h3> <br> <input type="button" id="btnReloadAjax" value="Click here"/> <?php echo jquery_ajax(array('listener' => array('selector' => '#btnReloadAjax', 'event' => 'click'), 'url' => url_for('jquery_demo/getjson'), 'dataType' => 'json', 'confirmation' => 'Do you want ajax submit', 'onNoConfirmation' => 'alert("Not submitted")', 'success' => like_function("\$('#divResults').html(data.frameworks.toString())", 'data'), 'data' => "'cboIdLenguage=' + Math.ceil(Math.random() * 3)", 'type' => 'GET')); ?> <?php echo jquery_ajax_event('#btnReloadAjax', 'ajaxComplete', like_function("alert('Complete')")); echo jquery_ajax_event('#btnReloadAjax', 'ajaxSend', like_function("alert('Send')", 'event,request,settings')); echo jquery_ajax_event('#btnReloadAjax', 'ajaxStop', like_function("alert('Stop')", 'event,request,settings')); echo jquery_ajax_event('#btnReloadAjax', 'ajaxSuccess', like_function("alert('Success')", 'event,request,settings')); echo jquery_ajax_event('#btnReloadAjax', 'ajaxStart', like_function("alert('Start')", 'event,request,settings')); echo jquery_ajax_event('#btnReloadAjax', 'ajaxError', like_function("alert('Error')", 'event,request,settings')); ?>
echo ui_end_content_panel(); ?> </div><!-- End demo --> <div class="demo-description"> <p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.</p> </div><!-- End demo-description --> <fieldset><legend>Example - Actions buttons for ui.slider</legend> <?php echo ui_button_pane_init($type = 'single', array('btnDestroySlider' => array('value' => 'Destroy Slider'), 'btnDisableSlider' => array('value' => 'Disable Slider'), 'btnEnableSlider' => array('value' => 'Enable Slider'), 'btnSetValueSlider' => array('value' => 'Set Slider1 value = 50'), 'btnSetValuesSlider' => array('value' => 'set Slider2[0] value = 15'))); ?> <?php echo ui_button_pane_end(); ?> </fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroySlider", 'click', like_function(ui_slider_destroy('#slider1'))); echo add_jquery_support("#btnDisableSlider", 'click', like_function(ui_slider_disable('#slider1'))); echo add_jquery_support("#btnEnableSlider", 'click', like_function(ui_slider_enable('#slider1'))); echo add_jquery_support("#btnSetValueSlider", 'click', like_function(ui_slider_value('#slider1', 50))); echo add_jquery_support("#btnSetValuesSlider", 'click', like_function(ui_slider_values('#slider2', 0, 15))); ?> <br> <?php echo link_to('jquery UI (slider) documentation', 'http://jqueryui.com/demos/slider');
<hr> <br> <h3>jquery.get request- example</h3> <input type="button" value="Request [GET]" id="btnGet" /> <?php echo jquery_ajax_get_request(array('listener' => array('selector' => '#btnGet', 'event' => 'click'), 'url' => url_for('jquery_demo/getjson'), 'callback' => like_function('alert("GET: Data SUCCESS: " + data);', 'data'), 'data' => array('cboIdLenguage' => '1'))); ?> <hr> <br> <h3>jquery.post request - example</h3> <input type="button" value="Request [POST]" id="btnPost" /> <?php echo jquery_ajax_post_request(array('listener' => array('selector' => '#btnPost', 'event' => 'click'), 'url' => url_for('jquery_demo/getjson'), 'callback' => like_function('alert("POST: Data SUCCESS: " + data);', 'data'), 'data' => array('cboIdLenguage' => '2'))); ?> <hr> <br> <h3>Get json - example</h3> <input type="button" value="Get JSON" id="btnGetJson" /> <?php echo jquery_get_json(array('listener' => array('selector' => '#btnGetJson', 'event' => 'click'), 'url' => url_for('jquery_demo/getjson'), 'callback' => like_function('alert(data.frameworks)', 'data'), 'data' => array('cboIdLenguage' => '2'))); ?> <hr>
<?php echo ui_button_pane_end(); ?> </fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroyDrag", 'click', like_function(ui_draggable_destroy('#draggable'))); echo add_jquery_support("#btnBuildDrag", 'click', like_function(ui_draggable_build('#draggable'))); echo add_jquery_support("#btnDisableDrag", 'click', like_function(ui_draggable_disable('#draggable'))); echo add_jquery_support("#btnEnableDrag", 'click', like_function(ui_draggable_enable('#draggable'))); echo add_jquery_support("#btnSetDragOption", 'click', like_function("setOption()")); echo add_jquery_support("#btnGetDragOption", 'click', like_function("getOption()")); ?> <script type="text/javascript" language="javascript"> function getOption(){ option = <?php echo ui_draggable_get_option('#draggable', 'axis'); ?> alert('The draggable axis value is: ' + option); } function setOption(){ option = <?php echo ui_draggable_set_options('#draggable', array('axis' => 'x')); ?> alert('Now the axis is only horizontal'); }
<br> <br> Test 4 (Remote Data): <input type="text" id="suggest4" /> <?php echo jquery_autocomplete_support_to('#suggest4', array('url' => url_for('jquery_demo/autocompleteData'), 'extraParams' => array('dataTypeParam' => 'items'), 'formatItem' => like_function('return row[0] + " (<strong>id: " + row[1] + "</strong>)"', 'row'), 'formatResult' => like_function('return row[0].replace(/(<.+?>)/gi, "")', 'row'))); ?> <br> <br> Test 5 (Remote Data [images from bassistance.de]): <input type="text" id="suggest5" /> <?php echo jquery_autocomplete_support_to('#suggest5', array('focus' => true, 'url' => url_for('jquery_demo/autocompleteImageData'), 'width' => 500, 'max' => 4, 'highlight' => false, 'scroll' => true, 'scrollHeight' => 300, 'formatItem' => like_function("return '<img width=\"92\" height=\"65\" src=\"http://jquery.bassistance.de/autocomplete/demo/images/' + value + '\" /> ' + value.split('.')[0];", 'data, i, n, value'), 'formatResult' => like_function('return value.split(".")[0];', 'data, value'))); ?> <br> <br> <?php echo jquery_autocomplete_input_tag(array('id' => 'suggest6', 'label' => 'Test 1 (Local Data [Tags]): | jquery_autocomplete_input_tag()', 'data' => '["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "pearl"]', 'width' => 500, 'max' => 4, 'highlight' => false, 'scroll' => true, 'scrollHeight' => 300)); ?> <input type="button" value="Unautocomplete" id="btnUnAutocomplete" /> <?php echo add_jquery_support('#btnUnAutocomplete', 'click', like_function(jquery_unautocomplete('#suggest6'))); ?> <br> <br> <br> <?php echo link_to('jQuery Autocomplete documentation', 'http://docs.jquery.com/Plugins/Autocomplete'); ?> </div>
</fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroyDialog", 'click', like_function(ui_dialog_destroy('#anotherDialog'))); echo add_jquery_support("#btnBuildDialog", 'click', like_function(ui_dialog_build('#anotherDialog', array('title' => 'What is Lorem ipsum?')))); echo add_jquery_support("#btnDisableDialog", 'click', like_function(ui_dialog_disable('#anotherDialog'))); echo add_jquery_support("#btnEnableDialog", 'click', like_function(ui_dialog_enable('#anotherDialog'))); echo add_jquery_support("#btnCloseDialog", 'click', like_function(ui_dialog_close('#anotherDialog'))); echo add_jquery_support("#btnOpenDialog", 'click', like_function(ui_dialog_open('#anotherDialog'))); echo add_jquery_support("#btnMoveToTopDialog", 'click', like_function(ui_dialog_move_to_top('#anotherDialog'))); echo add_jquery_support("#btnIsOpenDialog", 'click', like_function('isOpenDialog()')); ?> <script type="text/javascript" language="javascript"> function isOpenDialog(){ var isOpen = <?php echo ui_dialog_is_open('#anotherDialog'); ?> ; if(isOpen){ alert('is open = true'); }else{ alert('is open = false'); } } </script>
<table align="center"> <tr> <td>Paterno:</td> <td> <input type="text" id="datos_estudiante_paterno" name="datos_estudiante[paterno]" size="16" maxlength="35" style="text-transform: uppercase;" /> </td> <td>Materno:</td> <td> <input type="text" id="datos_estudiante_materno" name="datos_estudiante[materno]" size="16" maxlength="35" style="text-transform: uppercase;" /> </td> <td>Nombre:</td> <td> <input type="text" id="datos_estudiante_nombre" name="datos_estudiante[nombre]" size="24" maxlength="35" style="text-transform: uppercase;" /> </td> <td> <input type="submit" value="Buscar" id ="btnBuscar" /> </td> </tr> </table> </form> <?php echo ui_end_content(); echo ui_end_content_panel(); ?> </div> <?php echo jquery_ajax_form('#myForm', array('url' => url_for($url), 'success' => like_function("\$('#divResults').html(data)", 'data'), 'condition' => '$("#datos_estudiante_paterno").attr("value") != "" || $("#datos_estudiante_materno").attr("value") != "" || $("#datos_estudiante_nombre").attr("value") != ""', 'onFailureCondition' => 'alert("Debe ingresar al menos un criterio.")', 'type' => 'POST')); echo jquery_ajax_event('#datos_estudiante_nombre', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#datos_estudiante_nombre', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings'));
<input type="button" id="btnGo" value="Go" /> <input type="button" id="btnStop" value="Stop" /> <input type="button" id="btnBack" value="Back" /> <?php echo add_jquery_support('#btnGo', 'click', like_function(jquery_execute_effect('.block', 'animate', array('options' => array('left' => "+=100px"), 'speed' => 2000)))); ?> <?php echo add_jquery_support('#btnStop', 'click', like_function(jquery_execute_effect('.block', 'stop'))); ?> <?php echo add_jquery_support('#btnBack', 'click', like_function(jquery_execute_effect('.block', 'animate', array('options' => array('left' => "-=100px"), 'speed' => 2000)))); ?> <div class="block" style="background-color:#AABBCC;height:60px;left:0;margin:5px;position:absolute;width:60px;"> <br> </div>
* Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDestroyTabs", 'click', like_function(ui_tabs_destroy_panel('#tabPanelId'))); echo add_jquery_support("#btnBuildTabs", 'click', like_function(ui_tabs_build_panel('#tabPanelId'))); echo add_jquery_support("#btnSortableTabs", 'click', like_function(ui_tabs_sortable('#tabPanelId'))); echo add_jquery_support("#btnCountTabs", 'click', like_function('getTabsCount()')); echo add_jquery_support("#btnDisableTab", 'click', like_function(ui_tabs_disable('#tabPanelId', 1))); echo add_jquery_support("#btnEnableTab", 'click', like_function(ui_tabs_enable('#tabPanelId', 1))); echo add_jquery_support("#btnRemoveTab", 'click', like_function(ui_tabs_remove('#tabPanelId', 0))); echo add_jquery_support("#btnAddTab", 'click', like_function(ui_tabs_add('#tabPanelId', url_for('jqueryui_demo/progressbar'), 'Another tab', 3))); echo add_jquery_support("#btnSelectTab", 'click', like_function(ui_tabs_select('#tabPanelId', 1))); echo add_jquery_support("#btnSetOption", 'click', like_function('setTabOption()')); echo add_jquery_support("#btnGetOption", 'click', like_function('getTabOption()')); echo add_jquery_support("#btnInitRotate", 'click', like_function(ui_tabs_rotate('#tabPanelId', 3))); echo add_jquery_support("#btnEndRotate", 'click', like_function(ui_tabs_rotate('#tabPanelId', 0))); ?> <script type="text/javascript" language="javascript"> function getTabsCount(){ tabsCountVal = <?php echo ui_tabs_length('#tabPanelId'); ?> alert('Number of tabs ' + tabsCountVal); } function getTabOption(){ option = <?php echo ui_tabs_get_option('#tabPanelId', 'event'); ?> alert('The accordion event is ' + option);
/** * Enable a link_button or button * @param String $selector The jQuery Selector * @param String $funtion The function to bind. Needed to enable a link_button * @param boolean $isInternal */ function ui_enable_button($selector, $funtion = '', $isInternal = true) { if (!function_exists('ui_effects')) { use_helper('ysJQueryUIEffects'); } $sintax = ''; $sintax = jquery_set($selector, 'attr', array('disabled' => ''), $unescapeId = true, $accesors = '', $addSeparator = true); if ($funtion != '') { $sintax = jquery_bind_event($selector, 'click', $funtion); } $sintax .= ui_effects_remove_class($selector, array('class' => 'ui-state-disabled')); $sintax .= ui_effects_add_class($selector, array('class' => 'ui-state-default')); if ($isInternal) { return $sintax; } else { return add_jquery_support($selector, 'ready', like_function($sintax)); } }
<h3>Periodically ajax - example (frequency 5 seg)</h3> <?php //echo core_init_javasacript_tag() /*echo jquery_periodically_ajax(array( 'url' => url_for('jquery_demo/getjson'), 'dataType' => 'json' , 'success' => like_function("$('#divResults').html(data.frameworks.toString())" , 'data'), 'data' => "'cboIdLenguage=' + Math.ceil(Math.random() * 3)", 'frequency' => 5)); */ //echo core_end_javasacript_tag() ?> <?php echo jquery_ajax(array('listener' => array('selector' => 'document', 'event' => 'ready'), 'url' => url_for('jquery_demo/getjson'), 'dataType' => 'json', 'data' => "'cboIdLenguage=' + Math.ceil(Math.random() * 3)", 'success' => like_function("\$('#divResults').html(data.frameworks.toString())", 'data'), 'frequency' => 5)); ?> <hr> <br> <h3>Ajax Events on load</h3> <input type="button" id="btnAjaxEvencts" value="Call ajax & Show Events"/> <?php echo jquery_ajax(array('listener' => array('selector' => '#btnAjaxEvencts', 'event' => 'click'), 'url' => url_for('jquery_demo/getjson'), 'dataType' => 'json', 'data' => "'cboIdLenguage=' + 2", 'type' => 'POST', 'complete' => like_function("alert('complete')"), 'success' => like_function("alert(data.frameworks.toString())", 'data'), 'async' => 'true', 'beforeSend' => like_function("alert('beforeSend')"), 'error' => like_function("alert('error')"))); ?> <hr>
?> <?php $suma = $suma + (int) $curso['total']; ?> <?php ui_grid_td_end(); ?> <?php ui_grid_td_init('style="text-align:center;"'); ?> <a href="#" id = <?php echo 'modal' . $i; ?> ><img src="/images/entrega.gif" style="border-width: 0px;" title="VER LISTA" /></a> <?php echo jquery_ajax(array('listener' => array('selector' => '#modal' . $i, 'event' => 'click'), 'url' => url_for('adultostecnicalistado/listaestudiantes'), 'success' => like_function("\$('#divEstudiantes').html(data)", 'data'), 'data' => "'paralelo='+'" . $curso['paralelo'] . "'+'&nivel_id='+" . $curso['nivel_id'] . "+'&grado_id='+" . $curso['grado_id'] . "+'&ciclo='+" . $curso['ciclo_id'] . "+'&cod_ue_id='+" . $a['ue'] . "+'&gestion_id='+" . $a['gestion_id'] . "+'&turno_id='+" . $curso['turno_id'] . "+'&curso_oferta_id='+" . $curso['curso_oferta_id'], 'type' => 'GET')); ?> <?php ui_grid_td_end(); ?> <?php ui_grid_tr_end(); ?> <?php } ?> <?php ui_grid_body_end(); ?> <?php ui_grid_foot_init();
<?php use_helper('ysJQueryRevolutions'); use_helper('ysJQueryUIDialog'); ?> <select id="nivel_id" style="font-family: Arial;font-size: 12px;width: 280px;"> <option value="-999">[Seleccionar]</option> <?php foreach ($niveles as $nivel) { ?> <option value="<?php echo $nivel->getIdCiclo(); ?> "><?php echo $nivel->getIdCiclo() . ' - ' . $nivel->getDescCiclo(); ?> </option> <?php } ?> </select> <?php echo jquery_ajax(array('listener' => array('selector' => '#nivel_id', 'event' => 'change'), 'url' => url_for('cea_crear_cursos/ciclo'), 'success' => like_function("\$('#ciclo').html(data)", 'data'), 'data' => "'nivel_id='+" . jquery_get('this', 'val'), 'type' => 'POST')); ?> <?php echo jquery_ajax_event('#cea_crear_cursos', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#cea_crear_cursos', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings'));
<?php use_helper('ysJQueryRevolutions'); use_helper('ysJQueryUIDialog'); use_helper('ysUtil'); ui_dialog_init('dialogId', array('title' => 'LISTA DE ESTUDIANTES', 'modal' => true, 'width' => '900px', 'buttons' => array('Cerrar' => like_function(ui_dialog_close('this')))), 'style="font-size: 9px;"'); ?> <?php ui_grid_init('Unidad educativa'); ?> <?php ui_grid_head_init(); ?> <?php ui_grid_th('<a>N°</a>'); ?> <?php ui_grid_th('<a>RUDEALT</a>'); ?> <?php ui_grid_th('<a>CI</a>'); ?> <?php ui_grid_th('<a>PATERNO</a>'); ?> <?php ui_grid_th('<a>MATERNO</a>'); ?> <?php ui_grid_th('<a>NOMBRE</a>'); ?>
?> <?php echo ui_button_pane_end(); ?> </fieldset> <?php /* * Add jQuery support to the buttons above * **click event** */ echo add_jquery_support("#btnDetroySelectable", 'click', like_function(ui_selectable_destroy('#selectable'))); echo add_jquery_support("#btnBuildSelectable", 'click', like_function(ui_selectable_build('#selectable'))); echo add_jquery_support("#btnDisableSelectable", 'click', like_function(ui_selectable_disable('#selectable'))); echo add_jquery_support("#btnEnableSelectable", 'click', like_function(ui_selectable_enable('#selectable'))); echo add_jquery_support("#btnGetSelectableOption", 'click', like_function("getOption()")); echo add_jquery_support("#btnSetSelectableOption", 'click', like_function("setOption()")); ?> <script type="text/javascript" language="javascript"> function getOption(){ option = <?php echo ui_selectable_get_option('#selectable', 'delay'); ?> alert('The selectable delay is ' + option); } function setOption(){ <?php echo ui_selectable_set_options('#selectable', array('delay' => 1000)); ?> alert('Now the selectable delay is 1 sec (1000 milliseconds).'); } </script>
<?php use_helper('ysJQueryRevolutions'); use_helper('ysJQueryUIDialog'); ?> <select id="grado_id" style="font-family: Arial;font-size: 12px;width: 200px;" name="dat_rde_estudiante[grado_id]"> <option value="-999">[Seleccionar]</option> <?php foreach ($grados as $grado) { ?> <option value="<?php echo $grado->getGradoId(); ?> "><?php echo $grado->getGradoId() . ' - ' . Doctrine::getTable('ClaGrado')->find(array($nivel, $ciclo, $grado->getGradoId()))->getDescGrado(); ?> </option> <?php } ?> </select> <?php echo jquery_ajax(array('listener' => array('selector' => '#grado_id', 'event' => 'change'), 'url' => url_for('adultoshumanisticainscripcionanterior/paralelo'), 'success' => like_function("\$('#paralelo').html(data)", 'data'), 'data' => "'grado_id='+" . jquery_get('this', 'val') . "+'&ue_id='+document.getElementById('unidad_educativa').value+'&nivel_id='+document.getElementById('nivel_id').value+'&periodo_id='+document.getElementById('periodo_id').value+'&subcea_id='+document.getElementById('subcea_id').value+'&modalidad_id='+document.getElementById('modalidad_id').value+'&gestion_id='+document.getElementById('gestion_id').value", 'type' => 'POST')); ?> <?php echo jquery_ajax_event('#grado_id', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); echo jquery_ajax_event('#grado_id', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings'));
echo ui_link_button(array('value' => 'Disable Link button', 'id' => 'disablelnkBtnId')); ?> <?php echo ui_link_button(array('value' => 'Enable button', 'id' => 'enableBtnId')); echo ui_link_button(array('value' => 'Disable button', 'id' => 'disableBtnId')); ?> <?php echo add_jquery_support('#enableLnkBtnId', 'click', like_function(ui_enable_button('#lnkBtnId', 'linkEnableAndDisableToggleFunction'))); echo add_jquery_support('#disablelnkBtnId', 'click', like_function(ui_disable_link_button('#lnkBtnId'))); ?> <?php echo add_jquery_support('#enableBtnId', 'click', like_function(ui_enable_button('#btnId'))); echo add_jquery_support('#disableBtnId', 'click', like_function(ui_disable_button('#btnId'))); ?> <br><br> BUTTON PANE <br> <?php echo ui_button_pane_init($type = 'single', array('idBtn1' => array('value' => 'Hello', 'icon' => 'newwin'), 'idBtn2' => array('value' => 'World', 'icon' => 'newwin'))); ?> <?php echo ui_button_pane_end(); ?> <?php echo ui_button_pane_init($type = 'multiple', array('idBtn3' => array('title' => 'B', 'value' => '<b>B</b>'), 'idBtn4' => array('title' => 'I', 'value' => '<i>I</i>'), 'idBtn5' => array('title' => 'U', 'value' => '<u>U</u>')));
<option value="0">NINGUNO</option> </select> <?php } else { ?> <select name="dat_rde_estudiante[departamento_nac_id]" id="dat_rde_estudiante_departamento_nac_id" style="font-family: Arial;font-size: 12px;"> <option value="-999">[Seleccionar]</option> <?php foreach ($departamentos as $departamento) { ?> <option value="<?php echo $departamento->getIdDepartamento(); ?> "><?php echo $departamento->getDescDepartamento(); ?> </option> <?php } ?> </select> <?php echo jquery_ajax(array('listener' => array('selector' => '#dat_rde_estudiante_departamento_nac_id', 'event' => 'change'), 'url' => url_for('adultoshumanisticaextemporaneosinrude/provincia'), 'success' => like_function("\$('#provincia').html(data)", 'data'), 'data' => "'departamento_id=' + " . jquery_get('this', 'val'), 'type' => 'POST')); ?> <?php echo jquery_ajax_event('#dat_rde_estudiante_departamento_nac_id', 'ajaxSuccess', like_function('$("#imagen").css("display","none")', 'event,request,settings')); ?> <?php echo jquery_ajax_event('#dat_rde_estudiante_departamento_nac_id', 'ajaxStart', like_function('$("#imagen").css("display","block")', 'event,request,settings')); }
Registre los datos para la busqueda <?php echo ui_end_title(); ?> <?php echo ui_init_content(); ?> <form id="myForm" action="#"> <table align="center" style="width: 100%;padding:10px;"> <tr> <td>Centro de Educación Alternativa : </td> <td> <?php echo $ceas['cod_ue_id']->render(); ?> <td> <input type="submit" value="Buscar" id ="btnBuscar" /> </td> </tr> </table> </form> <?php echo ui_end_content(); echo ui_end_content_panel(); ?> </div> <?php echo jquery_ajax_form('#myForm', array('url' => url_for($ue), 'success' => like_function("\$('#divResults').html(data)", 'data'), 'type' => 'POST')); ?>