[racktables-users] Patch: Making tag filter items use <label>
- From: Frank Altpeter <frank-racktables@xxxxxxxxxxx>
- To: racktables-users <racktables-users@xxxxxxxxxxxxx>
- Date: Fri, 19 Jun 2009 17:17:33 +0200
Hi again,
I'm proud do announce my first patch for RackTables *g*
Yes, it's just a _very_ little modification, I know :-) It's just a patch
for having the (IMHO) comfortable use of the <label> item. This mod allows
you to select items on the tag filter listing not only by clicking exactly
on the checkbox, but on the complete descriptive text, which makes
selecting quite easier.
Tìoraidh an-dràsda,
Frank Altpeter
--
[Diese Signatur wurde zensiert]
diff -ruN RackTables-0.17.1.orig/inc/interface.php
RackTables-0.17.1/inc/interface.php
--- RackTables-0.17.1.orig/inc/interface.php 2009-06-19 16:59:37.000000000
+0200
+++ RackTables-0.17.1/inc/interface.php 2009-06-19 17:11:38.000000000 +0200
@@ -4812,8 +4812,8 @@
$class = 'tagbox';
}
echo "<tr><td colspan=2 class=${class} style='padding-left: " . ($level
* 16) . "px;'>";
- echo "<input type=checkbox name='${inputname}[]'
value='${taginfo['id']}'${selected}> ";
- echo $taginfo['tag'] . "</td></tr>\n";
+ echo "<input id='${class} ${taginfo['id']}' type=checkbox
name='${inputname}[]' value='${taginfo['id']}'${selected}> ";
+ echo "<label for='${class} ${taginfo['id']}'>" . $taginfo['tag'] .
"</label></td></tr>\n";
foreach ($taginfo['kids'] as $kid)
$self ($inputname, $preselect, $kid, $level + 1);
}
Other related posts: