diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-02-26 04:13:18 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-02-26 11:13:10 +0400 |
commit | 4f67ac26c4a169c0b6e3d4e84ce63daa231a07ec (patch) | |
tree | 67c209302596cb0c582875f883888f683637983f /plugins | |
parent | 8c0bbda883334c2136e6cb3a3b6cff34745c625e (diff) |
Minor updates to maps
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/API/css/styles.css | 3 | ||||
-rw-r--r-- | plugins/UserCountry/Controller.php | 1 | ||||
-rw-r--r-- | plugins/UserCountry/templates/index.tpl | 27 | ||||
-rw-r--r-- | plugins/UserCountryMap/UserCountryMap.php | 2 | ||||
-rw-r--r-- | plugins/UserCountryMap/js/visitor-map.js | 3 | ||||
-rw-r--r-- | plugins/UserCountryMap/templates/realtime-map.tpl | 22 |
6 files changed, 32 insertions, 26 deletions
diff --git a/plugins/API/css/styles.css b/plugins/API/css/styles.css index b62e0c822e..2b2f547da6 100644 --- a/plugins/API/css/styles.css +++ b/plugins/API/css/styles.css @@ -1,4 +1,5 @@ -#token_auth { + +#token_auth { background-color:#E8FFE9; border:1px solid #00CC3A; margin: 0 0 16px 8px; diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php index 037817d21d..07d5e24987 100644 --- a/plugins/UserCountry/Controller.php +++ b/plugins/UserCountry/Controller.php @@ -26,7 +26,6 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin $view->dataTableContinent = $this->getContinent(true); $view->dataTableRegion = $this->getRegion(true); $view->dataTableCity = $this->getCity(true); - $view->visitorMap = Piwik_FrontController::getInstance()->fetchDispatch('UserCountryMap', 'visitorMap'); echo $view->render(); } diff --git a/plugins/UserCountry/templates/index.tpl b/plugins/UserCountry/templates/index.tpl index f443dd19d7..ab29fa57ef 100644 --- a/plugins/UserCountry/templates/index.tpl +++ b/plugins/UserCountry/templates/index.tpl @@ -2,27 +2,28 @@ <div id="leftcolumn"> {postEvent name="template_leftColumnUserCountry"} -<h2>{'UserCountry_Continent'|translate}</h2> -{$dataTableContinent} + <h2>{'UserCountry_Continent'|translate}</h2> + {$dataTableContinent} -<div class="sparkline"> -{sparkline src=$urlSparklineCountries} -{'UserCountry_DistinctCountries'|translate:"<strong>$numberDistinctCountries</strong>"} -</div> + <div class="sparkline"> + {sparkline src=$urlSparklineCountries} + {'UserCountry_DistinctCountries'|translate:"<strong>$numberDistinctCountries</strong>"} + </div> + +{postEvent name="template_footerUserCountry"} </div> <div id="rightcolumn"> -<h2>{'UserCountry_Country'|translate}</h2> -{$dataTableCountry} + <h2>{'UserCountry_Country'|translate}</h2> + {$dataTableCountry} -<h2>{'UserCountry_Region'|translate}</h2> -{$dataTableRegion} + <h2>{'UserCountry_Region'|translate}</h2> + {$dataTableRegion} -<h2>{'UserCountry_City'|translate}</h2> -{$dataTableCity} + <h2>{'UserCountry_City'|translate}</h2> + {$dataTableCity} </div> -{postEvent name="template_footerUserCountry"} diff --git a/plugins/UserCountryMap/UserCountryMap.php b/plugins/UserCountryMap/UserCountryMap.php index 38c4e291cf..ad536bea20 100644 --- a/plugins/UserCountryMap/UserCountryMap.php +++ b/plugins/UserCountryMap/UserCountryMap.php @@ -19,7 +19,7 @@ class Piwik_UserCountryMap extends Piwik_Plugin { return array( 'name' => 'User Country Map', - 'description' => 'This plugin provides the widgets Visitor Map and Real-time Map.', + 'description' => 'This plugin provides the widgets Visitor Map and Real-time Map. Note: Requires the UserCountry plugin enabled.', 'author' => 'Piwik', 'author_homepage' => 'http://piwik.org/', 'version' => Piwik_Version::VERSION diff --git a/plugins/UserCountryMap/js/visitor-map.js b/plugins/UserCountryMap/js/visitor-map.js index 7a6cedd508..34b1656706 100644 --- a/plugins/UserCountryMap/js/visitor-map.js +++ b/plugins/UserCountryMap/js/visitor-map.js @@ -255,7 +255,7 @@ // handle window resizes $(window).off('resize').resize(onResizeLazy); - // enable mertic changes + // enable metric changes $$('.userCountryMapSelectMetrics').off('change').change(function() { updateState(self.lastSelected); }); @@ -284,6 +284,7 @@ })($$('.UserCountryMap-btn-region')); // add loading indicator overlay + var bl = $('<div id="UserCountryMap-black"></div>'); bl.hide(); $$('.UserCountryMap_map').append(bl); diff --git a/plugins/UserCountryMap/templates/realtime-map.tpl b/plugins/UserCountryMap/templates/realtime-map.tpl index d4c2827f47..355f365189 100644 --- a/plugins/UserCountryMap/templates/realtime-map.tpl +++ b/plugins/UserCountryMap/templates/realtime-map.tpl @@ -129,15 +129,19 @@ {* If the map is loaded from the menu, do a few tweaks to clean up the display *} {if $mapIsStandaloneNotWidget} - $('.top_controls').hide(); - $('ul.nav').on('piwikSwitchPage', function(event, item) {ldelim} - var clickedMenuIsNotMap = ($(item).text() != "{'UserCountryMap_RealTimeMap'|translate|escape:'js'}"); - if(clickedMenuIsNotMap) {ldelim} - $('.top_controls').show(); - {rdelim} - {rdelim}); - $('.realTimeMap_overlay').css('top', '0px'); - $('.realTimeMap_datetime').css('top', '20px'); + function initStandaloneMap() {ldelim} + $('.top_controls').hide(); + $('ul.nav').on('piwikSwitchPage', function(event, item) {ldelim} + var clickedMenuIsNotMap = ($(item).text() != "{'UserCountryMap_RealTimeMap'|translate|escape:'js'}"); + if(clickedMenuIsNotMap) {ldelim} + $('.top_controls').show(); + {rdelim} + {rdelim}); + $('.realTimeMap_overlay').css('top', '0px'); + $('.realTimeMap_datetime').css('top', '20px'); + {rdelim} + + initStandaloneMap(); {/if} {literal} |