message_edit: Replace image tag with inline SVG tag for clipboard image.

This commit is contained in:
Raghav Jajodia
2017-04-06 19:27:50 +05:30
committed by Tim Abbott
parent ae48eaa90d
commit 09090fa8a6
5 changed files with 9 additions and 14 deletions

View File

@@ -1,3 +0,0 @@
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
<path fill="#777" d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
</svg>

Before

Width:  |  Height:  |  Size: 531 B

View File

@@ -1,3 +0,0 @@
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
<path d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
</svg>

Before

Width:  |  Height:  |  Size: 519 B

View File

@@ -223,13 +223,11 @@ $(function () {
});
$("body").on("mouseenter", ".copy_message", function () {
$(this).find('img#clipboard_image').attr("src", "/static/images/clippy_hover.svg");
$(this).show();
$(this).tooltip('show');
});
$("body").on("mouseleave", ".copy_message", function () {
$(this).find('img#clipboard_image').attr("src", "/static/images/clippy.svg");
$(this).tooltip('hide');
});

View File

@@ -295,11 +295,12 @@ li,
}
#clipboard_image {
height: inherit;
width: inherit;
max-width: inherit;
margin-top: inherit;
margin-left: -7px;
margin-top: -5px;
margin-left: -8px;
}
.copy_message:hover svg path {
fill: black;
}
.btn-large {

View File

@@ -17,7 +17,9 @@
<div class="control-group no-margin">
<div class="controls edit-controls">
<button class="btn pull-right copy_message" data-toggle="tooltip" title="{{t "Copy and close" }}" data-clipboard-target="#message_edit_content">
<img src="/static/images/clippy.svg" id="clipboard_image" />
<svg height="20" width="18" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" id="clipboard_image">
<path fill="#777" d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
</svg>
</button>
<label class="edit-control-label" for="message_edit_topic">{{t "Content" }}</label>
<textarea class="message_edit_content" id="message_edit_content">{{content}}</textarea>