From 6ae22649bec3cc5c4cc5c4aaa9a4654a0144cfa2 Mon Sep 17 00:00:00 2001 From: Natalie St Jean <49460529+nstjean@users.noreply.github.com> Date: Tue, 17 Dec 2019 12:06:04 -0500 Subject: [PATCH] Clean up styling of location form (#6969) * cleaned up styling of location form * click to show coordinates on form * make entering coordinates link underlined --- app/assets/stylesheets/application.css | 1 + app/assets/stylesheets/location.css | 16 +++++++ app/views/editor/rich.html.erb | 66 ++++++++++++++------------ 3 files changed, 53 insertions(+), 30 deletions(-) create mode 100644 app/assets/stylesheets/location.css diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index bc6078824b..f526651f6f 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -35,4 +35,5 @@ *= require jquery-confirm/css/jquery-confirm.css *= require jquery.atwho *= require profile + *= require location */ diff --git a/app/assets/stylesheets/location.css b/app/assets/stylesheets/location.css new file mode 100644 index 0000000000..306f1313de --- /dev/null +++ b/app/assets/stylesheets/location.css @@ -0,0 +1,16 @@ +.leaflet-marker-icon { + background: url("https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-black.png") ; +} + +#map_content p { + margin: 0; +} +#map_content label { + margin-bottom: .2rem; +} +#map_content .form-group { + margin-bottom: 1.4rem; +} +#map_content .form-group .btn { + margin-top: .4rem; +} \ No newline at end of file diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index 30e1dffda5..87d6f151d3 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -21,9 +21,7 @@ <%= javascript_include_tag('/lib/leaflet-spin/example/leaflet.spin.min.js') %>
@@ -137,45 +139,44 @@
- -

- -

-

- -
-
-

-

+ +

+ +

+
+ +
+ Or by entering coordinates + +
+
+ +

- -

-
+

+
-
-

-

+ +

- -

+

+
-
- -

+

-

+
-
-
- Learn more + Learn more ยป
@@ -415,6 +414,12 @@ } }); + $('#coord_button').click((event) => { + event.preventDefault(); + $('#coord_input').toggle(); + }); + $("#coord_input").hide(); + // upload via posting "posted_main_image" function dataURItoBlob(dataURI) { // convert base64 to raw binary data held in a string @@ -459,4 +464,5 @@ } console.log("Draft:", editor.data.draft); } +