mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 22:54:03 +09:00
Cleaned plugin dashboard
This commit is contained in:
@@ -19,24 +19,6 @@
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
|
||||
.um-admin-dash-nav {
|
||||
float: left;
|
||||
width: 202px;
|
||||
}
|
||||
|
||||
.um-admin-dash-nav,
|
||||
.um-admin-dash-main
|
||||
{
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.um-admin-dash-main {
|
||||
margin-left: 201px;
|
||||
border-left: 1px solid #D8D8D8;
|
||||
padding: 10px 20px;
|
||||
box-shadow: 0px 1px 0px #FFF inset;
|
||||
}
|
||||
|
||||
.um-admin-dash-foot {
|
||||
border-radius: 0;
|
||||
background: none !important;
|
||||
@@ -80,6 +62,12 @@
|
||||
- Nav
|
||||
*/
|
||||
|
||||
.um-admin-dash-nav {
|
||||
float: left;
|
||||
width: 202px;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.um-admin-dash-nav a {
|
||||
font-family: Open Sans;
|
||||
font-size: 14px;
|
||||
@@ -117,10 +105,6 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/*
|
||||
- Misc
|
||||
*/
|
||||
|
||||
.um-admin-dash-count {
|
||||
background: #7ACF58;
|
||||
color: #fff;
|
||||
@@ -140,12 +124,28 @@
|
||||
- Main
|
||||
*/
|
||||
|
||||
.um-admin-dash-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.um-admin-dash-main {
|
||||
margin-left: 201px;
|
||||
border-left: 1px solid #D8D8D8;
|
||||
padding: 10px 20px;
|
||||
box-shadow: 0px 1px 0px #FFF inset;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.um-admin-dash-main h3{
|
||||
font-weight: 500;
|
||||
padding: 0 0 10px 0;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/*
|
||||
- Share icons
|
||||
*/
|
||||
|
||||
.um-admin-dash-share {
|
||||
margin-top: 11px !important;
|
||||
float: left;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
var active_tab = jQuery('.um-admin-dash-nav a.active').attr('data-rel');
|
||||
jQuery('.um-admin-dash-content').hide();
|
||||
jQuery('.um-admin-dash-content#'+active_tab).show();
|
||||
|
||||
chart_ready = 0;
|
||||
|
||||
jQuery(document).on('click', '.um-admin-dash-nav a', function(e){
|
||||
e.preventDefault();
|
||||
active_tab = jQuery(this).attr('data-rel');
|
||||
jQuery('.um-admin-dash-nav a').removeClass('active');
|
||||
jQuery(this).addClass('active');
|
||||
jQuery('.um-admin-dash-content').hide();
|
||||
jQuery('.um-admin-dash-content#'+active_tab).show();
|
||||
if ( chart_ready == 0 ) {
|
||||
draw_linechart();
|
||||
chart_ready = 1;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
@@ -120,6 +120,19 @@ class UM_Admin_Enqueue {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Load dashboard
|
||||
***/
|
||||
function load_dashboard(){
|
||||
|
||||
wp_register_style('um_admin_dashboard', um_url . 'admin/assets/css/um-admin-dashboard.css' );
|
||||
wp_enqueue_style('um_admin_dashboard');
|
||||
|
||||
wp_register_script('um_admin_dashboard', um_url . 'admin/assets/js/um-admin-dashboard.js' );
|
||||
wp_enqueue_script('um_admin_dashboard');
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Load modal
|
||||
***/
|
||||
@@ -195,10 +208,7 @@ class UM_Admin_Enqueue {
|
||||
|
||||
wp_register_style('um_admin_misc', um_url . 'admin/assets/css/um-admin-misc.css' );
|
||||
wp_enqueue_style('um_admin_misc');
|
||||
|
||||
wp_register_style('um_admin_dashboard', um_url . 'admin/assets/css/um-admin-dashboard.css' );
|
||||
wp_enqueue_style('um_admin_dashboard');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -287,6 +297,8 @@ class UM_Admin_Enqueue {
|
||||
|
||||
$this->load_modal();
|
||||
|
||||
$this->load_dashboard();
|
||||
|
||||
$this->load_field();
|
||||
|
||||
$this->load_users_js();
|
||||
|
||||
@@ -21,15 +21,24 @@ global $ultimatemember;
|
||||
|
||||
<div class="um-admin-dash-nav">
|
||||
|
||||
<a href="#" class="active"><i class="um-icon-home-3"></i><span class="um-admin-dash-nav-title">Dashboard Overview</span></a>
|
||||
<a href="#" class="active" data-rel="overview"><i class="um-icon-home-3"></i><span class="um-admin-dash-nav-title">Dashboard Overview</span></a>
|
||||
<a href="#" data-rel="analytics"><i class="um-icon-analytics-chart-graph"></i><span class="um-admin-dash-nav-title">Analytics</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-main">
|
||||
|
||||
<h3>New Registrations over last 30 days</h3>
|
||||
<?php echo $ultimatemember->chart->create('data=new_users&x_label=Day&y_label=Daily Signups'); ?>
|
||||
|
||||
<div class="um-admin-dash-content" id="overview">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-content" id="analytics">
|
||||
|
||||
<h3>New Registrations over last 30 days</h3>
|
||||
<?php echo $ultimatemember->chart->create('data=new_users&x_label=Day&y_label=Daily Signups'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
|
||||
@@ -100,6 +100,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#wpadminbar li#wp-admin-bar-um_parent {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
- Font Icons
|
||||
*/
|
||||
|
||||
+3
-5
@@ -47,10 +47,8 @@ class UM_Chart {
|
||||
<script type="text/javascript">
|
||||
|
||||
google.load("visualization", "1", {packages:["corechart"]});
|
||||
|
||||
google.setOnLoadCallback(drawChart);
|
||||
|
||||
function drawChart() {
|
||||
|
||||
function draw_linechart() {
|
||||
|
||||
var data = new google.visualization.DataTable();
|
||||
data.addColumn('string', '<?php echo $x_label; ?>');
|
||||
@@ -131,7 +129,7 @@ class UM_Chart {
|
||||
width: '100%',
|
||||
height: ( vgrid_count * 50 )
|
||||
};
|
||||
|
||||
|
||||
var chart = new google.visualization.LineChart(document.getElementById('chart_<?php echo $data . $id; ?>'));
|
||||
chart.draw(data, options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user