691 lines
34 KiB
Plaintext
691 lines
34 KiB
Plaintext
@using EnVisage.Code.HtmlHelpers
|
|
@using Microsoft.AspNet.Identity
|
|
@using EnVisage.Models
|
|
@using EnVisage.Code
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]> <html class="ie8"> <![endif]-->
|
|
<!--[if IE 9]> <html class="ie9 gt-ie8"> <![endif]-->
|
|
<!--[if gt IE 9]><!-->
|
|
<html class="gt-ie8 gt-ie9 not-ie">
|
|
<!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@ViewBag.Title - Prevu</title>
|
|
<!-- Open Sans font from Google CDN -->
|
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin" rel="stylesheet" type="text/css">
|
|
|
|
<!-- Pixel Admin's stylesheets -->
|
|
<link href="~/Content/stylesheets/bootstrap.min.css" rel="stylesheet" type="text/css">
|
|
<link href="~/Content/stylesheets/pixel-admin.css" rel="stylesheet" type="text/css">
|
|
<link href="~/Content/stylesheets/widgets.min.css" rel="stylesheet" type="text/css">
|
|
<link href="~/Content/stylesheets/themes.css" rel="stylesheet" type="text/css">
|
|
<link href="~/Content/stylesheets/Site.css" rel="stylesheet" type="text/css">
|
|
@RenderSection("stylesheets", required: false)
|
|
<!--[if lt IE 9]>
|
|
<script src="~/Scripts/ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript">
|
|
@Html.Raw(ViewBag.GlobalVariables)
|
|
</script>
|
|
<script src="~/Scripts/ContentLocker.js"></script>
|
|
@if (!string.IsNullOrEmpty(((string)ViewBag.ssoToken)))
|
|
{
|
|
<!-- UserVoice JavaScript SDK (only needed once on a page) -->
|
|
<script>
|
|
var quickLinkData;
|
|
(function () {
|
|
var uv = document.createElement('script'); uv.type = 'text/javascript';
|
|
uv.async = true; uv.src = '//widget.uservoice.com/IlZCovN2ONxaRFOhSX3apQ.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
|
|
})()
|
|
</script>
|
|
}
|
|
<script type="text/javascript">
|
|
function redirectTo(e, url) {
|
|
window.location.href = url;
|
|
e.stopPropagation();
|
|
return false;
|
|
}
|
|
|
|
function linkTo(e, url, id) {
|
|
window.location.href = URI(url).setQuery("linkId", id);
|
|
e.stopPropagation();
|
|
return false;
|
|
}
|
|
|
|
function waitFor() {
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
</head>
|
|
@{ var currviews = new EnVisage.Code.BLL.ViewManager(new EnVisageEntities()).GetViewsByOwner(Guid.Parse(User.Identity.GetID())).OrderBy(x => x.Name).ToList(); }
|
|
@{ var currteams = new EnVisage.Code.BLL.TeamManager(new EnVisageEntities()).GetTeamsByUser(Guid.Parse(User.Identity.GetID())).OrderBy(x => x.Name).ToList(); }
|
|
@{ var currlinks = Utils.GetQuickLinksByUser(Guid.Parse(User.Identity.GetID())); }
|
|
<body class="theme-adminflare main-menu-animated">
|
|
|
|
<script>var init = [];</script>
|
|
@if (!string.IsNullOrEmpty(((string)ViewBag.ssoToken)))
|
|
{
|
|
<!-- UserVoice - A tab to launch the Classic Widget -->
|
|
<script>
|
|
UserVoice = window.UserVoice || [];
|
|
UserVoice.push(['setSSO', '@ViewBag.ssoToken']);
|
|
UserVoice.push(['showTab', 'classic_widget', {
|
|
mode: 'full',
|
|
primary_color: '#499272',
|
|
link_color: '#003A21',
|
|
default_mode: 'support',
|
|
forum_id: 121373,
|
|
tab_label: 'Feedback & Support',
|
|
trigger_position: 'bottom-left',
|
|
tab_inverted: true,
|
|
trigger_style: 'icon',
|
|
trigger_background_color: '#FFFFFF',
|
|
trigger_color: '#499272'
|
|
}]);
|
|
</script>
|
|
}
|
|
<div id="main-wrapper">
|
|
<div id="main-navbar" class="navbar navbar-inverse" role="navigation">
|
|
<button type="button" id="main-menu-toggle"><i class="navbar-icon fa fa-bars icon"></i><span class="hide-menu-text">HIDE MENU</span></button>
|
|
|
|
<div class="navbar-inner">
|
|
<div class="navbar-header">
|
|
<a href="@Url.Action("Index","Home")" class="navbar-brand" style="text-transform:none;font-size:12px;"><div><img alt="Prevu" src="~/Content/images/prevu-xs.png"></div></a>
|
|
<span class="navbarHeading-sm visible-xs-inline hidden-sm hidden-md hidden-lg"> @ViewBag.Title</span>
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-navbar-collapse"><i class="navbar-icon fa fa-bars"></i></button>
|
|
</div>
|
|
<div class="pull-left">
|
|
<h1 id="navbarHeading" class="navbarHeading hidden-xs" title="@ViewBag.Title">@ViewBag.Title</h1>
|
|
</div>
|
|
<div id="main-navbar-collapse" class="collapse navbar-collapse main-navbar-collapse">
|
|
<div>
|
|
<div class="right clearfix">
|
|
@Html.Partial("_LoginPartial")
|
|
@RenderSection("pagemenu", required: false)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="main-menu" role="navigation">
|
|
<div id="main-menu-inner">
|
|
<ul class="navigation">
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Dashboard, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Home")"><i class="menu-icon fa fa-dashboard"></i><span class="mm-text">Dashboard</span></a>
|
|
</li>
|
|
}
|
|
|
|
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.UserQuickLinks, AccessLevel.Read))
|
|
{
|
|
|
|
<li class="@((currlinks.Count > 1) ? "mm-dropdown mm-dropdown-root" : "")">
|
|
<a href="#">
|
|
<i class="menu-icon fa fa-link"></i>
|
|
<span class="mm-text">My Quick Links</span><span class="label label-info" onclick="editQuickLink(event, '@User.Identity.GetID()', '00000000-0000-0000-0000-000000000000');"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
<ul id="quicklinksContainer">
|
|
@foreach (var link in currlinks)
|
|
{
|
|
<li id="@link.Id">
|
|
<a href="javascript:void('@link.Url');">
|
|
<span class="mm-text" onclick="linkTo(event, '@link.Url', '@link.Id');" title="@link.Name">@(link.Name.Length < 17 ? link.Name : link.Name.Substring(0, 15) + "...")</span>
|
|
<span class="label label-danger" onclick="LoadDeleteQLModal('@link.Id');"><i class="fa fa-trash-o"></i></span>
|
|
<span class="label label-info" onclick="editQuickLink(event, '@User.Identity.GetID()', '@link.Id');"><i class="fa fa-edit"></i></span>
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</li>
|
|
}
|
|
|
|
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ViewDashboard, AccessLevel.Read) )//&& currviews.Count() > 0)
|
|
{
|
|
|
|
|
|
<li class="@((currviews.Count() > 1) ? "mm-dropdown mm-dropdown-root" : "")">
|
|
@if (currviews.Count() == 1)
|
|
{
|
|
<a href="javascript:void('@Url.Action("Board", "View", new {@viewId = currviews[0].Id }, Request.Url.Scheme)');">
|
|
<i class="menu-icon fa fa-picture-o" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = currviews[0].Id}, Request.Url.Scheme)');"></i>
|
|
<span class="mm-text" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = currviews[0].Id}, Request.Url.Scheme)');" title="@currviews[0].Name">@(currviews[0].Name.Length < 17 ? currviews[0].Name : currviews[0].Name.Substring(0, 15) + "...")</span>
|
|
<span class="label label-info" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = currviews[0].Id, @mode = "edit" }, Request.Url.Scheme)');"><i class="fa fa-edit"></i></span>
|
|
<span class="label label-info" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @mode = "new" }, Request.Url.Scheme)');"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
}
|
|
else if (currviews.Count() > 1)
|
|
{
|
|
<a href="javascript:void('@Url.Action("Board", "View", new { @mode = "new" }, Request.Url.Scheme)');">
|
|
<i class="menu-icon fa fa-picture-o"></i>
|
|
<span class="mm-text">My Views</span><span class="label label-info" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @mode = "new" }, Request.Url.Scheme)');"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
<ul>
|
|
@foreach (var view in currviews)
|
|
{
|
|
<li>
|
|
<a href="javascript:void('@Url.Action("Board", "View", new { @viewId = view.Id}, Request.Url.Scheme)');">
|
|
<span class="mm-text" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = view.Id}, Request.Url.Scheme)');" title="@view.Name">@(view.Name.Length < 19 ? view.Name : view.Name.Substring(0, 17) + "...")</span>
|
|
<span class="label label-danger" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = view.Id, @mode = "delete" }, Request.Url.Scheme)');"><i class="fa fa-trash-o"></i></span>
|
|
<span class="label label-info" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @viewId = view.Id, @mode = "edit" }, Request.Url.Scheme)');"><i class="fa fa-edit"></i></span>
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
else
|
|
{
|
|
<a href="javascript:void('@Url.Action("Board", "View", new { @mode = "new" }, Request.Url.Scheme)');" onclick="redirectTo(event, '@Url.Action("Board", "View", new { @mode = "new" }, Request.Url.Scheme)');">
|
|
<i class="menu-icon fa fa-picture-o"></i>
|
|
<span class="mm-text">My Views</span><span class="label label-info"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
}
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Teams, AccessLevel.Read) && currteams.Count() > 0)
|
|
{
|
|
|
|
<li class='@((currteams.Count() > 1) ? "mm-dropdown mm-dropdown-root" : String.Empty)'>
|
|
@if (currteams.Count() == 1)
|
|
{
|
|
<a href="@Url.Action("Board", "Team", new { teamId = currteams[0].Id })"><i class="menu-icon fa fa-users"></i><span class="mm-text">@currteams[0].Name</span></a>
|
|
}
|
|
else
|
|
{
|
|
<a href="#">
|
|
<i class="menu-icon fa fa-users"></i><span class="mm-text">My Team(s)</span>
|
|
|
|
</a>
|
|
<ul>
|
|
@foreach (var team in currteams)
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Board", "Team", new { teamId = team.Id })">
|
|
<span class="mm-text">@team.Name</span>
|
|
</a>
|
|
|
|
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Portfolio, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Portfolio")"><i class="menu-icon fa fa-book"></i><span class="mm-text">Portfolio</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ScheduleBoard, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ScheduleBoard")"><i class="menu-icon fa fa-table"></i><span class="mm-text">Schedule Board</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Read))
|
|
{
|
|
<!--<li>
|
|
<a href=@Url.Action("Index", "Scenarios")><i class="menu-icon fa fa-files-o"></i><span class="mm-text">Scenarios</span></a>
|
|
</li>-->
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Projects, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Project")"><i class="menu-icon fa fa-briefcase"></i><span class="mm-text">My Projects</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="@Url.Action("Index", "CapacityManagement")"><i class="menu-icon fa fa-calendar"></i><span class="mm-text">Activity Calendar</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Mixes, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Mix")"><i class="menu-icon fa fa-archive"></i><span class="mm-text">Roadmap Optimizer</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Reports, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown mm-dropdown-root">
|
|
<a href="#"><i class="menu-icon fa fa-bar-chart-o"></i><span class="mm-text">Reports</span></a>
|
|
<ul>
|
|
<li class="mm-dropdown mm-dropdown-root">
|
|
<a href="#"><span class="mm-text">Financial Reports</span></a>
|
|
<ul>
|
|
<li>
|
|
<a href="@Url.Action("ForecastRevenue", "Reporting")"><span class="mm-text">Forecast Report: Revenue Generating Projects</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="@Url.Action("ForecastNonRevenue", "Reporting")"><span class="mm-text">Forecast Report: Non Revenue Generating Projects</span></a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckAnySecurityObjectPermission(new List<Areas>() { Areas.Users, Areas.Roles, Areas.Company, Areas.Clients, Areas.CreditDepartments, Areas.GLAccounts, Areas.Expenditures,
|
|
Areas.ExpenditureCategories, Areas.UnitsOfMeasure, Areas.ProjectClassifications, Areas.ProjectStatuses, Areas.FiscalCalendar, Areas.ScenarioTemplates,
|
|
Areas.ImportActuals}, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown mm-dropdown-root">
|
|
<a href="#"><i class="menu-icon fa fa-desktop"></i><span class="mm-text">Administration</span></a>
|
|
<ul>
|
|
@if (SecurityManager.CheckAnySecurityObjectPermission(new List<Areas>() { Areas.Users, Areas.Roles }, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown">
|
|
<a href="#"><span class="mm-text">Security</span></a>
|
|
<ul>
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Roles, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("index", "Role")"><span class="mm-text">Roles</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Users, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("index", "User")"><span class="mm-text">Users</span></a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Company, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Company")"><span class="mm-text">Company</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="@Url.Action("Index", "Contact")"><span class="mm-text">Internal Contacts</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Clients, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Clients")"><span class="mm-text">Clients</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.CreditDepartments, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "CreditDepartment")"><span class="mm-text">Cost Centers</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.GLAccounts, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "GLAccount")"><span class="mm-text">GL Accounts</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Expenditures, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Expenditure")"><span class="mm-text">Expenditures</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ExpenditureCategories, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ExpenditureCategory")"><span class="mm-text">Expenditure Categories</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.UnitsOfMeasure, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "UnitOfMeasure")"><span class="mm-text">Units of Measure</span></a>
|
|
</li>
|
|
}
|
|
@*@if (SecurityManager.CheckSecurityObjectPermission(Areas.Views, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "View")"><span class="mm-text">Views</span></a>
|
|
</li>
|
|
}*@
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Teams, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Team")"><span class="mm-text">Teams</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ProjectClassifications, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Type")"><span class="mm-text">Project Classifications</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ProjectStatuses, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Status")"><span class="mm-text">Project Statuses</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.FiscalCalendar, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Calendar")"><span class="mm-text">Fiscal Calendar</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ScenarioTemplates, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Templates", "Scenarios")"><span class="mm-text">Scenario Templates</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ImportActuals, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("ImportActuals", "Project")"><span class="mm-text">Import actuals</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ScenarioGroup")"><span class="mm-text">Scenario Groups</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Trainings, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "TrainingType")"><span class="mm-text">Training Types</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.StrategicGoals, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "StrategicGoal")"><span class="mm-text">Strategic Goals</span></a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</li>
|
|
}
|
|
</ul> <!-- / .navigation -->
|
|
</div> <!-- / #main-menu-inner -->
|
|
</div> <!-- / #main-menu -->
|
|
<!-- /4. $MAIN_MENU -->
|
|
<!-- Error modal alert -->
|
|
<div id="modal-error" class="modal modal-alert modal-danger fade">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<i class="fa fa-times-circle"></i>
|
|
</div>
|
|
<div class="modal-title"></div>
|
|
<div class="modal-body"></div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">OK</button>
|
|
</div>
|
|
</div> <!-- / .modal-content -->
|
|
</div> <!-- / .modal-dialog -->
|
|
</div> <!-- / .modal -->
|
|
<!-- / Error modal alert -->
|
|
|
|
|
|
<div id="content-wrapper">
|
|
<!--<ul class="breadcrumb breadcrumb-page">
|
|
<div class="breadcrumb-label text-light-gray">You are here: </div>
|
|
<li><a href="#"> @ViewContext.RouteData.Values["controller"].ToString()</a></li>
|
|
<li class="active"><a href="#">@ViewContext.RouteData.Values["action"].ToString()</a></li>
|
|
</ul>-->
|
|
@RenderBody()
|
|
</div> <!-- / #content-wrapper -->
|
|
<div id="main-menu-bg"></div>
|
|
|
|
|
|
<!-- Modal for quicklink -->
|
|
<div id="editQuickLink" class="modal fade" tabindex="-1" role="dialog" style="display: none;" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" id="editReloadQL">
|
|
|
|
</div> <!-- / .modal-content -->
|
|
</div> <!-- / .modal-dialog -->
|
|
</div> <!-- /.modal -->
|
|
<!-- / Modal -->
|
|
|
|
<div id="modal-deleteQuickLink" class="modal fade" tabindex="-1" role="dialog" style="display: none;">
|
|
<div class="modal-dialog divForCreate">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- / #main-wrapper -->
|
|
<!-- Get jQuery from Google CDN -->
|
|
<!--[if !IE]> -->
|
|
<script type="text/javascript"> window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.js">' + "<" + "/script>"); </script>
|
|
<!--[endif]-->
|
|
<!--[if lte IE 9]>
|
|
<script type="text/javascript"> window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">'+"<"+"/script>"); </script>
|
|
<![endif]-->
|
|
<!-- Pixel Admin's javascripts -->
|
|
|
|
<script src="~/Scripts/bootstrap.js"></script>
|
|
<script src="~/Scripts/pixel-admin.js"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.cookie.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.storageapi.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.blockUI.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/main.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.dataTables.columnFilter.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/dataTables.colReorder.js")"></script>
|
|
|
|
<script type="text/javascript">
|
|
var emulateNavUrl = "";
|
|
</script>
|
|
|
|
@RenderSection("scripts", required: false)
|
|
|
|
<script type="text/javascript">
|
|
|
|
function loadQuickLink(qlId) {
|
|
blockUI();
|
|
var url = qlId != null ? "?Id=" + qlId : "";
|
|
$('#editReloadQL').html("");
|
|
$('#editReloadQL').load('@Url.Action("Edit", "UserQuickLink")' + url, function () {
|
|
|
|
$('#editQuickLink')
|
|
.on('hidden.bs.modal', function () {
|
|
if (qlId != null) {
|
|
StopEdit();
|
|
}
|
|
})
|
|
.on('shown.bs.modal', function () {
|
|
//initView();
|
|
})
|
|
.modal('show');
|
|
|
|
initQuickLink();
|
|
unblockUI();
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function editQuickLink(e, aId, Id) {
|
|
e.stopPropagation();
|
|
loadQuickLink(Id);
|
|
return false;
|
|
}
|
|
|
|
function deleteQuickLink(e, aId, Id, name) {
|
|
|
|
$("#deleteQuickLinkId").val(Id);
|
|
$("#deleteQuickLinkCaption").text("Do you want to delete \"" + name + "\" QuickLink?");
|
|
$('#modal-deleteQuickLink').on('hidden.bs.modal', function () {
|
|
if (Id != null) {
|
|
StopEdit();
|
|
}
|
|
}).modal('show');
|
|
return false;
|
|
}
|
|
|
|
function deleteQLConfirmed(id) {
|
|
var data = $('#deleteQuickLinkForm').serialize();
|
|
var url = '@Url.Action("Delete", "UserQuickLink")';
|
|
blockUI();
|
|
$.post(url, data, function (data) {
|
|
unblockUI();
|
|
if (data != null) {
|
|
$('#modal-deleteQuickLink').modal('hide');
|
|
if ($('#' + id).length > 0)
|
|
$('#' + id).remove();
|
|
else alert('Error deleting QuickLink.');//document.location.href = document.location.href;
|
|
unblockUI();
|
|
}
|
|
});
|
|
}
|
|
|
|
function LoadDeleteQLModal(id) {
|
|
var url = '@Url.Action("Delete", "UserQuickLink", new { id = "idval" })';
|
|
url = url.replace('idval', id);
|
|
$('#modal-deleteQuickLink .divForCreate').load(url, function (data) {
|
|
|
|
$('#modal-deleteQuickLink').modal("show");
|
|
});
|
|
}
|
|
|
|
$(window).on('resize', function () {
|
|
var width = ($('div.navbar-inner').width() - 350) + 'px';
|
|
$('#navbarHeading, .navbarHeading-sm').css('width', width);
|
|
});
|
|
|
|
|
|
$(document).on('hide.bs.modal', '#editQuickLink', function (e) {
|
|
// skip modal hide event from datepickers
|
|
if ($(e.target).attr('id') != 'editQuickLink')
|
|
return true; // close modal form
|
|
// check that form has been changed
|
|
if (typeof isQLDataChanged === 'function')
|
|
// if form has been changed
|
|
if (isQLDataChanged()) {
|
|
// ask user for confirmation of form close
|
|
if (confirm("Quick Link form contains unsaved changes, do you really want to close the form?")) {
|
|
// reset change indicator
|
|
if (typeof resetQLDataChanged === 'function') {
|
|
resetQLDataChanged();
|
|
}
|
|
return true; // close modal form
|
|
};
|
|
return false; // DO NOT close modal form
|
|
}
|
|
return true; // close modal form
|
|
});
|
|
|
|
jQuery.validator.setDefaults({
|
|
highlight: function (element, errorClass, validClass) {
|
|
if (element.type === 'radio') {
|
|
this.findByName(element.name).addClass(errorClass).removeClass(validClass);
|
|
} else {
|
|
$(element).addClass(errorClass).removeClass(validClass);
|
|
//$(element).closest('.form-group').addClass('has-error');
|
|
}
|
|
},
|
|
unhighlight: function (element, errorClass, validClass) {
|
|
if (element.type === 'radio') {
|
|
this.findByName(element.name).removeClass(errorClass).addClass(validClass);
|
|
} else {
|
|
$(element).removeClass(errorClass).addClass(validClass);
|
|
//$(element).closest('.control-group').removeClass('has-error');
|
|
}
|
|
}
|
|
});
|
|
var chrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase());
|
|
function _printDoc() {
|
|
beforePrint();
|
|
window.print();
|
|
}
|
|
var beforePrint = function () {
|
|
main_wrapper_paddingLeft = $("#main-wrapper").css("padding-left");
|
|
if (chrome == true) {
|
|
$("#main-wrapper").addClass('important-padding-left-0');
|
|
}
|
|
};
|
|
|
|
var afterPrint = function () {
|
|
//all browsers except Chrome hide left nav menu with correct print styleshet. Chrome does not, so we apply a workaround here
|
|
if (chrome == true) {
|
|
$("#main-wrapper").removeClass('important-padding-left-0');
|
|
}
|
|
};
|
|
|
|
init.push(function () {
|
|
$("span.field-validation-valid, span.field-validation-error").addClass('help-block');
|
|
//$("div.form-group").has("span.field-validation-error").addClass('has-error');
|
|
$("div.validation-summary-errors").has("li:visible").addClass("alert alert-block alert-danger");
|
|
$("body").on("mousemove", function (e) {
|
|
if (ResetInactivePeriod)
|
|
ResetInactivePeriod();
|
|
});
|
|
|
|
if (window.matchMedia) {
|
|
var mediaQueryList = window.matchMedia('print');
|
|
mediaQueryList.addListener(function (mql) {
|
|
if (mql.matches) {
|
|
beforePrint();
|
|
} else {
|
|
afterPrint();
|
|
}
|
|
});
|
|
}
|
|
|
|
if (typeof quickLinkData === 'undefined' && URI().query(true).linkId) {
|
|
$.ajax("/UserQuickLink/GetPreferences",
|
|
{
|
|
async: false,
|
|
data: { linkId: URI().query(true).linkId },
|
|
method: "POST",
|
|
success: function (response, textStatus, jqXHR) {
|
|
if (response && response.Status === "OK" && response.Data) {
|
|
quickLinkData = JSON.parse(response.Data);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
window.onbeforeprint = beforePrint;
|
|
window.onafterprint = afterPrint;
|
|
|
|
$(window).keydown(function (event) {
|
|
if ((event.ctrlKey || event.metaKey) && event.keyCode == 80) {
|
|
//ctrl+P, ctrl+shift+P, cmd+P
|
|
beforePrint();
|
|
}
|
|
});
|
|
|
|
@Html.Raw(ViewBag.StartUpJS)
|
|
});
|
|
window.PixelAdmin.start(init,
|
|
{
|
|
main_menu: {
|
|
store_state: false,
|
|
detect_active: true,
|
|
detect_active_predicate: function (href, url) {
|
|
//console.log("href:" + href + "; url:" + url + "; em:" + emulateNavUrl + "; rplcd h:" + "/" + href.replace(/^(?:\/\/|[^\/]+)*\//, "") + "; result: " + (url === href || emulateNavUrl === "/" + href.replace(/^(?:\/\/|[^\/]+)*\//, "")));
|
|
return url === href || emulateNavUrl === "/" + href.replace(/^(?:\/\/|[^\/]+)*\//, "");
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.flot.time.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.flot.stack.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.flot.tickrotor.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.flot.resize.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.flot.axislabels.js")"></script>
|
|
<script src="@Url.Content("~/Scripts/stateManagement.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/URIjs.min.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/ContentLocker.js")" type="text/javascript"></script>
|
|
|
|
@RenderSection("afterAllScripts", false)
|
|
</body>
|
|
</html>
|