Skip to content

Commit

Permalink
click to show coordinates on form
Browse files Browse the repository at this point in the history
  • Loading branch information
nstjean committed Dec 17, 2019
1 parent e271835 commit 612dcdf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/views/editor/rich.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@
</div>

<div class="form-group">
<p><label>Or by entering coordinates</label></p>
<a href="" id="coord_button">Or by entering coordinates</a>

<div class="row">
<div class="col-lg-6">
<div id="coord_input" class="row">
<div class="col-sm-6">
<label>Latitude</label>
<p>
<input
Expand All @@ -158,7 +158,7 @@
</p>
</div>

<div class="col-lg-6">
<div class="col-sm-6">
<label>Longitude</label>
<p>
<input
Expand Down Expand Up @@ -410,6 +410,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
Expand Down Expand Up @@ -454,4 +460,5 @@
}
console.log("Draft:", editor.data.draft);
}

</script>

0 comments on commit 612dcdf

Please sign in to comment.