'; }
+ setDialogMode(2, "Notes", 2, showNotesEx, x, noteid);
meshserver.send({ action: 'getNotes', id: decodeURIComponent(noteid) });
}
@@ -10794,12 +10799,21 @@
function showUserAlertDialog(e, userid) {
if (xxdialogMode) return;
haltEvent(e);
- setDialogMode(2, format("Notify {0}", EscapeHtml(users[decodeURIComponent(userid)].name)), 3, showUserAlertDialogEx, "Send a text notification to this user." + '', userid);
+ var x = '' + "Send a text notification to this user." + '
';
+ x += '';
+ setDialogMode(2, format("Notify {0}", EscapeHtml(users[decodeURIComponent(userid)].name)), 3, showUserAlertDialogEx, x, userid);
Q('d2notifyText').focus();
return false;
}
- function showUserAlertDialogEx(button, userid) { meshserver.send({ action: 'notifyuser', userid: decodeURIComponent(userid), msg: Q('d2notifyText').value }); }
+ function showUserAlertDialogEx(button, userid) {
+ meshserver.send({ action: 'notifyuser', userid: decodeURIComponent(userid), msg: Q('d2notifyText').value, maxtime: parseInt(Q('broadcastMessageMaxTime').value) });
+ }
function p4batchAccountCreate() {
if (xxdialogMode) return;
@@ -10864,13 +10878,19 @@
function showUserBroadcastDialog(targetid) {
if (xxdialogMode) return;
- var x = "Broadcast a message to all connected users." + '';
+ var x = '' + "Broadcast a message to all connected users." + '
';
+ x += '';
setDialogMode(2, "Broadcast Message", 3, showUserBroadcastDialogEx, x, targetid?decodeURIComponent(targetid):null);
Q('broadcastMessage').focus();
}
function showUserBroadcastDialogEx(b, targetid) {
- meshserver.send({ action: 'userbroadcast', msg: Q('broadcastMessage').value, target: targetid });
+ meshserver.send({ action: 'userbroadcast', msg: Q('broadcastMessage').value, target: targetid, maxtime: parseInt(Q('broadcastMessageMaxTime').value) });
}
function showCreateNewAccountDialog() {
@@ -11621,10 +11641,10 @@
x += '
';
// Add action buttons
- x += '';
- if (user.phone && (features & 0x02000000)) { x += ''; }
+ x += '';
+ if (user.phone && (features & 0x02000000)) { x += ''; }
if ((typeof user.email == 'string') && (user.emailVerified === true) && (features & 0x00000040)) { x += ''; }
- if (!self && (activeSessions > 0)) { x += ''; }
+ if (!self && (activeSessions > 0)) { x += ''; }
// Setup the panel
QH('p30html', x);
@@ -12319,6 +12339,9 @@
notification.onclick = function (e) { notificationSelected(e.target.id, true); }
n.notification = notification;
}
+
+ // If the notification has a max time, setup the timer here.
+ if ((typeof n.maxtime == 'number') && (n.maxtime > 0)) { var trigger = function notifyRemoveTrigger() { notificationDelete(notifyRemoveTrigger.xid); }; trigger.xid = n.id; setTimeout(trigger, n.maxtime * 1000); }
}
// Remove all notifications