Skip to content

Commit 84c40fd

Browse files
committed
[feature/crud-context] drill related ui elements hided from missing places like density, locale, sources and loyalty.
1 parent d9b16af commit 84c40fd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,10 @@ window.LoyaltyView = countlyView.extend({
900900
}, 500);
901901
});
902902
}
903+
904+
if (!countlyAuth.validateRead('drill')) {
905+
$('#toggle-filter').hide();
906+
}
903907
}
904908
},
905909
setInput: function(inputs, subs, cur, sub, total) {
@@ -3441,7 +3445,6 @@ window.ManageUsersView = countlyView.extend({
34413445
for (var i0 in types) {
34423446
$('.create-user-drawer #' + types[i0][0] + '-' + feature + '-' + index).countlyCheckbox();
34433447
if (types[i0][0] === 'r' && feature === 'core') {
3444-
console.log('.create-user-drawer #' + types[i0][0] + '-' + feature + '-' + index);
34453448
$('.create-user-drawer #' + types[i0][0] + '-' + feature + '-' + index).countlyCheckbox().set(true);
34463449
$('.create-user-drawer #' + types[i0][0] + '-' + feature + '-' + index).countlyCheckbox().setDisabled();
34473450
}
@@ -4190,6 +4193,7 @@ window.ManageUsersView = countlyView.extend({
41904193
},
41914194
dataType: "json",
41924195
success: function(member) {
4196+
alert(self.memberModel.password);
41934197
CountlyHelpers.notify({
41944198
type: 'green',
41954199
delay: 3000,

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

+4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ window.DensityView = countlyView.extend({
9696
}));
9797

9898
$("#dataTableOne").stickyTableHeaders();
99+
100+
if (!countlyAuth.validateRead('drill')) {
101+
$('#drill-down-for-view').hide();
102+
}
99103
}
100104
},
101105
refresh: function() {

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

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ window.LanguageView = countlyView.extend({
6464
}));
6565

6666
$(".d-table").stickyTableHeaders();
67+
68+
if (!countlyAuth.validateRead('drill')) {
69+
$('#drill-down-for-view').hide();
70+
}
6771
}
6872
},
6973
refresh: function() {

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ window.SourcesView = countlyView.extend({
8888
countlyCommon.drawGraph(data.chartDPNew, "#dashboard-graph2", "pie");
8989

9090
CountlyHelpers.expandRows(this.dtable, this.expandTable, this);
91+
92+
if (!countlyAuth.validateRead('drill')) {
93+
$('#drill-down-for-view').hide();
94+
}
9195
}
9296
},
9397
refresh: function() {},
@@ -116,7 +120,7 @@ window.SourcesView = countlyView.extend({
116120
var str = '';
117121
if (d && d.sources && self.dataMap[d.sources]) {
118122
str += '<div class="datatablesubrow">' +
119-
'<table cellpadding="5" cellspacing="0" border="0" class="subtable">';
123+
'<table cellpadding="5" cellspacing="0" border="0" class="subtable">';
120124
str += '<tr>';
121125
str += '<th class="source-40">' + jQuery.i18n.map["sources.source"] + '</th>';
122126
str += '<th class="source-20">' + jQuery.i18n.map["common.table.total-sessions"] + '</th>';
@@ -137,7 +141,7 @@ window.SourcesView = countlyView.extend({
137141
str += '</tr>';
138142
}
139143
str += '</table>' +
140-
'</div>';
144+
'</div>';
141145
}
142146
return str;
143147
},

0 commit comments

Comments
 (0)