hide chat by default

This commit is contained in:
Felix Niklas 2015-10-15 16:06:24 +02:00
parent 9c27582068
commit ad57764057
3 changed files with 1 additions and 7 deletions

View file

@ -38,8 +38,6 @@ do($ = window.jQuery, window) ->
@setAgentOnlineState @isOnline @setAgentOnlineState @isOnline
@show() if @options.show
@el.find('.zammad-chat-header').click @toggle @el.find('.zammad-chat-header').click @toggle
@el.find('.zammad-chat-controls').on 'submit', @onSubmit @el.find('.zammad-chat-controls').on 'submit', @onSubmit
@el.find('.zammad-chat-input').on( @el.find('.zammad-chat-input').on(

View file

@ -114,9 +114,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
this.el = $(this.view('chat')()); this.el = $(this.view('chat')());
this.options.target.append(this.el); this.options.target.append(this.el);
this.setAgentOnlineState(this.isOnline); this.setAgentOnlineState(this.isOnline);
if (this.options.show) {
this.show();
}
this.el.find('.zammad-chat-header').click(this.toggle); this.el.find('.zammad-chat-header').click(this.toggle);
this.el.find('.zammad-chat-controls').on('submit', this.onSubmit); this.el.find('.zammad-chat-controls').on('submit', this.onSubmit);
this.el.find('.zammad-chat-input').on({ this.el.find('.zammad-chat-input').on({
@ -238,7 +235,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
ZammadChat.prototype.show = function() { ZammadChat.prototype.show = function() {
var remainerHeight; var remainerHeight;
this.el.addClass('zammad-chat-is-visible'); this.el.addClass('zammad-chat-is-visible');
console.log(this.el.outerHeight(), this.el.find('.zammad-chat-header').outerHeight());
remainerHeight = 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); return this.el.css('bottom', -remainerHeight);
}; };

File diff suppressed because one or more lines are too long