- */
-
-/* global window, Candy, jQuery */
-
-var CandyShop = (function(self) { return self; }(CandyShop || {}));
-
-CandyShop.LeftTabs = (function(self, Candy, $) {
- /**
- * Initializes the LeftTabs plugin with the default settings.
- */
- self.init = function(){
- Candy.View.Template.Chat = {
- pane: '{{> tabs}}{{> toolbar}}{{> rooms}}
{{> modal}}',
- rooms: '',
- tabs: '',
- tab: '' +
- '{{#privateUserChat}} {{/privateUserChat}}{{name}}' +
- '\u00D7' +
- '',
- modal: '',
- adminMessage: '{{time}}' +
- '{{sender}}' +
- '▸{{subject}} {{message}}
',
- infoMessage: '{{time}}' +
- '•{{subject}} {{message}}
',
- toolbar: '',
- soundcontrol: '',
- Context: {
- menu: '',
- menulinks: '',
- contextModalForm: '',
- adminMessageReason: '×' +
- '{{_action}}
{{#reason}}{{_reason}}
{{/reason}}'
- },
- tooltip: ''
- };
-
- // Make the message pane the full height of the window.
- self.heights();
-
- // Make sure that the window heights are the right size after the window is resized.
- $(window).resize(function() {
- self.heights();
- });
-
- // Make sure that the window heights are the right size after a new room is added.
- $(Candy).on('candy:view.room.after-add', function() {
- self.heights();
- if(typeof CandyShop.CreateRoom === "object") {
- self.createRoomPluginCompatibility();
- }
- });
-
- $(Candy).on('candy:view.message.after-show', function(ev, obj) {
- if(Candy.View.Pane.Window.autoscroll) {
- $('div[data-roomjid="' + obj.roomJid + '"] .message-pane').scrollTop($('div[data-roomjid="' + obj.roomJid + '"] .message-pane').prop('scrollHeight') + $('div[data-roomjid="' + obj.roomJid + '"] .message-form-wrapper').height());
- }
- });
-
- };
-
- self.heights = function() {
- var barless_height = $(window).height() - $('.message-form-wrapper').height();
- var message_pane_height = barless_height;
- var message_pane_wrapper_height = (barless_height - parseInt($('.message-pane-wrapper').css('padding-bottom')));
- if(CandyShop.RoomBar) {
- message_pane_height = barless_height - parseInt($('.roombar').css('height'));
- $('.message-pane').css('margin-top', parseInt($('.roombar').css('height')) + 'px');
- }
- $('.message-pane-wrapper').height(message_pane_wrapper_height + 'px');
- $('.message-pane').height(message_pane_height + 'px');
- $('.roster-pane').height(barless_height + 'px');
- };
-
- self.createRoomPluginCompatibility = function() {
- $('#create-group-form button').addClass('btn');
- $('#create-group-form .close-button').html('');
- };
-
- return self;
-}(CandyShop.LeftTabs || {}, Candy, jQuery));
diff --git a/index.html b/index.html
index f17bb3a..deb16d8 100644
--- a/index.html
+++ b/index.html
@@ -13,7 +13,7 @@
-
+
@@ -28,11 +28,11 @@
-
+