mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Admin Userclass styling and notice fixes.
This commit is contained in:
@@ -409,7 +409,7 @@ switch ($action)
|
|||||||
$userclass_groupclass = '';
|
$userclass_groupclass = '';
|
||||||
if ($params == 'edit' || $forwardVals)
|
if ($params == 'edit' || $forwardVals)
|
||||||
{
|
{
|
||||||
if (!$forwardVals)
|
if (!isset($forwardVals))
|
||||||
{ // Get the values from DB (else just recycle data uer was trying to store)
|
{ // Get the values from DB (else just recycle data uer was trying to store)
|
||||||
checkAllowed($class_num);
|
checkAllowed($class_num);
|
||||||
$sql->db_Select('userclass_classes', '*', "userclass_id='".intval($class_num)."' ");
|
$sql->db_Select('userclass_classes', '*', "userclass_id='".intval($class_num)."' ");
|
||||||
@@ -558,7 +558,9 @@ else
|
|||||||
|
|
||||||
$text .= "</div>";
|
$text .= "</div>";
|
||||||
$text .= "</form></div><br /><br />";
|
$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);
|
$ns->tablerender(ADLAN_38.SEP.LAN_CREATE, $text);
|
||||||
@@ -939,7 +941,17 @@ function userclass2_adminmenu()
|
|||||||
show_admin_menu(ADLAN_38, $action, $var);
|
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
|
class uclass_manager
|
||||||
{
|
{
|
||||||
@@ -1010,7 +1022,7 @@ class uclass_manager
|
|||||||
$text .= "</tbody></table></fieldset></form>";
|
$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 );
|
$ns->tablerender(UCSLAN_21, $mes->render().$text );
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ class admin_shortcodes
|
|||||||
if(function_exists('e_help')) // new in v2.x for non-admin-ui admin pages.
|
if(function_exists('e_help')) // new in v2.x for non-admin-ui admin pages.
|
||||||
{
|
{
|
||||||
$tmp = e_help();
|
$tmp = e_help();
|
||||||
return $ns->tablerender($tmp['caption'],$tmp['text'],'',true);
|
return $ns->tablerender($tmp['caption'],$tmp['text'],'e_help',true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$helpfile = '';
|
$helpfile = '';
|
||||||
|
@@ -1142,6 +1142,8 @@ class user_class_admin extends user_class
|
|||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected $top_icon = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -1152,6 +1154,11 @@ class user_class_admin extends user_class
|
|||||||
if (!(getperms('4') || getperms('0'))) return;
|
if (!(getperms('4') || getperms('0'))) return;
|
||||||
|
|
||||||
$this->isAdmin = TRUE; // We have full class management rights
|
$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)
|
protected function show_graphical_subtree($listnum, $indent_images, $is_last = FALSE)
|
||||||
{
|
{
|
||||||
|
|
||||||
$num_children = count(vartrue($this->class_tree[$listnum]['class_children']));
|
$num_children = count(vartrue($this->class_tree[$listnum]['class_children']));
|
||||||
$is_open = TRUE;
|
$is_open = TRUE;
|
||||||
$tag_name = 'uclass_tree_'.$listnum;
|
$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;\"";
|
$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' />
|
//$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>";
|
//<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
|
// vertical-align: middle doesn't work! Nor does text-top
|
||||||
@@ -1405,7 +1413,7 @@ class user_class_admin extends user_class
|
|||||||
|
|
||||||
$ret = "
|
$ret = "
|
||||||
<div class='uclass_tree' style='height:16px'>
|
<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>
|
<span style='top:3px'></span>
|
||||||
</div>"; // Just a generic icon here to provide a visual anchor
|
</div>"; // Just a generic icon here to provide a visual anchor
|
||||||
|
|
||||||
|
@@ -31,6 +31,10 @@ min-height:50px;
|
|||||||
|
|
||||||
tr.highlight-odd { background-color: #212121; }
|
tr.highlight-odd { background-color: #212121; }
|
||||||
tr.highlight-even { background-color: #212121; }
|
tr.highlight-even { background-color: #212121; }
|
||||||
|
.datepicker table tr td.day:hover {
|
||||||
|
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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 span.badge { float:right;font-size:85% }
|
||||||
ul#e-latest li a:hover { text-decoration: none; }
|
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-odd td { background-color: transparent }
|
||||||
.table-striped tbody > tr.highlight-even td { background-color: transparent }
|
.table-striped tbody > tr.highlight-even td { background-color: transparent }
|
||||||
/* Bootstrap tags input */
|
/* Bootstrap tags input */
|
||||||
|
@@ -54,10 +54,16 @@ function tablestyle($caption, $text, $mode)
|
|||||||
|
|
||||||
$class = '';
|
$class = '';
|
||||||
|
|
||||||
// echo 'mod='.$style;
|
|
||||||
|
|
||||||
|
|
||||||
if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
|
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')
|
if($mode == 'core-infopanel_latest' || $mode == 'core-infopanel_status')
|
||||||
{
|
{
|
||||||
//return;
|
//return;
|
||||||
|
Reference in New Issue
Block a user