diff options
Diffstat (limited to 'plugins/SegmentEditor/javascripts/Segmentation.js')
-rw-r--r-- | plugins/SegmentEditor/javascripts/Segmentation.js | 11 |
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); }); |