Remove invalid 'DISCONNECTED' message in drive history mode
This commit is contained in:
@@ -259,12 +259,14 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Handle disconnect/reconnect
|
// Handle disconnect/reconnect
|
||||||
var setEditable = function (state) {
|
var setEditable = function (state, isHistory) {
|
||||||
if (APP.closed || !APP.$content || !$.contains(document.documentElement, APP.$content[0])) { return; }
|
if (APP.closed || !APP.$content || !$.contains(document.documentElement, APP.$content[0])) { return; }
|
||||||
APP.editable = !APP.readOnly && state;
|
APP.editable = !APP.readOnly && state;
|
||||||
if (!state) {
|
if (!state) {
|
||||||
APP.$content.addClass('cp-app-drive-readonly');
|
APP.$content.addClass('cp-app-drive-readonly');
|
||||||
|
if (!isHistory) {
|
||||||
$('#cp-app-drive-connection-state').show();
|
$('#cp-app-drive-connection-state').show();
|
||||||
|
}
|
||||||
$('[draggable="true"]').attr('draggable', false);
|
$('[draggable="true"]').attr('draggable', false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ define([
|
|||||||
|
|
||||||
var setHistory = function (bool, update) {
|
var setHistory = function (bool, update) {
|
||||||
history.isHistoryMode = bool;
|
history.isHistoryMode = bool;
|
||||||
setEditable(!bool);
|
setEditable(!bool, true);
|
||||||
if (!bool && update) {
|
if (!bool && update) {
|
||||||
history.onLeaveHistory();
|
history.onLeaveHistory();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user