fix stream post

This commit is contained in:
Yuri Kuznetsov
2014-04-30 14:36:11 +03:00
parent b5e644ef6f
commit 4d83353d5a
+4 -6
View File
@@ -39,8 +39,8 @@ Espo.define('Views.Stream.Panel', 'Views.Record.Panels.Relationship', function (
this.post();
} else if (e.keyCode == 9) {
$text = $(e.currentTarget)
if ($text.val() == '') {
this.$el.find('.buttons-panel').addClass('hide');
if ($text.val() == '') {
this.disablePostingMode();
}
}
},
@@ -61,10 +61,8 @@ Espo.define('Views.Stream.Panel', 'Views.Record.Panels.Relationship', function (
this.$el.find('.buttons-panel').removeClass('hide');
if (!this.postingMode) {
$('body').on('click.stream-panel', function (e) {
var $element = $(e.toElement);
if (!$.contains(this.$el.get(0), e.toElement)) {
$('body').on('click.stream-panel', function (e) {
if (!$.contains(this.$el.get(0), e.target)) {
if (this.$textarea.val() == '') {
var attachmentsIds = this.seed.get('attachmentsIds');
if (!attachmentsIds.length) {