From 71db99a4b8a20da10ad0e5759543b0aae54ad0bc Mon Sep 17 00:00:00 2001 From: nagoon97 Date: Mon, 31 Dec 2012 10:03:35 +0000 Subject: [PATCH] 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 --- common/js/xml_handler.js | 14 +++-- modules/admin/lang/lang.xml | 36 ++++++++++++ modules/admin/tpl/index.html | 103 +++++++++++++++++++++++++++++++++- modules/admin/tpl/js/admin.js | 2 + 4 files changed, 148 insertions(+), 7 deletions(-) diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index bdf7e1560..c8656c237 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -375,11 +375,15 @@ $.exec_json = function(action,data,func){ ,data:$.param(data) ,success : function(data){ $(".wfsr").hide().trigger('cancel_confirm'); - if(data.error > 0) alert(data.message); - if(data.error == -1 && data.message == 'msg_is_not_administrator'){ - alert('You are not logged in as an administrator'); -// window.location.reload(); - return; + if(data.error != 0){ + if(data.error == -1 && data.message == 'msg_is_not_administrator'){ + alert('You are not logged in as an administrator'); + // window.location.reload(); + return; + }else{ + alert(data.message); + return; + } } if($.isFunction(func)) func(data); } diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index 147e6ed63..12b46624c 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -1499,4 +1499,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index ed449e80a..b5918d0ba 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -1,4 +1,15 @@ + + + + + + +

{$lang->control_panel} {$lang->help}

@@ -35,11 +46,12 @@
+

{$lang->uv}

-
<!-- Graph here -->
+

{$lang->pv}

-
<!-- Graph here -->
+
diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 52c91c383..ff5918b32 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -2284,9 +2284,11 @@ jQuery(function($){ var nLen = aSiteList.length; if(nLen <= 1){ // leave the site selector hidden + $SiteSelector.hide(); }else{ // show and fill in $SiteSelector = $('.x_modal._common .site_selector'); + $SiteSelector.html(""); for(var i=0; i").val(aSiteList[i].site_srl).html(aSiteList[i].domain)); }