diff --git a/.gitignore b/.gitignore index 2880e03b..00ab8519 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ users/*.json server/*.json public/*.json McserverConfig.json -core/*.json \ No newline at end of file +core/*.json +node_modules/ \ No newline at end of file diff --git a/public/common/css/common.css b/public/common/css/common.css index 7929377e..8b4f11d9 100644 --- a/public/common/css/common.css +++ b/public/common/css/common.css @@ -261,3 +261,15 @@ a,input{outline:none;} margin-left: -20px; } +/*进度条CSS*/ +.Toolscon{ + position: fixed; + top: 0px; + left: 0px; + /*background-color: #00cc06;*/ + height: 4px; + z-index: 999; + width: 100%; + overflow: hidden; + line-height: 3px; +} diff --git a/public/common/css/unit.css b/public/common/css/unit.css index 44f5fa3f..196d205f 100644 --- a/public/common/css/unit.css +++ b/public/common/css/unit.css @@ -18,3 +18,8 @@ box-shadow: 2px 0px 6px #888888; } +.width-100{ + width: 100%; +} + + diff --git a/public/common/js/common.js b/public/common/js/common.js index bf82b4d8..05e95aad 100644 --- a/public/common/js/common.js +++ b/public/common/js/common.js @@ -173,7 +173,6 @@ }, 200, function() { MI.on('colmchangeEnd', null); //触发事件 }); - // $SideCol.removeAttr('style') $Container.removeAttr('style') }); } @@ -203,20 +202,3 @@ // if(document.body.clientWidth <) })(); - -//logo -$(function() { - - // var MasterLogo = $('#MasterLogo'); - // - // function logoAnimate() { - // MasterLogo.animate({ - // 'letter-spacing': '2.0px' - // }, 15000, function() { - // MasterLogo.animate({ - // 'letter-spacing': '1px' - // }, 15000, logoAnimate); - // }); - // } - // logoAnimate(); -}) \ No newline at end of file diff --git a/public/common/js/response.js b/public/common/js/response.js index 46aff65d..69abb950 100644 --- a/public/common/js/response.js +++ b/public/common/js/response.js @@ -89,34 +89,56 @@ }); } } - - var PageMain = $('#ConsoleMain'); - RES.redirectPage = function(url, key, body, callback) { - PageMain.stop(true, true).animate({ - 'opacity': '0' - // 'margin-left':'50px' - }, 150, MmDoing); - //切换事件处理 - function MmDoing() { + RES.redirectPage = function(url, key, body, callback) { + + ToolsLoadingStart(function() { MI.rOn('onend'); + PageLoading(); //替換掉原先存在的 函数。防止新的单页没有这些函数而导致代码二次执行 MI.rListener('onend', function() {}); MI.rListener('onload', function() {}); RES.redirectHTML(url, key, body, function() { - MI.on('page/live'); //MCSERVER.URL( + MI.on('page/live'); //赋予的单页刷新 PAGE.refresh = function() { RES.redirectPage(url, key, body, callback); } + ToolsLoadingEnd(); MI.rOn('onload'); callback && callback(); - PageMain.stop(true, true).animate({ - 'opacity': '1' - // 'margin-left':'0px' - }, 150); + }); - } + }); } + + var PageMain = $('#ConsoleMain'); + var ToolsLoading = $('#ToolsLoading'); //进度条 + var ToolsPageLoading = $("#ToolsPageLoading"); //进度条容器 + + function ToolsLoadingStart(callback) { + ToolsLoading.css("width", "0%"); + ToolsPageLoading.css("display", "block"); + PageMain.stop(true, true).animate({ + 'opacity': '0' + }, 150, callback); + } + + function PageLoading() { + ToolsLoading.css("width", "80%"); + } + + function ToolsLoadingEnd() { + ToolsLoading.css("width", "100%"); + + + + PageMain.stop(true, true).animate({ + 'opacity': '1' + }, 150, function() { + ToolsPageLoading.css("display", "none"); + }); + } + })(); \ No newline at end of file diff --git a/public/index.html b/public/index.html index 8c3d078b..9e305653 100644 --- a/public/index.html +++ b/public/index.html @@ -1,45 +1,45 @@ - - - - - - - + + + + + + + - Mcserver 管理面板 - + Mcserver 管理面板 + - - - - - - - - - - + + + + - - + + - - -