Commit 7d659543 authored by JC Brand's avatar JC Brand

Add the logic for toggling minimized chats

parent 5f7ec3fc
...@@ -569,6 +569,7 @@ ...@@ -569,6 +569,7 @@
} }
this.bare_jid = Strophe.getBareJidFromJid(this.connection.jid); this.bare_jid = Strophe.getBareJidFromJid(this.connection.jid);
this.domain = Strophe.getDomainFromJid(this.connection.jid); this.domain = Strophe.getDomainFromJid(this.connection.jid);
this.minimized_chats = new converse.MinimizedChats({model: this.chatboxes});
this.features = new this.Features(); this.features = new this.Features();
this.enableCarbons(); this.enableCarbons();
this.initStatus($.proxy(function () { this.initStatus($.proxy(function () {
...@@ -653,17 +654,31 @@ ...@@ -653,17 +654,31 @@
'otr_status': this.get('otr_status') || UNENCRYPTED, 'otr_status': this.get('otr_status') || UNENCRYPTED,
'minimized': this.get('minimized') || false, 'minimized': this.get('minimized') || false,
'time_minimized': this.get('time_minimized') || moment(), 'time_minimized': this.get('time_minimized') || moment(),
'time_opened': this.get('time_opened') || moment().format(), 'time_opened': this.get('time_opened') || moment().valueOf(),
'height': height 'height': height
}); });
} else { } else {
this.set({ this.set({
'height': height, 'height': height,
'time_opened': moment(0).format() 'time_opened': moment(0).valueOf()
}); });
} }
}, },
maximize: function () {
this.save({
'minimized': false,
'time_opened': moment().valueOf()
});
},
minimize: function () {
this.save({
'minimized': true,
'time_minimized': moment().format()
});
},
getSession: function (callback) { getSession: function (callback) {
var cipher = CryptoJS.lib.PasswordBasedCipher; var cipher = CryptoJS.lib.PasswordBasedCipher;
var result, pass, instance_tag, saved_key, pass_check; var result, pass, instance_tag, saved_key, pass_check;
...@@ -1305,22 +1320,18 @@ ...@@ -1305,22 +1320,18 @@
}, },
maximize: function () { maximize: function () {
/* Restores a minimized chat box // Restores a minimized chat box
*/ this.model.trigger('maximized', this.model);
this.$el.insertAfter(converse.chatboxviews.get("controlbox").$el).show(); this.$el.insertAfter(converse.chatboxviews.get("controlbox").$el).show('fast', $.proxy(function () {
this.focus();
converse.refreshWebkit(); converse.refreshWebkit();
this.focus();
converse.emit('onChatBoxMaximized', this); converse.emit('onChatBoxMaximized', this);
this.model.trigger('maximized', this.model); }, this));
}, },
minimize: function (ev) { minimize: function (ev) {
/* Minimizes a chat box // Minimizes a chat box
*/ this.model.minimize();
this.model.save({
'minimized': true,
'time_minimized': moment().format()
});
this.$el.hide('fast', converse.refreshwebkit); this.$el.hide('fast', converse.refreshwebkit);
converse.emit('onChatBoxMinimized', this); converse.emit('onChatBoxMinimized', this);
}, },
...@@ -2478,18 +2489,12 @@ ...@@ -2478,18 +2489,12 @@
this.ChatBoxViews = Backbone.Overview.extend({ this.ChatBoxViews = Backbone.Overview.extend({
initialize: function () { initialize: function () {
this.trimmed_chatboxes_view = new converse.MinimizedChatBoxesView({model: this.model});
this.render();
this.model.on("add", this.onChatAdded, this); this.model.on("add", this.onChatAdded, this);
this.model.on("maximized", function (item) { this.model.on("maximized", function (item) {
this.trimChats(this.get(item.get('id'))); this.trimChats(this.get(item.get('id')));
}, this); }, this);
}, },
render: function () {
this.$el.html(this.trimmed_chatboxes_view.render());
},
_ensureElement: function() { _ensureElement: function() {
/* Override method from backbone.js /* Override method from backbone.js
* If the #conversejs element doesn't exist, create it. * If the #conversejs element doesn't exist, create it.
...@@ -2500,6 +2505,7 @@ ...@@ -2500,6 +2505,7 @@
$el = $('<div id="conversejs">'); $el = $('<div id="conversejs">');
$('body').append($el); $('body').append($el);
} }
$el.html(converse.templates.chats_panel());
this.setElement($el, false); this.setElement($el, false);
} else { } else {
this.setElement(_.result(this, 'el'), false); this.setElement(_.result(this, 'el'), false);
...@@ -2525,34 +2531,38 @@ ...@@ -2525,34 +2531,38 @@
this.trimChats(view); this.trimChats(view);
}, },
trimChats: function (view) { trimChats: function (newchat) {
/* This method is called before a new chat box will be opened. /* This method is called when a newly created chat box will
* be shown.
* *
* Check whether there is enough space in the page to show * It checks whether there is enough space on the page to show
* another chat box. Otherwise, close the oldest chat box. * another chat box. Otherwise it minimize the oldest chat box
* to create space.
*/ */
if (converse.no_trimming) { if (converse.no_trimming || (this.model.length <= 1)) {
return; return;
} }
var toggle_width = 0, var controlbox_width = 0,
trimmed_chats_width, $minimized = converse.minimized_chats.$el,
boxes_width = view.$el.outerWidth(true), minimized_width = $minimized.is(':visible') ? $minimized.outerWidth(true) : 0,
boxes_width = newchat.$el.outerWidth(true),
controlbox = this.get('controlbox'); controlbox = this.get('controlbox');
if (!controlbox || !controlbox.$el.is(':visible')) { if (!controlbox || !controlbox.$el.is(':visible')) {
toggle_width = converse.controlboxtoggle.$el.width(); controlbox_width = converse.controlboxtoggle.$el.outerWidth(true);
} else {
controlbox_width = controlbox.$el.outerWidth(true);
} }
this.$el.find('.chatbox').addBack('.chatroom').each(function (idx, el) {
var $el = $(el); _.each(this.getAll(), function (view) {
if ($el.is(':visible')) { var id = view.model.get('id');
boxes_width += $el.outerWidth(true); if (view.$el.is(':visible') && (id !== 'controlbox') && (id !== newchat.model.get('id'))) {
boxes_width += view.$el.outerWidth(true);
} }
}); });
if (this.model.length <= 1) {
return; if ((minimized_width + boxes_width + controlbox_width) > this.$el.outerWidth(true)) {
} this.getOldestMaximizedChat().minimize();
trimmed_chats_width = this.trimmed_chatboxes_view.$('.box-flyout').outerWidth(true) || 0;
if ((trimmed_chats_width + boxes_width + toggle_width) > this.$el.width()) {
this.getOldestMaximizedChat().set('minimized', true);
} }
}, },
...@@ -2560,6 +2570,9 @@ ...@@ -2560,6 +2570,9 @@
// Get oldest view (which is not controlbox) // Get oldest view (which is not controlbox)
var i = 0; var i = 0;
var model = this.model.sort().at(i); var model = this.model.sort().at(i);
console.log(this.model.pluck('time_opened'));
console.log(this.model.pluck('id'));
console.log(this.model.pluck('minimized'));
while (model.get('id') === 'controlbox' || model.get('minimized') === true) { while (model.get('id') === 'controlbox' || model.get('minimized') === true) {
i++; i++;
model = this.model.at(i); model = this.model.at(i);
...@@ -2571,7 +2584,7 @@ ...@@ -2571,7 +2584,7 @@
var chatbox = this.model.get(attrs.jid); var chatbox = this.model.get(attrs.jid);
if (chatbox) { if (chatbox) {
if (chatbox.get('minimized')) { if (chatbox.get('minimized')) {
chatbox.set({'minimized': false}); chatbox.maximize();
} else { } else {
chatbox.trigger('show'); chatbox.trigger('show');
} }
...@@ -2605,7 +2618,10 @@ ...@@ -2605,7 +2618,10 @@
}, },
render: function () { render: function () {
var data = this.model.toJSON(); var data = _.extend(
this.model.toJSON(),
{ 'tooltip': __('Click to restore this chat') }
);
if (this.model.get('chatroom')) { if (this.model.get('chatroom')) {
data.title = this.model.get('name'); data.title = this.model.get('name');
this.$el.addClass('chat-head-chatroom'); this.$el.addClass('chat-head-chatroom');
...@@ -2650,60 +2666,102 @@ ...@@ -2650,60 +2666,102 @@
ev.preventDefault(); ev.preventDefault();
} }
this.$el.remove(); this.$el.remove();
this.model.set({ this.model.maximize();
'time_opened': moment().format(),
'minimized': false
});
return this; return this;
} }
}); });
this.MinimizedChatBoxesView = Backbone.Overview.extend({ this.MinimizedChats = Backbone.Overview.extend({
el: "#minimized-chats",
events: {
"click #toggle-minimized-chats": "toggle"
},
initialize: function () { initialize: function () {
this.chats_toggle = new converse.MinimizedChatsToggle();
this.chats_toggle_view = new converse.MinimizedChatsToggleView({model: this.chats_toggle});
this.model.on("add", function (item) { this.model.on("add", function (item) {
if (item.get('minimized')) { if (item.get('minimized')) {
this.addChat(item); this.addChat(item);
} }
}, this); }, this);
this.model.on("destroy", function (item) {
this.remove(item.get('id'));
this.render();
}, this);
this.model.on("change:minimized", function (item) { this.model.on("change:minimized", function (item) {
this.onChanged(item); this.onChanged(item);
}, this); }, this);
}, },
render: function () { render: function () {
if (this.keys().length === 0) {
this.$el.hide('fast');
} else if (this.keys().length === 1) {
this.$el.show('fast');
}
return this.$el; return this.$el;
}, },
_ensureElement: function () { toggle: function () {
/* Override method from backbone.js this.chats_toggle.set({'visible': !this.chats_toggle.get('visible')})
* Make sure that the el and $el attributes point to a DOM snippet this.$('.minimized-chats-flyout').toggle();
* from src/templates/trimmed_chats.html
*/
if (!this.el) {
var $el = $(converse.templates.trimmed_chats());
this.setElement($el, false);
} else {
this.setElement(_.result(this, 'el'), false);
}
}, },
onChanged: function (item) { onChanged: function (item) {
var view;
if (item.get('minimized')) { if (item.get('minimized')) {
this.addChat(item); this.addChat(item);
} else { } else {
view = this.get(item.get('id')); this.removeChat(item);
view.restore();
} }
}, },
addChat: function (item) { addChat: function (item) {
if (this.get(item.get('id'))) {
return;
}
var view = new converse.MinimizedChatBoxView({model: item}); var view = new converse.MinimizedChatBoxView({model: item});
this.$('.box-flyout').append(view.render()); this.$('.minimized-chats-flyout').append(view.render());
this.add(item.get('id'), view); this.add(item.get('id'), view);
this.chats_toggle.set({'num_minimized': this.keys().length});
this.render();
},
removeChat: function (item) {
this.remove(item.get('id')).restore();
this.chats_toggle.set({'num_minimized': this.keys().length});
this.render();
} }
});
this.MinimizedChatsToggle = Backbone.Model.extend({
localStorage: new Backbone.LocalStorage(
b64_sha1('converse.minimized-chats-toggle'+converse.bare_jid)),
initialize: function () {
this.set({
'visible': this.get('visible') || false,
'num_minimized': 0
});
}
});
this.MinimizedChatsToggleView = Backbone.View.extend({
el: '#toggle-minimized-chats',
initialize: function () {
this.model.on('change:num_minimized', this.render, this);
},
render: function () {
this.$el.html(converse.templates.toggle_chats({
'Minimized': __('Minimized'),
'num_minimized': this.model.get('num_minimized')
}));
return this.$el;
},
}); });
this.RosterItem = Backbone.Model.extend({ this.RosterItem = Backbone.Model.extend({
...@@ -3461,7 +3519,7 @@ ...@@ -3461,7 +3519,7 @@
} }
}); });
this.Feature = Backbone.Model.extend(); this.Feature = Backbone.Model;
this.Features = Backbone.Collection.extend({ this.Features = Backbone.Collection.extend({
/* Service Discovery /* Service Discovery
* ----------------- * -----------------
......
...@@ -559,14 +559,14 @@ span.spinner.centered { ...@@ -559,14 +559,14 @@ span.spinner.centered {
span.spinner.hor_centered { span.spinner.hor_centered {
text-align: center; text-align: center;
} }
#conversejs #trimmed-chatboxes .box-flyout { #conversejs #minimized-chats .box-flyout {
position: absolute; position: absolute;
display: block; display: block;
height: auto; height: auto;
bottom: 25px; bottom: 25px;
margin-left: 0; margin-left: 0;
} }
#conversejs #trimmed-chatboxes .box-flyout .chat-head { #conversejs #minimized-chats .box-flyout .chat-head {
font-size: 100%; font-size: 100%;
border-radius: 4px; border-radius: 4px;
padding: 3px 0 0 5px; padding: 3px 0 0 5px;
...@@ -575,10 +575,7 @@ span.spinner.hor_centered { ...@@ -575,10 +575,7 @@ span.spinner.hor_centered {
height: 24px; height: 24px;
width: 130px; width: 130px;
} }
#conversejs #trimmed-chatboxes .chat-head-chatroom { #conversejs #minimized-chats,
width: 100px;
}
#conversejs #trimmed-chatboxes,
#conversejs .toggle-controlbox { #conversejs .toggle-controlbox {
float: right; float: right;
font-size: 90%; font-size: 90%;
...@@ -591,7 +588,12 @@ span.spinner.hor_centered { ...@@ -591,7 +588,12 @@ span.spinner.hor_centered {
font-weight: bold; font-weight: bold;
height: 100%; height: 100%;
} }
#conversejs .toggle-minimized-chats { #conversejs #minimized-chats {
width: 130px;
padding: 0;
display: none;
}
#conversejs #toggle-minimized-chats {
position: relative; position: relative;
padding: 4px 0 0 4px; padding: 4px 0 0 4px;
display: block; display: block;
...@@ -599,6 +601,10 @@ span.spinner.hor_centered { ...@@ -599,6 +601,10 @@ span.spinner.hor_centered {
height: 100%; height: 100%;
color: #0f0f0f; color: #0f0f0f;
} }
#conversejs #toggle-minimized-chats .unread-message-count {
right: 5px;
bottom: 5px;
}
#conversejs .chat-head { #conversejs .chat-head {
color: #ffffff; color: #ffffff;
font-size: 100%; font-size: 100%;
...@@ -838,10 +844,6 @@ dl.add-converse-contact { ...@@ -838,10 +844,6 @@ dl.add-converse-contact {
background-color: #2D617A; background-color: #2D617A;
padding: 3px 0 0 0; padding: 3px 0 0 0;
} }
#conversejs .toggle-minimized-chats .unread-message-count {
right: 5px;
bottom: 5px;
}
#conversejs .unread-message-count, #conversejs .unread-message-count,
#conversejs .chat-head-message-count { #conversejs .chat-head-message-count {
font-weight: bold; font-weight: bold;
...@@ -1054,11 +1056,6 @@ dl.add-converse-contact { ...@@ -1054,11 +1056,6 @@ dl.add-converse-contact {
margin-right: 15px; margin-right: 15px;
display: block; display: block;
} }
#conversejs #trimmed-chatboxes {
width: 130px;
padding: 0;
display: none;
}
#conversejs .chatbox { #conversejs .chatbox {
width: 200px; width: 200px;
} }
...@@ -1377,6 +1374,7 @@ input.custom-xmpp-status { ...@@ -1377,6 +1374,7 @@ input.custom-xmpp-status {
#conversejs .set-xmpp-status .dropdown dd ul { #conversejs .set-xmpp-status .dropdown dd ul {
z-index: 22; z-index: 22;
} }
#conversejs .minimized-chats-flyout,
#conversejs .box-flyout { #conversejs .box-flyout {
border-radius: 4px; border-radius: 4px;
bottom: 6px; bottom: 6px;
...@@ -1385,11 +1383,24 @@ input.custom-xmpp-status { ...@@ -1385,11 +1383,24 @@ input.custom-xmpp-status {
height: 324px; height: 324px;
position: absolute; position: absolute;
} }
#conversejs .box-flyout.minimized { #conversejs .minimized-chats-flyout {
border-radius: 4px;
bottom: 25px;
box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
display: block;
position: absolute;
height: auto;
width: 130px;
}
#conversejs .minimized-chats-flyout.minimized {
height: auto; height: auto;
} }
#conversejs .box-flyout.minimized .chat-head { #conversejs .minimized-chats-flyout .chat-head-chatroom,
#conversejs .minimized-chats-flyout .chat-head {
border-radius: 4px; border-radius: 4px;
width: 130px;
height: 25px;
margin-bottom: 1px;
} }
#conversejs .chatbox .box-flyout { #conversejs .chatbox .box-flyout {
width: 200px; width: 200px;
......
...@@ -588,7 +588,7 @@ span.spinner.hor_centered { ...@@ -588,7 +588,7 @@ span.spinner.hor_centered {
text-align: center; text-align: center;
} }
#conversejs #trimmed-chatboxes .box-flyout { #conversejs #minimized-chats .box-flyout {
position: absolute; position: absolute;
display: block; display: block;
height: auto; height: auto;
...@@ -596,7 +596,7 @@ span.spinner.hor_centered { ...@@ -596,7 +596,7 @@ span.spinner.hor_centered {
margin-left: 0; margin-left: 0;
} }
#conversejs #trimmed-chatboxes .box-flyout .chat-head { #conversejs #minimized-chats .box-flyout .chat-head {
font-size: 100%; font-size: 100%;
border-radius: 4px; border-radius: 4px;
padding: 3px 0 0 5px; padding: 3px 0 0 5px;
...@@ -606,11 +606,7 @@ span.spinner.hor_centered { ...@@ -606,11 +606,7 @@ span.spinner.hor_centered {
width: 130px; width: 130px;
} }
#conversejs #trimmed-chatboxes .chat-head-chatroom { #conversejs #minimized-chats,
width: 100px;
}
#conversejs #trimmed-chatboxes,
#conversejs .toggle-controlbox { #conversejs .toggle-controlbox {
float: right; float: right;
font-size: 90%; font-size: 90%;
...@@ -624,7 +620,13 @@ span.spinner.hor_centered { ...@@ -624,7 +620,13 @@ span.spinner.hor_centered {
height: 100%; height: 100%;
} }
#conversejs .toggle-minimized-chats { #conversejs #minimized-chats {
width: 130px;
padding: 0;
display: none;
}
#conversejs #toggle-minimized-chats {
position: relative; position: relative;
padding: 4px 0 0 4px; padding: 4px 0 0 4px;
display: block; display: block;
...@@ -633,6 +635,11 @@ span.spinner.hor_centered { ...@@ -633,6 +635,11 @@ span.spinner.hor_centered {
color: #0f0f0f; color: #0f0f0f;
} }
#conversejs #toggle-minimized-chats .unread-message-count {
right: 5px;
bottom: 5px;
}
#conversejs .chat-head { #conversejs .chat-head {
color: #ffffff; color: #ffffff;
font-size: 100%; font-size: 100%;
...@@ -917,11 +924,6 @@ dl.add-converse-contact { ...@@ -917,11 +924,6 @@ dl.add-converse-contact {
padding: 3px 0 0 0; padding: 3px 0 0 0;
} }
#conversejs .toggle-minimized-chats .unread-message-count {
right: 5px;
bottom: 5px;
}
#conversejs .unread-message-count, #conversejs .unread-message-count,
#conversejs .chat-head-message-count { #conversejs .chat-head-message-count {
font-weight: bold; font-weight: bold;
...@@ -1166,12 +1168,6 @@ dl.add-converse-contact { ...@@ -1166,12 +1168,6 @@ dl.add-converse-contact {
display: block; display: block;
} }
#conversejs #trimmed-chatboxes {
width: 130px;
padding: 0;
display: none;
}
#conversejs .chatbox { #conversejs .chatbox {
width: 200px; width: 200px;
} }
...@@ -1551,6 +1547,7 @@ input.custom-xmpp-status { ...@@ -1551,6 +1547,7 @@ input.custom-xmpp-status {
z-index: 22; z-index: 22;
} }
#conversejs .minimized-chats-flyout,
#conversejs .box-flyout { #conversejs .box-flyout {
border-radius: 4px; border-radius: 4px;
bottom: 6px; bottom: 6px;
...@@ -1560,12 +1557,26 @@ input.custom-xmpp-status { ...@@ -1560,12 +1557,26 @@ input.custom-xmpp-status {
position: absolute; position: absolute;
} }
#conversejs .box-flyout.minimized { #conversejs .minimized-chats-flyout {
border-radius: 4px;
bottom: 25px;
box-shadow: 1px 3px 5px 3px rgba(0,0,0,0.4);
display: block;
position: absolute;
height: auto;
width: 130px;
}
#conversejs .minimized-chats-flyout.minimized {
height: auto; height: auto;
} }
#conversejs .box-flyout.minimized .chat-head { #conversejs .minimized-chats-flyout .chat-head-chatroom,
#conversejs .minimized-chats-flyout .chat-head {
border-radius: 4px; border-radius: 4px;
width: 130px;
height: 25px;
margin-bottom: 1px;
} }
#conversejs .chatbox .box-flyout { #conversejs .chatbox .box-flyout {
......
...@@ -373,11 +373,12 @@ ...@@ -373,11 +373,12 @@
</div> </div>
</div> </div>
<div id="trimmed-chatboxes"> <div id="minimized-chats">
<a class="toggle-minimized-chats" href="#"> <a id="toggle-minimized-chats" href="#">
<span class="conn-feedback">Minimized</span> <span id="online-count">(0)</span> <span class="conn-feedback">Minimized</span> <span id="online-count">(0)</span>
<span class="unread-message-count" href="#" style="display:block">322</span>
</a> </a>
<div class="box-flyout minimized-chats"> <div class="minimized-chats-flyout">
<div class="chat-head chat-head-chatroom"> <div class="chat-head chat-head-chatroom">
<a class="close-chatbox-button icon-close"></a> <a class="close-chatbox-button icon-close"></a>
<a class="chat-head-message-count" href="#" style="display:block">3</a> <a class="chat-head-message-count" href="#" style="display:block">3</a>
......
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
</div> </div>
<div id="trimmed-chatboxes"> <div id="minimized-chats" style="display: block">
<a class="toggle-minimized-chats" href="#"> <a id="toggle-minimized-chats" href="#">
<span class="conn-feedback">Minimized</span> <span id="online-count">(0)</span> <span>Minimized <span id="minimized-count">(0)</span>
<span class="unread-message-count" href="#" style="display:block">322</span> <span class="unread-message-count" href="#" style="display:block">322</span>
</a> </a>
<div class="box-flyout minimized-chats"> <div class="minimized-chats-flyout">
<div class="chat-head chat-head-chatroom"> <div class="chat-head chat-head-chatroom">
<a class="close-chatbox-button icon-close"></a> <a class="close-chatbox-button icon-close"></a>
<a class="chat-head-message-count" href="#" style="display:block">3</a> <a class="chat-head-message-count" href="#" style="display:block">3</a>
...@@ -194,7 +194,7 @@ $(document).ready(function () { ...@@ -194,7 +194,7 @@ $(document).ready(function () {
}); });
$('.toggle-minimized-chats').click(function(ev) { $('.toggle-minimized-chats').click(function(ev) {
$('.minimized-chats').toggle(); $('.minimized-chats-flyout').toggle();
}); });
// Clickable Dropdown // Clickable Dropdown
......
...@@ -8,6 +8,7 @@ define("converse-templates", [ ...@@ -8,6 +8,7 @@ define("converse-templates", [
"tpl!src/templates/chatbox", "tpl!src/templates/chatbox",
"tpl!src/templates/chatroom", "tpl!src/templates/chatroom",
"tpl!src/templates/chatrooms_tab", "tpl!src/templates/chatrooms_tab",
"tpl!src/templates/chats_panel",
"tpl!src/templates/choose_status", "tpl!src/templates/choose_status",
"tpl!src/templates/contacts", "tpl!src/templates/contacts",
"tpl!src/templates/contacts_panel", "tpl!src/templates/contacts_panel",
...@@ -36,7 +37,7 @@ define("converse-templates", [ ...@@ -36,7 +37,7 @@ define("converse-templates", [
"tpl!src/templates/status_option", "tpl!src/templates/status_option",
"tpl!src/templates/toolbar", "tpl!src/templates/toolbar",
"tpl!src/templates/trimmed_chat", "tpl!src/templates/trimmed_chat",
"tpl!src/templates/trimmed_chats" "tpl!src/templates/toggle_chats"
], function () { ], function () {
return { return {
action: arguments[0], action: arguments[0],
...@@ -48,34 +49,35 @@ define("converse-templates", [ ...@@ -48,34 +49,35 @@ define("converse-templates", [
chatbox: arguments[6], chatbox: arguments[6],
chatroom: arguments[7], chatroom: arguments[7],
chatrooms_tab: arguments[8], chatrooms_tab: arguments[8],
choose_status: arguments[9], chats_panel: arguments[9],
contacts: arguments[10], choose_status: arguments[10],
contacts_panel: arguments[11], contacts: arguments[11],
contacts_tab: arguments[12], contacts_panel: arguments[12],
controlbox: arguments[13], contacts_tab: arguments[13],
controlbox_toggle: arguments[14], controlbox: arguments[14],
field: arguments[15], controlbox_toggle: arguments[15],
form_checkbox: arguments[16], field: arguments[16],
form_input: arguments[17], form_checkbox: arguments[17],
form_select: arguments[18], form_input: arguments[18],
info: arguments[19], form_select: arguments[19],
login_panel: arguments[20], info: arguments[20],
login_tab: arguments[21], login_panel: arguments[21],
message: arguments[22], login_tab: arguments[22],
new_day: arguments[23], message: arguments[23],
occupant: arguments[24], new_day: arguments[24],
pending_contact: arguments[25], occupant: arguments[25],
pending_contacts: arguments[26], pending_contact: arguments[26],
requesting_contact: arguments[27], pending_contacts: arguments[27],
requesting_contacts: arguments[28], requesting_contact: arguments[28],
room_description: arguments[29], requesting_contacts: arguments[29],
room_item: arguments[30], room_description: arguments[30],
room_panel: arguments[31], room_item: arguments[31],
roster_item: arguments[32], room_panel: arguments[32],
select_option: arguments[33], roster_item: arguments[33],
status_option: arguments[34], select_option: arguments[34],
toolbar: arguments[35], status_option: arguments[35],
trimmed_chat: arguments[36], toolbar: arguments[36],
trimmed_chats: arguments[37] trimmed_chat: arguments[37],
toggle_chats: arguments[38]
}; };
}); });
<div id="minimized-chats">
<a id="toggle-minimized-chats" href="#">
<span>Minimized <span id="minimized-count">(0)</span>
<span class="unread-message-count" href="#">0</span>
</a>
<div class="minimized-chats-flyout"></div>
</div>
{{Minimized}} <span id="minimized-count">({{num_minimized}})</span>
<span class="unread-message-count" href="#">0</span>
<a class="close-chatbox-button icon-close"></a> <a class="close-chatbox-button icon-close"></a>
<a class="chat-head-message-count" href="#">0</a>
<div class="chat-title"> <div class="chat-title">
<a href="#" class="restore-chat"> <a href="#" class="restore-chat" title="{{tooltip}}">
<div class="chat-head-message-count">0</div>
{{ title }} {{ title }}
</a> </a>
</div> </div>
<div id="trimmed-chatboxes"><div class="box-flyout"></div></div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment