initial add

This commit is contained in:
Jonathan Ouellette
2022-09-27 14:10:30 -07:00
parent 91fd8a50a9
commit 580e90f6a2
3941 changed files with 954648 additions and 19 deletions

View File

@ -0,0 +1,66 @@
using System.Web;
using System.Web.Optimization;
namespace Fab2ApprovalSystem
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js")
);
//bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
// "~/Scripts/jquery.validate*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.min.js",
"~/Scripts/common.js"));
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
"~/Scripts/kendo/kendo.all.min.js",
"~/Scripts/kendo/kendo.aspnetmvc.min.js"));
bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
"~/Content/kendo/kendo.common-bootstrap.min.css",
"~/Content/kendo/kendo.bootstrap.min.css"));
bundles.Add(new StyleBundle("~/Content/jqw/css").Include(
"~/Scripts/jqwidgets/styles/jqx.base.css",
"~/Scripts/jqwidgets/styles/jqx.energyblue.css",
"~/Scripts/jqwidgets/styles/jqx.arctic.css",
"~/Scripts/jqwidgets/styles/jqx.energyblue.css"));
bundles.Add(new ScriptBundle("~/Content/jqw/jq").Include(
"~/Scripts/jqwidgets/jqxcore.js",
"~/Scripts/jqwidgets/jqxdata.js",
"~/Scripts/jqwidgets/jqxbuttons.js",
"~/Scripts/jqwidgets/jqxscrollbar.js",
"~/Scripts/jqwidgets/jqxlistbox.js",
"~/Scripts/jqwidgets/jqxpanel.js",
"~/Scripts/jqwidgets/jqxtree.js"));
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.min.css",
"~/Content/site.css",
"~/Content/jquery-ui.css"));
}
}
}

View File

@ -0,0 +1,13 @@
using System.Web;
using System.Web.Mvc;
namespace Fab2ApprovalSystem
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
namespace Fab2ApprovalSystem
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
// fixing hyperlinks so that the login page will redirect to them
// set the default route to the desired landing page, instead of the login page
// otherwise MVC generates the wrong form action url
defaults: new { controller = "Home", action = "MyTasks", id = UrlParameter.Optional }
);
//routes.MapHttpRoute(
// name: "ApiRoute",
// routeTemplate: "api/{controller}/{id}",
// defaults: new { id = RouteParameter.Optional }
//);
}
}
}

View File

@ -0,0 +1,38 @@
using Microsoft.AspNet.Identity;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
namespace Fab2ApprovalSystem
{
public partial class Startup
{
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
{
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
// Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Uncomment the following lines to enable logging in with third party login providers
//app.UseMicrosoftAccountAuthentication(
// clientId: "",
// clientSecret: "");
//app.UseTwitterAuthentication(
// consumerKey: "",
// consumerSecret: "");
//app.UseFacebookAuthentication(
// appId: "",
// appSecret: "");
//app.UseGoogleAuthentication();
}
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace Fab2ApprovalSystem
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}