Merge branch 'dev' into sxw-dev
Conflicts: template/admin/admin.html
This commit is contained in:
@@ -7,25 +7,36 @@ define("admin", ["jquery", "avalon"], function($, avalon){
|
||||
$(".list-group-item").attr("class", "list-group-item");
|
||||
}
|
||||
|
||||
function show_template(url){
|
||||
$("#loading-gif").show();
|
||||
vm.template_url = url;
|
||||
}
|
||||
|
||||
var vm = avalon.define({
|
||||
$id: "admin",
|
||||
template_url: "template/index/index.html",
|
||||
hide_loading: function(){
|
||||
$("#loading-gif").hide();
|
||||
}
|
||||
});
|
||||
|
||||
var hash = window.location.hash.substring(1);
|
||||
|
||||
if(hash){
|
||||
li_active("#li-" + hash);
|
||||
li_active("#li-" + hash.replace("/", "-"));
|
||||
show_template("template/" + hash + ".html");
|
||||
}else {
|
||||
li_active("#li-index");
|
||||
li_active("#li-index-index");
|
||||
}
|
||||
|
||||
window.onhashchange = function() {
|
||||
var hash = window.location.hash.substring(1);
|
||||
if(hash){
|
||||
li_inactive(".list-group-item");
|
||||
li_active("#li-" + hash);
|
||||
vm.template_url = "template/index/" + hash + ".html";
|
||||
li_active("#li-" + hash.replace("/", "-"));
|
||||
show_template("template/" + hash + ".html");
|
||||
}
|
||||
};
|
||||
|
||||
var vm = avalon.define({
|
||||
$id: "admin",
|
||||
template_url: "template/index/index.html"
|
||||
});
|
||||
|
||||
});
|
||||
@@ -2,6 +2,7 @@ require(["jquery", "avalon", "editor", "uploader", "datetimepicker",
|
||||
"validation"
|
||||
],
|
||||
function ($, avalon, editor, uploader) {
|
||||
avalon.vmodels.add_contest = null;
|
||||
$("#add-contest-form")
|
||||
.formValidation({
|
||||
framework: "bootstrap",
|
||||
|
||||
Reference in New Issue
Block a user