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