Merge "Hoist validation errors from hidden fields to the top of the form"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.placeholder.js
index bdd2cef..9c18a91 100644 (file)
@@ -37,7 +37,7 @@
                                rinlinejQuery = /^jQuery\d+$/;
                $.each( elem.attributes, function ( i, attr ) {
                        if ( attr.specified && !rinlinejQuery.test( attr.name ) ) {
-                               newAttrs[attr.name] = attr.value;
+                               newAttrs[ attr.name ] = attr.value;
                        }
                } );
                return newAttrs;
@@ -51,7 +51,7 @@
                                $input = $input.hide().next().show().attr( 'id', $input.removeAttr( 'id' ).data( 'placeholder-id' ) );
                                // If `clearPlaceholder` was called from `$.valHooks.input.set`
                                if ( event === true ) {
-                                       $input[0].value = value;
+                                       $input[ 0 ].value = value;
                                        return value;
                                }
                                $input.focus();
@@ -74,9 +74,9 @@
                        if ( input.type === 'password' ) {
                                if ( !$input.data( 'placeholder-textinput' ) ) {
                                        try {
-                                               $replacement = $input.clone().attr( { 'type': 'text' } );
+                                               $replacement = $input.clone().attr( { type: 'text' } );
                                        } catch ( e ) {
-                                               $replacement = $( '<input>' ).attr( $.extend( args( this ), { 'type': 'text' } ) );
+                                               $replacement = $( '<input>' ).attr( $.extend( args( this ), { type: 'text' } ) );
                                        }
                                        $replacement
                                                        .removeAttr( 'name' )
@@ -96,7 +96,7 @@
                                // Note: `$input[0] != input` now!
                        }
                        $input.addClass( 'placeholder' );
-                       $input[0].value = $input.attr( 'placeholder' );
+                       $input[ 0 ].value = $input.attr( 'placeholder' );
                } else {
                        $input.removeClass( 'placeholder' );
                }
                        if ( $input.attr( 'placeholder' ) !== text ) {
                                $input.prop( 'placeholder', text );
                                if ( $input.hasClass( 'placeholder' ) ) {
-                                       $input[0].value = text;
+                                       $input[ 0 ].value = text;
                                }
                        }
                }
                placeholder.textarea = isTextareaSupported;
 
                hooks = {
-                       'get': function ( element ) {
+                       get: function ( element ) {
                                var $element = $( element ),
                                        $passwordInput = $element.data( 'placeholder-password' );
                                if ( $passwordInput ) {
-                                       return $passwordInput[0].value;
+                                       return $passwordInput[ 0 ].value;
                                }
 
                                return $element.data( 'placeholder-enabled' ) && $element.hasClass( 'placeholder' ) ? '' : element.value;
                        },
-                       'set': function ( element, value ) {
+                       set: function ( element, value ) {
                                var $element = $( element ),
                                        $passwordInput = $element.data( 'placeholder-password' );
                                if ( $passwordInput ) {
-                                       $passwordInput[0].value = value;
+                                       $passwordInput[ 0 ].value = value;
                                        return value;
                                }