Revision: 2038
http://mrbs.svn.sourceforge.net/mrbs/?rev=2038&view=rev
Author: cimorrison
Date: 2011-09-30 14:21:02 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
Added a tooltip title to the room name in the rooms table. Also removed the
Edit column as it's redundant (you can edit a room by clicking on the room
name).
Modified Paths:
--------------
mrbs/branches/datatables/web/Themes/default/header.inc
mrbs/branches/datatables/web/admin.php
Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc 2011-09-30
14:02:58 UTC (rev 2037)
+++ mrbs/branches/datatables/web/Themes/default/header.inc 2011-09-30
14:21:02 UTC (rev 2038)
@@ -1102,40 +1102,8 @@
{
// Turn the list of rooms into a dataTable
?>
- var tableOptions = new Object();
+ var roomsTable = makeDataTable('#rooms_table', {}, 0.33);
<?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.
- // [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) ? 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,
- "iLeftWidth": 30,
- "sLeftWidth": "relative"});
- $('.js div.datatable_container').css('visibility', 'visible');
- };
- <?php
- // Remove the fixed columns from the column visibility
- ?>
- tableOptions.oColVis = {aiExclude: []};
- for (var i=0; i<nFixedColumns; i++)
- {
- tableOptions.oColVis.aiExclude.push(i);
- }
- <?php
- // and stop those columns being reordered
- ?>
- tableOptions.oColReorder = {iFixedColumns: nFixedColumns};
-
- var roomsTable = makeDataTable('#rooms_table', tableOptions);
- <?php
}
// EDIT_AREA_ROOM.PHP
Modified: mrbs/branches/datatables/web/admin.php
===================================================================
--- mrbs/branches/datatables/web/admin.php 2011-09-30 14:02:58 UTC (rev
2037)
+++ mrbs/branches/datatables/web/admin.php 2011-09-30 14:21:02 UTC (rev
2038)
@@ -256,11 +256,7 @@
// The header
echo "<thead>\n";
echo "<tr>\n";
- if ($is_admin)
- {
- echo "<th><div> </div></th>\n";
- echo "<th><div> </div></th>\n";
- }
+
echo "<th><div>" . get_vocab("name") . "</div></th>\n";
if ($is_admin)
{
@@ -292,6 +288,12 @@
echo "<th><div>$text</div></th>\n";
}
}
+
+ if ($is_admin)
+ {
+ echo "<th><div> </div></th>\n";
+ }
+
echo "</tr>\n";
echo "</thead>\n";
@@ -305,29 +307,11 @@
{
$row_class = ($row_class == "even_row") ? "odd_row" : "even_row";
echo "<tr class=\"$row_class\">\n";
- // Give admins delete and edit links
+
+ $html_name = htmlspecialchars($r['room_name']);
+ echo "<td><div><a title=\"$html_name\"
href=\"edit_area_room.php?change_room=1&phase=1&room=" . $r['id'] .
"\">$html_name</a></div></td>\n";
if ($is_admin)
{
- // Delete link
- echo "<td><div>\n";
- echo "<a href=\"del.php?type=room&area=$area&room=" .
$r['id'] . "\">\n";
- echo "<img src=\"images/delete.png\" width=\"16\" height=\"16\"
- alt=\"" . get_vocab("delete") . "\"
- title=\"" . get_vocab("delete") . "\">\n";
- echo "</a>\n";
- echo "</div></td>\n";
- // Delete link
- echo "<td><div>\n";
- echo "<a
href=\"edit_area_room.php?change_room=1&phase=1&room=" . $r['id'] .
"\">\n";
- echo "<img src=\"images/edit.png\" width=\"16\" height=\"16\"
- alt=\"" . get_vocab("edit") . "\"
- title=\"" . get_vocab("edit") . "\">\n";
- echo "</a>\n";
- echo "</div></td>\n";
- }
- echo "<td><div><a
href=\"edit_area_room.php?change_room=1&phase=1&room=" . $r['id'] .
"\">" . htmlspecialchars($r['room_name']) . "</a></div></td>\n";
- if ($is_admin)
- {
// Don't show ordinary users the disabled status: they are only
going to see enabled rooms
echo "<td class=\"boolean\"><div>" . ((!$r['disabled']) ? "<img
src=\"images/check.png\" alt=\"check mark\" width=\"16\" height=\"16\">" :
" ") . "</div></td>\n";
}
@@ -375,6 +359,20 @@
} // switch
} // if
} // foreach
+
+ // Give admins a delete link
+ if ($is_admin)
+ {
+ // Delete link
+ echo "<td><div>\n";
+ echo "<a href=\"del.php?type=room&area=$area&room=" .
$r['id'] . "\">\n";
+ echo "<img src=\"images/delete.png\" width=\"16\" height=\"16\"
+ alt=\"" . get_vocab("delete") . "\"
+ title=\"" . get_vocab("delete") . "\">\n";
+ echo "</a>\n";
+ echo "</div></td>\n";
+ }
+
echo "</tr>\n";
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits