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
@el.animate { bottom: 0 }, 500, @onOpenAnimationEnd
sendDelayedInit = =>
@send('chat_session_init')
@initDelayId = setTimeout(sendDelayedInit, 1000)
else
@el.css 'bottom', 0
@onOpenAnimationEnd()
@ -609,9 +607,6 @@ do($ = window.jQuery, window) ->
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.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() {
var sendDelayedInit;
if (this.isOpen) {
this.log.debug('widget already open, block');
return;
@ -735,12 +734,7 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
this.el.animate({
bottom: 0
}, 500, this.onOpenAnimationEnd);
sendDelayedInit = (function(_this) {
return function() {
return _this.send('chat_session_init');
};
})(this);
return this.initDelayId = setTimeout(sendDelayedInit, 1000);
return this.send('chat_session_init');
} else {
this.el.css('bottom', 0);
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();
console.log("el", this.el.height());
console.log("header", this.el.find('.zammad-chat-header').outerHeight());
this.el.css('bottom', -remainerHeight);
return this.el.addClass('zammad-chat-is-shown');
};

File diff suppressed because one or more lines are too long