X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/80066ce43bd7bac9343044fd8a6f304a5ff841c3..af3a959636b1e6954c1a66d15c614388cb9a9715:/sercom/widgets.py
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
-