From 532e2e2dcd8b8e46dc2cb436afb86f5977db82ac Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Fri, 22 Sep 2017 01:05:17 +0530 Subject: [PATCH 1/5] [navbar] layout fixes --- frappe/public/css/desk.css | 5 ++++- frappe/public/css/mobile.css | 9 +++++---- frappe/public/css/navbar.css | 10 ++++++---- frappe/public/less/desk.less | 6 +++++- frappe/public/less/mobile.less | 15 +++++++-------- frappe/public/less/navbar.less | 10 ++++++---- 6 files changed, 33 insertions(+), 22 deletions(-) diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css index 8b1dacd667..b2ff1bbd06 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/less/desk.less b/frappe/public/less/desk.less index 786c05461b..14343d3332 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; } } From 40e57efa528cfcced5a0baaff2ed5040e13d4f0d Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Tue, 26 Sep 2017 12:05:50 +0530 Subject: [PATCH 2/5] [setup] indicator and check color --- frappe/desk/page/setup_wizard/setup_wizard.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frappe/desk/page/setup_wizard/setup_wizard.js b/frappe/desk/page/setup_wizard/setup_wizard.js index cca625297e..6f14ce06f5 100644 --- a/frappe/desk/page/setup_wizard/setup_wizard.js +++ b/frappe/desk/page/setup_wizard/setup_wizard.js @@ -38,7 +38,7 @@ frappe.pages['setup-wizard'].on_page_load = function(wrapper) { freeze: true, callback: function(r) { frappe.setup.data.lang = r.message; - + frappe.setup.run_event("before_load"); var wizard_settings = { parent: wrapper, @@ -244,14 +244,16 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides { return $(`
- - ${title} + ${loading + ? '${title}' + : `${title}` + }

${message}

${loading ? '
' - : `
` } From fa120c3ab3ea256919eaccd2ad3dd7cbc4a1f934 Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Tue, 26 Sep 2017 09:11:10 +0530 Subject: [PATCH 3/5] [fix] values by date strings --- frappe/public/js/frappe/ui/graphs.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) 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 From a15c2a53a235cc6c11b18fbc1c38769ff6abb858 Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Tue, 26 Sep 2017 12:27:47 +0530 Subject: [PATCH 4/5] [minor] --- frappe/desk/page/setup_wizard/setup_wizard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/desk/page/setup_wizard/setup_wizard.js b/frappe/desk/page/setup_wizard/setup_wizard.js index 6f14ce06f5..02264e065f 100644 --- a/frappe/desk/page/setup_wizard/setup_wizard.js +++ b/frappe/desk/page/setup_wizard/setup_wizard.js @@ -245,7 +245,7 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides {
${loading - ? '${title}' + ? `${title}` : `${title}` }
From 714444bf5ff39e7483fc3eb6b9ecba8051b26858 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 26 Sep 2017 16:32:53 +0600 Subject: [PATCH 5/5] bumped to version 9.0.0 --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 48b9c17e2f..5ee4517b6d 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json from .exceptions import * 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" local = Local()