Made the form validation icons (check/X/?) more visually appealing. IE-friendliness is still on the TODO list.
authorDan
Thu, 07 Feb 2008 15:45:44 -0500
changeset 404 fb4f9e6f378f
parent 403 2c9745b5c09d
child 405 adb7f8de8ce1
Made the form validation icons (check/X/?) more visually appealing. IE-friendliness is still on the TODO list.
images/check.png
images/checkbad.png
images/checkunk.png
includes/clientside/static/editor.js
install/includes/libenanoinstall.php
install/includes/stages/database_mysql.php
install/includes/stages/database_postgresql.php
install/includes/stages/login.php
install/includes/stages/sysreqs.php
install/install.php
plugins/SpecialUserFuncs.php
Binary file images/check.png has changed
Binary file images/checkbad.png has changed
Binary file images/checkunk.png has changed
--- a/includes/clientside/static/editor.js	Thu Feb 07 07:58:07 2008 -0500
+++ b/includes/clientside/static/editor.js	Thu Feb 07 15:45:44 2008 -0500
@@ -112,6 +112,8 @@
   var heading = document.createElement('h3');
   heading.style.cssFloat = 'left';
   heading.style.styleFloat = 'left';
+  heading.style.marginTop = '0px';
+  heading.style.marginBottom = '0px';
   heading.appendChild(document.createTextNode($lang.get('editor_msg_editor_heading')));
   
   // Plaintext/wikitext toggler
@@ -122,9 +124,7 @@
   {
     var toggler = document.createElement('p');
     toggler.style.marginLeft = '0';
-    toggler.style.cssFloat = 'right';
-    toggler.style.styleFloat = 'right';
-    toggler.style.paddingTop = '4pt';
+    toggler.style.textAlign = 'right';
     
     var span_wiki = document.createElement('span');
     var span_mce  = document.createElement('span');
@@ -167,7 +167,6 @@
   // Form (to allow submits from MCE to trigger a real save)
   var form = document.createElement('form');
   form.action = 'javascript:void(0);';
-  form.style.clear = 'both';
   form.onsubmit = function()
   {
     ajaxEditorSave();
@@ -180,12 +179,12 @@
   preview_anchor.id = 'ajax_preview';
   var preview_container = document.createElement('div');
   preview_container.id = 'enano_editor_preview';
-  preview_container.style.clear = 'both';
+  preview_container.style.clear = 'left';
   
   // Textarea containing the content
   var ta_wrapper = document.createElement('div');
   ta_wrapper.style.margin = '10px 0';
-  ta_wrapper.style.clear = 'both';
+  // ta_wrapper.style.clear = 'both';
   var textarea = document.createElement('textarea');
   textarea.value = content;
   textarea._edTimestamp = timestamp;
--- a/install/includes/libenanoinstall.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/includes/libenanoinstall.php	Thu Feb 07 15:45:44 2008 -0500
@@ -77,7 +77,7 @@
 {
   global $neutral_color;
   $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
-  echo '<tr><td style="width: 500px; background-color: #' . "{$neutral_color}{$neutral_color}FF{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Done" src="../images/good.gif" /></td></tr>' . "\n";
+  echo '<tr><td style="width: 500px; background-color: #' . "{$neutral_color}{$neutral_color}FF{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Done" src="../images/check.png" /></td></tr>' . "\n";
   flush();
 }
 
@@ -87,7 +87,7 @@
   global $lang;
   
   $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
-  echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="../images/bad.gif" /></td></tr>' . "\n";
+  echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="../images/checkbad.png" /></td></tr>' . "\n";
   flush();
   close_install_table();
   $post_data = '';
--- a/install/includes/stages/database_mysql.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/includes/stages/database_mysql.php	Thu Feb 07 15:45:44 2008 -0500
@@ -397,7 +397,7 @@
       <input onkeyup="verify(this);" tabindex="1" name="db_host" size="30" type="text" />
     </td>
     <td>
-      <img id="s_db_host" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_host" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -410,7 +410,7 @@
       <input onkeyup="verify(this);" tabindex="2" name="db_name" size="30" type="text" />
     </td>
     <td>
-      <img id="s_db_name" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_name" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -425,7 +425,7 @@
       <input name="db_pass" tabindex="4" size="30" type="password" />
     </td>
     <td>
-      <img id="s_db_auth" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_auth" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -442,7 +442,7 @@
       <input onkeyup="verify(this);" tabindex="5" name="table_prefix" size="30" type="text" />
     </td>
     <td>
-      <img id="s_table_prefix" alt="Good/bad icon" src="../images/good.gif" />
+      <img id="s_table_prefix" alt="Good/bad icon" src="../images/check.png" />
     </td>
   </tr>
   <tr>
@@ -457,7 +457,7 @@
       <input onkeyup="verify(this);" tabindex="7" name="db_root_pass" size="30" type="password" />
     </td>
     <td>
-      <img id="s_db_root" alt="Good/bad icon" src="../images/good.gif" />
+      <img id="s_db_root" alt="Good/bad icon" src="../images/check.png" />
     </td>
   </tr>
   <tr>
@@ -468,7 +468,7 @@
       <?php echo $lang->get('dbmysql_field_mysqlversion_blurb_willbechecked'); ?>
     </td>
     <td>
-      <img id="s_mysql_version" alt="Good/bad icon" src="../images/unknown.gif" />
+      <img id="s_mysql_version" alt="Good/bad icon" src="../images/checkunk.png" />
     </td>
   </tr>
   <tr>
--- a/install/includes/stages/database_postgresql.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/includes/stages/database_postgresql.php	Thu Feb 07 15:45:44 2008 -0500
@@ -161,9 +161,9 @@
 
 <script type="text/javascript">
 
-  var img_bad = '../images/bad.gif';
-  var img_good = '../images/good.gif';
-  var img_neu = '../images/unknown.gif';
+  var img_bad = '../images/checkbad.png';
+  var img_good = '../images/check.png';
+  var img_neu = '../images/checkunk.png';
   
   var tested = false;
 
@@ -339,7 +339,7 @@
       <input onkeyup="verify(this);" tabindex="1" name="db_host" size="30" type="text" />
     </td>
     <td>
-      <img id="s_db_host" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_host" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -352,7 +352,7 @@
       <input onkeyup="verify(this);" tabindex="2" name="db_name" size="30" type="text" />
     </td>
     <td>
-      <img id="s_db_name" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_name" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -367,7 +367,7 @@
       <input name="db_pass" size="30" tabindex="4" type="password" />
     </td>
     <td>
-      <img id="s_db_auth" alt="Good/bad icon" src="../images/bad.gif" />
+      <img id="s_db_auth" alt="Good/bad icon" src="../images/checkbad.png" />
     </td>
   </tr>
   <tr>
@@ -384,7 +384,7 @@
       <input onkeyup="verify(this);" tabindex="5" name="table_prefix" size="30" type="text" />
     </td>
     <td>
-      <img id="s_table_prefix" alt="Good/bad icon" src="../images/good.gif" />
+      <img id="s_table_prefix" alt="Good/bad icon" src="../images/check.png" />
     </td>
   </tr>
   <tr>
@@ -399,7 +399,7 @@
       <input onkeyup="verify(this);" tabindex="7" name="db_root_pass" size="30" type="password" />
     </td>
     <td>
-      <img id="s_db_root" alt="Good/bad icon" src="../images/good.gif" />
+      <img id="s_db_root" alt="Good/bad icon" src="../images/check.png" />
     </td>
   </tr>
   <tr>
@@ -410,7 +410,7 @@
       <?php echo $lang->get('dbpgsql_field_pgsqlversion_blurb_willbechecked'); ?>
     </td>
     <td>
-      <img id="s_pgsql_version" alt="Good/bad icon" src="../images/unknown.gif" />
+      <img id="s_pgsql_version" alt="Good/bad icon" src="../images/checkunk.png" />
     </td>
   </tr>
   <tr>
--- a/install/includes/stages/login.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/includes/stages/login.php	Thu Feb 07 15:45:44 2008 -0500
@@ -187,7 +187,7 @@
         <input type="text" tabindex="1" name="username" size="15" onkeyup="verify(this);" />
       </td>
       <td>
-        <img id="s_username" alt="Good/bad icon" src="../images/bad.gif" />
+        <img id="s_username" alt="Good/bad icon" src="../images/checkbad.png" />
       </td>
     </tr>
     
@@ -204,7 +204,7 @@
         <input type="password" tabindex="3" name="password_confirm" size="15" onkeyup="verify(this);" /> <small><?php echo $lang->get('login_field_password_confirm'); ?></small>
       </td>
       <td>
-        <img id="s_password" alt="Good/bad icon" src="../images/bad.gif" />
+        <img id="s_password" alt="Good/bad icon" src="../images/checkbad.png" />
       </td>
     </tr>
     
@@ -216,7 +216,7 @@
         <input type="text" tabindex="4" name="email" size="30" onkeyup="verify(this);" />
       </td>
       <td>
-        <img id="s_email" alt="Good/bad icon" src="../images/bad.gif" />
+        <img id="s_email" alt="Good/bad icon" src="../images/checkbad.png" />
       </td>
     </tr>
   
--- a/install/includes/stages/sysreqs.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/includes/stages/sysreqs.php	Thu Feb 07 15:45:44 2008 -0500
@@ -43,14 +43,14 @@
   if($val)
   {
     if($cv) $color='CCFFCC'; else $color='AAFFAA';
-    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='../images/good.gif' /></td></tr>";
+    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='../images/check.png' /></td></tr>";
   } elseif(!$val && $warn) {
     if($cv) $color='FFFFCC'; else $color='FFFFAA';
-    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='../images/unknown.gif' /></td></tr>";
+    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='../images/checkunk.png' /></td></tr>";
     $warned = true;
   } else {
     if($cv) $color='FFCCCC'; else $color='FFAAAA';
-    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='../images/bad.gif' /></td></tr>";
+    echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='../images/checkbad.png' /></td></tr>";
     $failed = true;
   }
 }
--- a/install/install.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/install/install.php	Thu Feb 07 15:45:44 2008 -0500
@@ -18,7 +18,7 @@
 
 define('IN_ENANO', 1);
 // DEFINE THIS BEFORE RELEASE!
-define('ENANO_DANGEROUS', 1);
+//define('ENANO_DANGEROUS', 1);
 
 require_once('includes/common.php');
 @ini_set('display_errors', 'on');
--- a/plugins/SpecialUserFuncs.php	Thu Feb 07 07:58:07 2008 -0500
+++ b/plugins/SpecialUserFuncs.php	Thu Feb 07 15:45:44 2008 -0500
@@ -611,8 +611,8 @@
               <td class="row1" style="width: 50%;">
                 <input tabindex="1" type="text" name="username" size="30" value="<?php echo $username; ?>" onkeyup="namegood = false; validateForm(this);" onblur="checkUsername();" />
               </td>
-              <td class="row1" style="max-width: 24px;">
-                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/bad.gif" id="s_username" />
+              <td class="row1" style="width: 1px;">
+                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/checkbad.png" id="s_username" />
               </td>
             </tr>
             
@@ -629,7 +629,7 @@
                 <input tabindex="2" type="password" name="password" size="15" onkeyup="<?php if ( getConfig('pw_strength_enable') == '1' ): ?>password_score_field(this); <?php endif; ?>validateForm(this);" /><?php if ( getConfig('pw_strength_enable') == '1' ): ?><span class="password-checker" style="font-weight: bold; color: #aaaaaa;"> Loading...</span><?php endif; ?>
               </td>
               <td rowspan="<?php echo ( getConfig('pw_strength_enable') == '1' ) ? '3' : '2'; ?>" class="row3" style="max-width: 24px;">
-                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/bad.gif" id="s_password" />
+                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/checkbad.png" id="s_password" />
               </td>
             </tr>
             
@@ -674,7 +674,7 @@
                 <input tabindex="4" type="text" name="email" size="30" value="<?php echo $email; ?>" onkeyup="validateForm(this);" />
               </td>
               <td class="row1" style="max-width: 24px;">
-                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/bad.gif" id="s_email" />
+                <img alt="Good/bad icon" src="<?php echo scriptPath; ?>/images/checkbad.png" id="s_email" />
               </td>
             </tr>
             
@@ -862,11 +862,11 @@
               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
               if ( frm.username.value.match(regex) )
               {
-                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
+                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/checkunk.png';
                 document.getElementById('e_username').innerHTML = '&nbsp;';
               } else {
                 failed = true;
-                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';
+                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/checkbad.png';
                 document.getElementById('e_username').innerHTML = '<br /><small>' + $lang.get('user_reg_err_username_invalid') + '</small>';
               }
             }
@@ -881,7 +881,7 @@
             {
               if(frm.password.value.match(/^(.+){6,}$/ig) && frm.password_confirm.value.match(/^(.+){6,}$/ig) && frm.password.value == frm.password_confirm.value )
               {
-                document.getElementById('s_password').src='<?php echo scriptPath; ?>/images/good.gif';
+                document.getElementById('s_password').src='<?php echo scriptPath; ?>/images/check.png';
                 document.getElementById('e_password').innerHTML = '<br /><small>' + $lang.get('user_reg_err_password_good') + '</small>';
               } else {
                 failed = true;
@@ -897,7 +897,7 @@
                 {
                   document.getElementById('e_password').innerHTML = '';
                 }
-                document.getElementById('s_password').src='<?php echo scriptPath; ?>/images/bad.gif';
+                document.getElementById('s_password').src='<?php echo scriptPath; ?>/images/checkbad.png';
               }
             }
             
@@ -906,10 +906,10 @@
             // workaround for idiot jEdit bug
             if ( validateEmail(frm.email.value) && ( field.name == 'email' || field.name == '_nil' ) )
             {
-              document.getElementById('s_email').src='<?php echo scriptPath; ?>/images/good.gif';
+              document.getElementById('s_email').src='<?php echo scriptPath; ?>/images/check.png';
             } else {
               failed = true;
-              document.getElementById('s_email').src='<?php echo scriptPath; ?>/images/bad.gif';
+              document.getElementById('s_email').src='<?php echo scriptPath; ?>/images/checkbad.png';
             }
             if(failed)
             {
@@ -927,10 +927,10 @@
               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
               if ( frm.username.value.match(regex) )
               {
-                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
+                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/checkunk.png';
                 document.getElementById('e_username').innerHTML = '&nbsp;';
               } else {
-                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';
+                document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/checkbad.png';
                 document.getElementById('e_username').innerHTML = '<br /><small>' + $lang.get('user_reg_err_username_invalid') + '</small>';
                 return false;
               }
@@ -941,11 +941,11 @@
               if(ajax.readyState == 4)
                 if(ajax.responseText == 'good')
                 {
-                  document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/good.gif';
+                  document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/check.png';
                   document.getElementById('e_username').innerHTML = '<br /><small><b>' + $lang.get('user_reg_msg_username_available') + '</b></small>';
                   namegood = true;
                 } else if(ajax.responseText == 'bad') {
-                  document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';
+                  document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/checkbad.png';
                   document.getElementById('e_username').innerHTML = '<br /><small><b>' + $lang.get('user_reg_msg_username_unavailable') + '</b></small>';
                   namegood = false;
                 } else {