@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json | |||||
from .exceptions import * | from .exceptions import * | ||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | ||||
__version__ = '8.10.9' | |||||
__version__ = '9.0.0' | |||||
__title__ = "Frappe Framework" | __title__ = "Frappe Framework" | ||||
local = Local() | local = Local() | ||||
@@ -259,8 +259,10 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides { | |||||
return $(`<div class="page-card-container" data-state="setup"> | return $(`<div class="page-card-container" data-state="setup"> | ||||
<div class="page-card"> | <div class="page-card"> | ||||
<div class="page-card-head"> | <div class="page-card-head"> | ||||
<span class="indicator blue"> | |||||
${title}</span> | |||||
${loading | |||||
? `<span class="indicator orange">${title}</span>` | |||||
: `<span class="indicator green">${title}</span>` | |||||
} | |||||
</div> | </div> | ||||
<p>${message}</p> | <p>${message}</p> | ||||
<div class="state-icon-container"> | <div class="state-icon-container"> | ||||
@@ -522,7 +522,7 @@ a.progress-small .progress-bar { | |||||
background-color: #98d85b; | background-color: #98d85b; | ||||
} | } | ||||
li.user-progress .progress-chart { | li.user-progress .progress-chart { | ||||
width: 60px; | |||||
width: 50px; | |||||
margin-top: 8px; | margin-top: 8px; | ||||
} | } | ||||
li.user-progress .progress { | li.user-progress .progress { | ||||
@@ -544,6 +544,9 @@ li.user-progress .progress-bar { | |||||
margin-top: 0px; | margin-top: 0px; | ||||
margin-left: 2px; | margin-left: 2px; | ||||
} | } | ||||
li.user-progress .progress-chart { | |||||
width: 25px; | |||||
} | |||||
} | } | ||||
.msg-box { | .msg-box { | ||||
padding: 30px 15px; | padding: 30px 15px; | ||||
@@ -67,6 +67,10 @@ body { | |||||
#navbar-breadcrumbs { | #navbar-breadcrumbs { | ||||
margin: 0px; | margin: 0px; | ||||
display: inline-block; | display: inline-block; | ||||
max-width: 150px; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
} | } | ||||
#navbar-breadcrumbs > li, | #navbar-breadcrumbs > li, | ||||
#navbar-breadcrumbs > li > a { | #navbar-breadcrumbs > li > a { | ||||
@@ -187,11 +191,8 @@ body { | |||||
} | } | ||||
} | } | ||||
@media (max-width: 991px) and (max-width: 480px) { | @media (max-width: 991px) and (max-width: 480px) { | ||||
#navbar-breadcrumbs li a { | |||||
#navbar-breadcrumbs li > a { | |||||
width: 100px; | width: 100px; | ||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
} | } | ||||
} | } | ||||
@media (max-width: 767px) { | @media (max-width: 767px) { | ||||
@@ -133,6 +133,7 @@ | |||||
background-color: #ff5858; | background-color: #ff5858; | ||||
} | } | ||||
.navbar-form .awesomplete { | .navbar-form .awesomplete { | ||||
margin-left: -15px; | |||||
width: 300px; | width: 300px; | ||||
} | } | ||||
@media (max-width: 1199px) { | @media (max-width: 1199px) { | ||||
@@ -195,13 +196,14 @@ | |||||
} | } | ||||
#navbar-breadcrumbs > li > a { | #navbar-breadcrumbs > li > a { | ||||
padding: 6px 15px 10px 0px; | padding: 6px 15px 10px 0px; | ||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
max-width: 170px; | |||||
} | } | ||||
@media (min-width: 991px) and (max-width: 1199px) { | @media (min-width: 991px) and (max-width: 1199px) { | ||||
#navbar-breadcrumbs > li > a { | #navbar-breadcrumbs > li > a { | ||||
max-width: 143px; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
max-width: 120px; | |||||
} | } | ||||
} | } | ||||
.toolbar-user-fullname { | .toolbar-user-fullname { | ||||
@@ -688,6 +688,14 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph { | |||||
this.month_weeks[this.current_month] = 0; | this.month_weeks[this.current_month] = 0; | ||||
this.month_start_points.push(13); | 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++) { | for(var i = 0; i < no_of_weeks; i++) { | ||||
let data_group, month_change = 0; | let data_group, month_change = 0; | ||||
let day = new Date(current_week_sunday); | 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 data_value = 0; | ||||
let color_index = 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); | 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); | 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) { | get_max_checkpoint(value, distribution) { | ||||
return distribution.filter((d, i) => { | 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 | // TODO: date utils, move these out | ||||
@@ -350,7 +350,7 @@ a.progress-small { | |||||
li.user-progress { | li.user-progress { | ||||
.progress-chart { | .progress-chart { | ||||
width: 60px; | |||||
width: 50px; | |||||
margin-top: 8px; | margin-top: 8px; | ||||
} | } | ||||
@@ -377,6 +377,10 @@ li.user-progress { | |||||
margin-top: 0px; | margin-top: 0px; | ||||
margin-left: 2px; | margin-left: 2px; | ||||
} | } | ||||
li.user-progress .progress-chart { | |||||
width: 25px; | |||||
} | |||||
} | } | ||||
.msg-box { | .msg-box { | ||||
@@ -90,15 +90,14 @@ body { | |||||
#navbar-breadcrumbs { | #navbar-breadcrumbs { | ||||
margin: 0px; | margin: 0px; | ||||
display: inline-block; | display: inline-block; | ||||
max-width: 150px; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
@media(max-width: 480px) { | @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 { | .reply { | ||||
padding: 10px; | padding: 10px; | ||||
} | |||||
} | |||||
.commented-on-small{ | .commented-on-small{ | ||||
display: inline-block; | display: inline-block; | ||||
} | } | ||||
@@ -161,6 +161,7 @@ | |||||
} | } | ||||
.navbar-form .awesomplete { | .navbar-form .awesomplete { | ||||
margin-left: -15px; | |||||
width: 300px; | width: 300px; | ||||
@media (max-width: @screen-md) { | @media (max-width: @screen-md) { | ||||
@@ -218,12 +219,13 @@ | |||||
#navbar-breadcrumbs > li > a { | #navbar-breadcrumbs > li > a { | ||||
padding: 6px 15px 10px 0px; | padding: 6px 15px 10px 0px; | ||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
max-width: 170px; | |||||
@media (min-width:991px) and (max-width: 1199px) { | @media (min-width:991px) and (max-width: 1199px) { | ||||
max-width: 143px; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
max-width: 120px; | |||||
} | } | ||||
} | } | ||||