增加开放文档逻辑,优化文档展示

This commit is contained in:
暮光:城中城
2019-01-28 22:26:34 +08:00
committed by zhanghongli
parent 15eecc7ee0
commit c2b64d06e4
22 changed files with 3262 additions and 14 deletions

View File

@@ -99,7 +99,9 @@ function getDocumentListByService() {
$("#choiceLocationList .choice-text").text(json.data[0].name);
addDocumentByLocationService(json.data[0].location);
} else {
addDocumentByLocationService();
initDashboard();
documentLoadFinish();
$("#choiceLocationList .choice-text").text("请先至 文档地址管理 处增加文档");
}
});
}
@@ -155,10 +157,7 @@ function addDocumentByLocationService(choiceDocList) {
return;
}
documentJsonArr = [];
var template = $('#homePageDashboardTemplate').html();
$('#homePageDashboard').empty();
$('#homePageDashboard').append('<div class="dashboard" data-height="320"></div>');
$('#homePageDashboard .dashboard').append(template);
initDashboard();
for (var i = 0; i < json.data.length; i++) {
showGlobalLoadingMessage('解析第' + (i + 1) + '份文档,请稍候...', true);
@@ -224,7 +223,7 @@ $("#choiceLocationList").on("click", ".dropdown-menu li", function(){
/**
* 搜索框回车事件
*/
$("#searchDocInput").keyup(function(e) {
$("#searchDocInput").keyup(function(e) {
if (e.keyCode == 13) {
searchDoc();
}
@@ -1017,7 +1016,7 @@ function updateUserSettings(newSetting) {
/**
* 初始化用户的设置
* @param
* @param
* @returns
*/
function initUserSettings() {
@@ -1043,3 +1042,9 @@ function showGlobalLoadingMessage(text, loading) {
globalLoadingMessager.$.find(".messager-content").html(text);
}
function initDashboard(){
var template = $('#homePageDashboardTemplate').html();
$('#homePageDashboard').empty();
$('#homePageDashboard').append('<div class="dashboard" data-height="320"></div>');
$('#homePageDashboard .dashboard').append(template);
}