Remove connection lost popup when websocket connection is lost
This commit is contained in:
@@ -325,11 +325,11 @@ define([
|
||||
var onConnectionChange = function (info) {
|
||||
if (state === STATE.DELETED) { return; }
|
||||
stateChange(info.state ? STATE.INITIALIZING : STATE.DISCONNECTED);
|
||||
if (info.state) {
|
||||
/*if (info.state) {
|
||||
UI.findOKButton().click();
|
||||
} else {
|
||||
UI.alert(Messages.common_connectionLost, undefined, true);
|
||||
}
|
||||
}*/
|
||||
};
|
||||
|
||||
var onError = function (err) {
|
||||
|
||||
@@ -1048,6 +1048,13 @@ define([
|
||||
toolbar.reconnecting = function (/*userId*/) {
|
||||
toolbar.connected = false;
|
||||
if (toolbar.spinner) {
|
||||
var state = -1;
|
||||
var interval = window.setInterval(function () {
|
||||
if (toolbar.connected) { clearInterval(interval); }
|
||||
var dots = Array(state+1).join('.');
|
||||
toolbar.spinner.text(Messages.reconnecting + dots);
|
||||
if (++state > 3) { state = 0; }
|
||||
}, 500);
|
||||
toolbar.spinner.text(Messages.reconnecting);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -237,7 +237,7 @@ define([
|
||||
'tabindex': '-1',
|
||||
'data-icon': faFolder,
|
||||
}, Messages.fc_newfolder)),
|
||||
h('li', h('a.cp-app-drive-context-hashtag.dropdown-item', {
|
||||
h('li', h('a.cp-app-drive-context-hashtag.dropdown-item.cp-app-drive-context-editable', {
|
||||
'tabindex': '-1',
|
||||
'data-icon': faTags,
|
||||
}, Messages.fc_hashtag)),
|
||||
|
||||
@@ -1117,13 +1117,13 @@ define([
|
||||
});
|
||||
}
|
||||
setEditable(false);
|
||||
UI.alert(Messages.common_connectionLost, undefined, true);
|
||||
//UI.alert(Messages.common_connectionLost, undefined, true);
|
||||
};
|
||||
|
||||
var onReconnect = function () {
|
||||
if (APP.unrecoverable) { return; }
|
||||
setEditable(true);
|
||||
UI.findOKButton().click();
|
||||
//UI.findOKButton().click();
|
||||
};
|
||||
|
||||
var getHeadingText = function () {
|
||||
|
||||
@@ -616,9 +616,9 @@ define([
|
||||
setEditable(info.state);
|
||||
if (info.state) {
|
||||
initializing = true;
|
||||
UI.findOKButton().click();
|
||||
//UI.findOKButton().click();
|
||||
} else {
|
||||
UI.alert(Messages.common_connectionLost, undefined, true);
|
||||
//UI.alert(Messages.common_connectionLost, undefined, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user