Remove the custom propmpt inside textareas and input fields.
authorDaniel Diniz <ajaksu@gmail.com>
Mon, 06 Jul 2009 12:06:28 +0200
changeset 2556 d1175010235e
parent 2555 b7f14c803619
child 2557 cba50e22ff6b
Remove the custom propmpt inside textareas and input fields. This will hopefully be replaced with custom tooltips. Two reasons for this are that the tooltips will still be readable once your start typing and this way we avoid a bug that caused a textarea to go into prompt mode on some form validation errors. Reviewed by: Lennard de Rijk
app/soc/content/js/survey-take-090705.js
--- a/app/soc/content/js/survey-take-090705.js	Mon Jul 06 00:54:48 2009 +0200
+++ b/app/soc/content/js/survey-take-090705.js	Mon Jul 06 12:06:28 2009 +0200
@@ -19,9 +19,9 @@
 * @author <a href="mailto:jamesalexanderlevy@gmail.com">James Levy</a>
 */
 
-(function ($) { 
+(function ($) {
   $(function () {
-  
+
     /*
     * == Setup Survey on Page Load ==
     *
@@ -42,16 +42,9 @@
       * == Set Custom Field Rules ==
       *
       */
-      widget.find('input').each(
-        function () {
-          $(this).preserveDefaultText($(this).val());
-        }
-      );
-
       widget.find('textarea').each(
         function () {
-          $(this).preserveDefaultText($(this).val()).attr('overflow', 'auto')
-          .growfield();
+          $(this).attr('overflow', 'auto').growfield();
         }
       );
     }
@@ -148,11 +141,11 @@
         );
       }
     );
-  
+
    /*
    * == Customize Comment Appearance ==
    */
-   
+
    var comments = widget.find('td > .comment');
    comments.each(function(){
      $(this).parents('tr:first')
@@ -160,6 +153,6 @@
            .prev().css({'margin-top': '-10px'})
            .find('label').css({'font-size': '11px'});
    });
-    
+
   });
 }(jQuery));