mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 00:13:18 +00:00
增加模板加载效果和对应的 js 控制
This commit is contained in:
parent
ab63ac652f
commit
d6a36fe20c
@ -20,12 +20,16 @@ define("admin", ["jquery", "avalon"], function($, avalon){
|
||||
if(hash){
|
||||
li_inactive(".list-group-item");
|
||||
li_active("#li-" + hash);
|
||||
$("#loading-gif").show();
|
||||
vm.template_url = "template/index/" + hash + ".html";
|
||||
}
|
||||
};
|
||||
|
||||
var vm = avalon.define({
|
||||
$id: "admin",
|
||||
template_url: "template/index/index.html"
|
||||
template_url: "template/index/index.html",
|
||||
hide_loading: function(){
|
||||
$("#loading-gif").hide();
|
||||
}
|
||||
});
|
||||
});
|
@ -81,9 +81,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
<!-- admin left end -->
|
||||
|
||||
<img src="/static/img/loading.gif" id="loading-gif">
|
||||
<!-- custom body begin -->
|
||||
<div ms-include-src="template_url"></div>
|
||||
<div ms-include-src="template_url" data-include-rendered="hide_loading"></div>
|
||||
<!-- custom body end -->
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user