mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 15:49:57 +09:00
Site selector added to menu selector
Graphs added to dashboard git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12496 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c1e3a4ef5d
commit
71db99a4b8
4 changed files with 148 additions and 7 deletions
|
|
@ -375,11 +375,15 @@ $.exec_json = function(action,data,func){
|
||||||
,data:$.param(data)
|
,data:$.param(data)
|
||||||
,success : function(data){
|
,success : function(data){
|
||||||
$(".wfsr").hide().trigger('cancel_confirm');
|
$(".wfsr").hide().trigger('cancel_confirm');
|
||||||
if(data.error > 0) alert(data.message);
|
if(data.error != 0){
|
||||||
if(data.error == -1 && data.message == 'msg_is_not_administrator'){
|
if(data.error == -1 && data.message == 'msg_is_not_administrator'){
|
||||||
alert('You are not logged in as an administrator');
|
alert('You are not logged in as an administrator');
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
return;
|
return;
|
||||||
|
}else{
|
||||||
|
alert(data.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($.isFunction(func)) func(data);
|
if($.isFunction(func)) func(data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1499,4 +1499,40 @@
|
||||||
<value xml:lang="ko"><![CDATA[페이지 뷰]]></value>
|
<value xml:lang="ko"><![CDATA[페이지 뷰]]></value>
|
||||||
<value xml:lang="en"><![CDATA[Page Views]]></value>
|
<value xml:lang="en"><![CDATA[Page Views]]></value>
|
||||||
</item>
|
</item>
|
||||||
|
<item name="this_week">
|
||||||
|
<value xml:lang="ko"><![CDATA[이번주]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[This Week]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="next_week">
|
||||||
|
<value xml:lang="ko"><![CDATA[다음주]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Next Week]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="mon">
|
||||||
|
<value xml:lang="ko"><![CDATA[월]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Mon]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="tue">
|
||||||
|
<value xml:lang="ko"><![CDATA[화]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Tue]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="wed">
|
||||||
|
<value xml:lang="ko"><![CDATA[수]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Wed]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="thu">
|
||||||
|
<value xml:lang="ko"><![CDATA[목]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Thu]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="fri">
|
||||||
|
<value xml:lang="ko"><![CDATA[금]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Fri]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="sat">
|
||||||
|
<value xml:lang="ko"><![CDATA[토]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Sat]]></value>
|
||||||
|
</item>
|
||||||
|
<item name="sun">
|
||||||
|
<value xml:lang="ko"><![CDATA[일]]></value>
|
||||||
|
<value xml:lang="en"><![CDATA[Sun]]></value>
|
||||||
|
</item>
|
||||||
</lang>
|
</lang>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,15 @@
|
||||||
<include target="./_header.html" />
|
<include target="./_header.html" />
|
||||||
|
<!--script type="text/javascript" src="./js/jquery.jqplot.min.js"></script>
|
||||||
|
<script type="text/javascript" src="./js/jqplot.barRenderer.min.js"></script>
|
||||||
|
<script type="text/javascript" src="./js/jqplot.categoryAxisRenderer.min.js"></script>
|
||||||
|
<script type="text/javascript" src="./js/jqplot.pointLabels.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/maserati/modules/admin/tpl/css/jquery.jqplot.min.css" /-->
|
||||||
|
<load target="./js/jquery.jqplot.min.js" />
|
||||||
|
<load target="./js/jqplot.barRenderer.min.js" />
|
||||||
|
<load target="./js/jqplot.categoryAxisRenderer.min.js" />
|
||||||
|
<load target="./js/jqplot.pointLabels.min.js" />
|
||||||
|
<load target="./css/jquery.jqplot.min.css" />
|
||||||
|
|
||||||
<div class="content" id="content">
|
<div class="content" id="content">
|
||||||
<div class="x_page-header">
|
<div class="x_page-header">
|
||||||
<h1>{$lang->control_panel} <a class="x_icon-question-sign" href="./help/index.html#UMAN_dashboard" target="_blank">{$lang->help}</a></h1>
|
<h1>{$lang->control_panel} <a class="x_icon-question-sign" href="./help/index.html#UMAN_dashboard" target="_blank">{$lang->help}</a></h1>
|
||||||
|
|
@ -35,11 +46,12 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div>
|
<div>
|
||||||
<section class="status">
|
<section class="status">
|
||||||
<h2>{$lang->uv}</h2>
|
<h2>{$lang->uv}</h2>
|
||||||
<div style="margin:10px 15px"><!-- Graph here --></div>
|
<div style="margin:10px 15px; height:150px" id="visitors"></div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{$lang->menu_gnb['user']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)}(<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
|
<dt>{$lang->menu_gnb['user']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)}(<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
|
||||||
|
|
@ -49,7 +61,7 @@
|
||||||
</section>
|
</section>
|
||||||
<section class="status">
|
<section class="status">
|
||||||
<h2>{$lang->pv}</h2>
|
<h2>{$lang->pv}</h2>
|
||||||
<div style="margin:10px 15px"><!-- Graph here --></div>
|
<div style="margin:10px 15px; height:150px" id="page_views"></div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{$lang->menu_gnb_sub['document']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)}(<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
|
<dt>{$lang->menu_gnb_sub['document']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)}(<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
|
||||||
|
|
@ -107,6 +119,16 @@
|
||||||
</div>
|
</div>
|
||||||
<include target="./_footer.html" />
|
<include target="./_footer.html" />
|
||||||
<script>
|
<script>
|
||||||
|
xe.lang.this_week = '{$lang->this_week}';
|
||||||
|
xe.lang.next_week = '{$lang->next_week}';
|
||||||
|
xe.lang.mon = '{$lang->mon}';
|
||||||
|
xe.lang.tue = '{$lang->tue}';
|
||||||
|
xe.lang.wed = '{$lang->wed}';
|
||||||
|
xe.lang.thu = '{$lang->thu}';
|
||||||
|
xe.lang.fri = '{$lang->fri}';
|
||||||
|
xe.lang.sat = '{$lang->sat}';
|
||||||
|
xe.lang.sun = '{$lang->sun}';
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// Dashboard portlet UI
|
// Dashboard portlet UI
|
||||||
$('.dashboard>div>section>ul>li')
|
$('.dashboard>div>section>ul>li')
|
||||||
|
|
@ -119,4 +141,81 @@ jQuery(function($){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function obj2Array(htObj){
|
||||||
|
var aRes = [];
|
||||||
|
|
||||||
|
for(var x in htObj){
|
||||||
|
if(!htObj.hasOwnProperty(x)) continue;
|
||||||
|
|
||||||
|
aRes.push(htObj[x]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return aRes;
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery(function ($) {
|
||||||
|
$.exec_json("counter.getWeeklyUniqueVisitor", {}, function(htRes){
|
||||||
|
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||||
|
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||||
|
|
||||||
|
drawChart("visitors", "Weekly Visitors", aLastWeek, aThisWeek);
|
||||||
|
});
|
||||||
|
|
||||||
|
$.exec_json("counter.getWeeklyPageView", {}, function(htRes){
|
||||||
|
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||||
|
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||||
|
|
||||||
|
drawChart("page_views", "Weekly Page Views", aLastWeek, aThisWeek);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function drawChart(sContainerId, sTitle, aLastWeek, aThisWeek) {
|
||||||
|
$ = jQuery;
|
||||||
|
|
||||||
|
var s1 = aLastWeek;
|
||||||
|
var s2 = aThisWeek;
|
||||||
|
// Can specify a custom tick Array.
|
||||||
|
// Ticks should match up one for each y value (category) in the series.
|
||||||
|
var ticks = [xe.lang.sun,xe.lang.mon,xe.lang.tue,xe.lang.wed,xe.lang.thu,xe.lang.fri,xe.lang.sat];
|
||||||
|
|
||||||
|
var plot1 = $.jqplot(sContainerId, [s1, s2], {
|
||||||
|
// The "seriesDefaults" option is an options object that will
|
||||||
|
// be applied to all series in the chart.
|
||||||
|
seriesDefaults:{
|
||||||
|
renderer:$.jqplot.BarRenderer,
|
||||||
|
rendererOptions: {fillToZero: true}
|
||||||
|
},
|
||||||
|
// Custom labels for the series are specified with the "label"
|
||||||
|
// option on the series option. Here a series option object
|
||||||
|
// is specified for each series.
|
||||||
|
series:[
|
||||||
|
{label: xe.lang.next_week},
|
||||||
|
{label: xe.lang.this_week}
|
||||||
|
],
|
||||||
|
// Show the legend and put it outside the grid, but inside the
|
||||||
|
// plot container, shrinking the grid to accomodate the legend.
|
||||||
|
// A value of "outside" would not shrink the grid and allow
|
||||||
|
// the legend to overflow the container.
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
placement: 'outsideGrid'
|
||||||
|
},
|
||||||
|
axes: {
|
||||||
|
// Use a category axis on the x axis and use our custom ticks.
|
||||||
|
xaxis: {
|
||||||
|
renderer: $.jqplot.CategoryAxisRenderer,
|
||||||
|
ticks: ticks
|
||||||
|
},
|
||||||
|
// Pad the y axis just a little so bars can get close to, but
|
||||||
|
// not touch, the grid boundaries. 1.2 is the default padding.
|
||||||
|
yaxis: {
|
||||||
|
min: 0,
|
||||||
|
ticks: 1,
|
||||||
|
//tickOptions: {formatString: '%d'},
|
||||||
|
pad: 1.05
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -2284,9 +2284,11 @@ jQuery(function($){
|
||||||
var nLen = aSiteList.length;
|
var nLen = aSiteList.length;
|
||||||
if(nLen <= 1){
|
if(nLen <= 1){
|
||||||
// leave the site selector hidden
|
// leave the site selector hidden
|
||||||
|
$SiteSelector.hide();
|
||||||
}else{
|
}else{
|
||||||
// show and fill in
|
// show and fill in
|
||||||
$SiteSelector = $('.x_modal._common .site_selector');
|
$SiteSelector = $('.x_modal._common .site_selector');
|
||||||
|
$SiteSelector.html("");
|
||||||
for(var i=0; i<nLen; i++){
|
for(var i=0; i<nLen; i++){
|
||||||
$SiteSelector.append($("<option>").val(aSiteList[i].site_srl).html(aSiteList[i].domain));
|
$SiteSelector.append($("<option>").val(aSiteList[i].site_srl).html(aSiteList[i].domain));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue