diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs
index eb1818335b..5dc4a1aec5 100644
--- a/src/Umbraco.Core/Manifest/ManifestParser.cs
+++ b/src/Umbraco.Core/Manifest/ManifestParser.cs
@@ -16,6 +16,7 @@ namespace Umbraco.Core.Manifest
internal class ManifestParser
{
private readonly DirectoryInfo _pluginsDir;
+
//used to strip comments
private static readonly Regex Comments = new Regex("(/\\*.*\\*/)", RegexOptions.Compiled);
@@ -102,7 +103,7 @@ namespace Umbraco.Core.Manifest
{
if (m.IsNullOrWhiteSpace()) continue;
- //remove any comments first
+ //remove any comments first, NOTE: I think JSON.Net will do this for us! but we'll leave it here for now
Comments.Replace(m, match => "");
diff --git a/src/Umbraco.Tests/AngularIntegration/RequireJsInitTests.cs b/src/Umbraco.Tests/AngularIntegration/RequireJsInitTests.cs
index dcd8b2d796..32950ce61e 100644
--- a/src/Umbraco.Tests/AngularIntegration/RequireJsInitTests.cs
+++ b/src/Umbraco.Tests/AngularIntegration/RequireJsInitTests.cs
@@ -14,6 +14,8 @@ namespace Umbraco.Tests.AngularIntegration
public class RequireJsInitTests
{
+
+
[Test]
public void Get_Default_Config()
{
@@ -42,5 +44,22 @@ namespace Umbraco.Tests.AngularIntegration
Assert.IsTrue(result.Contains("require([World]"));
}
+ [Test]
+ public void Parse_Main_With_JS_Function()
+ {
+ var result = RequireJsInit.ParseMain(@"{
+ waitSeconds: 120,
+ paths: {
+ jquery: '../lib/jquery/jquery-1.8.2.min'
+ },
+ shim: {
+ 'tinymce':""@@@@{exports:'tinyMCE',init:function() { this.tinymce.DOM.events.domLoaded = true; return this.tinymce; } }""
+ }
+ }", "[World]");
+
+ Assert.IsFalse(result.Contains("@@@@"));
+ Assert.IsTrue(result.Contains("'tinymce':{exports:'tinyMCE',init:function()"));
+ }
+
}
}
diff --git a/src/Umbraco.Web.UI.Client/views/container.controller.js b/src/Umbraco.Web.UI.Client/views/container.controller.js
new file mode 100644
index 0000000000..af0bded5c3
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/views/container.controller.js
@@ -0,0 +1,9 @@
+'use strict';
+
+define(['angular'], function(angular) {
+
+ //Handles the initial loading of the index.html main app from our razor page
+ angular.module('umbraco').controller("ContainerController", function($scope) {
+ $scope.applicationView = "views/index.html";
+ });
+});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Common/Js/MyPackage.js b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Common/Js/MyPackage.js
index 287e54b6a3..4c7a3a4cd3 100644
--- a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Common/Js/MyPackage.js
+++ b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Common/Js/MyPackage.js
@@ -1,6 +1,6 @@
'use strict';
-define(['myApp'], function (app) {
+define(['app'], function (app) {
app.directive('valPostcode', function () {
diff --git a/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/PostcodeEditor.js b/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/PostcodeEditor.js
index d1d0aae38d..5ad3b3d694 100644
--- a/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/PostcodeEditor.js
+++ b/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/PostcodeEditor.js
@@ -1,6 +1,6 @@
'use strict';
-define(['myApp'], function (app) {
+define(['namespaceMgr'], function () {
Umbraco.Sys.registerNamespace("MyPackage.PropertyEditors");
diff --git a/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/RegexEditor.js b/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/RegexEditor.js
index a7b6716526..b76b7840e6 100644
--- a/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/RegexEditor.js
+++ b/src/Umbraco.Web.UI/App_Plugins/MyPackage/PropertyEditors/Js/RegexEditor.js
@@ -1,6 +1,6 @@
'use strict';
-define(['myApp'], function (app) {
+define(['namespaceMgr'], function () {
Umbraco.Sys.registerNamespace("MyPackage.PropertyEditors");
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index 051ff0cf5e..891c542536 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -565,7 +565,8 @@
-
+
+
@@ -2096,7 +2097,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/umbraco/Views/Default.cshtml b/src/Umbraco.Web.UI/umbraco/Views/Default.cshtml
index 270f4de483..0b1764e1da 100644
--- a/src/Umbraco.Web.UI/umbraco/Views/Default.cshtml
+++ b/src/Umbraco.Web.UI/umbraco/Views/Default.cshtml
@@ -1,4 +1,6 @@
-@{
+@using Umbraco.Core
+@inherits System.Web.Mvc.WebViewPage
+@{
Layout = null;
}
@@ -14,7 +16,7 @@
@*Currently this needs to be loaded before anything*@
-
+
-
+
-
+
-
-
+
+
+ @*We cannot use the data-main attribute above because we need to load in the application
+ via a server side JavaScript request, so we just request it after requirejs*@
+
+
diff --git a/src/Umbraco.Web.UI/umbraco/Views/Web.config b/src/Umbraco.Web.UI/umbraco/Views/Web.config
deleted file mode 100644
index edac1a2296..0000000000
--- a/src/Umbraco.Web.UI/umbraco/Views/Web.config
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/umbraco/Views/index.html b/src/Umbraco.Web.UI/umbraco/Views/index.html
index e9f300fde1..d0ec2a0bb9 100644
--- a/src/Umbraco.Web.UI/umbraco/Views/index.html
+++ b/src/Umbraco.Web.UI/umbraco/Views/index.html
@@ -1,140 +1,142 @@
-