]> git.llucax.com Git - z.facultad/75.52/sercom.git/commitdiff
chiche visual para el widget
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Sun, 4 Mar 2007 17:47:01 +0000 (17:47 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Sun, 4 Mar 2007 17:47:01 +0000 (17:47 +0000)
sercom/widgets.py

index ba75c51bdefb01ff995eb8b59136fa58897ae32c..f333523041e193a64d0323108999159c87b87c60 100644 (file)
@@ -65,14 +65,16 @@ MultiSelectAjax = '''
         var d = loadJSONDoc(url);
         d.addCallbacks(partial(_on_alumno_get_result, lista, loading), partial(_on_alumno_get_error, loading));
     }
         var d = loadJSONDoc(url);
         d.addCallbacks(partial(_on_alumno_get_result, lista, loading), partial(_on_alumno_get_error, loading));
     }
-
 '''
 
 class AjaxMultiSelect(widgets.MultipleSelectField):
     template = '''
     <div style="width:250px" xmlns:py="http://purl.org/kid/ns#">  
     <div>
 '''
 
 class AjaxMultiSelect(widgets.MultipleSelectField):
     template = '''
     <div style="width:250px" xmlns:py="http://purl.org/kid/ns#">  
     <div>
-    <input type="text" id="${field_id}_nuevo" size="10" />
+    <input type="text" id="${field_id}_nuevo" size="10" value="padron"
+        style="color:#aaa;"
+        onfocus="this.style.color='#000'; if (this.value =='padron') { this.value=''; }"
+        onblur="if (this.value == '') { this.style.color='#aaa'; this.value='padron'; }" />
     <img src="/static/images/loading.gif" align="baseline" style="visibility:hidden;" id="${name}_loading" width="16px" height="16px" />
     <input type="button" id="_agregar" value="Agregar"
         onClick=" _do_add(${on_add}, '${field_id}_nuevo', '${field_id}', '${name}_loading'); " />
     <img src="/static/images/loading.gif" align="baseline" style="visibility:hidden;" id="${name}_loading" width="16px" height="16px" />
     <input type="button" id="_agregar" value="Agregar"
         onClick=" _do_add(${on_add}, '${field_id}_nuevo', '${field_id}', '${name}_loading'); " />