-
- ${title}
+ ${loading
+ ? `${title}`
+ : `${title}`
+ }
${message}
diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css
index 845b36117f..9e30f9e52b 100644
--- a/frappe/public/css/desk.css
+++ b/frappe/public/css/desk.css
@@ -522,7 +522,7 @@ a.progress-small .progress-bar {
background-color: #98d85b;
}
li.user-progress .progress-chart {
- width: 60px;
+ width: 50px;
margin-top: 8px;
}
li.user-progress .progress {
@@ -544,6 +544,9 @@ li.user-progress .progress-bar {
margin-top: 0px;
margin-left: 2px;
}
+ li.user-progress .progress-chart {
+ width: 25px;
+ }
}
.msg-box {
padding: 30px 15px;
diff --git a/frappe/public/css/mobile.css b/frappe/public/css/mobile.css
index cc5b926f13..f21407b636 100644
--- a/frappe/public/css/mobile.css
+++ b/frappe/public/css/mobile.css
@@ -67,6 +67,10 @@ body {
#navbar-breadcrumbs {
margin: 0px;
display: inline-block;
+ max-width: 150px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
#navbar-breadcrumbs > li,
#navbar-breadcrumbs > li > a {
@@ -187,11 +191,8 @@ body {
}
}
@media (max-width: 991px) and (max-width: 480px) {
- #navbar-breadcrumbs li a {
+ #navbar-breadcrumbs li > a {
width: 100px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
}
}
@media (max-width: 767px) {
diff --git a/frappe/public/css/navbar.css b/frappe/public/css/navbar.css
index f68908d7d0..c64e71314b 100644
--- a/frappe/public/css/navbar.css
+++ b/frappe/public/css/navbar.css
@@ -133,6 +133,7 @@
background-color: #ff5858;
}
.navbar-form .awesomplete {
+ margin-left: -15px;
width: 300px;
}
@media (max-width: 1199px) {
@@ -195,13 +196,14 @@
}
#navbar-breadcrumbs > li > a {
padding: 6px 15px 10px 0px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 170px;
}
@media (min-width: 991px) and (max-width: 1199px) {
#navbar-breadcrumbs > li > a {
- max-width: 143px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+ max-width: 120px;
}
}
.toolbar-user-fullname {
diff --git a/frappe/public/js/frappe/ui/graphs.js b/frappe/public/js/frappe/ui/graphs.js
index 1fe86e7212..52f2b07ad2 100644
--- a/frappe/public/js/frappe/ui/graphs.js
+++ b/frappe/public/js/frappe/ui/graphs.js
@@ -688,6 +688,14 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph {
this.month_weeks[this.current_month] = 0;
this.month_start_points.push(13);
+ this.date_values = {};
+
+ Object.keys(this.data).map(key => {
+ let date = new Date(key * 1000);
+ let date_str = this.get_dd_mm_yyyy(date);
+ this.date_values[date_str] = this.data[key];
+ });
+
for(var i = 0; i < no_of_weeks; i++) {
let data_group, month_change = 0;
let day = new Date(current_week_sunday);
@@ -721,16 +729,15 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph {
let data_value = 0;
let color_index = 0;
- // TODO: More foolproof for any data
- let timestamp = Math.floor(current_date.getTime()/1000).toFixed(1);
+ let timestamp = this.get_dd_mm_yyyy(current_date);
- if(this.data[timestamp]) {
- data_value = this.data[timestamp];
+ if(this.date_values[timestamp]) {
+ data_value = this.date_values[timestamp];
color_index = this.get_max_checkpoint(data_value, this.distribution);
}
- if(this.data[Math.round(timestamp)]) {
- data_value = this.data[Math.round(timestamp)];
+ if(this.date_values[Math.round(timestamp)]) {
+ data_value = this.date_values[Math.round(timestamp)];
color_index = this.get_max_checkpoint(data_value, this.distribution);
}
@@ -832,11 +839,8 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph {
get_max_checkpoint(value, distribution) {
return distribution.filter((d, i) => {
- if(i === 1) {
- return distribution[0] < value;
- }
- return d <= value;
- }).length - 1;
+ return value > d;
+ }).length;
}
// TODO: date utils, move these out
diff --git a/frappe/public/less/desk.less b/frappe/public/less/desk.less
index ea7a771da8..66ff146e40 100644
--- a/frappe/public/less/desk.less
+++ b/frappe/public/less/desk.less
@@ -350,7 +350,7 @@ a.progress-small {
li.user-progress {
.progress-chart {
- width: 60px;
+ width: 50px;
margin-top: 8px;
}
@@ -377,6 +377,10 @@ li.user-progress {
margin-top: 0px;
margin-left: 2px;
}
+
+ li.user-progress .progress-chart {
+ width: 25px;
+ }
}
.msg-box {
diff --git a/frappe/public/less/mobile.less b/frappe/public/less/mobile.less
index 3c93a88177..63996f31ad 100644
--- a/frappe/public/less/mobile.less
+++ b/frappe/public/less/mobile.less
@@ -90,15 +90,14 @@ body {
#navbar-breadcrumbs {
margin: 0px;
display: inline-block;
+ max-width: 150px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
@media(max-width: 480px) {
- li {
- a {
- width: 100px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
+ li > a {
+ width: 100px;
}
}
}
@@ -457,7 +456,7 @@ body {
}
.reply {
padding: 10px;
- }
+ }
.commented-on-small{
display: inline-block;
}
diff --git a/frappe/public/less/navbar.less b/frappe/public/less/navbar.less
index 8d3619d58d..52e71143b7 100644
--- a/frappe/public/less/navbar.less
+++ b/frappe/public/less/navbar.less
@@ -161,6 +161,7 @@
}
.navbar-form .awesomplete {
+ margin-left: -15px;
width: 300px;
@media (max-width: @screen-md) {
@@ -218,12 +219,13 @@
#navbar-breadcrumbs > li > a {
padding: 6px 15px 10px 0px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 170px;
@media (min-width:991px) and (max-width: 1199px) {
- max-width: 143px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+ max-width: 120px;
}
}