Project

General

Profile

Bug #2490 » admin.comprofiler.html.patch

krileon, 15 April 2011 21:44

View differences:

administrator/components/com_comprofiler/admin.comprofiler.html.php
<thead>
<tr>
<th width="2%" class="title"><?php echo htmlspecialchars( CBTxt::T('#') ); ?></th>
<th width="3%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="checkAll(' . count($rows) . ');"'; ?> />
<th width="3%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="cbToggleAll( this, ' . count($rows) . ', \'cb\' );"'; ?> />
</th>
<th width="25%" class="title"><?php echo htmlspecialchars( CBTxt::T('Title') ); ?></th>
<th width="25%" class="title"><?php echo htmlspecialchars( CBTxt::T('Description') ); ?></th>
......
?>
<tr class="<?php echo "row$k"; ?>">
<td><?php echo $i+1+$pageNav->limitstart;?></td>
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->listid; ?>" onClick="isChecked(this.checked);" /></td>
<td> <a href="#editList" onClick="return listItemTask('cb<?php echo $i;?>','editList')"><?php echo htmlspecialchars( getLangDefinition($row->title) ); ?></a></td>
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->listid; ?>" onClick="cbIsChecked(this.checked);" /></td>
<td> <a href="#editList" onClick="return cbListItemTask( this, 'editList', null, null, 'cb', '<?php echo $i;?>' )"><?php echo htmlspecialchars( getLangDefinition($row->title) ); ?></a></td>
<td><?php echo htmlspecialchars( getLangDefinition($row->description) ); ?></td>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task3;?>')"><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task4;?>')"><img src="<?php echo $imgpath.$img4;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task3;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task4;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img4;?>" width="16" height="16" border="0" alt="" /></a></td>
<td><?php
if ( $row->useraccessgroupid >= 0 ) {
echo '<span style="color:red;">' . $_CB_framework->acl->get_group_name( (int) $row->useraccessgroupid ) . '</span>';
......
?></td>
<td>
<?php if ($i > 0 || ($i+$pageNav->limitstart > 0)) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderupList')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderupList', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-uparrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Up') ); ?>" />
</a>
<?php } ?>
</td>
<td>
<?php if ($i < $n-1 || $i+$pageNav->limitstart < $pageNav->total-1) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdownList')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderdownList', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-downarrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Down') ); ?>" />
</a>
<?php } ?>
......
else
{
var i = selectObj.options.length;
value = value.replace(/1\/2/g, '�');
value = value.replace(/1\/2/g, '');
selectObj.options.length = i + 1;
selectObj.options[i].value = (value != '' && value != ' ') ? value : ' ';
selectObj.options[i].text = (value != '' && value != ' ') ? value : '[empty]';
......
<thead>
<tr>
<th width="2%" class="title"><?php echo htmlspecialchars( CBTxt::T('#') ); ?></th>
<th width="3%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="checkAll(' . count($rows) . ');"'; ?> />
<th width="3%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="cbToggleAll( this, ' . count($rows) . ', \'cb\' );"'; ?> />
</th>
<th width="10%" class="title"><?php echo htmlspecialchars( CBTxt::T('Name') ); ?></th>
<th width="10%" class="title"><?php echo htmlspecialchars( CBTxt::T('Title') ); ?></th>
......
?>
<tr class="<?php echo "row$k"; ?>">
<td><?php echo $i+1+$pageNav->limitstart;?></td>
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->fieldid; ?>" onClick="isChecked(this.checked);" /></td>
<td> <a href="#editField" onClick="return listItemTask('cb<?php echo $i;?>','editField')">
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->fieldid; ?>" onClick="cbIsChecked(this.checked);" /></td>
<td> <a href="#editField" onClick="return cbListItemTask( this, 'editField', null, null, 'cb', '<?php echo $i;?>' )">
<?php echo htmlspecialchars( $row->name ); ?> </a> </td>
<td><?php echo htmlspecialchars( getLangDefinition( $row->title ) ); ?></td>
<td><?php
......
echo '</span>';
}
?></td>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')"><img src="<?php echo $imgpath.$img;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task2;?>')"><img src="<?php echo $imgpath.$img2;?>" width="16" height="16" border="0" alt="" /><?php echo $text2;?></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task4;?>')"><img src="<?php echo $imgpath.$img4;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task2;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img2;?>" width="16" height="16" border="0" alt="" /><?php echo $text2;?></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task4;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img4;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><?php
if ( $row->tablecolumns != '' && ! in_array( $row->type, array( 'password', 'userparams' ) ) ) {
?><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task5;?>')"><img src="<?php echo $imgpath.$img5;?>" width="16" height="16" border="0" alt="" /></a><?php
?><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task5;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img5;?>" width="16" height="16" border="0" alt="" /></a><?php
} else {
echo '<img src="' . $imgpath . $img5 . '" width="16" height="16" border="0" alt="" />';
}
......
<?php
} else {
?>
<td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task3;?>')"><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" alt="" /></a></td>
<td width="10%"><a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php echo $task3;?>', null, null, 'cb', '<?php echo $i;?>' )"><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" alt="" /></a></td>
<?php
}
?>
<td>
<?php if (($i > 0 || ($i+$pageNav->limitstart > 0)) && $row->tab == @$rows[$i-1]->tab) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderupField')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderupField', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-uparrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Up') ); ?>" />
</a>
<?php } ?>
</td>
<td>
<?php if (($i < $n-1 || $i+$pageNav->limitstart < $pageNav->total-1) && $row->tab == @$rows[$i+1]->tab) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdownField')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderdownField', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-downarrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Down') ); ?>" />
</a>
<?php } ?>
......
<thead>
<tr>
<th width="1%" class="title"><?php echo htmlspecialchars( CBTxt::T('#') ); ?></th>
<th width="1%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="checkAll(' . count($rows) . ');"'; ?> /></th>
<th width="1%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="cbToggleAll( this, ' . count($rows) . ', \'cb\' );"'; ?> /></th>
<th width="17%" class="title"><?php echo htmlspecialchars( CBTxt::T('Title') ); ?></th>
<th width="30%" class="title"><?php echo htmlspecialchars( CBTxt::T('Description') ); ?></th>
<th width="10%" class="title"><?php echo htmlspecialchars( CBTxt::T('Display') ); ?></th>
......
?>
<tr class="<?php echo "row$k"; ?>">
<td><?php echo $i+1+$pageNav->limitstart;?></td>
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->tabid; ?>" onclick="isChecked(this.checked);" /></td>
<td> <a href="#editTab" onclick="return listItemTask('cb<?php echo $i;?>','editTab')">
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->tabid; ?>" onclick="cbIsChecked(this.checked);" /></td>
<td> <a href="#editTab" onclick="return cbListItemTask( this, 'editTab', null, null, 'cb', '<?php echo $i;?>' )">
<?php echo htmlspecialchars( getLangDefinition($row->title) ); ?> </a> </td>
<td><?php echo htmlspecialchars( getLangDefinition($row->description) ); ?></td>
<td><?php echo htmlspecialchars( $row->displaytype ); ?></td>
......
echo '</span>';
}
?></td>
<?php $task3 = ($task3==null) ? " " : "onClick=\"return listItemTask('cb".$i."','".$task3."')\"" ; ?>
<?php $task3 = ($task3==null) ? " " : "onClick=\"return cbListItemTask( this, '".$task3."', null, null, 'cb', '".$i."' )\"" ; ?>
<td><a href="javascript: void(0);" <?php echo $task3; ?> ><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" alt="" /></a></td>
<td><?php
if ( $row->useraccessgroupid >= 0 ) {
......
<td><?php echo htmlspecialchars( substr( $row->position, 0, 3 ) == 'cb_' ? substr( $row->position, 3 ) : $row->position ); ?></td>
<td>
<?php if (($i > 0 || ($i+$pageNav->limitstart > 0)) && $row->position == @$rows[$i-1]->position) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderupTab')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderupTab', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-uparrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Up') ); ?>" />
</a>
<?php } ?>
</td>
<td>
<?php if (($i < $n-1 || $i+$pageNav->limitstart < $pageNav->total-1) && $row->position == @$rows[$i+1]->position) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdownTab')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderdownTab', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-downarrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Down') ); ?>" />
</a>
<?php } ?>
......
<tr>
<th width="20"><?php echo htmlspecialchars( CBTxt::T('#') ); ?></th>
<th width="20">
<input type="checkbox" name="toggle" value="" <?php echo 'onclick="checkAll(' . count( $rows ) . ');"';?> />
<input type="checkbox" name="toggle" value="" <?php echo 'onclick="cbToggleAll( this, ' . count($rows) . ', \'cb\' );"';?> />
</th>
<th class="title">
<?php echo htmlspecialchars( CBTxt::T('Plugin Name') ); ?>
......
$task_access = 'accesspublic';
}
$access = ' <a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task_access .'\')" '. $color_access .'>
$access = ' <a href="javascript: void(0);" onclick="return cbListItemTask( this, \''. $task_access .'\', null, null, \'cb\', \''. $i .'\' )" '. $color_access .'>
'. $row->groupname .'
</a>';
......
$checked = '<img src="'. $checked_img .'" '. $hover .'/>';
} else {
$checked = '<input type="checkbox" id="cb'.$i.'" name="cid[]" value="'.$row->id.'" onclick="isChecked(this.checked);" />';
$checked = '<input type="checkbox" id="cb'.$i.'" name="cid[]" value="'.$row->id.'" onclick="cbIsChecked(this.checked);" />';
}
$imgpath='../components/com_comprofiler/images/';
......
} elseif ( ( $row->id == 1 ) && $row->published ) {
$published = '<img src="' . $imgpath . 'publish_g.png" border="0" alt="' . htmlspecialchars( CBTxt::T('Published') ) . '" title="' . htmlspecialchars( CBTxt::T('CB core plugin cannot be unpublished') ) . '" />';
} else {
$published = '<a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task .'\')" title="'. htmlspecialchars( $action ) .'">
$published = '<a href="javascript: void(0);" onclick="return cbListItemTask( this, \''. $task .'\', null, null, \'cb\', \''. $i .'\' )" title="'. htmlspecialchars( $action ) .'">
<img src="'. $imgpath . $img .'" border="0" alt="'. htmlspecialchars( $alt ) .'" />
</a>';
}
......
</td>
<td>
<?php if (($i > 0 || ($i+$pageNav->limitstart > 0)) && $row->type == @$rows[$i-1]->type) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderupPlugin')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderupPlugin', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-uparrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Up') ); ?>" />
</a>
<?php } ?>
</td>
<td>
<?php if (($i < $n-1 || $i+$pageNav->limitstart < $pageNav->total-1) && $row->type == @$rows[$i+1]->type) { ?>
<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdownPlugin')">
<a href="#reorder" onClick="return cbListItemTask( this, 'orderdownPlugin', null, null, 'cb', '<?php echo $i;?>' )">
<img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-downarrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Down') ); ?>" />
</a>
<?php } ?>
(1-1/4)