Browse Source

Bugfixes

master
Igor Zhukov 9 years ago
parent
commit
210dd48249
  1. 12
      app/js/directives.js
  2. 3
      app/js/message_composer.js

12
app/js/directives.js

@ -1507,9 +1507,6 @@ angular.module('myApp.directives', ['myApp.filters'])
}); });
} }
var peerPhotoCompiled = $compile('<span class="composer_user_photo" my-peer-photolink="peerID" img-class="composer_user_photo"></span>');
var cachedPeerPhotos = {};
var composer = new MessageComposer(messageField, { var composer = new MessageComposer(messageField, {
onTyping: function () { onTyping: function () {
$scope.$emit('ui_typing'); $scope.$emit('ui_typing');
@ -3375,9 +3372,10 @@ angular.module('myApp.directives', ['myApp.filters'])
html.push('<li><a class="composer_emoji_option" data-code="' + encodeEntities(emoticonCode) + '"><i class="emoji emoji-w', iconSize, ' emoji-spritesheet-' + categoryIndex + '" style="background-position: -' + x + 'px -' + y + 'px;"></i><span class="composer_emoji_shortcut">:' + encodeEntities(emoticonData[1][0]) + ':</span></a></li>'); html.push('<li><a class="composer_emoji_option" data-code="' + encodeEntities(emoticonCode) + '"><i class="emoji emoji-w', iconSize, ' emoji-spritesheet-' + categoryIndex + '" style="background-position: -' + x + 'px -' + y + 'px;"></i><span class="composer_emoji_shortcut">:' + encodeEntities(emoticonData[1][0]) + ':</span></a></li>');
} }
} }
onContentLoaded(function () { // onContentLoaded(function () {
element.html(html); element.html(html.join(''));
}); console.log(dT(), 'emoji done');
// });
}); });
} }
}; };
@ -3394,7 +3392,7 @@ angular.module('myApp.directives', ['myApp.filters'])
link: function ($scope, element, attrs) { link: function ($scope, element, attrs) {
$scope.$watch('botResults.results.length', function (show) { $scope.$watch('botResults.results.length', function (show) {
console.log($scope.botResults, show); // console.log($scope.botResults, show);
}); });
} }
} }

3
app/js/message_composer.js

@ -683,7 +683,7 @@ function MessageComposer (textarea, options) {
this.autoCompleteWrapEl = $('<div class="composer_dropdown_wrap"></div>').appendTo(document.body); this.autoCompleteWrapEl = $('<div class="composer_dropdown_wrap"></div>').appendTo(document.body);
var autoCompleteEl = $('<div></div>').appendTo(this.autoCompleteWrapEl); var autoCompleteEl = $('<div></div>').appendTo(this.autoCompleteWrapEl);
options.dropdownDirective(div, function (scope, autoCompleteEl) { options.dropdownDirective(autoCompleteEl, function (scope, autoCompleteEl) {
self.autoCompleteEl = autoCompleteEl; self.autoCompleteEl = autoCompleteEl;
self.autoCompleteScope = scope; self.autoCompleteScope = scope;
self.setUpAutoComplete(); self.setUpAutoComplete();
@ -1405,6 +1405,7 @@ MessageComposer.prototype.showCommandsSuggestions = function (commands) {
MessageComposer.prototype.updatePosition = function () { MessageComposer.prototype.updatePosition = function () {
var offset = (this.richTextareaEl || this.textareaEl).offset(); var offset = (this.richTextareaEl || this.textareaEl).offset();
var height = this.scroller.updateHeight(); var height = this.scroller.updateHeight();
console.log(dT(), 'pos', height);
var width = $((this.richTextareaEl || this.textareaEl)[0].parentNode).outerWidth(); var width = $((this.richTextareaEl || this.textareaEl)[0].parentNode).outerWidth();
this.autoCompleteWrapEl.css({ this.autoCompleteWrapEl.css({
top: offset.top - height, top: offset.top - height,

Loading…
Cancel
Save