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