add transfer command

This commit is contained in:
Anthony Minessale
2014-07-19 00:32:04 +05:00
parent bf197196a6
commit 997e921721
4 changed files with 38 additions and 11 deletions

View File

@@ -1192,13 +1192,15 @@
var box_id = "box_" + x;
var volup_id = "volume_in_up" + x;
var voldn_id = "volume_in_dn" + x;
var transfer_id = "transfer" + x;
var html = "<div id='" + box_id + "'>" +
"<button class='ctlbtn' id='" + kick_id + "'>KICK</button>" +
"<button class='ctlbtn' id='" + tmute_id + "'>MUTE</button>" +
"<button class='ctlbtn' id='" + voldn_id + "'>vol -</button>" +
"<button class='ctlbtn' id='" + volup_id + "'>vol +</button>" +
"<button class='ctlbtn' id='" + kick_id + "'>Kick</button>" +
"<button class='ctlbtn' id='" + tmute_id + "'>Mute</button>" +
"<button class='ctlbtn' id='" + voldn_id + "'>Vol -</button>" +
"<button class='ctlbtn' id='" + volup_id + "'>Vol +</button>" +
"<button class='ctlbtn' id='" + transfer_id + "'>Transfer</button>" +
"</div>"
;
@@ -1218,6 +1220,11 @@
$("#" + box_id).hide();
});
$("#" + transfer_id).click(function() {
var xten = prompt("Enter Extension");
confMan.modCommand("transfer", x, xten);
});
$("#" + kick_id).click(function() {
confMan.modCommand("kick", x);
});
@@ -1261,13 +1268,13 @@
if (confMan.params.onBroadcast) {
confMan.params.onBroadcast(verto, confMan, e.data);
}
if (confMan.params.displayID) {
if (!confMan.destroyed && confMan.params.displayID) {
$(confMan.params.displayID).html(e.data.response + "<br><br>");
if (confMan.lastTimeout) {
clearTimeout(confMan.lastTimeout);
confMan.lastTimeout = 0;
}
confMan.lastTimeout = setTimeout(function() { $(confMan.params.displayID).html("Moderator Controls Ready<br><br>")}, 4000);
confMan.lastTimeout = setTimeout(function() { $(confMan.params.displayID).html(confMan.destroyed ? "" : "Moderator Controls Ready<br><br>")}, 4000);
}
}
@@ -1361,6 +1368,8 @@
$.verto.confMan.prototype.destroy = function() {
var confMan = this;
confMan.destroyed = true;
if (confMan.lt) {
confMan.lt.destroy();
}