From c15f66b0d52e855ca0c03e20f875f7c4bd67282f Mon Sep 17 00:00:00 2001 From: Dixsie Wolmers Date: Wed, 11 Sep 2019 15:26:38 -0500 Subject: Update certificate management page consistency This change applies global styles to improve page layout consistency and modal management - Adds page and section styles - Removes unused styles - Creates individual html files for modals - Updates certificate modals to bootstrap modal - Updates global styles for input file field in file-upload.scss TODO: - Update certificate table with table component in separate commit - Update CSR modal to use global form-field styles in separate commit Signed-off-by: Dixsie Wolmers Change-Id: I9b800cb684740da1a9168294433e726efb0f9d0e --- app/common/directives/certificate.html | 75 ++++++++++++++++++----------- app/common/styles/elements/file-upload.scss | 56 +++++++++++++++++++++ app/common/styles/elements/index.scss | 2 +- app/common/styles/elements/input-file.scss | 25 ---------- app/common/styles/elements/modals.scss | 42 ++++++++++++++-- 5 files changed, 142 insertions(+), 58 deletions(-) create mode 100644 app/common/styles/elements/file-upload.scss delete mode 100644 app/common/styles/elements/input-file.scss (limited to 'app/common') diff --git a/app/common/directives/certificate.html b/app/common/directives/certificate.html index 1a7d091..cf7b46d 100644 --- a/app/common/directives/certificate.html +++ b/app/common/directives/certificate.html @@ -1,4 +1,5 @@ -
+ +
{{getCertificateName(cert.Description)}}
@@ -39,35 +40,55 @@ {{cert.ValidNotAfter | date:medium}}
-
-
-
- -
-
- -
-
- No file selected - {{cert.file.name}} - -
-
- -
+
+ +
+
+ + +
+
+ No file selected + {{ cert.file.name }} + +
+
+
-
\ No newline at end of file +
diff --git a/app/common/styles/elements/file-upload.scss b/app/common/styles/elements/file-upload.scss new file mode 100644 index 0000000..4704d6d --- /dev/null +++ b/app/common/styles/elements/file-upload.scss @@ -0,0 +1,56 @@ +/** + * Used for file upload + * Markup +
+ + +
+ No file selected + {{ newCertificate.file.name }} + +
+
+*/ + +// Choose/upload button +.file-upload-input { + width: 1px; + height: 1px; + opacity: 0; + overflow: hidden; + position: absolute; + z-index: -1; +} + +.file-upload-input:focus { + outline: 0.2rem solid $base-02--04; +} + +// File name of uploaded file field +.file-upload-container { + background: $background-02; + padding: 0.5rem; + span { + padding-left: .5rem; + } + .file-upload-reset { + float: right; + margin-top: -.5rem; + icon { + margin-right: -1.7em; + margin-left: -1.5em; + } + } +} diff --git a/app/common/styles/elements/index.scss b/app/common/styles/elements/index.scss index b1df113..9fee615 100644 --- a/app/common/styles/elements/index.scss +++ b/app/common/styles/elements/index.scss @@ -2,7 +2,7 @@ @import "toggle-filter"; @import "alerts"; @import "inline-confirm"; -@import "input-file"; +@import "file-upload"; @import "accordion"; @import "loader"; @import "content-search"; diff --git a/app/common/styles/elements/input-file.scss b/app/common/styles/elements/input-file.scss deleted file mode 100644 index 3f32b2b..0000000 --- a/app/common/styles/elements/input-file.scss +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Used for file upload "choose file" button - * Markup (example for certificate upload) - -*/ - -.input-file { - width: 0.1px; - height: 0.1px; - opacity: 0; - overflow: hidden; - position: absolute; - z-index: -1; -} - -.input-file:focus + span { - outline: 0.2rem solid $box-shadow-color; -} \ No newline at end of file diff --git a/app/common/styles/elements/modals.scss b/app/common/styles/elements/modals.scss index 263d285..3132934 100644 --- a/app/common/styles/elements/modals.scss +++ b/app/common/styles/elements/modals.scss @@ -83,9 +83,45 @@ } } +/** + * Markup for bootstrap modal +
+ + + +
+*/ + .uib-modal.fade.in { opacity: 1; } + .uib-modal.in .modal-dialog { transform: translate(0, 10vh); margin-top: 50px; @@ -99,14 +135,10 @@ } } -.uib-modal .modal-dialog { - // override bootstrap max-width set at 500px - max-width: 550px; -} - .modal-backdrop.in { opacity: 0.5; } + .uib-modal__content { padding: 1em; .modal-header { -- cgit v1.2.1