|
|
@ -879,6 +879,14 @@ MessengerUI, Messages) {
|
|
|
|
$spin.text(Messages.saved);
|
|
|
|
$spin.text(Messages.saved);
|
|
|
|
}, /*local ? 0 :*/ SPINNER_DISAPPEAR_TIME);
|
|
|
|
}, /*local ? 0 :*/ SPINNER_DISAPPEAR_TIME);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (config.spinner) {
|
|
|
|
|
|
|
|
var h = function () {
|
|
|
|
|
|
|
|
onSynced();
|
|
|
|
|
|
|
|
try { config.spinner.onSync.unreg(h); } catch (e) { console.error(e); }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config.spinner.onSync.reg(h);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
config.sfCommon.whenRealtimeSyncs(onSynced);
|
|
|
|
config.sfCommon.whenRealtimeSyncs(onSynced);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var ks = function (toolbar, config, local) {
|
|
|
|
var ks = function (toolbar, config, local) {
|
|
|
@ -891,6 +899,15 @@ MessengerUI, Messages) {
|
|
|
|
var $spin = $('<span>', {'class': SPINNER_CLS}).appendTo(toolbar.title);
|
|
|
|
var $spin = $('<span>', {'class': SPINNER_CLS}).appendTo(toolbar.title);
|
|
|
|
$spin.text(Messages.synchronizing);
|
|
|
|
$spin.text(Messages.synchronizing);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (config.spinner) {
|
|
|
|
|
|
|
|
config.spinner.onPatch.reg(ks(toolbar, config));
|
|
|
|
|
|
|
|
typing = 0;
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
|
|
|
kickSpinner(toolbar, config);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return $spin;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (config.realtime) {
|
|
|
|
if (config.realtime) {
|
|
|
|
config.realtime.onPatch(ks(toolbar, config));
|
|
|
|
config.realtime.onPatch(ks(toolbar, config));
|
|
|
|
config.realtime.onMessage(ks(toolbar, config, true));
|
|
|
|
config.realtime.onMessage(ks(toolbar, config, true));
|
|
|
|