Skip to content
Browse files

Merge branch 'anurse-1126-ysoddynamicdata' into qa

  • Loading branch information...
2 parents 53f87a4 + 1ed7f49 commit e4270c5f1e5bcf20ac79e2e266b391da3bff82f1 @anurse anurse committed May 6, 2013
Showing with 19 additions and 0 deletions.
  1. +19 −0 Website/Areas/Admin/DynamicData/DynamicDataManager.cs
View
19 Website/Areas/Admin/DynamicData/DynamicDataManager.cs
@@ -5,6 +5,7 @@
using System.Threading;
using System.Web.DynamicData;
using System.Web.Routing;
+using System.Web.UI;
using DynamicData.EFCodeFirstProvider;
namespace NuGetGallery.Areas.Admin.DynamicData
@@ -18,6 +19,24 @@ public class DynamicDataManager
public static void Register(RouteCollection routes, string root, IConfiguration configuration)
{
+ // Set up unobtrusive validation
+ InitializeValidation();
+
+ // Set up dynamic data
+ InitializeDynamicData(routes, root, configuration);
+ }
+
+ private static void InitializeValidation()
+ {
+ ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition()
+ {
+ Path = "~/Scripts/jquery-1.6.2.min.js",
+ DebugPath = "~/Scripts/jquery-1.6.2.js"
+ });
+ }
+
+ private static void InitializeDynamicData(RouteCollection routes, string root, IConfiguration configuration)
+ {
try
{
DefaultModel.RegisterContext(

0 comments on commit e4270c5

Please sign in to comment.
Something went wrong with that request. Please try again.