updated sln to have a simple website project in the Umbraco.UI.Client folder which will be the Belle development folder, its a website so it doesn't compile or anythng

just a space to be able to edit files. We can probably also update it to launch IIS Express to point to the build folder for testing. Moved the back office
scripts controller actions just to the normal back office controller. Tweaked some of the Belle POC so now it is loading and have created an index.html
file which contains all the belle stuff so people won't have to worry about the container razor file.
This commit is contained in:
Shannon Deminick
2013-05-29 20:25:29 -10:00
parent 957e98ac78
commit 03f64521cb
20 changed files with 258 additions and 320 deletions

View File

@@ -1,13 +1,13 @@
require.config("##RequireJsConfig##");
require("##RequireJsInitialize##", function (angular, myApp) {
require("##RequireJsInitialize##", function (angular, app) {
//This function will be called when all the dependencies
//listed above are loaded. Note that this function could
//be called before the page is loaded.
//This callback is optional.
jQuery(document).ready(function() {
angular.bootstrap(document, ['myApp']);
jQuery(document).ready(function () {
angular.bootstrap(document, ['umbraco']);
});
});

View File

@@ -1,24 +1,39 @@
{
baseUrl: "js",
waitSeconds: 120,
paths: {
jquery: 'lib/jquery/jquery-1.8.2.min',
underscore: 'lib/underscore/underscore-min',
angular: 'lib/angular/angular',
angularResource: 'lib/angular/angular-resource',
statemanager: 'lib/angular/statemanager',
text: 'lib/require/text',
async: 'lib/require/async',
namespaceMgr: 'lib/Umbraco/NamespaceManager',
myApp: 'js/umbraco.app'
jquery: '../lib/jquery/jquery-1.8.2.min',
jqueryCookie: '../lib/jquery/jquery.cookie',
bootstrap: '../lib/bootstrap/js/bootstrap',
underscore: '../lib/underscore/underscore',
angular: '../lib/angular/angular.min',
angularResource: '../lib/angular/angular-resource',
codemirror: '../lib/codemirror/js/lib/codemirror',
codemirrorJs: '../lib/codemirror/js/mode/javascript/javascript',
codemirrorCss: '../lib/codemirror/js/mode/css/css',
codemirrorXml: '../lib/codemirror/js/mode/xml/xml',
codemirrorHtml: '../lib/codemirror/js/mode/htmlmixed/htmlmixed',
tinymce: '../lib/tinymce/tinymce.min',
text: '../lib/require/text',
async: '../lib/require/async',
css: '../lib/require/css'
},
shim: {
'angular' : {'exports' : 'angular'},
'angular-resource': { deps: ['angular'] },
'statemanager': { deps: ['angular'] },
'bootstrap': { deps: ['jquery'] },
'jqueryCookie': { deps: ['jquery'] },
'angular-statemanager' : {deps:['angular']},
'underscore': {exports: '_'}
'underscore': {exports: '_'},
'codemirror': {exports: 'CodeMirror'},
'codemirrorJs':{deps:['codemirror']},
'codemirrorCss':{deps:['codemirror']},
'codemirrorXml':{deps:['codemirror']},
'codemirrorHtml':{deps:['codemirrorXml','codemirrorCss','codemirrorJs'], exports: 'mixedMode'},
/* THIS IS SPECIAL SYNTAX BECAUSE JS functions ARE NOT STANDARD JSON SO THEY CANNOT BE SERIALIZED */
/* SO BEFORE WE RENDER WE'LL ENSURE THAT IT'S FORM */
'tinymce': "@@@@{exports: 'tinyMCE', init: function () { this.tinymce.DOM.events.domLoaded = true; return this.tinymce; } }"
},
priority: [
"angular"

View File

@@ -19,6 +19,15 @@ namespace Umbraco.Web.UI.JavaScript
_parser = parser;
}
//used to strip comments
internal static readonly Regex Comments = new Regex("(/\\*.*\\*/)", RegexOptions.Compiled);
//used for dealing with js functions inside of json (which is not a supported json syntax)
private const string PrefixJavaScriptObject = "@@@@";
private static readonly Regex JsFunctionParser = new Regex(string.Format("(\"{0}(.*?)\")+", PrefixJavaScriptObject),
RegexOptions.Multiline
| RegexOptions.CultureInvariant
| RegexOptions.Compiled);
//used to replace the tokens in the js main
private static readonly Regex Token = new Regex("(\"##\\w+?##\")", RegexOptions.Compiled);
/// <summary>
@@ -65,11 +74,17 @@ namespace Umbraco.Web.UI.JavaScript
internal static string ParseMain(params string[] replacements)
{
var count = 0;
return Token.Replace(Resources.Main, match =>
{
var replaced = replacements[count];
//we need to cater for the special syntax when we have js function() objects contained in the json
var jsFunctionParsed = JsFunctionParser.Replace(replaced, "$2");
count++;
return replaced;
return jsFunctionParsed;
});
}

View File

@@ -1,7 +1,15 @@
[
'angular',
'app',
'jquery',
'underscore',
'namespaceMgr',
'myApp'
'jqueryCookie',
'bootstrap',
'umbraco.resources',
'umbraco.directives',
'umbraco.filters',
'umbraco.services',
'umbraco.controllers',
'sample.propertyeditor.controller',
'sampletwo.propertyeditor.controller',
'routes'
]