From 2c6ed1e1a52fbe424bdb71739e55b6e71c26ec6d Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 24 May 2017 13:55:15 -0700 Subject: [PATCH] Adjust markup and styles so that the Quick, Relative, and Absolute layouts all occupy the same bounds (#1) * Adjust markup and styles so that the Quick, Relative, and Absolute layouts all occupy the same bounds, so the content doesn't jump around as you switch modes.. * Make kbn-timepicker-content responsive so that it stacks content on narrower screens. * Combine Relative input and select fields using kuiFieldGroup. * Make Timepicker submit button wider. * Align button on right. --- .../angular-bootstrap/datepicker/day.html | 2 +- .../angular-bootstrap/datepicker/month.html | 2 +- .../angular-bootstrap/datepicker/year.html | 2 +- .../kbn_timepicker_absolute_panel.html | 96 ++++---- .../kbn_timepicker_quick_panel.html | 2 +- .../kbn_timepicker_relative_panel.html | 232 ++++++++++-------- src/ui/public/timepicker/timepicker.html | 2 +- src/ui/public/timepicker/timepicker.less | 28 +++ 8 files changed, 217 insertions(+), 149 deletions(-) diff --git a/src/ui/public/angular-bootstrap/datepicker/day.html b/src/ui/public/angular-bootstrap/datepicker/day.html index 4d2bb57ffb0ae..4912427ea0b70 100755 --- a/src/ui/public/angular-bootstrap/datepicker/day.html +++ b/src/ui/public/angular-bootstrap/datepicker/day.html @@ -1,5 +1,5 @@ -
-
- +
+
+
+ + + +
+ +
Invalid Date
+ +
+ +
-
- -
-
-
-
- +
+
+ + + +
+ Invalid Date -
-
- + +
+ +
-
- -
- - From must occur before To -
+
+ + From must occur before To
diff --git a/src/ui/public/timepicker/quick_panel/kbn_timepicker_quick_panel.html b/src/ui/public/timepicker/quick_panel/kbn_timepicker_quick_panel.html index 87423552622ee..6e659719b4a9a 100644 --- a/src/ui/public/timepicker/quick_panel/kbn_timepicker_quick_panel.html +++ b/src/ui/public/timepicker/quick_panel/kbn_timepicker_quick_panel.html @@ -1,4 +1,4 @@ -
+
  • diff --git a/src/ui/public/timepicker/relative_panel/kbn_timepicker_relative_panel.html b/src/ui/public/timepicker/relative_panel/kbn_timepicker_relative_panel.html index 2713fffff1c71..990c6cde3773d 100644 --- a/src/ui/public/timepicker/relative_panel/kbn_timepicker_relative_panel.html +++ b/src/ui/public/timepicker/relative_panel/kbn_timepicker_relative_panel.html @@ -1,111 +1,139 @@
    -
    - -
    -
    - -
    -
    - -
    -
    -
    - -
    - From must occur before To +
    +
    +
    + + +
    -
    -
    -
    - -
    -
    - -
    -
    - +
    + + {{relative.from.preview}} + + + Invalid Expression + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + From must occur before To +
    +
    -
    -
    - + +
    +
    + + + +
    + +
    + + {{relative.to.preview}} + + + Invalid Expression + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    -
    - -
    -
    - -
    +
    +
    diff --git a/src/ui/public/timepicker/timepicker.html b/src/ui/public/timepicker/timepicker.html index f2640fba692e0..17df38e0e4fcc 100644 --- a/src/ui/public/timepicker/timepicker.html +++ b/src/ui/public/timepicker/timepicker.html @@ -1,6 +1,6 @@
    -
    +
    diff --git a/src/ui/public/timepicker/timepicker.less b/src/ui/public/timepicker/timepicker.less index 79bf620334b8f..435782efd4b1d 100644 --- a/src/ui/public/timepicker/timepicker.less +++ b/src/ui/public/timepicker/timepicker.less @@ -3,6 +3,11 @@ display: flex; justify-content: flex-end; + .kbn-timepicker-content { + width: 100%; + max-width: 600px; + } + [kbn-time-input] { text-align: center; } @@ -13,6 +18,29 @@ float: left; padding-right: 15px; } + .kbn-timepicker-body { + display: flex; + align-itmes: top; + justify-content: stretch; + width: 100%; + + @media (max-width: 660px) { + flex-direction: column; + } + } + .kbn-timepicker-body-column { + width: 100%; + } + .kbn-timepicker-form-header { + margin-bottom: 0 !important; + } + .kbn-timepicker-actions { + display: flex; + justify-content: flex-end; + } + .kbn-timepicker-submit-button { + min-width: 100px; + } .kbn-refresh-section { float: left; padding: 0px 15px;