Revision: 1899
http://mrbs.svn.sourceforge.net/mrbs/?rev=1899&view=rev
Author: cimorrison
Date: 2011-08-28 07:48:02 +0000 (Sun, 28 Aug 2011)
Log Message:
-----------
Various fixes to formatting, including fixes for problems in IE7/8 and Webkit
Modified Paths:
--------------
mrbs/branches/datatables/web/Themes/default/header.inc
mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
mrbs/branches/datatables/web/mrbs.css.php
mrbs/branches/datatables/web/report.php
Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc 2011-08-27
17:50:36 UTC (rev 1898)
+++ mrbs/branches/datatables/web/Themes/default/header.inc 2011-08-28
07:48:02 UTC (rev 1899)
@@ -885,21 +885,25 @@
// ADMIN.PHP
if ($page == 'admin')
{
- // Turn the list of users into a dataTable
+ // Turn the list of rooms into a dataTable
?>
var tableOptions = new Object();
<?php
// If we're an ordinary user we only see the Name column. If we're
- // an admin we also see the Delete, Edit and Disabled columns
+ // an admin we also see the Delete, Edit and Disabled columns.
+ // [For some weird reason, setting nFixedColumns as 4 causes a JavaScript
+ // error in IE7 and IE8 when you reload the page]
?>
- var nFixedColumns = <?php echo ($is_admin) ? 4 : 1 ?>;
+ var nFixedColumns = <?php echo ($is_admin) ? 3 : 1 ?>;
<?php
// Fix the left hand columns. This has to be done when
// initialisation is complete as the language files are loaded
// asynchronously
?>
tableOptions.fnInitComplete = function(){
- new FixedColumns(roomsTable, {"iLeftColumns": nFixedColumns});
+ new FixedColumns(roomsTable, {"iLeftColumns": nFixedColumns,
+ "iLeftWidth": 30,
+ "sLeftWidth": "relative"});
};
<?php
// Remove the fixed columns from the column visibility
@@ -1069,7 +1073,9 @@
// asynchronously
?>
tableOptions.fnInitComplete = function(){
- new FixedColumns(usersTable, {"iLeftColumns": 2});
+ new FixedColumns(usersTable, {"iLeftColumns": 2,
+ "iLeftWidth": 30,
+ "sLeftWidth": "relative"});
};
<?php
// Remove the first two columns from the column visibility
@@ -1146,22 +1152,25 @@
$('<input>').attr({
type: 'hidden',
name: 'datatable',
- value: '1',
+ value: '1'
}).appendTo('#report_form');
}
+ <?php
+ // Stop the first column ("id") from being searchable. For some reason
+ // using bVisible here does not work, so we will use CSS instead.
+ ?>
+ tableOptions.aoColumnDefs = [{"bSearchable": false, "bVisible": false,
"aTargets": [ 0 ]}];
+
<?php
// Fix the left hand three columns (one of which is the "id" column which
// is hidden by CSS). This has to be done when initialisation is complete
// as the language files are loaded asynchronously
?>
tableOptions.fnInitComplete = function(){
- new FixedColumns(reportTable, {"iLeftColumns": 3});
+ var oFC = new FixedColumns(reportTable, {"iLeftColumns": 3,
+ "iLeftWidth": 30,
+ "sLeftWidth": "relative"});
<?php
- // Stop the first column ("id") from being searchable. For some
reason
- // using bVisible here does not work, so we will use CSS instead.
- ?>
- reportTable.fnSettings().aoColumns[0].bSearchable = false;
- <?php
// Also add a "Delete entries button", provided that (a) the user is an
// admin and (b) the configuration allows it
if ($is_admin && $auth['show_bulk_delete'])
Modified: mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
===================================================================
--- mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
2011-08-27 17:50:36 UTC (rev 1898)
+++ mrbs/branches/datatables/web/jquery/datatables/css/mrbs-table.css
2011-08-28 07:48:02 UTC (rev 1899)
@@ -119,6 +119,9 @@
width: 100%;
}
+.DTFC_LeftBodyWrapper table {
+ table-layout: fixed;
+}
/* Note Firefox 3.5 and before have a bug with border-collapse
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
Modified: mrbs/branches/datatables/web/mrbs.css.php
===================================================================
--- mrbs/branches/datatables/web/mrbs.css.php 2011-08-27 17:50:36 UTC (rev
1898)
+++ mrbs/branches/datatables/web/mrbs.css.php 2011-08-28 07:48:02 UTC (rev
1899)
@@ -107,7 +107,8 @@
.admin h2 {clear: left}
div#area_form, div#room_form {float: left; padding: 0 0 2em 1em}
div#area_form {width: auto}
-div#room_form {width: 95%}
+div#room_form {width: 98%}
+div#room_info {width: 100%; float: left}
div#custom_html {float: left; padding: 0 0 3em 1em}
#area_form form {float: left; margin-right: 1em}
#area_form label#area_label {display: block; float: left; font-weight: bold;
margin-right: <?php echo $admin_form_gap ?>em}
@@ -653,7 +654,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 {position: relative; float: left; min-width: 50%; max-width:
98%; padding: 2em 0 2em 1em}
+div#user_list {width: 98%; padding: 2em 0 2em 1em}
form#add_new_user {margin-left: 1em}
@@ -754,8 +755,11 @@
.report .form_general fieldset fieldset {padding-top: 0.5em; padding-bottom:
0.5em}
.report .form_general fieldset fieldset legend {font-size: small; font-style:
italic; font-weight: normal}
button#delete_button {float: left; clear: left; margin: 1em 0 3em 0}
-<?php // Stop the first column ("id") in the table from being displayed ?>
-.report table.display th:first-child, .report table.display td:first-child
{display: none}
+<?php
+// Stop the first column ("id") in the table from being displayed
+// !important needed for Webkit to fix the first row of the body
+?>
+.report .DTFC_LeftWrapper table.display th:first-child, .report
.DTFC_LeftWrapper table.display td:first-child {display: none !important}
/* ------------ SEARCH.PHP ----------------------*/
Modified: mrbs/branches/datatables/web/report.php
===================================================================
--- mrbs/branches/datatables/web/report.php 2011-08-27 17:50:36 UTC (rev
1898)
+++ mrbs/branches/datatables/web/report.php 2011-08-28 07:48:02 UTC (rev
1899)
@@ -98,6 +98,7 @@
}
$values[] = get_vocab("lastupdate");
+
if ($output_as_csv)
{
// Remove any HTML entities from the values, and escape the strings
@@ -125,6 +126,12 @@
}
elseif ($output_as_html)
{
+ $html .= "<colgroup>";
+ foreach ($values as $value)
+ {
+ $html .= "<col>";
+ }
+ $html .= "</colgroup>\n";
$html = "<thead>\n";
$html .= "<tr>\n";
foreach ($values as $value)
@@ -187,6 +194,7 @@
return;
}
+ $rows_output++;
$values = array();
// Id
@@ -320,6 +328,7 @@
// Last updated:
$values[] = escape(time_date_string($row['last_updated']));
+
if ($ajax)
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits