diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-05-23 14:36:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-05-23 14:36:35 +0400 |
commit | 7268be654896f68c5762ca1bea1be8b591ea4e41 (patch) | |
tree | f9e46bdbe71d40f0d6635dea64094a49a363e5e2 | |
parent | 2d5b0aca2c0bbbe0f740182134c0162b11466fd2 (diff) |
Fixing tracking code generator + better display of Loading messages (more often, but not too much)1.12-b17
BETA 17 will become 1.12 if nothing comes up (EXCEPT for MOBILE DEVICE detection plugin coming shortly :))
-rw-r--r-- | core/Version.php | 2 | ||||
-rw-r--r-- | plugins/CoreAdminHome/templates/jsTrackingGenerator.js | 5 | ||||
-rw-r--r-- | plugins/SegmentEditor/templates/Segmentation.js | 16 |
3 files changed, 14 insertions, 9 deletions
diff --git a/core/Version.php b/core/Version.php index 87bda74c95..272f67bb1b 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,5 +20,5 @@ final class Piwik_Version * Current Piwik version * @var string */ - const VERSION = '1.12-b16'; + const VERSION = '1.12-b17'; } diff --git a/plugins/CoreAdminHome/templates/jsTrackingGenerator.js b/plugins/CoreAdminHome/templates/jsTrackingGenerator.js index 034d7dbe32..32e0aa52ed 100644 --- a/plugins/CoreAdminHome/templates/jsTrackingGenerator.js +++ b/plugins/CoreAdminHome/templates/jsTrackingGenerator.js @@ -104,11 +104,6 @@ } ); ajaxRequest.setCallback(function (data) { - for (var i = 0; i != data.length; ++i) { - data[i] = JSON.parse(data[i]); - } - - // set data var currency = data[0][0].currency || ''; siteCurrencies[idSite] = currencySymbols[currency.toUpperCase()]; siteUrls[idSite] = data[1] || []; diff --git a/plugins/SegmentEditor/templates/Segmentation.js b/plugins/SegmentEditor/templates/Segmentation.js index b0993e36c0..7ca9ebdffc 100644 --- a/plugins/SegmentEditor/templates/Segmentation.js +++ b/plugins/SegmentEditor/templates/Segmentation.js @@ -398,6 +398,7 @@ Segmentation = (function($) { segment.definition = $(this).data("definition"); segment.name = $(this).attr("title"); self.segmentSelectMethod( segment.definition ); + toggleLoadingMessage( segment.definition.length ); setSegment(segment.definition); markCurrentSegment(); } @@ -955,6 +956,14 @@ Segmentation = (function($) { $(selector).css({left: Math.max($('#periodString')[0].offsetWidth) + 10}); } + function toggleLoadingMessage(segmentIsSet) { + if (segmentIsSet) { + $('#ajaxLoading .loadingSegment').show(); + } else { + $('#ajaxLoading .loadingSegment').hide(); + } + } + var initHtml = function() { if(typeof self.content !== "undefined"){ self.content.unbind(); @@ -972,6 +981,10 @@ Segmentation = (function($) { // assign content to object attribute to make it easil accesible through all widget methods bindListEvents(); markCurrentSegment(); + + // Loading message + var segmentIsSet = self.getSegment().length; + toggleLoadingMessage(segmentIsSet); } initHtml(); }; @@ -990,9 +1003,6 @@ $(document).ready( function(){ $('#segmentEditorPanel a.close').click(); segmentDefinition = cleanupSegmentDefinition(segmentDefinition); segmentDefinition = encodeURIComponent(segmentDefinition); - if(segmentDefinition.length) { - $('.loadingSegment').show(); - } return broadcast.propagateNewPage('segment=' + segmentDefinition, true); }; |