mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 04:38:27 +01:00
Admin template clean up. 2 new admin styles added. (to be improved). Left admin panel collapse improved. (still needs a cookie to 'stick' .
This commit is contained in:
parent
7be16b9e32
commit
a6e341274e
@ -882,7 +882,7 @@ function update_706_to_800($type='')
|
||||
if ($just_check) return update_needed('pref: Admin theme upgrade to bootstrap3 ');
|
||||
|
||||
$pref['admintheme'] = 'bootstrap3';
|
||||
$pref['admincss'] = 'admin_dark.css';
|
||||
$pref['admincss'] = 'css/bootstrap-dark.min.css';
|
||||
|
||||
$do_save = true;
|
||||
}
|
||||
|
@ -679,21 +679,18 @@ class admin_shortcodes extends e_shortcode
|
||||
{
|
||||
return '';
|
||||
}
|
||||
global $ns, $pref;
|
||||
|
||||
// SecretR: NEW v0.8
|
||||
$tmp = e107::getAdminUI();
|
||||
if($tmp)
|
||||
if($tmp = e107::getAdminUI())
|
||||
{
|
||||
ob_start();
|
||||
// FIXME - renderMenu(), respectively e_adm/in_menu() should return, not output content!
|
||||
$tmp->renderMenu();
|
||||
$ret = ob_get_clean();
|
||||
|
||||
return $ret;
|
||||
return $tmp->renderMenu();
|
||||
}
|
||||
|
||||
unset($tmp);
|
||||
|
||||
$ns = e107::getRender();
|
||||
$pref = e107::getPref();
|
||||
|
||||
|
||||
$curScript = basename($_SERVER['SCRIPT_FILENAME']);
|
||||
|
||||
|
@ -235,7 +235,7 @@ else
|
||||
{SETSTYLE=admin_menu}
|
||||
{ADMIN_MENU}
|
||||
|
||||
|
||||
<div class="sidebar-toggle-panel">
|
||||
{ADMIN_MENUMANAGER}
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ else
|
||||
{ADMIN_PLUGINS}
|
||||
|
||||
<!--<div class="admin-copyright"><small>Copyright © 2008-2017 e107.org</small></div>-->
|
||||
|
||||
</div>
|
||||
{SETSTYLE=default}
|
||||
</div>
|
||||
<div class="col-md-9 col-lg-10 admin-right-panel">
|
||||
@ -282,7 +282,7 @@ $ADMIN_TEMPLATE['footer'] = '
|
||||
* see function e107::getNav()->admin() in e107_admin/header.php
|
||||
*/
|
||||
$ADMIN_TEMPLATE['menu']['start'] = '
|
||||
<div class="nav-panel-body">
|
||||
<div class="nav-panel-body sidebar-toggle-panel">
|
||||
<ul id="admin-ui-nav-menu" class="plugin-navigation nav nav-pills nav-stacked">
|
||||
';
|
||||
|
||||
@ -325,6 +325,6 @@ $ADMIN_TEMPLATE['menu']['end'] = '
|
||||
</div>
|
||||
';
|
||||
|
||||
$ADMIN_TEMPLATE['menu']['divider'] = '<li role="separator" class="divider"></li>';
|
||||
|
||||
$ADMIN_TEMPLATE['menu']['divider'] = '<li role="separator" class="divider"><!-- --></li>';
|
||||
|
||||
$ADMIN_TEMPLATE['menu']['caption'] = '<span class="e-toggle-sidebar" title="Toggle Sidebar" style="cursor:pointer">{ICON}</span><span class="sidebar-toggle-panel">{CAPTION}</span><span class="close e-toggle-sidebar sidebar-toggle-panel sidebar-toggle-switch"><!-- --></span>';
|
||||
|
@ -1681,7 +1681,13 @@ class e_admin_dispatcher
|
||||
$icon = e107::getPlug()->load(e_CURRENT_PLUGIN)->getIcon(24);
|
||||
}
|
||||
|
||||
return e107::getNav()->admin($icon. '<span>' .$this->menuTitle. '</span>', $selected, $var);
|
||||
$toggle = "<span class='e-toggle-sidebar'><!-- --></span>";
|
||||
|
||||
$var['_extras_'] = array('icon'=> $icon);
|
||||
|
||||
// $var['_icon_'] = $icon;
|
||||
|
||||
return e107::getNav()->admin($this->menuTitle, $selected, $var);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6348,7 +6348,7 @@ var_dump($select_options);*/
|
||||
for ($i=0; $i < $max; $i++)
|
||||
{
|
||||
$k = $key.'['.$i.'][path]';
|
||||
$ival = $value[$i]['path'];
|
||||
$ival = isset($value[$i]) ? $value[$i]['path'] : '';
|
||||
|
||||
$ret .= $this->mediapicker($k, $ival, $parms);
|
||||
}
|
||||
|
@ -1173,10 +1173,17 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
/*
|
||||
* Search for id
|
||||
*/
|
||||
$extraParms = array();
|
||||
$temp = explode('--id--', $title, 2);
|
||||
$title = $temp[0];
|
||||
$id = str_replace(array(' ', '_'), '-', varset($temp[1]));
|
||||
|
||||
|
||||
if(isset($e107_vars['_extras_'])) // hold icon info, but could be more.
|
||||
{
|
||||
$extraParms = $e107_vars['_extras_'];
|
||||
unset($e107_vars['_extras_']);
|
||||
}
|
||||
|
||||
unset($temp);
|
||||
|
||||
/*
|
||||
@ -1400,9 +1407,18 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
|
||||
$ns = e107::getRender();
|
||||
$ns->setUniqueId($id);
|
||||
$ns->tablerender($title, $text);
|
||||
|
||||
$srch = array('{ICON}', '{CAPTION}');
|
||||
$repl = array(varset($extraParms['icon']), $title);
|
||||
|
||||
$title = str_replace($srch,$repl, $tmpl['caption']);
|
||||
|
||||
|
||||
|
||||
$ret = $ns->tablerender($title, $text, 'default', true);
|
||||
$ns->setUniqueId(null);
|
||||
return '';
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3050,7 +3050,7 @@ class themeHandler
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function setAdminTheme()
|
||||
{
|
||||
global $pref,$e107cache;
|
||||
@ -3072,7 +3072,7 @@ class themeHandler
|
||||
|
||||
// $ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
||||
// $this->showThemes('admin');
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @todo add admin log
|
||||
|
@ -1840,8 +1840,10 @@ td img.thumbnail { margin-bottom:0 }
|
||||
}
|
||||
|
||||
/* Cleanup table borders/headers */
|
||||
/*
|
||||
#admin-ui-list-batch ,
|
||||
.adminlist > thead > tr { background-color: rgba(0,0,0,0.1); }
|
||||
*/
|
||||
|
||||
.adminlist { border:1px solid rgba(0,0,0,0.1); }
|
||||
|
||||
@ -1883,6 +1885,12 @@ tr.highlight-odd, .table-striped > tbody > tr.highlight-odd { background-color
|
||||
tr.highlight-even, .table-striped > tbody > tr.highlight-even { background-color: rgba(0,0,0,0.15); }
|
||||
|
||||
|
||||
.admin-left-panel-collapsed { width:60px; }
|
||||
.admin-left-panel-collapsed .admin-menu,
|
||||
.admin-left-panel-collapsed .admin-menu .panel-heading { border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px; }
|
||||
|
||||
|
||||
|
||||
|
||||
@media (min-width: 1101px ){
|
||||
|
1563
e107_themes/bootstrap3/css/modern-dark.css
Normal file
1563
e107_themes/bootstrap3/css/modern-dark.css
Normal file
File diff suppressed because it is too large
Load Diff
1568
e107_themes/bootstrap3/css/modern-light.css
Normal file
1568
e107_themes/bootstrap3/css/modern-light.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,8 +25,10 @@
|
||||
</libraries>
|
||||
<stylesheets>
|
||||
<css file="style.css" name="Default"/>
|
||||
<css file="css/bootstrap-dark.min.css" name="Dark Admin" description="" thumbnail='images/admin_bootstrap-dark.jpg' scope='admin' exclude='bootstrap'/>
|
||||
<css file="css/kadmin.css" name="K-Admin Inspired" scope='admin' description="(experimental)" thumbnail='images/admin_kadmin.jpg' url='http://themifycloud.com/demos/templates/KAdmin/KAdmin-Dark/dashboard.html' />
|
||||
<css file="css/modern-light.css" name="Modern Light" description="A modern light theme admin area" thumbnail='images/admin_bootstrap-dark.jpg' scope='admin' exclude='bootstrap'/>
|
||||
<css file="css/modern-dark.css" name="Modern Dark" description="A modern variation of the dark admin area" thumbnail='images/admin_bootstrap-dark.jpg' scope='admin' exclude='bootstrap'/>
|
||||
<css file="css/bootstrap-dark.min.css" name="Legacy Dark Admin" description="A dark admin area skin" thumbnail='images/admin_bootstrap-dark.jpg' scope='admin' exclude='bootstrap'/>
|
||||
<css file="css/kadmin.css" name="K-Admin Inspired" scope='admin' description="A light admin area skin" thumbnail='images/admin_kadmin.jpg' url='http://themifycloud.com/demos/templates/KAdmin/KAdmin-Dark/dashboard.html' />
|
||||
<css file="css/corporate.css" name="Corporate" scope='admin' thumbnail='images/admin_corporate.jpg' exclude='bootstrap' />
|
||||
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/flatly/bootstrap.min.css" name="Flatly" scope='admin' exclude='bootstrap'/>
|
||||
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/sandstone/bootstrap.min.css" name="Sandstone" scope='admin' exclude='bootstrap'/>
|
||||
|
@ -407,25 +407,37 @@ $(document).ready(function()
|
||||
);
|
||||
|
||||
|
||||
$('a[data-toggle-sidebar]').on('click', function(e)
|
||||
$('a[data-toggle-sidebar], .e-toggle-sidebar').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
var $leftPanel = $(".admin-left-panel");
|
||||
var $leftPanel = $(".sidebar-toggle-panel");
|
||||
var $rightPanel = $(".admin-right-panel");
|
||||
|
||||
if ($rightPanel.hasClass('col-md-12'))
|
||||
{
|
||||
console.log('has class');
|
||||
$rightPanel.toggleClass("col-md-9 col-md-12");
|
||||
$rightPanel.toggleClass("col-lg-10 col-lg-12");
|
||||
$leftPanel.toggle(1000);
|
||||
$(".admin-left-panel").toggleClass("col-md-3 col-lg-2");
|
||||
$(".admin-left-panel").toggleClass("admin-left-panel-collapsed");
|
||||
$leftPanel.toggle(500);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$leftPanel.toggle(1000, function() {
|
||||
$rightPanel.toggleClass("col-md-9 col-md-12");
|
||||
|
||||
$(".admin-left-panel").toggleClass("col-md-3 col-lg-2");
|
||||
$(".admin-left-panel").toggleClass("admin-left-panel-collapsed");
|
||||
$rightPanel.toggleClass("col-md-9 col-md-12");
|
||||
$rightPanel.toggleClass("col-lg-10 col-lg-12");
|
||||
$leftPanel.toggle(500);
|
||||
/*
|
||||
$leftPanel.toggle(500, function() {
|
||||
$(".admin-left-panel").toggleClass("col-md-3 col-lg-2");
|
||||
$rightPanel.toggleClass("col-md-9 col-md-12");
|
||||
$rightPanel.toggleClass("col-lg-10 col-lg-12");
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user