Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Apps empty view + prod/dev switch + fixes #114

Merged
merged 5 commits into from
Dec 16, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Displaying empty graph for all apps
  • Loading branch information
ar2rsawseen committed Dec 16, 2014
commit 5eebf3c93891d51a58ba2792a92fd78aac2e5b2a
31 changes: 22 additions & 9 deletions frontend/express/public/javascripts/countly/countly.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,7 @@ window.EnterpriseView = countlyView.extend({
window.AllAppsView = countlyView.extend({
selectedView:"#draw-total-sessions",
selectedApps: {"all":true},
selectedCount: 1,
selectedCount: 0,
initialize:function () {
this.template = Handlebars.compile($("#template-allapps").html());
},
Expand Down Expand Up @@ -2931,7 +2931,7 @@ window.AllAppsView = countlyView.extend({
$("#sidebar-menu > .item").addClass("hide");
$("#management-menu").removeClass("hide");
$("#enterprise-menu").removeClass("hide");
$("#allapps-menu").removeClass("hide").css("display", "inline");
$("#allapps-menu").removeClass("hide").css("display", "inline-block");
var appData = countlyAllApps.getData();

this.templateData = {
Expand Down Expand Up @@ -3010,21 +3010,34 @@ window.AllAppsView = countlyView.extend({
row.find(".check").removeClass("icon-check").addClass("icon-unchecked");
row.find(".color").css("background-color", "transparent");
delete self.selectedApps[row.attr("id")];
self.selectedCount--;
if(row.attr("id") != "all")
self.selectedCount--;
if(self.selectedCount==0){
$("#empty-graph").show();
$(".big-numbers").removeClass("active");
$(".big-numbers .select").removeClass("selected");
}

}
else if(self.selectedCount <= 10 || row.attr("id") == "all"){
else if(self.selectedCount < 10 || row.attr("id") == "all"){
if(self.selectedCount==0){
$("#empty-graph").hide();
$(self.selectedView).parents(".big-numbers").addClass("active");
}
if(row.attr("id") == "all"){
$(".check.icon-check").removeClass("icon-check").addClass("icon-unchecked");
$('.d-table').find(".color").css("background-color", "transparent");
self.selectedApps = {};
self.selectedCount = 0;
}
else if(self.selectedApps["all"]){
$(".d-table #all .check.icon-check").removeClass("icon-check").addClass("icon-unchecked");
$('.d-table #all').find(".color").css("background-color", "transparent");
delete self.selectedApps["all"];
else{
if(self.selectedApps["all"]){
$(".d-table #all .check.icon-check").removeClass("icon-check").addClass("icon-unchecked");
$('.d-table #all').find(".color").css("background-color", "transparent");
delete self.selectedApps["all"];
}
self.selectedCount++;
}
self.selectedCount++;
row.find(".check").removeClass("icon-unchecked").addClass("icon-check");
self.selectedApps[row.attr("id")] = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,5 @@ allapps.total-sessions = Total Sessions
allapps.total-users = Total Users
allapps.new-users = New Users
allapps.total-duration = Total Duration
allapps.average-duration = Average Duration
allapps.average-duration = Average Duration
allapps.empty-graph = Select one or more applications to see the chart
1 change: 1 addition & 0 deletions frontend/express/public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -700,4 +700,5 @@ table.events-table { width:100%; padding:0; margin:0; }

.allappview .widget-content .big-numbers .inner{height: 30px;}
.allappview .widget-footer{border-radius: 0;}
.allappview #empty-graph {position: absolute; text-align: center; font-size: 35px; width:100%; top:50%; margin-top: -20px; display: none;}
.allapps div.color{ width: 10px; height: 20px; float: right;}