From 9cf379e625dd380eca4c2986cdf3fe4a92c43164 Mon Sep 17 00:00:00 2001 From: Owen Stephens Date: Tue, 16 Jan 2018 16:26:15 +0000 Subject: [PATCH] Add show/hide toggle and some style adjustments --- .../add-column-by-fetching-urls-dialog.html | 6 ++++-- .../scripts/views/data-table/menu-edit-column.js | 10 ++++++++++ main/webapp/modules/core/styles/common.less | 10 ++++++++++ .../core/styles/views/data-table-view.less | 15 +++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/main/webapp/modules/core/scripts/views/data-table/add-column-by-fetching-urls-dialog.html b/main/webapp/modules/core/scripts/views/data-table/add-column-by-fetching-urls-dialog.html index 31fa826cc..e1ee9073e 100644 --- a/main/webapp/modules/core/scripts/views/data-table/add-column-by-fetching-urls-dialog.html +++ b/main/webapp/modules/core/scripts/views/data-table/add-column-by-fetching-urls-dialog.html @@ -21,8 +21,10 @@ -

- $HTTP_HEADERS_WIDGET$ +

+ + $HTTP_HEADERS_WIDGET$ +

$EXPRESSION_PREVIEW_WIDGET$ diff --git a/main/webapp/modules/core/scripts/views/data-table/menu-edit-column.js b/main/webapp/modules/core/scripts/views/data-table/menu-edit-column.js index 424e20f41..3d6a25335 100644 --- a/main/webapp/modules/core/scripts/views/data-table/menu-edit-column.js +++ b/main/webapp/modules/core/scripts/views/data-table/menu-edit-column.js @@ -106,6 +106,16 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) { elmts.or_views_storeErr.text($.i18n._('core-views')["store-err"]); elmts.or_views_cacheResponses.text($.i18n._('core-views')["cache-responses"]); elmts.or_views_httpHeaders.text($.i18n._('core-views')["http-headers"]); + elmts.or_views_httpHeadersShowHide.text($.i18n._('core-views')["show"]); + elmts.or_views_httpHeadersShowHide.click(function() { + $( ".set-httpheaders-container" ).toggle( "slow", function() { + if ($(this).is(':visible')) { + elmts.or_views_httpHeadersShowHide.text($.i18n._('core-views')["hide"]); + } else { + elmts.or_views_httpHeadersShowHide.text($.i18n._('core-views')["show"]); + } + }); + }); elmts.or_views_urlFetch.text($.i18n._('core-views')["url-fetch"]); elmts.okButton.html($.i18n._('core-buttons')["ok"]); elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]); diff --git a/main/webapp/modules/core/styles/common.less b/main/webapp/modules/core/styles/common.less index 9beccc81f..7d45d2758 100644 --- a/main/webapp/modules/core/styles/common.less +++ b/main/webapp/modules/core/styles/common.less @@ -178,6 +178,10 @@ a img { font-weight: bold; } +.inline-header { + display: inline; + } + .list-table { width: 100%; } @@ -242,6 +246,12 @@ a img { opacity: 0.3; } +.toggle-text { + font-size: x-small; + border-bottom: 1px blue dotted; + left-margin: 1em +} + #header { height: 40px; margin: 10px; diff --git a/main/webapp/modules/core/styles/views/data-table-view.less b/main/webapp/modules/core/styles/views/data-table-view.less index 35eff8fc8..3ea49872a 100644 --- a/main/webapp/modules/core/styles/views/data-table-view.less +++ b/main/webapp/modules/core/styles/views/data-table-view.less @@ -316,6 +316,21 @@ a.data-table-flag-off { color: @light_grey; } +.set-httpheaders-container { + display: none; + } + +.set-httpheaders-container label { + display: inline-block; + width: 15%; + text-align: left; + } + +.set-httpheaders-container input { + display: inline-block; + width: 50%; + } + ul.sorting-dialog-blank-error-positions { margin: 0; padding: 5px;