From 210dd48249b61727053ff9ea7e48dbc5ba7a715c Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 26 Jan 2016 22:37:26 +0000 Subject: [PATCH] Bugfixes --- app/js/directives.js | 12 +++++------- app/js/message_composer.js | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index da49bd58..29c25a2e 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1507,9 +1507,6 @@ angular.module('myApp.directives', ['myApp.filters']) }); } - var peerPhotoCompiled = $compile(''); - var cachedPeerPhotos = {}; - var composer = new MessageComposer(messageField, { onTyping: function () { $scope.$emit('ui_typing'); @@ -3375,9 +3372,10 @@ angular.module('myApp.directives', ['myApp.filters']) html.push('
  • :' + encodeEntities(emoticonData[1][0]) + ':
  • '); } } - onContentLoaded(function () { - element.html(html); - }); + // onContentLoaded(function () { + element.html(html.join('')); + console.log(dT(), 'emoji done'); + // }); }); } }; @@ -3394,7 +3392,7 @@ angular.module('myApp.directives', ['myApp.filters']) link: function ($scope, element, attrs) { $scope.$watch('botResults.results.length', function (show) { - console.log($scope.botResults, show); + // console.log($scope.botResults, show); }); } } diff --git a/app/js/message_composer.js b/app/js/message_composer.js index cf04c492..e8f3f449 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -683,7 +683,7 @@ function MessageComposer (textarea, options) { this.autoCompleteWrapEl = $('
    ').appendTo(document.body); var autoCompleteEl = $('
    ').appendTo(this.autoCompleteWrapEl); - options.dropdownDirective(div, function (scope, autoCompleteEl) { + options.dropdownDirective(autoCompleteEl, function (scope, autoCompleteEl) { self.autoCompleteEl = autoCompleteEl; self.autoCompleteScope = scope; self.setUpAutoComplete(); @@ -1405,6 +1405,7 @@ MessageComposer.prototype.showCommandsSuggestions = function (commands) { MessageComposer.prototype.updatePosition = function () { var offset = (this.richTextareaEl || this.textareaEl).offset(); var height = this.scroller.updateHeight(); + console.log(dT(), 'pos', height); var width = $((this.richTextareaEl || this.textareaEl)[0].parentNode).outerWidth(); this.autoCompleteWrapEl.css({ top: offset.top - height,