X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/fcd65e663e7984ae5bd81e0a4d7cff4d6d0c85c5..f7a565ad20ac34bdc502aa591a9c95936fbf282f:/sercom/widgets.py?ds=inline diff --git a/sercom/widgets.py b/sercom/widgets.py index 5a06ea7..5f9540c 100644 --- a/sercom/widgets.py +++ b/sercom/widgets.py @@ -19,7 +19,7 @@ class CustomTextField(widgets.TextField): ''' -AlumnoMultiSelectAjax = ''' +MultiSelectAjax = ''' function _on_alumno_get_result(lista, loading, results) { @@ -43,8 +43,24 @@ AlumnoMultiSelectAjax = ''' load.style.visibility = 'hidden'; } - function agregar_a_la_lista(texto, lista, loading) + function sacar_de_la_lista(lista) + { + l = MochiKit.DOM.getElement(lista); + if (l.selectedIndex < 0) return; + + /* caso especial, 1 solo item */ + if (l.options.length == 1) { + l.options.length = 0 + return; + } + + for (i=l.selectedIndex; i
+ onClick=" _do_add(${on_add}, '${field_id}_nuevo', '${field_id}', '${name}_loading'); " />