121 lines
5.6 KiB
Plaintext
121 lines
5.6 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/IronIntelMasterPage.master" AutoEventWireup="true" CodeFile="JobSite.aspx.cs" Inherits="JobSite" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="holder_head" runat="Server">
|
|
<link href="<%=GetFileUrlWithVersion("../css/split.css")%>" rel="stylesheet" type="text/css" />
|
|
<script src="<%=GetFileUrlWithVersion("../js/split.js")%>"></script>
|
|
<%--<script src="<%=GetFileUrlWithVersion("../fic/js/utility.js")%>" type="text/javascript"></script>--%>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
setFavoriteDisplay(true);
|
|
|
|
_network.query = function (method, param, callback, error) {
|
|
_network.request("JobSite/JobSite.aspx", -1, method, param, callback, error);
|
|
}
|
|
_network.query('GetNavigations', '', function (data) {
|
|
if (data != null && data.length > 0) {
|
|
var list = [];
|
|
for (var i = 0; i < data.length; i++) {
|
|
var icon = $(' <button></button>');
|
|
var title = getNavInfoByID(data[i].ID, data[i].Title, icon);
|
|
var li = $('<li class="nav_item"></li>').attr({
|
|
'id': data[i].ID,
|
|
'page': data[i].Url,
|
|
'title': title
|
|
});
|
|
var a = $('<a></a>').attr('href', '#' + data[i].ID);
|
|
var src = data[i].IconPath;
|
|
if (!src) {
|
|
src = 'img/none.png';
|
|
}
|
|
var img = $('<img style="width: 20px; height: 20px;"/>').attr("src", src);
|
|
var divicon = $('<div></div>').append(img);
|
|
//var divicon = $('<div></div>').append(icon);
|
|
a.append(divicon);
|
|
a.append($('<span></span>').text(title));
|
|
li.append(a);
|
|
list.push(li);
|
|
}
|
|
$('.ul_menu').append(list);
|
|
}
|
|
|
|
if (data.length > 0) {
|
|
default_page = '#' + data[0].ID;
|
|
if (!old_hash) {
|
|
old_hash = default_page;
|
|
}
|
|
|
|
window.changePage(old_hash);
|
|
} else {
|
|
// 无权限时跳转至登录页面
|
|
window.location.href = '<%=LoginPageUrl%>';
|
|
}
|
|
}, function (e) {
|
|
console.log(e);
|
|
});
|
|
|
|
window.changePage(old_hash);
|
|
});
|
|
|
|
function getNavInfoByID(id, title1, icon) {
|
|
var title = title1;
|
|
if (id === "nav_jobsiterequirements") {
|
|
title = GetTextByKey("P_JS_JOBSITEREQUIREMENTS", title);
|
|
//$(icon).addClass("iconmanagealerts");
|
|
}
|
|
else if (id === "nav_dispatchrequests") {
|
|
title = GetTextByKey("P_JS_DISPATCHREQUESTS", title);
|
|
//$(icon).addClass("iconworkorder");
|
|
}
|
|
else if (id === "nav_jobsitemanage") {
|
|
title = GetTextByKey("P_JOBSITES", title);
|
|
//$(icon).addClass("iconpreventative");
|
|
}
|
|
else if (id === "nav_scheduler") {
|
|
title = GetTextByKey("P_JS_SCHEDULER", title);
|
|
//$(icon).addClass("icontimebased");
|
|
}
|
|
return title;
|
|
}
|
|
|
|
function afterpagechanged(hash, name) {
|
|
setFavorateStyle(hash, name);
|
|
};
|
|
</script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="holder_content" runat="Server">
|
|
<div id="set_left">
|
|
<ul class="ul_menu">
|
|
<li id="nav_arrow">
|
|
<div class="icn collapse"></div>
|
|
</li>
|
|
<%--<li class="nav_item" id="nav_jobsiterequirements" page="JobSiteRequirements.aspx" title="Jobsite Requirements" data-title-lgid="P_JS_JOBSITEREQUIREMENTS"><a href="#nav_jobsiterequirements">
|
|
<div>
|
|
<img style="width: 20px; height: 20px;" src="img/jobsiterequirements.png" />
|
|
</div>
|
|
<span data-lgid="P_JS_JOBSITEREQUIREMENTS">Jobsite Requirements</span></a></li>
|
|
<li class="nav_item" id="nav_dispatchrequests" page="DispatchRequests.aspx" title="Dispatch Requests" data-title-lgid="P_JS_DISPATCHREQUESTS"><a href="#nav_dispatchrequests">
|
|
<div>
|
|
<img style="width: 20px; height: 20px;" src="img/dispatch.png" />
|
|
</div>
|
|
<span data-lgid="P_JS_DISPATCHREQUESTS">Dispatch Requests</span></a></li>
|
|
<li class="nav_item" id="nav_jobsitemanage" page="JobSiteManage.aspx" title="Jobsites" data-title-lgid="P_JOBSITES"><a href="#nav_jobsitemanage">
|
|
<div>
|
|
<img style="width: 20px; height: 20px;" src="img/jobsite.png" />
|
|
</div>
|
|
<span data-lgid="P_JOBSITES">Jobsites</span></a></li>
|
|
<li class="nav_item" id="nav_scheduler" page="SchedulerManagement.aspx" title="Scheduler" data-title-lgid="P_JS_SCHEDULER"><a href="#nav_scheduler">
|
|
<div>
|
|
<img style="width: 20px; height: 20px;" src="img/scheduler.png" />
|
|
</div>
|
|
<span data-lgid="P_JS_SCHEDULER">Scheduler</span></a></li>--%>
|
|
</ul>
|
|
<div class="hostmask maskbg" style="display: none;"></div>
|
|
</div>
|
|
<div id="set_right">
|
|
<div class="loading_holder">
|
|
<div class="loading_icon icn icn-spin"></div>
|
|
</div>
|
|
</div>
|
|
</asp:Content>
|
|
|