Browse Source

Minor comment/formatting changes, etc.

master
Ruel Tmeizeh 5 years ago
parent
commit
ad1e312d95
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      app.js

+ 5
- 7
app.js View File

@ -64,7 +64,7 @@ define(function (require) {
var self = this, var self = this,
$template = args.template; $template = args.template;
//load the parked calls on document ready, and repeat every 15 seconds
//load the parked calls on document ready, and repeat every 30 seconds
$(document).ready(function (e) { $(document).ready(function (e) {
loadParkingLot(); loadParkingLot();
setInterval(loadParkingLot, 30000); setInterval(loadParkingLot, 30000);
@ -124,7 +124,7 @@ define(function (require) {
/////////////////////////////// ///////////////////////////////
$template.find(".parked-call").on("mouseover", function (e) { //load more details about parker when hover $template.find(".parked-call").on("mouseover", function (e) { //load more details about parker when hover
var clickedItem = $(this);
var clickedItem = $(this);
if ($(clickedItem).find('.call-parker').html() == '') { //check if the parker info is empty if ($(clickedItem).find('.call-parker').html() == '') { //check if the parker info is empty
self.callApi({ self.callApi({
// Get info on the parker device: // Get info on the parker device:
@ -153,14 +153,11 @@ define(function (require) {
}); //end get info on user }); //end get info on user
}, },
error: function (parsedError) { error: function (parsedError) {
monster.ui.alert(
"FAILED to get device info for device: " + slot.ringback_id + ": " + parsedError
);
monster.ui.alert("FAILED to get device info: " + slot.ringback_id + ": " + parsedError);
}, },
}); //end get info on parker device }); //end get info on parker device
} //if clickedItem parker info is empty } //if clickedItem parker info is empty
}); //end parked-call mouseover binding }); //end parked-call mouseover binding
}); //end self.getParkedCalls }); //end self.getParkedCalls
} //end function loadParkingLot(); } //end function loadParkingLot();
}, //bindEvents }, //bindEvents
@ -185,7 +182,8 @@ define(function (require) {
//if we get a 401 when refreshing parked calls, log out so user can re-auth. //if we get a 401 when refreshing parked calls, log out so user can re-auth.
monster.util.logoutAndReload(); monster.util.logoutAndReload();
} }
callback([]);
monster.ui.alert("ERROR: Failed to get parked calls list: " + parsedError);
callback([]); //Populate results with nothing
}, },
}); //end get parked calls list }); //end get parked calls list
}, //end getParkedCalls }, //end getParkedCalls


Loading…
Cancel
Save