Skip to content

Commit 0a9bfc2

Browse files
authored
Merge pull request #1052 from Cookiezaurs/master-bugfix
Bugfix for action map. (Action map was not loading)
2 parents af69642 + 0c979dd commit 0a9bfc2

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

frontend/express/public/javascripts/countly/countly.views.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,8 @@ window.GraphNotesView = countlyView.extend({
166166
showOtherMonths: true,
167167
onSelect: function() {}
168168
});
169-
/*eslint-disable */
170-
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@' +
171-
'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
172-
/*eslint-enable */
169+
170+
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
173171
self.emailInput = $('#email-list-input').selectize({
174172
plugins: ['remove_button'],
175173
persist: false,
@@ -208,9 +206,9 @@ window.GraphNotesView = countlyView.extend({
208206
}
209207

210208
211-
/*eslint-disable */
209+
212210
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
213-
/*eslint-enable */
211+
214212
match = input.match(regex);
215213
if (match) {
216214
return !Object.prototype.hasOwnProperty.call(this.options, match[2]);

plugins/alerts/frontend/public/javascripts/countly.views.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,7 @@ window.AlertsView = countlyView.extend({
467467
});
468468
});
469469

470-
/*eslint-disable */
471-
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@' +
472-
'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
473-
/*eslint-enable */
474-
470+
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
475471
self.emailInput = $('#email-list-input').selectize({
476472
plugins: ['remove_button'],
477473
persist: false,

plugins/reports/frontend/public/javascripts/countly.views.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,8 @@ window.ReportingView = countlyView.extend({
485485
$("#reports-multi-app-dropdown").on("cly-multi-select-change", function() {
486486
$("#reports-widget-drawer").trigger("cly-report-widget-section-complete");
487487
});
488-
/*eslint-disable */
489-
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@' +
490-
'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
491-
/*eslint-enable */
492488

489+
var REGEX_EMAIL = '([a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)';
493490
self.emailInput = $('#email-list-input').selectize({
494491
plugins: ['remove_button'],
495492
persist: false,

plugins/views/frontend/public/javascripts/countly.views.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ window.ViewsView = countlyView.extend({
401401
countlyTokenManager.createToken("View heatmap", "/o/actions", true, countlyCommon.ACTIVE_APP_ID, 1800, function(err, token) {
402402
self.token = token && token.result;
403403
if (self.token) {
404-
newWindow.location.href = url;
405404
newWindow.name = "cly:" + JSON.stringify({"token": self.token, "purpose": "heatmap", period: countlyCommon.getPeriodForAjax(), showHeatMap: true});
405+
newWindow.location.href = url;
406406
}
407407
});
408408
}
@@ -433,8 +433,8 @@ window.ViewsView = countlyView.extend({
433433
self.token = token && token.result;
434434
if (self.token) {
435435
var path = self.useView.replace("#/analytics/views/action-map/", "");
436-
newWindow.location.href = url + path;
437436
newWindow.name = "cly:" + JSON.stringify({"token": self.token, "purpose": "heatmap", period: countlyCommon.getPeriodForAjax(), showHeatMap: true});
437+
newWindow.location.href = url + path;
438438
}
439439
});
440440
$('.widget-content > .cly-button-menu-trigger').removeClass("active");

0 commit comments

Comments
 (0)