Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-03-02 23:23:52 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-03-02 23:23:52 +0400
commit7345411d6a062b52d75a31d09db64cd1f4bb4063 (patch)
tree141e446a5031420888f45ccd7fc646cf5bc63ca3 /plugins/CoreHome/javascripts/top_controls.js
parentc21379323d472d0e7e59d9fde106856c03dd17cd (diff)
Fixing UI tests build:
- change idsite to idSite in Overlay URLs in piwik.js - don't init top controls if top controls container can't be found - add default parameter for $urls in SitesManager.setSiteAliasUrls so site alias URLs can be reset - fix bugs in UI tests database setup (including moving dashboard setup to UITestFixture class & keeping outside of setUp function so --persist-fixture-data will work in case the super user is deleted) - Add queryParamOverride testingEnvironment variable. - fix screenshot testing page renderer's method of waiting for CSS images - add margin bottom & left for widgetized controls for tests - add diagnostics to upload_artifacts.sh script
Diffstat (limited to 'plugins/CoreHome/javascripts/top_controls.js')
-rw-r--r--plugins/CoreHome/javascripts/top_controls.js25
1 files changed, 14 insertions, 11 deletions
diff --git a/plugins/CoreHome/javascripts/top_controls.js b/plugins/CoreHome/javascripts/top_controls.js
index c2089648d0..21f3c41fc6 100644
--- a/plugins/CoreHome/javascripts/top_controls.js
+++ b/plugins/CoreHome/javascripts/top_controls.js
@@ -7,18 +7,21 @@
function initTopControls() {
var $topControlsContainer = $('.top_controls'),
left = 0;
- $('.piwikTopControl').each(function () {
- var $control = $(this);
- if ($control.css('display') == 'none') {
- return;
- }
+
+ if ($topControlsContainer.length) {
+ $('.piwikTopControl').each(function () {
+ var $control = $(this);
+ if ($control.css('display') == 'none') {
+ return;
+ }
- $control.css('left', left);
+ $control.css('left', left);
- if (!$.contains($topControlsContainer[0], this)) {
- $control.detach().appendTo($topControlsContainer);
- }
+ if (!$.contains($topControlsContainer[0], this)) {
+ $control.detach().appendTo($topControlsContainer);
+ }
- left += $control.outerWidth(true);
- });
+ left += $control.outerWidth(true);
+ });
+ }
} \ No newline at end of file