X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/80066ce43bd7bac9343044fd8a6f304a5ff841c3..a4c3fa576067c19331f7a2254c36b54a335482ca:/sercom/widgets.py?ds=sidebyside
diff --git a/sercom/widgets.py b/sercom/widgets.py
index 309adc0..c19f54c 100644
--- a/sercom/widgets.py
+++ b/sercom/widgets.py
@@ -7,70 +7,186 @@ 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
-