X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/80066ce43bd7bac9343044fd8a6f304a5ff841c3..1a9e08223b7e05ed9804caeb8d2a3b931b5b5b4c:/sercom/widgets.py?ds=inline
diff --git a/sercom/widgets.py b/sercom/widgets.py
index 309adc0..3f2da58 100644
--- a/sercom/widgets.py
+++ b/sercom/widgets.py
@@ -7,70 +7,189 @@ class CustomTextField(widgets.TextField):
"""Un input con un div al lado para ponerle info"""
template = '''
-
'''
-AlumnoMultiSelectAjax = '''
- function agregar_a_la_lista(texto, lista)
+MultiSelectAjax = '''
+
+ function _on_alumno_get_result(lista, loading, results)
{
- t = MochiKit.DOM.getElement(texto);
- MochiKit.DOM.appendChildNodes(lista, OPTION(t.value));
- t.value = "";
+ load = MochiKit.DOM.getElement(loading);
+ load.style.visibility = 'hidden';
+ if (results.error) {
+ alert(results.msg);
+ return;
+ }
+ /* Verifico si esta y no lo agrego si esta repetido */
+ l = MochiKit.DOM.getElement(lista);
+ esta = false;
+ for(i=0; i
-