X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/5a5fd7200d429896765a5043908441683e5f06ea..9fb3648059d399e2a3e3ff2730774b109c76aba6:/sercom/subcontrollers/curso/templates/edit.kid diff --git a/sercom/subcontrollers/curso/templates/edit.kid b/sercom/subcontrollers/curso/templates/edit.kid index e4e6811..feda8f5 100644 --- a/sercom/subcontrollers/curso/templates/edit.kid +++ b/sercom/subcontrollers/curso/templates/edit.kid @@ -9,14 +9,25 @@ function init_data() { // MochiKit.DOM.getElement('form_responsable').focus(); MochiKit.DOM.getElement('form_anio').focus(); - - MochiKit.DOM.appendChildNodes("form_docentes_curso", OPTION({"value":${d['id']}}, '${d['label']}')) + + MochiKit.DOM.appendChildNodes("form_docentes_to", OPTION({"value":${d['id']}}, '${d['label']}')) 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) @@ -25,7 +36,8 @@
Formulario
-Agregar Alumnos +
+Agregar Alumnos desde archivo

Ver (cancela) |