mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
message_edit: Added copy to clipboard button.
A copy-to-clipboard button is added over message-edit textarea. Closes #3239.
This commit is contained in:
committed by
Tim Abbott
parent
2991c19fea
commit
9707c74f33
@@ -212,6 +212,25 @@ $(function () {
|
||||
|
||||
$('.message_failed i[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
$('.copy_message[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
$("body").on("mouseover", "#message_edit_content", function () {
|
||||
$(this).closest(".message_row").find(".copy_message").show();
|
||||
});
|
||||
|
||||
$("body").on("mouseout", "#message_edit_content", function () {
|
||||
$(this).closest(".message_row").find(".copy_message").hide();
|
||||
});
|
||||
|
||||
$("body").on("mouseover", ".copy_message", function () {
|
||||
$(this).show();
|
||||
$(this).tooltip('show');
|
||||
});
|
||||
|
||||
$("body").on("mouseout", ".copy_message", function () {
|
||||
$(this).tooltip('hide');
|
||||
});
|
||||
|
||||
if (!page_params.realm_allow_message_editing) {
|
||||
$("#edit-message-hotkey-help").hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user