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:
Diffstat (limited to 'plugins/SegmentEditor/javascripts/Segmentation.js')
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index 90fc6cc7f5..d85399781b 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -8,6 +8,9 @@
Segmentation = (function($) {
Mousetrap.bind('s', function (event) {
+ if (event.altKey) {
+ return;
+ }
if (event.preventDefault) {
event.preventDefault();
} else {
@@ -546,6 +549,14 @@ Segmentation = (function($) {
});
self.target.on('click', '.add_new_segment', function (e) {
+
+ var parameters = {isAllowed: true};
+ var $rootScope = piwikHelper.getAngularDependency('$rootScope');
+ $rootScope.$emit('Segmentation.initAddSegment', parameters);
+ if (parameters && !parameters.isAllowed) {
+ return;
+ }
+
e.stopPropagation();
displayFormAddNewSegment(e);
});