Removed initial delay (not longer needed because of fixed rendering issue).

This commit is contained in:
Martin Edenhofer 2016-03-04 13:32:27 +01:00
parent 176b377326
commit 76006a5159
3 changed files with 4 additions and 17 deletions

View file

@ -518,9 +518,7 @@ do($ = window.jQuery, window) ->
if !@sessionId if !@sessionId
@el.animate { bottom: 0 }, 500, @onOpenAnimationEnd @el.animate { bottom: 0 }, 500, @onOpenAnimationEnd
sendDelayedInit = => @send('chat_session_init')
@send('chat_session_init')
@initDelayId = setTimeout(sendDelayedInit, 1000)
else else
@el.css 'bottom', 0 @el.css 'bottom', 0
@onOpenAnimationEnd() @onOpenAnimationEnd()
@ -609,9 +607,6 @@ do($ = window.jQuery, window) ->
remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight() remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight()
console.log "el", @el.height()
console.log "header", @el.find('.zammad-chat-header').outerHeight()
@el.css 'bottom', -remainerHeight @el.css 'bottom', -remainerHeight
@el.addClass('zammad-chat-is-shown') @el.addClass('zammad-chat-is-shown')

View file

@ -720,7 +720,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
}; };
ZammadChat.prototype.open = function() { ZammadChat.prototype.open = function() {
var sendDelayedInit;
if (this.isOpen) { if (this.isOpen) {
this.log.debug('widget already open, block'); this.log.debug('widget already open, block');
return; return;
@ -735,12 +734,7 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
this.el.animate({ this.el.animate({
bottom: 0 bottom: 0
}, 500, this.onOpenAnimationEnd); }, 500, this.onOpenAnimationEnd);
sendDelayedInit = (function(_this) { return this.send('chat_session_init');
return function() {
return _this.send('chat_session_init');
};
})(this);
return this.initDelayId = setTimeout(sendDelayedInit, 1000);
} else { } else {
this.el.css('bottom', 0); this.el.css('bottom', 0);
return this.onOpenAnimationEnd(); return this.onOpenAnimationEnd();
@ -836,8 +830,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
}); });
} }
remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight(); remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight();
console.log("el", this.el.height());
console.log("header", this.el.find('.zammad-chat-header').outerHeight());
this.el.css('bottom', -remainerHeight); this.el.css('bottom', -remainerHeight);
return this.el.addClass('zammad-chat-is-shown'); return this.el.addClass('zammad-chat-is-shown');
}; };

File diff suppressed because one or more lines are too long