Skip to content
Snippets Groups Projects
Commit e042ca28 authored by echicken's avatar echicken :chicken:
Browse files

Unbreak enter-to-send.

parent ed92241b
Branches
Tags
No related merge requests found
......@@ -42,10 +42,8 @@ function scrollUp() {
function sendTelegram(alias) {
function send_tg(evt) {
if (typeof evt !== 'undefined') evt.preventDefault();
$.getJSON('./api/system.ssjs?call=send-telegram&user=' + alias + '&telegram=' + $('#telegram').val(),
function(data) {
}
);
$.getJSON('./api/system.ssjs?call=send-telegram&user=' + alias + '&telegram=' + $('#telegram').val(), function(data) {
});
$('#popUpModal').modal('hide');
}
$('#popUpModalTitle').html('Send a telegram to ' + alias);
......@@ -55,9 +53,9 @@ function sendTelegram(alias) {
+ '<input type="submit" value="submit" class="hidden">'
+ '</form>'
);
$('#popUpModalActionButton').show();
$('#send-telegram-form').submit(send_tg);
$('#popUpModalActionButton').click(send_tg);
$('#popUpModalActionButton').show();
$('#popUpModal').modal('show');
}
......
......@@ -84,20 +84,28 @@
<?xjs if (settings.nodelist_ibbs) { ?>
function _send_ibbs_telegram(sys, host, user) {
$('#popUpModalTitle').html('Send a telegram to ' + user + '@' + sys);
$('#popUpModalBody').html('<input type="text" class="form-control" placeholder="My message" name="telegram" id="telegram">');
$('#popUpModalActionButton').show();
$('#popUpModalActionButton').click(function () {
$.getJSON(
'./api/sbbsimsg.ssjs?call=send_telegram'
function send_ibbs_tg(evt) {
if (typeof evt !== 'undefined') evt.preventDefault();
$.getJSON(
'./api/sbbsimsg.ssjs?call=send_telegram'
+ '&username=' + user
+ '&host=' + host
+ '&message=' + $('#telegram').val(),
function (data) {
function (data) {
}
);
$('#popUpModal').modal('hide');
});
};
$('#popUpModalTitle').html('Send a telegram to ' + user + '@' + sys);
$('#popUpModalBody').html(
'<form id="ibbs-telegram-form">'
+ '<input type="text" class="form-control" placeholder="My message" name="telegram" id="telegram">'
+ '<input type="submit" value="submit" class="hidden">'
+ '</form>'
);
$('#popUpModalActionButton').show();
$('#ibbs-telegram-form').submit(send_ibbs_tg);
$('#popUpModalActionButton').click(send_ibbs_tg);
$('#popUpModal').modal('show');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment