fixed download and rollback UI

This commit is contained in:
strawmanbobi
2016-12-04 21:46:27 +08:00
parent 12d46f353f
commit 8da5f4414e
4 changed files with 10 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ exports.setupEnvironment = function () {
REDIS_HOST = "localhost";
REDIS_PORT = "6379";
REDIS_PASSWORD = "";
EXTERNAL_SERVER_ADDRESS = "irext.net"
EXTERNAL_SERVER_ADDRESS = "irext.net";
EXTERNAL_SERVER_PORT = "80"
} else if (enums.APP_DEVELOPMENT_MODE == env) {
MYSQL_DB_SERVER_ADDRESS = "localhost";
@@ -40,7 +40,7 @@ exports.setupEnvironment = function () {
REDIS_HOST = "localhost";
REDIS_PORT = "6379";
REDIS_PASSWORD = "";
EXTERNAL_SERVER_ADDRESS = "irext.net"
EXTERNAL_SERVER_ADDRESS = "irext.net";
EXTERNAL_SERVER_PORT = "80"
} else if (enums.APP_USERDEBUG_MODE == env) {
MYSQL_DB_SERVER_ADDRESS = "localhost";
@@ -54,7 +54,7 @@ exports.setupEnvironment = function () {
REDIS_HOST = "localhost";
REDIS_PORT = "6379";
REDIS_PASSWORD = "";
EXTERNAL_SERVER_ADDRESS = "irext.net"
EXTERNAL_SERVER_ADDRESS = "irext.net";
EXTERNAL_SERVER_PORT = "80"
}
};

View File

@@ -531,6 +531,6 @@
<script src="../public_js/utils/url_parser.js"></script>
<script src="../public_js/chinese/await.js"></script>
<script src="../public_js/chinese/chinese.js"></script>
<script type="text/javascript" src="./js/remote.js"></script>
<script type="text/javascript" src="js/code_index.js"></script>
<script type="text/javascript" src="../js/ui.js"></script>
</html>

View File

@@ -141,7 +141,6 @@ function loadRemoteList(isSearch, remoteMap) {
url: url,
cache: false,
height: 600,
striped: true,
pagination: true,
pageSize: 50,
pageList: [10, 25, 50, 100, 200],
@@ -209,7 +208,7 @@ function loadRemoteList(isSearch, remoteMap) {
clickToSelect: true
}, {
field: 'contributor',
title: '来源',
title: '贡献者',
align: 'left',
valign: 'middle',
sortable: true,
@@ -268,7 +267,7 @@ function rowStyle(row, index) {
};
} else if (row.status == '重复') {
style = {
classes: 'danger'
classes: 'warning'
};
} else {
style = {
@@ -415,16 +414,16 @@ function fallbackRemote() {
timeout: 20000,
success: function (response) {
if(response.status.code == 0) {
$("#verify_confirm_dialog").modal("hide");
$("#fallback_confirm_dialog").modal("hide");
popUpHintDialog("已成功回退索引");
loadRemoteList();
} else {
$("#verify_confirm_dialog").modal("hide");
$("#fallback_confirm_dialog").modal("hide");
popUpHintDialog("回退索引操作失败");
}
},
error: function () {
$("#verify_confirm_dialog").modal("hide");
$("#fallback_confirm_dialog").modal("hide");
popUpHintDialog("回退索引操作失败");
}
});

View File

@@ -151,8 +151,7 @@ exports.downloadRemoteBinCachedWorkUnit = function(remoteIndexID, callback) {
RemoteIndex.getRemoteIndexByID(remoteIndexID, function(getRemoteIndexErr, remoteIndex) {
if (errorCode.SUCCESS.code == getRemoteIndexErr.code && null != remoteIndex) {
var fileName = "irda_" + remoteIndex.protocol + "_" + remoteIndex.remote + ".bin";
var remoteBinaryPath = FILE_TEMP_PATH;
var localBinFileName = remoteBinaryPath + "/cache/" + fileName;
var localBinFileName = FILE_TEMP_PATH + "/" + fileName;
var error = errorCode.SUCCESS;