]> git.llucax.com Git - software/sercom.git/commitdiff
Pasar JS a widget de formulario.
authorLeandro Lucarella <llucax@gmail.com>
Fri, 16 Feb 2007 19:38:12 +0000 (19:38 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Fri, 16 Feb 2007 19:38:12 +0000 (19:38 +0000)
sercom/controllers.py
sercom/subcontrollers/caso_de_prueba/__init__.py
sercom/subcontrollers/caso_de_prueba/templates/edit.kid
sercom/subcontrollers/caso_de_prueba/templates/new.kid
sercom/subcontrollers/docente/__init__.py
sercom/subcontrollers/docente/templates/edit.kid
sercom/subcontrollers/docente/templates/new.kid
sercom/subcontrollers/enunciado/__init__.py
sercom/subcontrollers/enunciado/templates/edit.kid
sercom/subcontrollers/enunciado/templates/new.kid
sercom/templates/login.kid

index 88880c5aeedd78579addaf26b342135086c0e876..714869a763e8c1b30891a96efdf0d5084b9101b1 100644 (file)
@@ -62,6 +62,8 @@ class Root(controllers.RootController):
 
         login_form = w.TableForm(fields=fields, action=previous_url,
                         submit_text=_(u'Ingresar'), submit=submit)
 
         login_form = w.TableForm(fields=fields, action=previous_url,
                         submit_text=_(u'Ingresar'), submit=submit)
+        login_form.javascript.append(
+            w.JSSource("MochiKit.DOM.focusOnLoad('form_login_user');"))
 
         values = dict(forward_url=forward_url)
         values.update(request.params)
 
         values = dict(forward_url=forward_url)
         values.update(request.params)
index ad62b05af84c8e8d0e2feec7dbb0a0e25430a7d6..191800b52661c517984a8ba9727f1e83499ef837 100644 (file)
@@ -59,6 +59,7 @@ form = TableForm(fields=[
     TextField(name='tiempo_cpu', label=_(u'Tiempo de CPU'),
         validator=validators.Number(not_empty=False, strip=True)),
 ])
     TextField(name='tiempo_cpu', label=_(u'Tiempo de CPU'),
         validator=validators.Number(not_empty=False, strip=True)),
 ])
+form.javascript.append(JSSource("MochiKit.DOM.focusOnLoad('form_nombre');"))
 
 class CasoDePruebaController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
 
 class CasoDePruebaController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
index 40b7d75869e07b160e7cc4af6ac89166c9bad101..a8a5aec8215156c7be7fa23a91c360900f625783 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
-<script>MochiKit.DOM.focusOnLoad('form_nombre');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index 715e74c97c914baf4975635d0435307d97f19056..6a05bc7c8942acf89afef1a7e5e73a45b4a5108c 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <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>
-<script>MochiKit.DOM.focusOnLoad('form_nombre');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index b8805b9a28cd56562916273024cb82c54991aaa1..df4a2b78752d4d64bde944a696825dd23472ca47 100644 (file)
@@ -43,6 +43,7 @@ form = TableForm(fields=[
         #help_text=_(u'Si no está activo no puede ingresar al sistema.'),
         validator=validators.Bool(if_empty=1)),
 ])
         #help_text=_(u'Si no está activo no puede ingresar al sistema.'),
         validator=validators.Bool(if_empty=1)),
 ])
+form.javascript.append(JSSource("MochiKit.DOM.focusOnLoad('form_usuario');"))
 
 class DocenteController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
 
 class DocenteController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
index 739cbfee9dd0755cc73608571eff0fa9d04283d1..d5d3dcc7fc302b7136022f2eea7776119b7b17f3 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
-<script>MochiKit.DOM.focusOnLoad('form_usuario');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index 5133fcc5a5869c4898e666caf85cb75c8531f479..c30f9005b88d751f76dd51a58c47e591a33f1eab 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <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>
-<script>MochiKit.DOM.focusOnLoad('form_usuario');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index 86bc1f84d6937acf80dc9c4b8bfb8798d0031b7d..9527e8368079daa44cbf7a55bc60828a6d04ade5 100644 (file)
@@ -54,6 +54,7 @@ form = TableForm(fields=[
     TextField(name='descripcion', label=_(u'Descripción'),
         validator=validators.UnicodeString(not_empty=False, max=255, strip=True)),
 ])
     TextField(name='descripcion', label=_(u'Descripción'),
         validator=validators.UnicodeString(not_empty=False, max=255, strip=True)),
 ])
+form.javascript.append(JSSource("MochiKit.DOM.focusOnLoad('form_nombre');"))
 
 class EnunciadoController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
 
 class EnunciadoController(controllers.Controller, identity.SecureResource):
     """Basic model admin interface"""
index c9c6e4ae06c1605b5d2a2d10d531eda637d243eb..517e6f313576f07e282aaa13fe2fdf6729ffe9b1 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
 <title>edit</title>
-<script>MochiKit.DOM.focusOnLoad('form_nombre');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index af1ff82bd96fea98a71cd34ca5d78c3c27567643..331105e8b30a7fe2e85ca5022aeb635cb359b0c2 100644 (file)
@@ -4,7 +4,6 @@
 <head>
 <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>
-<script>MochiKit.DOM.focusOnLoad('form_nombre');</script>
 </head>
 <body>
 
 </head>
 <body>
 
index 03c847890da28e96a0c5af284d90f8c78d8626be..0cf80a7bac7ffa58fd94dd7797d1a83bea97c0cb 100644 (file)
@@ -70,7 +70,6 @@
         }
 
     </style>
         }
 
     </style>
-    <script>MochiKit.DOM.focusOnLoad('form_login_user');</script>
 </head>
 
 <body>
 </head>
 
 <body>