]> git.llucax.com Git - z.facultad/75.52/sercom.git/blobdiff - sercom/subcontrollers/curso/templates/edit.kid
cambio el estilo del form de filtros
[z.facultad/75.52/sercom.git] / sercom / subcontrollers / curso / templates / edit.kid
index e4e68116c20da0cf24ca43f0e58067834e0b199b..6939753915f5a141d5910be465af3279ede9cdcc 100644 (file)
         </span>
     }
     MochiKit.DOM.addLoadEvent(init_data)
+    
+    function makeOption(option) {
+        return OPTION({"value": option.value}, option.text);
+    }
+                   
+    function moveOption( fromSelect, toSelect) {
+        // add 'selected' nodes toSelect
+        appendChildNodes(toSelect,
+        map( makeOption,ifilter(itemgetter('selected'), $(fromSelect).options)));
+        // remove the 'selected' fromSelect
+        // replaceChildNodes(fromSelect,
+        // list(ifilterfalse(itemgetter('selected'), $(fromSelect).options)));
+    }
+    
+    function mover( src, dest ) {
+        moveOption(src, dest)    
+    }
+    
+    function remover (src, dest) {
+        replaceChildNodes(src,list(ifilterfalse(itemgetter('selected'), $(src).options)))
+    }
+    
 </script>
 <body>
 
@@ -25,7 +47,8 @@
 
 <div py:replace="form(value=record, action=tg.url('/curso/update/%d' % record.id),
     submit_text=_(u'Guardar'))">Formulario</div>
-<a href="${tg.url('/curso/curso_alumno/new/%d' % record.id)}">Agregar Alumnos</a>
+<br/>
+<a href="${tg.url('/curso/from_file/%d' % record.id)}">Agregar Alumnos desde archivo</a>
     <br/>
     <br/>
 <a href="${tg.url('/curso/show/%d' % record.id)}">Ver (cancela)</a> |