Skip to content

Commit b23a01a

Browse files
dlucas94dlucas94
authored andcommitted
sos triggered twice - fix
1 parent 1ed113e commit b23a01a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

js/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $(function() {
2222
dialogClass: "dlg-no-close",
2323
buttons: {
2424
"Confirm": function() {
25-
addSOS();
25+
sendSMS();
2626
getLocation();
2727
$( this ).dialog( "close" );
2828
},
@@ -126,7 +126,7 @@ function getLocation() {
126126
console.log("Geo NOT supported");
127127
$( '#dialogNoGeo' ).dialog('open');
128128
// alert("Geolocation not supported.");
129-
sendSMS();
129+
// sendSMS();
130130
}
131131
}
132132

@@ -170,8 +170,8 @@ function addSOS() {
170170
var lastname = sessionStorage.getItem("lastname");
171171
var lat = sessionStorage.getItem("lat");
172172
var lon = sessionStorage.getItem("lon");
173-
console.log("AboutToSendSMS");
174-
sendSMS();
173+
// console.log("AboutToSendSMS");
174+
// sendSMS();
175175

176176
var ref = new Firebase("https://crackling-fire-1447.firebaseio.com/");
177177
var sosRef = ref.child("sos");
@@ -194,7 +194,7 @@ function SOS_saved(error) {
194194

195195
function sendSMS() {
196196
console.log("StartingSMSSend");
197-
var message = "SOS Test";
197+
var message = "SOS raised by " + uName;
198198
var number = "07947476240";
199199
// var success = function () { alert('Message sent successfully'); };
200200
var error = function(e) {

0 commit comments

Comments
 (0)