Revision: 1874
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1874&view=rev
Author:   cimorrison
Date:     2011-08-19 13:33:03 +0000 (Fri, 19 Aug 2011)

Log Message:
-----------
Tidied up CSS

Modified Paths:
--------------
    mrbs/branches/datatables/web/Themes/default/header.inc
    mrbs/branches/datatables/web/edit_users.php
    mrbs/branches/datatables/web/jquery/datatables/css/ColVis.css
    mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
    mrbs/branches/datatables/web/mrbs-ielte7.css.php
    mrbs/branches/datatables/web/mrbs.css.php

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-08-18 
17:57:49 UTC (rev 1873)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-08-19 
13:33:03 UTC (rev 1874)
@@ -163,6 +163,7 @@
         }
         ?>
         dataTablesDefaults.sDom = 'RClfrtip';
+        dataTablesDefaults.sScrollX = "100%";
         dataTablesDefaults.oColVis = {sSize: "css",
                                       buttonText: '<?php echo 
get_vocab("show_hide_columns") ?>',
                                       bRestore: true,
@@ -813,7 +814,7 @@
 } // pending
 ?>
 
-$(window).load(function() {
+$(document).ready(function() {
 
   <?php // ALL PAGES ?>
   // if there's a logon box, set the username input field in focus
@@ -969,7 +970,8 @@
     {
       dataTablesOptions.oColReorder.aiOrder.push(i);
     }
-    $('#users_table').dataTable(dataTablesOptions);
+    var oTable = $('#users_table').dataTable(dataTablesOptions);
+
     <?php
   }
   

Modified: mrbs/branches/datatables/web/edit_users.php
===================================================================
--- mrbs/branches/datatables/web/edit_users.php 2011-08-18 17:57:49 UTC (rev 
1873)
+++ mrbs/branches/datatables/web/edit_users.php 2011-08-19 13:33:03 UTC (rev 
1874)
@@ -123,146 +123,6 @@
 }
 
 
-// Produce the HTML for a freeze_panes sub-table
-//
-//   $info       an array containing the data
-//   $columns    the columns in that data to display
-//   $class      the class name tio assign to the table
-//   $action     whether an action button is required
-function freeze_panes_table_html($info, $columns, $class, $action=FALSE)
-{
-  global $tbl_users, $PHP_SELF;
-  global $user, $level, $min_user_editing_level, $max_content_length;
-  global $fields, $auth;
-  global $select_options;
-  
-  $html = '';
-  $html .= "<div class=\"$class\">\n";
-  $html .= "<table class=\"admin_table\">\n";
-  $html .= "<thead>\n";
-  $html .= "<tr>";
-  if ($action)
-  {
-    // First column which is an action button
-    $html .= "<th><div>" . get_vocab("action") . "</div></th>";
-  }
-  
-  // Column headers
-  foreach ($fields as $field)
-  {
-    $fieldname = $field['name'];
-    if (in_array($fieldname, $columns))
-    {
-      $html .= "<th><div>" . get_loc_field_name($tbl_users, $fieldname) . 
"</div></th>";
-    }
-  }
-
-  $html .= "</tr>\n";
-  $html .= "</thead>\n";
-  
-  $html .= "<tbody>\n";
-  $row_class = "odd_row";
-  foreach ($info as $line)
-  {
-    // Check whether ordinary users are allowed to see other users' details.  
If not,
-    // then skip past this row if it's not the current user or the user is not 
an admin
-    if ($auth['only_admin_can_see_other_users'] &&
-        ($level < $min_user_editing_level) &&
-        (strcasecmp($line['name'], $user) != 0))
-    {
-      continue;
-    }
-    
-    $row_class = ($row_class == "even_row") ? "odd_row" : "even_row";
-    $html .= "<tr class=\"$row_class\">\n";
-    if ($action)
-    {
-      // First column (the action button)
-      $html .= "<td class=\"action\"><div>\n";
-      // You can only edit a user if you have sufficient admin rights, or else 
if that user is yourself
-      if (($level >= $min_user_editing_level) || (strcasecmp($line['name'], 
$user) == 0))
-      {
-        $html .= "<form method=\"post\" action=\"" . 
htmlspecialchars(basename($PHP_SELF)) . "\">\n";
-        $html .= "<div>\n";
-        $html .= "<input type=\"hidden\" name=\"Action\" value=\"Edit\">\n";
-        $html .= "<input type=\"hidden\" name=\"Id\" value=\"" . $line['id'] . 
"\">\n";
-        $html .= "<input type=\"image\" class=\"button\" 
src=\"images/edit.png\"
-                   title=\"" . get_vocab("edit") . "\" alt=\"" . 
get_vocab("edit") . "\">\n";
-        $html .= "</div>\n";
-        $html .= "</form>\n";
-      }
-      else
-      {
-        $html .= "&nbsp;\n";
-      }
-      $html .= "</div></td>\n";
-    }
-    
-    // Column contents
-    foreach ($fields as $field)
-    {
-      $key = $field['name'];
-      if (in_array($key, $columns))
-      {
-        $col_value = $line[$key];
-        switch($key)
-        {
-          // special treatment for some fields
-          case 'level':
-            // the level field contains a code and we want to display a string
-            $html .= "<td><div>" . get_vocab("level_$col_value") . 
"</div></td>\n";
-            break;
-          case 'email':
-            // we don't want to truncate the email address
-            $html .= "<td><div>" . htmlspecialchars($col_value) . 
"</div></td>\n";
-            break;
-          default:
-            // Where there's an associative array of options, display
-            // the value rather than the key
-            if (is_assoc($select_options["users.$key"]))
-            {
-              $col_value = $select_options["users.$key"][$line[$key]];
-              $html .= "<td><div>" . htmlspecialchars($col_value) . 
"</div></td>\n";
-            }
-            elseif (($field['nature'] == 'boolean') || 
-                (($field['nature'] == 'integer') && isset($field['length']) && 
($field['length'] <= 2)) )
-            {
-              // booleans: represent by a checkmark
-              $html .= "<td class=\"int\"><div>";
-              $html .= (!empty($col_value)) ? "<img src=\"images/check.png\" 
alt=\"check mark\" width=\"16\" height=\"16\">" : "&nbsp;";
-              $html .= "</div></td>\n";
-            }
-            elseif (($field['nature'] == 'integer') && isset($field['length']) 
&& ($field['length'] > 2))
-            {
-              // integer values
-              $html .= "<td class=\"int\"><div>" . $col_value . 
"</div></td>\n";
-            }
-            else
-            {
-               // strings
-              $html .= "<td title=\"" . htmlspecialchars($col_value) . 
"\"><div>";
-              // Truncate before conversion, otherwise you could chop off in 
the middle of an entity
-              $html .= htmlspecialchars(substr($col_value, 0, 
$max_content_length));
-              $html .= (strlen($col_value) > $max_content_length) ? " ..." : 
"";
-              $html .= "</div></td>\n";
-            }
-            break;
-        }  // end switch
-      }
-    }  // end foreach
-    
-    $html .= "</tr>\n";
-    
-  }  // end while
-  
-  $html .= "</tbody>\n";
-  $html .= "</table>\n";
-  $html .= "</div>\n";
-  
-  return $html;
-}
-
-
 // Get the information about the fields in the users table
 $fields = sql_field_info($tbl_users);
 
@@ -1002,37 +862,6 @@
   echo "</table>\n";
   echo "</div>\n";
   
-  /*
-  // Build an array with the user info
-  $info = array();
-  for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++)
-  {
-    $info[] = $row;
-  }
-  // Display it in a table [Actually two tables side by side so that we can
-  // achieve a "Freeze Panes" effect: there doesn't seem to be a good way of
-  // getting a colgroup to scroll, so we have to distort the mark-up a little]
-  echo "<div id=\"user_list\">\n";
-  echo "<div class=\"freeze_panes\">\n";
-  // (a) the "header" columns containing the user names
-  // For the header column we just want to use the level and name fields
-  $columns = array('level', 'name');
-  echo freeze_panes_table_html($info, $columns, 'header_columns', TRUE);
-  
-  // (b) the "body" columns containing the user info
-  // For the body column we want all the other columns, except the id and 
password
-  $columns[] = 'id';
-  $columns[] = 'password';
-  $all_columns = array();
-  foreach ($fields as $field)
-  {
-    $all_columns[] = $field['name'];
-  }
-  $columns = array_diff($all_columns, $columns);
-  echo freeze_panes_table_html($info, $columns, 'body_columns', FALSE);
-  echo "</div>\n";   // freeze_panes
-  echo "</div>\n";
-  */
 }   // ($initial_user_creation != 1)
 
 require_once "trailer.inc";

Modified: mrbs/branches/datatables/web/jquery/datatables/css/ColVis.css
===================================================================
--- mrbs/branches/datatables/web/jquery/datatables/css/ColVis.css       
2011-08-18 17:57:49 UTC (rev 1873)
+++ mrbs/branches/datatables/web/jquery/datatables/css/ColVis.css       
2011-08-19 13:33:03 UTC (rev 1874)
@@ -16,6 +16,7 @@
   height: 30px;
   background-color: #fff;
   border: 1px solid #d0d0d0;
+  white-space: nowrap;
   cursor: pointer;
   *cursor: hand;
 }

Modified: mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
===================================================================
--- mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css   
2011-08-18 17:57:49 UTC (rev 1873)
+++ mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css   
2011-08-19 13:33:03 UTC (rev 1874)
@@ -35,7 +35,6 @@
  table.dataTables {
    float: left;
    clear: both;
-   margin-top: 3em;
  }
 
 .dataTables th div, .dataTables td div {
@@ -52,7 +51,10 @@
   position: relative;
   float: left;
   clear: both;
-  padding: 2.5em 0 2em 0;
+  padding: 5.5em 0 2em 0;
+  max-width: 98%;
+  min-height: 302px;
+  _height: 302px;
   zoom: 1; /* Feeling sorry for IE */
 }
 

Modified: mrbs/branches/datatables/web/mrbs-ielte7.css.php
===================================================================
--- mrbs/branches/datatables/web/mrbs-ielte7.css.php    2011-08-18 17:57:49 UTC 
(rev 1873)
+++ mrbs/branches/datatables/web/mrbs-ielte7.css.php    2011-08-19 13:33:03 UTC 
(rev 1874)
@@ -21,15 +21,6 @@
 #areaChangeForm button {margin-top: -0.1em}
 
 
-/* ------------ EDIT_USERS.PHP ------------------*/
-
-<?php
-// IE7 and below do not understand max-width, treating it as width.  So just 
let
-// the user table be as wide as necessary and the users will have to scroll 
across
-?>
-div#user_list {max-width: auto; position relative}
-
-
 /* ------------ FORM_GENERAL ------------------------*/
 
 .form_general#edit_room legend {font-size: 0}   /* no legend in edit_room, so 
stop IE allocating space */

Modified: mrbs/branches/datatables/web/mrbs.css.php
===================================================================
--- mrbs/branches/datatables/web/mrbs.css.php   2011-08-18 17:57:49 UTC (rev 
1873)
+++ mrbs/branches/datatables/web/mrbs.css.php   2011-08-19 13:33:03 UTC (rev 
1874)
@@ -662,7 +662,7 @@
 #form_delete_users input.submit {left: 2.0em}                                  
/* and put the Delete on the left */
 #form_edit_users input.checkbox {width: auto; margin-left: <?php echo 
$edit_users_gap ?>em}
 form.edit_users_error {width: 10em; margin-top: 2.0em}
-div#user_list {float: left; max-width: 100%; padding: 2em 0 2em 1em}
+div#user_list {position: relative; float: left; max-width: 98%; padding: 2em 0 
2em 1em}
 form#add_new_user {margin-left: 1em}
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to