Skip to content

Commit

Permalink
Dev: Apply cell adapters only to table with activecell class
Browse files Browse the repository at this point in the history
Dev: remove some style from template rights
  • Loading branch information
Shnoulle committed Mar 29, 2013
1 parent e9ca0ab commit a392e97
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion application/views/admin/user/setuserpermissions.php
Expand Up @@ -2,7 +2,7 @@
<div class='header ui-widget-header'><?php printf($clang->gT("Edit user permissions for user %s"),"<span style='font-style:italic'>".$oUser->users_name."</span>"); ?></div>
<br />
<?php echo CHtml::form(array("admin/user/sa/savepermissions"), 'post');?>
<table style='margin:0 auto;' class='userpermissions'><thead>
<table style='margin:0 auto;' class='userpermissions activecell'><thead>

<tr><th></th><th><?php $clang->eT("Permission");?></th>
<th><input type='button' id='btnToggleAdvanced' value='<<' /></th>
Expand Down
10 changes: 4 additions & 6 deletions application/views/admin/user/setusertemplates.php
@@ -1,10 +1,10 @@
<?php echo CHtml::form(array("admin/user/sa/usertemplates"), 'post', array('name'=>'modtemplaterightsform', 'id'=>'modtemplaterightsform')); ?>

<div class='header ui-widget-header'><?php $clang->eT('Edit template permissions');?></div>
<table id="user-template-rights" width='50%' border='0' cellpadding='3' style='margin:5px auto 0 auto;'>
<table id="user-template-rights" class="activecell" style="margin:0 auto;">
<thead>
<tr>
<th colspan="2" style="background-color:#000; color:#fff;">
<th colspan="2" class="header">
<?php $clang->eT('Set templates that this user may access');?>: <?php echo htmlspecialchars(sanitize_user($_POST['user']));?></th>
</tr>
<?php
Expand Down Expand Up @@ -38,15 +38,13 @@
{
if($table_row_odd_even == 'odd' )
{
$row_class = ' class="row_odd"';
$table_row_odd_even = 'even';
}
else
{
$row_class = ' class="row_even"';
$table_row_odd_even = 'odd';
}
echo "\t<tr$row_class>\n<td>".$trow["folder"]."</td>\n";
echo "\t<tr class=\"$table_row_odd_even\">\n<td>".$trow["folder"]."</td>\n";
echo "<td><input type=\"checkbox\" class=\"checkboxbtn\" name=\"".$trow["folder"]."_use\" value=\"".$trow["folder"]."_use\"";

if(isset($templaterights[$trow['folder']]) && $templaterights[$trow['folder']]['use'] == 1)
Expand All @@ -60,4 +58,4 @@
</form>
<?php
}
?>
?>
4 changes: 2 additions & 2 deletions scripts/admin/admin_core.js
Expand Up @@ -698,10 +698,10 @@ function initializeAjaxProgress()
*/
function tableCellAdapters()
{
$('table').delegate('tbody td input:checkbox,tbody td input:radio,tbody td label,tbody th input:checkbox,tbody th input:radio,tbody th label',"click", function(e) {
$('table.activecell').delegate('tbody td input:checkbox,tbody td input:radio,tbody td label,tbody th input:checkbox,tbody th input:radio,tbody th label',"click", function(e) {
e.stopPropagation();
});
$('table').delegate('tbody td,tbody th',"click", function() {
$('table.activecell').delegate('tbody td,tbody th',"click", function() {
if($(this).find("input:radio,input:checkbox").length==1)
{
$(this).find("input:radio").click();
Expand Down

0 comments on commit a392e97

Please sign in to comment.