diff --git a/js/src/gis_data_editor.js b/js/src/gis_data_editor.js index d7a61e74b0..626c29fb16 100644 --- a/js/src/gis_data_editor.js +++ b/js/src/gis_data_editor.js @@ -162,30 +162,15 @@ function loadGISEditor (value, field, type, inputName) { */ // eslint-disable-next-line no-unused-vars function openGISEditor () { - // Center the popup - var windowWidth = document.documentElement.clientWidth; - var windowHeight = document.documentElement.clientHeight; - var popupWidth = windowWidth * 0.9; - var popupHeight = windowHeight * 0.9; - var popupOffsetTop = windowHeight / 2 - popupHeight / 2; - var popupOffsetLeft = windowWidth / 2 - popupWidth / 2; - - var $gisEditor = $('#gis_editor'); - var $background = $('#popup_background'); - - $gisEditor.css({ 'top': popupOffsetTop, 'left': popupOffsetLeft, 'width': popupWidth, 'height': popupHeight }); - $background.css({ 'opacity' : '0.7' }); - - $gisEditor.append( - '
' + - '' + - '
' - ); - - // Make it appear - $background.fadeIn('fast'); - $gisEditor.fadeIn('fast'); + $('#popup_background').fadeIn('fast'); + $('#gis_editor') + .append( + '
' + + '' + + '
' + ) + .fadeIn('fast'); } /** diff --git a/templates/gis_data_editor_form.twig b/templates/gis_data_editor_form.twig index 2d1a28c46b..21af9e15de 100644 --- a/templates/gis_data_editor_form.twig +++ b/templates/gis_data_editor_form.twig @@ -240,7 +240,7 @@

{% trans 'Choose "GeomFromText" from the "Function" column and paste the string below into the "Value" field.' %}

- + diff --git a/themes/bootstrap/scss/_common.scss b/themes/bootstrap/scss/_common.scss index 1712da2d9d..01bee8b269 100644 --- a/themes/bootstrap/scss/_common.scss +++ b/themes/bootstrap/scss/_common.scss @@ -1004,6 +1004,7 @@ select.invalid_value, top: 0; left: 0; background: $black; + opacity: 0.7; z-index: 1000; overflow: hidden; } diff --git a/themes/bootstrap/scss/_gis.scss b/themes/bootstrap/scss/_gis.scss index c95ff10b96..916ce1dc77 100644 --- a/themes/bootstrap/scss/_gis.scss +++ b/themes/bootstrap/scss/_gis.scss @@ -8,6 +8,11 @@ a.close_gis_editor { #gis_editor { display: none; position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + padding: 40px; z-index: 1001; overflow-y: auto; overflow-x: hidden; @@ -19,6 +24,8 @@ a.close_gis_editor { #gis_data_textarea { height: 6em; + resize: vertical; + width: 100%; } #gis_data_editor { diff --git a/themes/metro/scss/_common.scss b/themes/metro/scss/_common.scss index 1fa38f7a38..0a5593f597 100644 --- a/themes/metro/scss/_common.scss +++ b/themes/metro/scss/_common.scss @@ -1223,6 +1223,7 @@ input { top: 0; left: 0; background: #000; + opacity: 0.7; z-index: 1000; overflow: hidden; } diff --git a/themes/metro/scss/_gis.scss b/themes/metro/scss/_gis.scss deleted file mode 100644 index 42e76a35e4..0000000000 --- a/themes/metro/scss/_gis.scss +++ /dev/null @@ -1,34 +0,0 @@ -// GIS data editor styles for the Metro theme -a.close_gis_editor { - float: right; -} - -#gis_editor { - display: none; - position: fixed; - z-index: 1001; - overflow-y: auto; - overflow-x: hidden; -} - -#gis_data { - min-height: 230px; -} - -#gis_data_textarea { - height: 6em; -} - -#gis_data_editor { - background: #d0dce0; - padding: 15px; - min-height: 500px; - - .choice { - display: none; - } - - input[type="text"] { - width: 75px; - } -} diff --git a/themes/metro/scss/theme.scss b/themes/metro/scss/theme.scss index e28a7c0983..c2ddaf80de 100644 --- a/themes/metro/scss/theme.scss +++ b/themes/metro/scss/theme.scss @@ -3,7 +3,7 @@ @import "../../bootstrap/scss/bootstrap"; @import "common"; @import "enum-editor"; -@import "gis"; +@import "../../bootstrap/scss/gis"; @import "navigation"; @import "designer"; @import "codemirror"; diff --git a/themes/original/scss/_common.scss b/themes/original/scss/_common.scss index 26029d5531..149458583e 100644 --- a/themes/original/scss/_common.scss +++ b/themes/original/scss/_common.scss @@ -1000,6 +1000,7 @@ select.invalid_value, top: 0; left: 0; background: #000; + opacity: 0.7; z-index: 1000; overflow: hidden; } diff --git a/themes/original/scss/theme.scss b/themes/original/scss/theme.scss index d3af82396a..7ba5e8c74c 100644 --- a/themes/original/scss/theme.scss +++ b/themes/original/scss/theme.scss @@ -2,7 +2,7 @@ @import "../../bootstrap/scss/bootstrap"; @import "common"; @import "../../pmahomme/scss/enum-editor"; -@import "../../pmahomme/scss/gis"; +@import "../../bootstrap/scss/gis"; @import "navigation"; @import "../../pmahomme/scss/designer"; @import "../../pmahomme/scss/codemirror"; diff --git a/themes/pmahomme/scss/_common.scss b/themes/pmahomme/scss/_common.scss index 6514f389b5..614f2e9213 100644 --- a/themes/pmahomme/scss/_common.scss +++ b/themes/pmahomme/scss/_common.scss @@ -1190,6 +1190,7 @@ input#import_merge { top: 0; left: 0; background: #000; + opacity: 0.7; z-index: 1000; overflow: hidden; } diff --git a/themes/pmahomme/scss/_gis.scss b/themes/pmahomme/scss/_gis.scss deleted file mode 100644 index c95ff10b96..0000000000 --- a/themes/pmahomme/scss/_gis.scss +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GIS data editor styles - */ -a.close_gis_editor { - float: right; -} - -#gis_editor { - display: none; - position: fixed; - z-index: 1001; - overflow-y: auto; - overflow-x: hidden; -} - -#gis_data { - min-height: 230px; -} - -#gis_data_textarea { - height: 6em; -} - -#gis_data_editor { - background: #d0dce0; - padding: 15px; - min-height: 500px; - - .choice { - display: none; - } - - input[type="text"] { - width: 75px; - } -} diff --git a/themes/pmahomme/scss/theme.scss b/themes/pmahomme/scss/theme.scss index a485ecaac0..9c951988a8 100644 --- a/themes/pmahomme/scss/theme.scss +++ b/themes/pmahomme/scss/theme.scss @@ -2,7 +2,7 @@ @import "../../bootstrap/scss/bootstrap"; @import "common"; @import "enum-editor"; -@import "gis"; +@import "../../bootstrap/scss/gis"; @import "navigation"; @import "designer"; @import "codemirror";