Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/javascripts/auth0.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
window.addEventListener('load', function() {
navigator.geolocation.getCurrentPosition(function(position){
alert('Lat: ' + position.coords.latitude + ' ' +
'Lon: ' + position.coords.longitude);
});

var content = document.querySelector('.content');
var loadingSpinner = document.getElementById('loading');
content.style.display = 'block';
Expand Down
9 changes: 2 additions & 7 deletions public/style.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
$(document).ready(function(){



$("#sortable").sortable({
revert: true
});
evert: true
});

$('.ui-state-default').on('click', function(){
let list = $('.ui-state-default');
list.forEach(element =>{
console.log(element);
});
});


});
30 changes: 5 additions & 25 deletions views/home.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@
<form id="editUserSettings">
<input type="text" class="form-control modalForm" id="userNickname" value="{{#if user.customSettings}}
{{user.customSettings.nickname}}
{{else}}
{{user.userData.nickname}}!</b>
{{/if}}" placeholder="Edit Your Name">
<input type="text" class="form-control modalForm" id="homeAddress" value="{{#if user.customSettings}}
{{user.customSettings.homeAddress}}
Expand All @@ -139,35 +137,12 @@
{{/if}}
<!-- END MODAL FOR DISPLAYING USER INFORMATION -->

<!-- MODAL FOR NOTIFYING USER OF UPDATED USER SETTINGS -->
{{#if user}}
<div id="userSettings" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" style="text-align: left;">
<b>Hi {{user.userData.nickname}}!</b>
</h2>
</div>
<div class="modal-body">
<p>Success! Your settings have been saved.</p>
</div>
<div class="modal-footer">
<span><button type="button" class="btn btn-default" data-dismiss="modal">CLOSE</button></span>
</div>
</div>
</div>
</div>
{{/if}}


<!-- Google Maps -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDkLQbqN7AkkB4iG82HbHcFhFWxubl2U44&libraries=places"></script>
<script src="javascripts/google_maps.js"></script>
<script>
google.maps.event.addDomListener(window, "load", initialize)
</script>
<!-- Event Handler to Change User Settings -->
<script>
// Document ready fn
$( document ).ready(function(){
Expand Down Expand Up @@ -247,6 +222,11 @@ $('#user-button').on('click', function(){
}
);
});

$("#updateUserSettings").on("click", function (event) {
event.preventDefault();
alert("Settings Saved!");
})
</script>
</body>
</html>
1 change: 0 additions & 1 deletion views/layout.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@
</div>
</div>
</footer>

</body>
</html>
2 changes: 1 addition & 1 deletion views/user.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
{{userProfile}}
</h3> --}}
</p>
<a href="home.html"><button>Start Your Search</button></a>
<a href="/home"><button>Start Your Search</button></a>