$(function(){App.init();App.initLeftNavAjax(window.activeURL,null);App.bottomFloat(".pagination");App.bottomFloat(".form-submit-group",0,true);App.notifyListen();$("#topnav a[data-project]").on("click",function(t){t.preventDefault();var i=$(this).data("project");var a=$(this).parent("li");var e=function(){if(!a.hasClass("active")){a.addClass("active")}a.siblings("li.active").removeClass("active");if($(".cl-toggle").is(":visible")){$(".navbar-header > .navbar-toggle").trigger("click");if(!$("#leftnav").is(":visible"))$(".cl-toggle").trigger("click")}};if(i==$("#topnav").attr("data-project"))return e();$("#topnav").attr("data-project",i);$.get(window.BACKEND_URL+"/project/"+i,{partial:1},function(t){if(t.Code!=1){App.message({title:App.i18n.SYS_INFO,text:t.Info,type:"error"});return}$("#leftnav").attr("data-project",i).html(t.Data.list);App.initLeftNav();App.initLeftNavAjax(window.activeURL,"#leftnav");e()},"json")});$("#leftnav").on("click",'a[data-marknav="left"]',function(){if($(".cl-toggle").is(":visible"))$(".cl-toggle").trigger("click")});$("#topnav").on("click",'a[data-marknav="top"]',function(){if($(".cl-toggle").is(":visible")){if($("#leftnav").is(":visible"))$(".cl-toggle").trigger("click")}})});