fix close bug

This commit is contained in:
Felix Niklas 2015-10-15 15:28:30 +02:00
parent 7e4c374cdc
commit 843e1e5a9c
3 changed files with 6 additions and 5 deletions

View file

@ -130,7 +130,7 @@ do($ = window.jQuery, window) ->
close: ->
remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight()
@el.animate { bottom: -remainerHeight }, 500, onCloseAnimationEnd
@el.animate { bottom: -remainerHeight }, 500, @onCloseAnimationEnd
onCloseAnimationEnd: =>
@el.removeClass('zammad-chat-is-open')
@ -143,7 +143,7 @@ do($ = window.jQuery, window) ->
show: ->
@el.addClass('zammad-chat-is-visible')
remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight()
remainerHeight = @el.outerHeight() - @el.find('.zammad-chat-header').outerHeight()
@el.css 'bottom', -remainerHeight

View file

@ -222,7 +222,7 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight();
return this.el.animate({
bottom: -remainerHeight
}, 500, onCloseAnimationEnd);
}, 500, this.onCloseAnimationEnd);
};
ZammadChat.prototype.onCloseAnimationEnd = function() {
@ -238,7 +238,8 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
ZammadChat.prototype.show = function() {
var remainerHeight;
this.el.addClass('zammad-chat-is-visible');
remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight();
console.log(this.el.outerHeight(), this.el.find('.zammad-chat-header').outerHeight());
remainerHeight = this.el.outerHeight() - this.el.find('.zammad-chat-header').outerHeight();
return this.el.css('bottom', -remainerHeight);
};

File diff suppressed because one or more lines are too long