feat: Gantt Rebranded Styles (#11662)

list.min.css is not needed anymore as the only styles it included was of old gantt
This commit is contained in:
Faris Ansari 2020-10-08 10:00:25 +05:30 committed by GitHub
parent 8970cc89e9
commit 1b6cbf681f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 95 additions and 6 deletions

View file

@ -664,7 +664,7 @@
}
],
"max_attachments": 5,
"modified": "2020-08-26 19:48:49.677800",
"modified": "2020-10-07 19:48:49.677800",
"modified_by": "Administrator",
"module": "Core",
"name": "User",

View file

@ -38,7 +38,6 @@ app_include_js = [
]
app_include_css = [
"assets/css/desk.min.css",
"assets/css/list.min.css",
"assets/css/report.min.css",
]

View file

@ -90,8 +90,15 @@ frappe.views.GanttView = class GanttView extends frappe.views.ListView {
const date_format = 'YYYY-MM-DD';
this.$result.empty();
this.$result.addClass('gantt-modern');
this.gantt = new Gantt(this.$result[0], this.tasks, {
bar_height: 35,
bar_corner_radius: 4,
resize_handle_width: 8,
resize_handle_height: 28,
resize_handle_corner_radius: 3,
resize_handle_offset: 4,
view_mode: gantt_view_mode,
date_format: "YYYY-MM-DD",
on_click: task => {

View file

@ -0,0 +1,82 @@
.gantt-modern .gantt {
.bar {
fill: white;
}
.arrow {
stroke: var(--gray-600);
}
.bar-wrapper {
.bar {
stroke: var(--gray-300);
stroke-width: 1;
}
&:hover {
.bar {
fill: white;
stroke: var(--gray-400);
}
.bar-progress {
fill: var(--gray-200);
}
.handle {
visibility: hidden;
opacity: 0;
}
}
&.active {
.handle {
visibility: visible;
opacity: 1;
fill: var(--blue-200);
}
.bar {
fill: var(--blue-300);
stroke: var(--blue-300);
}
.bar-progress {
fill: var(--blue-500);
}
.bar-label {
fill: white;
}
}
}
.bar-progress {
fill: var(--gray-200);
}
.bar-label {
fill: var(--text-color);
font-weight: normal;
}
}
.gantt-container .popup-wrapper {
min-width: 9rem;
border-radius: var(--border-radius);
font-size: var(--text-sm);
.title {
color: white;
border-bottom: none;
padding-bottom: 0;
}
.subtitle {
color: var(--gray-500);
}
.pointer {
height: 15px;
}
}

View file

@ -24,6 +24,7 @@
@import "list";
@import "report";
@import "frappe-datatable";
@import "frappe-gantt";
@import "image-view";
@import "kanban";
@import "calendar";
@ -32,4 +33,4 @@
@import "controls";
@import "role_editor";
@import "user-profile";
@import "quill";
@import "quill";

View file

@ -24,7 +24,7 @@
<link type="text/css" rel="stylesheet" href="{{ include }}?ver={{ build_version }}">
{%- endfor -%}
</head>
<body data-theme="{{ theme.lower() }}">
<body data-theme="{{ desk_theme.lower() }}">
{% include "public/icons/timeless/symbol-defs.svg" %}
</svg>
<div class="centered splash" style="width: 100px; height: 100px;">

View file

@ -43,7 +43,7 @@ def get_context(context):
"include_css": hooks["app_include_css"],
"sounds": hooks["sounds"],
"boot": boot if context.get("for_mobile") else boot_json,
"theme": desk_theme or "Light",
"desk_theme": desk_theme or "Light",
"csrf_token": csrf_token,
"google_analytics_id": frappe.conf.get("google_analytics_id"),
"mixpanel_id": frappe.conf.get("mixpanel_id")

View file

@ -4304,7 +4304,7 @@ lodash@4.17.15, lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.4,
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.12:
lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.10:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==