* (bug 15701) Protection form was too wide for some browsers as 2 columns, switching...
[lhc/web/wiklou.git] / skins / common / protect.js
index ab1ea30..d9650c8 100644 (file)
@@ -19,14 +19,13 @@ var ProtectionForm = {
                var box = document.getElementById( opts.tableId );
                if( !box )
                        return false;
-
-               var tbody = box.getElementsByTagName( 'tbody' )[0];
+               
+               var boxbody = box.getElementsByTagName('tbody')[0]
                var row = document.createElement( 'tr' );
-               tbody.appendChild( row );
+               boxbody.insertBefore( row, boxbody.firstChild );
 
                this.existingMatch = opts.existingMatch;
 
-               row.appendChild( document.createElement( 'td' ) );
                var cell = document.createElement( 'td' );
                row.appendChild( cell );
                // If there is only one protection type, there is nothing to chain