This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inFocus = true; | |
$(window).blur(function(){ | |
inFocus = false; | |
}); | |
$(window).focus(function(){ | |
inFocus = true; | |
}); | |
setTimeout(function(){ | |
if (!inFocus) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This javascript code will find the logout form on your page and do the submit. | |
We do this separation so we can have total control over styling. | |
--> | |
<a href="javascript:document.getElementById('logoutForm').submit()">Logout!</a> | |
<!-- | |
Put this form anywhere you want outside your content area so styling isn't jacked up. | |
--> | |
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-form pull-right" })) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ | |
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
routes.MapRoute( | |
"Sub", // Route name | |
"{controller}/{action}/{id}", // URL with parameters | |
new { controller = "SubdomainController", action = "AnyActionYouLike", id = UrlParameter.Optional }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model System.Web.Mvc.HandleErrorInfo | |
@{ | |
ViewBag.Title = "Error"; | |
} | |
<h2> | |
Sorry, an error occurred while processing your request. | |
</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is added under your WebRole section. The commandline should be the path to the file, which starts at the root of the project that is your WebRole. --> | |
<Startup> | |
<Task commandLine="startup\disableTimeout.cmd" executionContext="elevated" taskType="background"/> | |
</Startup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#textboxId").keyup(function (event) { | |
if (event.keyCode == 13) { | |
$("#sendId").click(); | |
} | |
}); |
NewerOlder