From b0130531f856a3db14025a9605cb7cfad516751d Mon Sep 17 00:00:00 2001
From: Igor Zhukov <igor.beatle@gmail.com>
Date: Mon, 17 Feb 2014 23:15:28 +0400
Subject: [PATCH] style improvements

---
 app/css/app.css                                 | 16 ++++++++++++++++
 app/js/services.js                              |  4 ++--
 app/partials/message.html                       |  6 ++++++
 app/vendor/jquery.emojiarea/jquery.emojiarea.js |  3 ++-
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/app/css/app.css b/app/css/app.css
index b4fd5cf8..4466a3a2 100644
--- a/app/css/app.css
+++ b/app/css/app.css
@@ -883,6 +883,15 @@ img.im_message_video_thumb {
   border-radius: 2px;
 }
 
+img.im_message_video_thumb {
+  -webkit-filter: blur(2px);
+  -moz-filter: blur(2px);
+  -o-filter: blur(2px);
+  -ms-filter: blur(2px);
+  filter: blur(2px);
+  filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='2');
+}
+
 div.im_message_video_thumb {
   position: relative;
 }
@@ -965,6 +974,13 @@ div.im_message_video_thumb {
   float: left;
 }
 
+
+.im_message_document_thumb {
+  border-radius: 2px;
+  overflow: hidden;
+  max-width: 100px;
+  max-height: 100px;
+}
 .im_message_document_name_wrap {
   overflow: hidden;
   white-space: nowrap;
diff --git a/app/js/services.js b/app/js/services.js
index bde74964..eaa67a68 100644
--- a/app/js/services.js
+++ b/app/js/services.js
@@ -1667,8 +1667,8 @@ angular.module('myApp.services', [])
 
   function wrapForHistory (videoID) {
     var video = angular.copy(videos[videoID]),
-        width = 100,
-        height = 100,
+        width = 200,
+        height = 200,
         thumbPhotoSize = video.thumb,
         thumb = {
           placeholder: 'img/placeholders/VideoThumbConversation.gif',
diff --git a/app/partials/message.html b/app/partials/message.html
index b53a1ec1..88115eb8 100644
--- a/app/partials/message.html
+++ b/app/partials/message.html
@@ -115,6 +115,12 @@
           <div ng-switch-when="messageMediaDocument" class="im_message_document">
             <a href="" ng-click="openDoc(historyMessage.media.document.id)" ng-if="!historyMessage.media.document.progress.enabled">
               <i class="icon icon-document"></i>
+              <!-- <img
+                class="im_message_document_thumb"
+                my-load-thumb
+                thumb="historyMessage.media.document.thumb"
+                ng-if="historyMessage.media.document.thumb"
+              /> -->
             </a>
             <i class="icon icon-document" ng-if="historyMessage.media.document.progress.enabled"></i>
 
diff --git a/app/vendor/jquery.emojiarea/jquery.emojiarea.js b/app/vendor/jquery.emojiarea/jquery.emojiarea.js
index 0a24f9bf..8da0b1f1 100644
--- a/app/vendor/jquery.emojiarea/jquery.emojiarea.js
+++ b/app/vendor/jquery.emojiarea/jquery.emojiarea.js
@@ -281,7 +281,8 @@
 
 		this.setup();
 
-		this.$button.on('mousedown', function() {
+		/* MODIFICATION: Following line was modified by Igor Zhukov, in order to improve emoji insert behaviour */
+		$(document.body).on('mousedown', function() {
 			if (self.hasFocus) {
 				self.selection = util.saveSelection();
 			}