message_edit: Modify css for hover over 'Copy' button.

Replace background-image of copy button with an image
and change color on hover.
This commit is contained in:
Raghav Jajodia
2017-03-26 15:45:50 +05:30
committed by Tim Abbott
parent fd5ad3658d
commit 2bb632824e
6 changed files with 19 additions and 12 deletions

View File

@@ -201,11 +201,10 @@ function edit_message(row, raw_content) {
var message_edit_countdown_timer = row.find('.message_edit_countdown_timer');
var copy_message = row.find('.copy_message');
initClipboard(copy_message[0]);
if (editability === editability_types.NO) {
message_edit_content.prop("readonly", "readonly");
message_edit_topic.prop("readonly", "readonly");
initClipboard(copy_message[0]);
} else if (editability === editability_types.NO_LONGER) {
// You can currently only reach this state in non-streams. If that
// changes (e.g. if we stop allowing topics to be modified forever
@@ -213,10 +212,12 @@ function edit_message(row, raw_content) {
// row.find('input.message_edit_topic') as well.
message_edit_content.prop("readonly", "readonly");
message_edit_countdown_timer.text(i18n.t("View source"));
initClipboard(copy_message[0]);
} else if (editability === editability_types.TOPIC_ONLY) {
message_edit_content.prop("readonly", "readonly");
// Hint why you can edit the topic but not the message content
message_edit_countdown_timer.text(i18n.t("Topic editing only"));
initClipboard(copy_message[0]);
} else if (editability === editability_types.FULL) {
copy_message.remove();
composebox_typeahead.initialize_compose_typeahead("#message_edit_content", {emoji: true, stream: true});