|
|
@ -687,6 +687,7 @@ MessengerUI, Messages) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var save = function () {
|
|
|
|
var save = function () {
|
|
|
|
|
|
|
|
if (toolbar.history) { return; }
|
|
|
|
var name = $input.val().trim();
|
|
|
|
var name = $input.val().trim();
|
|
|
|
if (name === "") {
|
|
|
|
if (name === "") {
|
|
|
|
name = $input.attr('placeholder');
|
|
|
|
name = $input.attr('placeholder');
|
|
|
@ -717,6 +718,7 @@ MessengerUI, Messages) {
|
|
|
|
|
|
|
|
|
|
|
|
var displayInput = function () {
|
|
|
|
var displayInput = function () {
|
|
|
|
if (toolbar.connected === false) { return; }
|
|
|
|
if (toolbar.connected === false) { return; }
|
|
|
|
|
|
|
|
if (toolbar.history) { return; }
|
|
|
|
$input.width(Math.max(($text.width() + 10), 300)+'px');
|
|
|
|
$input.width(Math.max(($text.width() + 10), 300)+'px');
|
|
|
|
$text.hide();
|
|
|
|
$text.hide();
|
|
|
|
//$pencilIcon.css('display', 'none');
|
|
|
|
//$pencilIcon.css('display', 'none');
|
|
|
@ -1273,12 +1275,14 @@ MessengerUI, Messages) {
|
|
|
|
//checkLag(toolbar, config);
|
|
|
|
//checkLag(toolbar, config);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
toolbar.initializing = function (/*userId*/) {
|
|
|
|
toolbar.initializing = function (/*userId*/) {
|
|
|
|
|
|
|
|
if (toolbar.history) { return; }
|
|
|
|
toolbar.connected = false;
|
|
|
|
toolbar.connected = false;
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
toolbar.spinner.text(Messages.initializing);
|
|
|
|
toolbar.spinner.text(Messages.initializing);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
toolbar.reconnecting = function (/*userId*/) {
|
|
|
|
toolbar.reconnecting = function (/*userId*/) {
|
|
|
|
|
|
|
|
if (toolbar.history) { return; }
|
|
|
|
toolbar.connected = false;
|
|
|
|
toolbar.connected = false;
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
var state = -1;
|
|
|
|
var state = -1;
|
|
|
@ -1342,6 +1346,13 @@ MessengerUI, Messages) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.setHistory = function (bool) {
|
|
|
|
|
|
|
|
toolbar.history = bool;
|
|
|
|
|
|
|
|
if (bool && toolbar.spinner) {
|
|
|
|
|
|
|
|
toolbar.spinner.text("HISTORY"); // XXX
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// On log out, remove permanently the realtime elements of the toolbar
|
|
|
|
// On log out, remove permanently the realtime elements of the toolbar
|
|
|
|
Common.onLogout(function () {
|
|
|
|
Common.onLogout(function () {
|
|
|
|
failed();
|
|
|
|
failed();
|
|
|
|