]> git.llucax.com Git - z.facultad/75.52/sercom.git/blobdiff - sercom/subcontrollers/curso/templates/new.kid
related join
[z.facultad/75.52/sercom.git] / sercom / subcontrollers / curso / templates / new.kid
index 96de1547eac977a361e87d5c8ae2cb394dc072e3..e50ec7618acd4b487a1206b36381024a9ecd8963 100644 (file)
@@ -2,6 +2,30 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
     py:extends="'../../../templates/master.kid'">
 <head>
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
     py:extends="'../../../templates/master.kid'">
 <head>
+
+<script type="text/javascript">
+    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 ) {
+        moveOption(src, dest)
+    }
+</script>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>new</title>
 </head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>new</title>
 </head>
@@ -10,7 +34,6 @@
 <h1>Crear Nuevo <span py:replace="name">Objeto</span></h1>
 
 <p py:replace="form(action=tg.url('/curso/create'), value=values, submit_text=_('Crear'))">Formulario</p>
 <h1>Crear Nuevo <span py:replace="name">Objeto</span></h1>
 
 <p py:replace="form(action=tg.url('/curso/create'), value=values, submit_text=_('Crear'))">Formulario</p>
-
 <br/>
 <a href="${tg.url('/curso/list')}">Cancelar</a>
 
 <br/>
 <a href="${tg.url('/curso/list')}">Cancelar</a>