1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 20:51:53 +02:00

Admin Userclass styling and notice fixes.

This commit is contained in:
Cameron 2013-04-30 01:28:44 -07:00
parent d5b572d925
commit bae6d6f2ee
6 changed files with 40 additions and 8 deletions

View File

@ -409,7 +409,7 @@ switch ($action)
$userclass_groupclass = '';
if ($params == 'edit' || $forwardVals)
{
if (!$forwardVals)
if (!isset($forwardVals))
{ // Get the values from DB (else just recycle data uer was trying to store)
checkAllowed($class_num);
$sql->db_Select('userclass_classes', '*', "userclass_id='".intval($class_num)."' ");
@ -558,7 +558,9 @@ else
$text .= "</div>";
$text .= "</form></div><br /><br />";
$text .= $e_userclass->show_graphical_tree();
// $text .= $e_userclass->show_graphical_tree();
$ns->tablerender(ADLAN_38.SEP.LAN_CREATE, $text);
@ -939,7 +941,17 @@ function userclass2_adminmenu()
show_admin_menu(ADLAN_38, $action, $var);
}
function e_help()
{
global $e_userclass;
$text = "<div id='userclass-tree-structure'>".$e_userclass->show_graphical_tree()."</div>";
return array('caption'=>'Class Structure', 'text' => $text);
// $text .= $e_userclass->show_graphical_tree();
}
class uclass_manager
{
@ -1010,7 +1022,7 @@ class uclass_manager
$text .= "</tbody></table></fieldset></form>";
}
$text .= $e_userclass->show_graphical_tree(); // Show the tree as well - sometimes more useful
// $text .= $e_userclass->show_graphical_tree(); // Show the tree as well - sometimes more useful
$ns->tablerender(UCSLAN_21, $mes->render().$text );

View File

@ -64,7 +64,7 @@ class admin_shortcodes
if(function_exists('e_help')) // new in v2.x for non-admin-ui admin pages.
{
$tmp = e_help();
return $ns->tablerender($tmp['caption'],$tmp['text'],'',true);
return $ns->tablerender($tmp['caption'],$tmp['text'],'e_help',true);
}
$helpfile = '';

View File

@ -1142,6 +1142,8 @@ class user_class_admin extends user_class
))
);
protected $top_icon = null;
/**
* Constructor
@ -1152,6 +1154,11 @@ class user_class_admin extends user_class
if (!(getperms('4') || getperms('0'))) return;
$this->isAdmin = TRUE; // We have full class management rights
$pref = e107::getPref();
$style = ($pref['admincss'] == 'admin_dark.css') ? ' icon-white' : '';
$this->top_icon = "<i class='icon-user{$style}'></i> ";
}
@ -1310,6 +1317,7 @@ class user_class_admin extends user_class
*/
protected function show_graphical_subtree($listnum, $indent_images, $is_last = FALSE)
{
$num_children = count(vartrue($this->class_tree[$listnum]['class_children']));
$is_open = TRUE;
$tag_name = 'uclass_tree_'.$listnum;
@ -1356,7 +1364,7 @@ class user_class_admin extends user_class
$onc = " onclick=\"alert('".str_replace("'", "\\'", (stripslashes(UCSLAN_90)))."'); return false;\"";
}
$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' /><a style='text-decoration: none' class='userclass_edit'{$onc} href='{$url}'>".$name_line."</a></div>";
$ret .= $this->top_icon."<a style='text-decoration: none' class='userclass_edit'{$onc} href='{$url}'>".$name_line."</a></div>";
//$ret .= "<img src='".UC_ICON_DIR."topicon.png' alt='class icon' />
//<span style='cursor:pointer; vertical-align: bottom' onclick=\"javascript: document.location.href='".e_ADMIN."userclass2.php?config.edit.{$this->class_tree[$listnum]['userclass_id']}'\">".$name_line."</span></div>";
// vertical-align: middle doesn't work! Nor does text-top
@ -1405,7 +1413,7 @@ class user_class_admin extends user_class
$ret = "
<div class='uclass_tree' style='height:16px'>
<img src='".UC_ICON_DIR."topicon.png' alt='class icon' style='vertical-align: bottom' />
".$this->top_icon."
<span style='top:3px'></span>
</div>"; // Just a generic icon here to provide a visual anchor

View File

@ -31,6 +31,10 @@ min-height:50px;
tr.highlight-odd { background-color: #212121; }
tr.highlight-even { background-color: #212121; }
.datepicker table tr td.day:hover {
color: black;
}

View File

@ -776,6 +776,8 @@ ul#e-latest { line-height:17px }
ul#e-latest li a span.badge { float:right;font-size:85% }
ul#e-latest li a:hover { text-decoration: none; }
#userclass-tree-structure { font-size:80% }
.table-striped tbody > tr.highlight-odd td { background-color: transparent }
.table-striped tbody > tr.highlight-even td { background-color: transparent }
/* Bootstrap tags input */

View File

@ -54,9 +54,15 @@ function tablestyle($caption, $text, $mode)
$class = '';
// echo 'mod='.$style;
if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
if($mode == 'e_help')
{
$style = 'admin_menu';
}
if($mode == 'core-infopanel_latest' || $mode == 'core-infopanel_status')
{