Archivo de July 2009

Con un empujoncito del plugin jTip para jQuery de Cody Lindley algo modificado (Descargar version modificada) y el siguiente parche en algún template que se incluya en el form, (por ejemplo: /apps/backend/modules/module_name/templates/_custom_field.php y el siguiente):

<script type="text/javascript">
// Replaces standard help <span> by costumized jTip one

$(document).ready(function() {
$('.help').each(function(column) {

var myId = $(this).parent().parent().attr('class');
if (myId.indexOf(' ') != -1) {
myId = myId.split(' ');
myId = myId[2];
}

myId = myId.replace('sf_admin_form_field_','help_');
myText = $(this).text();

$(this).html('<a href="#" class="jTip" id="' + myId + '" name="Ayuda@@@' + myText + '"><img alt="Ayuda" src="/images/help.gif"/></a>');
});
JT_init();

});
</script>

la ayuda que acompaña a los campos en los formularios generados con el backend generator de Symfony se convierte en un tooltip.

Enjoy!

Comments No Hay Comentarios »