mirror of https://github.com/calzoneman/sync.git
Add a signature to announcements
The `from` field has existed for ages, but was never actually displayed. Displaying it to users reduces confusion about who is making the announcement.
This commit is contained in:
parent
9e00bb133e
commit
29a4834baa
|
@ -91,7 +91,8 @@ $("#acp-announce-submit").click(function () {
|
|||
socket.on("announcement", function (data) {
|
||||
$("#acp-announcements").find(".announcement").remove();
|
||||
|
||||
var al = makeAlert(data.title, data.text)
|
||||
var signature = "<br>\u2014" + data.from;
|
||||
var al = makeAlert(data.title, data.text + signature)
|
||||
.removeClass("col-md-12")
|
||||
.addClass("announcement")
|
||||
.insertAfter($("#acp-announcements h3")[0]);
|
||||
|
|
|
@ -67,7 +67,8 @@ Callbacks = {
|
|||
|
||||
announcement: function(data) {
|
||||
$("#announcements").html("");
|
||||
makeAlert(data.title, data.text)
|
||||
var signature = "<br>\u2014" + data.from;
|
||||
var announcement = makeAlert(data.title, data.text + signature)
|
||||
.appendTo($("#announcements"));
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue