await is a reserved word

This commit is contained in:
Mads Rasmussen
2018-10-07 20:01:54 +02:00
parent 8c52529e47
commit 6dfb1e7e83
2 changed files with 8 additions and 8 deletions

View File

@@ -44,11 +44,11 @@ angular.module("umbraco.directives")
var stylesheets = [];
var styleFormats = [];
var await = [];
var requests = [];
//queue file loading
if (typeof (tinymce) === "undefined") {
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", scope));
requests.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", scope));
}
@@ -61,7 +61,7 @@ angular.module("umbraco.directives")
angular.forEach(scope.configuration.stylesheets, function(stylesheet, key){
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + stylesheet + ".css");
await.push(stylesheetResource.getRulesByName(stylesheet).then(function (rules) {
requests.push(stylesheetResource.getRulesByName(stylesheet).then(function (rules) {
angular.forEach(rules, function (rule) {
var r = {};
var split = "";
@@ -97,7 +97,7 @@ angular.module("umbraco.directives")
//stores a reference to the editor
var tinyMceEditor = null;
$q.all(await).then(function () {
$q.all(requests).then(function () {
var uniqueId = scope.uniqueId;

View File

@@ -84,20 +84,20 @@ angular.module("umbraco")
var toolbar = editorConfig.toolbar.join(" | ");
var stylesheets = [];
var styleFormats = [];
var await = [];
var requests = [];
if (!editorConfig.maxImageSize && editorConfig.maxImageSize != 0) {
editorConfig.maxImageSize = tinyMceService.defaultPrevalues().maxImageSize;
}
//queue file loading
if (typeof tinymce === "undefined") { // Don't reload tinymce if already loaded
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
requests.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
}
//queue rules loading
angular.forEach(editorConfig.stylesheets, function (val, key) {
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + val + ".css?" + new Date().getTime());
await.push(stylesheetResource.getRulesByName(val).then(function (rules) {
requests.push(stylesheetResource.getRulesByName(val).then(function (rules) {
angular.forEach(rules, function (rule) {
var r = {};
r.title = rule.name;
@@ -170,7 +170,7 @@ angular.module("umbraco")
}
//wait for queue to end
$q.all(await).then(function () {
$q.all(requests).then(function () {
//create a baseline Config to exten upon
var baseLineConfigObj = {