From 95639bf1cb5ee8e544d68bddd6043050aa6a8578 Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Wed, 18 Nov 2020 21:24:47 +0100 Subject: [PATCH] #1669 Normalize the fields used to update objects --- frontend/app/index.html | 2 + frontend/app/styles/custom-fields.css | 10 ++++ frontend/app/styles/main.css | 7 ++- frontend/app/styles/updatable.css | 38 +++++++++++++++ .../common/custom-field-input.component.html | 36 +++++++------- .../views/directives/updatable-boolean.html | 27 +++++------ .../app/views/directives/updatable-date.html | 48 +++++++++---------- .../views/directives/updatable-select.html | 27 +++++------ .../directives/updatable-simple-text.html | 29 +++++------ .../app/views/directives/updatable-tags.html | 43 ++++++++++++++++- 10 files changed, 180 insertions(+), 87 deletions(-) create mode 100644 frontend/app/styles/custom-fields.css create mode 100644 frontend/app/styles/updatable.css diff --git a/frontend/app/index.html b/frontend/app/index.html index 5460192e47..800b08a1ae 100644 --- a/frontend/app/index.html +++ b/frontend/app/index.html @@ -43,12 +43,14 @@ + + diff --git a/frontend/app/styles/custom-fields.css b/frontend/app/styles/custom-fields.css new file mode 100644 index 0000000000..39513cef4c --- /dev/null +++ b/frontend/app/styles/custom-fields.css @@ -0,0 +1,10 @@ +/* .custom-field-input dd { + overflow: hidden; +} + + +div.custom-field-input-wrapper { + max-width: 100%; + text-overflow: ellipsis; +} + */ diff --git a/frontend/app/styles/main.css b/frontend/app/styles/main.css index 3b328dba34..0425ebbcd9 100644 --- a/frontend/app/styles/main.css +++ b/frontend/app/styles/main.css @@ -160,7 +160,7 @@ pre.clearpre { /***************************/ .flexwrap { - display: flex; + display: flex !important; flex-wrap: wrap; justify-content: flex-start; align-items: flex-start; @@ -340,6 +340,11 @@ ul.observable-reports-summary li { width: 200px !important; } +.case-details dd, +.case-custom-fields dd { + margin-left: 200px !important; +} + .case-custom-fields dt { background-color: #f9f9f9; padding-left: 5px; diff --git a/frontend/app/styles/updatable.css b/frontend/app/styles/updatable.css new file mode 100644 index 0000000000..4ef2fabbbc --- /dev/null +++ b/frontend/app/styles/updatable.css @@ -0,0 +1,38 @@ +.updatable-input { + /* border: 1px solid green; */ +} + +.updatable-input .updatable-value { + vertical-align: top; + white-space: pre-wrap +} + +.updatable-input .updatable-input-value-wrapper { + position: relative; + display: inline-block; + border-bottom: 1px solid #fff; +} + +.updatable-input .updatable-input-value-wrapper:hover{ + border-bottom: 1px solid #337ab7; + cursor: pointer; +} + +.updatable-input .updatable-input-value-wrapper .updatable-input-icon { + display: none; + float: right; + margin-left: 10px; + color: #337ab7; +} + +.updatable-input .updatable-input-value-wrapper .updatable-input-icon.lg { + line-height: 18px; +} + +.updatable-input .updatable-input-value-wrapper:hover .updatable-input-icon { + display: block; +} + +.updatable-input.updatable-input-tags { + +} diff --git a/frontend/app/views/components/common/custom-field-input.component.html b/frontend/app/views/components/common/custom-field-input.component.html index cde52043e6..6d62361643 100644 --- a/frontend/app/views/components/common/custom-field-input.component.html +++ b/frontend/app/views/components/common/custom-field-input.component.html @@ -1,4 +1,4 @@ -
+
{{$ctrl.field.name}}
- +
+ - + - + - + - + - Not Editable + Not Editable +
{{$ctrl.value | shortDate}} diff --git a/frontend/app/views/directives/updatable-boolean.html b/frontend/app/views/directives/updatable-boolean.html index 0c9c7e6e16..f2eb94ab1b 100644 --- a/frontend/app/views/directives/updatable-boolean.html +++ b/frontend/app/views/directives/updatable-boolean.html @@ -1,15 +1,14 @@ - - {{value ? trueText || 'True' : falseText || 'False'}} - Not Specified - - - - - -       - - -
+
+ + {{value ? trueText || 'True' : falseText || 'False'}} + Not Specified + + + + + + +
@@ -19,7 +18,7 @@ - +
- +
diff --git a/frontend/app/views/directives/updatable-date.html b/frontend/app/views/directives/updatable-date.html index 3e4a1e2964..6dc9c05410 100644 --- a/frontend/app/views/directives/updatable-date.html +++ b/frontend/app/views/directives/updatable-date.html @@ -1,29 +1,27 @@ - - {{value | shortDate}} - Not Specified - - - - - -       - - +
+ + {{value | shortDate}} + Not Specified -
-
- - + + + + + + +
+ + - Now - - + Now + + + + -
- - +
+ +
diff --git a/frontend/app/views/directives/updatable-select.html b/frontend/app/views/directives/updatable-select.html index 4fc1d7a403..e901a03d06 100644 --- a/frontend/app/views/directives/updatable-select.html +++ b/frontend/app/views/directives/updatable-select.html @@ -1,15 +1,14 @@ - - {{value}} - Not Specified - - - - - -       - - -
+
+ + {{value}} + Not Specified + + + + + + +
@@ -19,7 +18,7 @@ - +
- +
diff --git a/frontend/app/views/directives/updatable-simple-text.html b/frontend/app/views/directives/updatable-simple-text.html index ddabf16bbc..21cd440100 100644 --- a/frontend/app/views/directives/updatable-simple-text.html +++ b/frontend/app/views/directives/updatable-simple-text.html @@ -1,17 +1,18 @@ - - {{value}} - Not Specified - - - - - -       - - -
+
+ + {{value}} + Not Specified + + + + + + +
+ + - +
- +
diff --git a/frontend/app/views/directives/updatable-tags.html b/frontend/app/views/directives/updatable-tags.html index 46ceceb402..d388b77f09 100644 --- a/frontend/app/views/directives/updatable-tags.html +++ b/frontend/app/views/directives/updatable-tags.html @@ -1,16 +1,54 @@ +
+ + Not Specified + + {{tag.text}} + + + + + + + + + + +
+ + + +
+
+ + +
+
+
+ + +
-
@@ -28,3 +66,4 @@
+-->