X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/093cc6f1322e48e79088a864addd7fff4c34c252..f2a30895b781767cb3e536d525ca4910cfe6e5ff:/sercom/subcontrollers/curso/templates/edit.kid diff --git a/sercom/subcontrollers/curso/templates/edit.kid b/sercom/subcontrollers/curso/templates/edit.kid index 7cbef82..feda8f5 100644 --- a/sercom/subcontrollers/curso/templates/edit.kid +++ b/sercom/subcontrollers/curso/templates/edit.kid @@ -16,7 +16,18 @@ MochiKit.DOM.appendChildNodes("form_alumnos", OPTION({"value":${a['id']}}, '${a['label']}')) - } + // Saco de FROM los que ya estan en TO + replaceChildNodes('form_docentes_from', list(ifilterfalse( + partial(esta_en_to, $('form_docentes_to').options), + $('form_docentes_from').options + ))); + } + function esta_en_to (options, i) { + for (j=0; j < options.length; j++) + if (options[j].value == i.value) + return true; + return false; + } MochiKit.DOM.addLoadEvent(init_data)