Save
This commit is contained in:
parent
9747f09927
commit
479cabd2ec
@ -1744,14 +1744,8 @@ actions.prototype.clickSyncSave = function (x,y) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var index=5*(main.savePages||30);
|
core.setLocalStorage("save"+core.status.saveIndex, data);
|
||||||
for (var i=5*(main.savePages||30);i>=1;i--) {
|
core.drawText("同步成功!\n单存档已覆盖至存档"+core.status.saveIndex);
|
||||||
if (core.getLocalStorage("save"+i, null)==null)
|
|
||||||
index=i;
|
|
||||||
else break;
|
|
||||||
}
|
|
||||||
core.setLocalStorage("save"+index, data);
|
|
||||||
core.drawText("同步成功!\n单存档已覆盖至存档"+index);
|
|
||||||
}
|
}
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
||||||
@ -1880,12 +1874,7 @@ actions.prototype.clickLocalSaveSelect = function (x,y) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
for (var i=5*(main.savePages||30);i>=1;i--) {
|
saves=core.getLocalStorage("save"+core.status.saveIndex, null);
|
||||||
saves=core.getLocalStorage("save"+i, null);
|
|
||||||
if (core.isset(saves)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -2072,14 +2072,6 @@ control.prototype.syncSave = function (type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/*
|
|
||||||
for (var i=5*(main.savePages||30);i>=1;i--) {
|
|
||||||
saves=core.getLocalStorage("save"+i, null);
|
|
||||||
if (core.isset(saves)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
saves=core.getLocalStorage("save"+core.status.saveIndex, null);
|
saves=core.getLocalStorage("save"+core.status.saveIndex, null);
|
||||||
}
|
}
|
||||||
if (!core.isset(saves)) {
|
if (!core.isset(saves)) {
|
||||||
@ -2111,10 +2103,12 @@ control.prototype.syncSave = function (type) {
|
|||||||
|
|
||||||
////// 从服务器加载存档 //////
|
////// 从服务器加载存档 //////
|
||||||
control.prototype.syncLoad = function () {
|
control.prototype.syncLoad = function () {
|
||||||
|
core.interval.onDownInterval = 'tmp';
|
||||||
var id = prompt("请输入存档编号:");
|
var id = prompt("请输入存档编号:");
|
||||||
if (id==null || id=="") {
|
if (id==null || id=="") {
|
||||||
core.ui.drawSyncSave(); return;
|
core.ui.drawSyncSave(); return;
|
||||||
}
|
}
|
||||||
|
core.interval.onDownInterval = 'tmp';
|
||||||
var password = prompt("请输入存档密码:");
|
var password = prompt("请输入存档密码:");
|
||||||
if (password==null || password=="") {
|
if (password==null || password=="") {
|
||||||
core.ui.drawSyncSave(); return;
|
core.ui.drawSyncSave(); return;
|
||||||
@ -2154,17 +2148,8 @@ control.prototype.syncLoad = function () {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 只覆盖单存档
|
// 只覆盖单存档
|
||||||
/*
|
core.setLocalStorage("save"+core.status.saveIndex, data);
|
||||||
var index=5*(main.savePages||30);
|
core.drawText("同步成功!\n单存档已覆盖至存档"+core.status.saveIndex);
|
||||||
for (var i=5*(main.savePages||30);i>=1;i--) {
|
|
||||||
if (core.getLocalStorage("save"+i, null)==null)
|
|
||||||
index=i;
|
|
||||||
else break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
var index = core.status.saveIndex;
|
|
||||||
core.setLocalStorage("save"+index, data);
|
|
||||||
core.drawText("同步成功!\n单存档已覆盖至存档"+index);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
|
|||||||
@ -1112,7 +1112,7 @@ ui.prototype.drawSyncSave = function () {
|
|||||||
ui.prototype.drawSyncSelect = function () {
|
ui.prototype.drawSyncSelect = function () {
|
||||||
core.status.event.id = 'syncSelect';
|
core.status.event.id = 'syncSelect';
|
||||||
this.drawChoices(null, [
|
this.drawChoices(null, [
|
||||||
"同步本地所有存档", "只同步选中单存档", "返回上级菜单"
|
"同步本地所有存档", "只同步当前单存档", "返回上级菜单"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1120,7 +1120,7 @@ ui.prototype.drawSyncSelect = function () {
|
|||||||
ui.prototype.drawLocalSaveSelect = function () {
|
ui.prototype.drawLocalSaveSelect = function () {
|
||||||
core.status.event.id = 'localSaveSelect';
|
core.status.event.id = 'localSaveSelect';
|
||||||
this.drawChoices(null, [
|
this.drawChoices(null, [
|
||||||
"下载所有存档", "只下载选中单存档", "返回上级菜单"
|
"下载所有存档", "只下载当前单存档", "返回上级菜单"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user