Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
621 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
app/javascript/vue/components/georeferences/geolocateComponent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div> | ||
<button | ||
class="button normal-input button-default" | ||
@click="show = true">GEOLocate</button> | ||
<modal-component | ||
v-if="show" | ||
@close="show = false"> | ||
<h3 slot="header">GEOLocate</h3> | ||
<div slot="body"> | ||
<div class="field"> | ||
<label>Coordinates:</label> | ||
<textarea | ||
class="full_width" | ||
rows="5" | ||
v-model="iframe_response"> | ||
</textarea> | ||
</div> | ||
</div> | ||
<div slot="footer"> | ||
<button | ||
type="button" | ||
class="normal-input button button-submit" | ||
:disabled="!validateFields" | ||
@click="createShape"> | ||
Add | ||
</button> | ||
</div> | ||
</modal-component> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import ModalComponent from 'components/modal' | ||
import convertDMS from 'helpers/parseDMS.js' | ||
export default { | ||
components: { | ||
ModalComponent | ||
}, | ||
computed: { | ||
validateFields () { | ||
return this.iframe_response | ||
} | ||
}, | ||
data () { | ||
return { | ||
show: false, | ||
iframe_response: undefined | ||
} | ||
}, | ||
methods: { | ||
createShape () { | ||
this.$emit('create', this.iframe_response) | ||
this.iframe_response = undefined | ||
this.show = false | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
/deep/ .modal-container { | ||
max-width: 500px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.