|
|
@ -55,7 +55,8 @@ define([
|
|
|
|
var CHECKPOINT_INTERVAL = 100;
|
|
|
|
var CHECKPOINT_INTERVAL = 100;
|
|
|
|
var DISPLAY_RESTORE_BUTTON = false;
|
|
|
|
var DISPLAY_RESTORE_BUTTON = false;
|
|
|
|
var NEW_VERSION = 2;
|
|
|
|
var NEW_VERSION = 2;
|
|
|
|
var PENDING_TIMEOUT = 30000; // XXX it feels like maybe this should be shorter
|
|
|
|
var PENDING_TIMEOUT = 30000;
|
|
|
|
|
|
|
|
var READ_ONLY_REFRESH_DATA_DELAY = 15000;
|
|
|
|
|
|
|
|
|
|
|
|
var debug = function (x) {
|
|
|
|
var debug = function (x) {
|
|
|
|
if (!window.CP_DEV_MODE) { return; }
|
|
|
|
if (!window.CP_DEV_MODE) { return; }
|
|
|
@ -558,8 +559,6 @@ define([
|
|
|
|
xhr.send(null);
|
|
|
|
xhr.send(null);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Messages.oo_refresh = "Refresh"; // XXX read-only corner popup when receiving remote updates
|
|
|
|
|
|
|
|
Messages.oo_refreshText = "out of date"; // XXX read-only corner popup when receiving remote updates
|
|
|
|
|
|
|
|
var refreshReadOnly = function () {
|
|
|
|
var refreshReadOnly = function () {
|
|
|
|
var cancel = h('button.cp-corner-cancel', Messages.cancel);
|
|
|
|
var cancel = h('button.cp-corner-cancel', Messages.cancel);
|
|
|
|
var reload = h('button.cp-corner-primary', [
|
|
|
|
var reload = h('button.cp-corner-primary', [
|
|
|
@ -619,8 +618,8 @@ Messages.oo_refreshText = "out of date"; // XXX read-only corner popup when rece
|
|
|
|
APP.refreshPopup = true;
|
|
|
|
APP.refreshPopup = true;
|
|
|
|
|
|
|
|
|
|
|
|
// Don't "spam" the user instantly and no more than
|
|
|
|
// Don't "spam" the user instantly and no more than
|
|
|
|
// 1 popup every 30s
|
|
|
|
// 1 popup every 15s
|
|
|
|
setTimeout(refreshReadOnly, 30000);
|
|
|
|
setTimeout(refreshReadOnly, READ_ONLY_REFRESH_DATA_DELAY);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ooChannel.send(obj.data.msg);
|
|
|
|
ooChannel.send(obj.data.msg);
|
|
|
|