summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-06 09:26:47 +0100
committerJacob Schatz <jschatz1@gmail.com>2016-06-09 16:24:40 -0400
commitcc971f03096b8298567caf0b9e0ae738bead03a7 (patch)
treed8aafadbf1b15798d061fafb671bb34ff0e4a26e
parent787b73f5d6dafb3db36a9113a59e3bc5b047a4b9 (diff)
downloadgitlab-ce-cc971f03096b8298567caf0b9e0ae738bead03a7.tar.gz
Improved the UX of issue & milestone date picker
Closes #18198
-rw-r--r--app/assets/stylesheets/framework/jquery.scss43
-rw-r--r--app/views/groups/milestones/new.html.haml3
-rw-r--r--app/views/projects/milestones/_form.html.haml3
-rw-r--r--app/views/shared/issuable/_form.html.haml4
4 files changed, 34 insertions, 19 deletions
diff --git a/app/assets/stylesheets/framework/jquery.scss b/app/assets/stylesheets/framework/jquery.scss
index 525ed81b059..30a5b837d69 100644
--- a/app/assets/stylesheets/framework/jquery.scss
+++ b/app/assets/stylesheets/framework/jquery.scss
@@ -2,6 +2,7 @@
font-family: $regular_font;
font-size: $font-size-base;
+ &.ui-datepicker,
&.ui-datepicker-inline {
border: 1px solid #ddd;
padding: 10px;
@@ -10,6 +11,25 @@
.ui-datepicker-header {
background: #fff;
border-color: #ddd;
+
+ .ui-datepicker-prev,
+ .ui-datepicker-next {
+ top: 4px;
+ }
+
+ .ui-datepicker-prev {
+ left: 2px;
+ }
+
+ .ui-datepicker-next {
+ right: 2px;
+ }
+
+ .ui-state-hover {
+ background: transparent;
+ border: 0;
+ cursor: pointer;
+ }
}
.ui-datepicker-calendar td a {
@@ -36,21 +56,18 @@
}
.ui-state-highlight {
- border: 1px solid #eee;
- background: #eee;
+ border: 0;
+ background: transparent;
}
- .ui-state-active {
- border: 1px solid $gl-primary;
- background: $gl-primary;
- color: #fff;
- }
-
- .ui-state-hover,
- .ui-state-focus {
- border: 1px solid $row-hover;
- background: $row-hover;
- color: #333;
+ .ui-datepicker-calendar {
+ .ui-state-active,
+ .ui-state-hover,
+ .ui-state-focus {
+ border: 1px solid $gl-primary;
+ background: $gl-primary;
+ color: #fff;
+ }
}
}
diff --git a/app/views/groups/milestones/new.html.haml b/app/views/groups/milestones/new.html.haml
index 7d9d27ae1fc..ca6c4326d1c 100644
--- a/app/views/groups/milestones/new.html.haml
+++ b/app/views/groups/milestones/new.html.haml
@@ -39,9 +39,8 @@
.col-md-6
.form-group
= f.label :due_date, "Due Date", class: "control-label"
- .col-sm-10= f.hidden_field :due_date
.col-sm-10
- .datepicker
+ = f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date"
.form-actions
= f.submit 'Create Milestone', class: "btn-create btn"
diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml
index 687222fa92f..f5e2b927da8 100644
--- a/app/views/projects/milestones/_form.html.haml
+++ b/app/views/projects/milestones/_form.html.haml
@@ -17,9 +17,8 @@
.col-md-6
.form-group
= f.label :due_date, "Due Date", class: "control-label"
- .col-sm-10= f.hidden_field :due_date
.col-sm-10
- .datepicker
+ = f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date"
.form-actions
- if @milestone.new_record?
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index b430251dbf6..17e2a7e9290 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -88,9 +88,9 @@
.col-lg-6
.form-group
= f.label :due_date, "Due date", class: "control-label"
- = f.hidden_field :due_date, id: "issuable-due-date"
.col-sm-10
- .datepicker
+ .issuable-form-select-holder
+ = f.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: "Select due date"
- if issuable.can_move?(current_user)
%hr