@@ -107,9 +107,7 @@ namespace Umbraco.Web.WebAssets
|
||||
/// <returns></returns>
|
||||
private IEnumerable<string> GetInitBackOfficeScripts()
|
||||
{
|
||||
|
||||
var fileContent = Resources.JsInitialize;
|
||||
var resources = JsonConvert.DeserializeObject<JArray>(fileContent);
|
||||
var resources = JsonConvert.DeserializeObject<JArray>(Resources.JsInitialize);
|
||||
return resources.Where(x => x.Type == JTokenType.String).Select(x => x.ToString());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Umbraco.Web.WebAssets {
|
||||
namespace Umbraco.Web.WebAssets
|
||||
{
|
||||
using System;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Umbraco.Infrastructure.WebAssets.Resources", typeof(Resources).Assembly);
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Infrastructure.WebAssets.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
@@ -44,31 +60,109 @@ namespace Umbraco.Web.WebAssets {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [
|
||||
/// 'lib/jquery/jquery.min.js',
|
||||
/// 'lib/jquery-ui/jquery-ui.min.js',
|
||||
/// 'lib/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js',
|
||||
///
|
||||
/// 'lib/angular/angular.js',
|
||||
/// 'lib/underscore/underscore-min.js',
|
||||
///
|
||||
/// 'lib/moment/moment.min.js',
|
||||
/// 'lib/flatpickr/flatpickr.js',
|
||||
///
|
||||
/// 'lib/animejs/anime.min.js',
|
||||
///
|
||||
/// 'lib/angular-route/angular-route.js',
|
||||
/// 'lib/angular-cookies/angular-cookies.js',
|
||||
/// 'lib/angular-aria/angular-aria.min.js',
|
||||
/// 'lib/angular-touch/angular-touch.js',
|
||||
/// 'lib/angula [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string JsInitialize {
|
||||
get {
|
||||
return ResourceManager.GetString("JsInitialize", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to LazyLoad.js("##JsInitialize##", function () {
|
||||
/// //we need to set the legacy UmbClientMgr path
|
||||
/// if ((typeof UmbClientMgr) !== "undefined") {
|
||||
/// UmbClientMgr.setUmbracoPath('"##UmbracoPath##"');
|
||||
/// }
|
||||
///
|
||||
/// jQuery(document).ready(function () {
|
||||
///
|
||||
/// angular.bootstrap(document, ['"##AngularModule##"']);
|
||||
///
|
||||
/// });
|
||||
///});
|
||||
///.
|
||||
/// </summary>
|
||||
internal static string Main {
|
||||
get {
|
||||
return ResourceManager.GetString("Main", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [
|
||||
/// '../lib/jquery/jquery.min.js',
|
||||
/// '../lib/angular/angular.js',
|
||||
/// '../lib/underscore/underscore-min.js',
|
||||
/// '../lib/umbraco/Extensions.js',
|
||||
/// '../js/app.js',
|
||||
/// '../js/umbraco.resources.js',
|
||||
/// '../js/umbraco.services.js',
|
||||
/// '../js/umbraco.interceptors.js',
|
||||
/// '../ServerVariables',
|
||||
/// '../lib/signalr/jquery.signalR.js',
|
||||
/// '../BackOffice/signalr/hubs',
|
||||
/// '../js/umbraco.preview.js'
|
||||
///]
|
||||
///.
|
||||
/// </summary>
|
||||
internal static string PreviewInitialize {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewInitialize", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but
|
||||
///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want
|
||||
///// to force load JS files ?
|
||||
///
|
||||
/////create the namespace (NOTE: This loads before any dependencies so we don't have a namespace mgr so we just create it manually)
|
||||
///var Umbraco = {};
|
||||
///Umbraco.Sys = {};
|
||||
/////define a global static object
|
||||
///Umbraco.Sys.ServerVariables = ##Variables## ;.
|
||||
/// </summary>
|
||||
internal static string ServerVariables {
|
||||
get {
|
||||
return ResourceManager.GetString("ServerVariables", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [
|
||||
/// 'lib/tinymce/tinymce.min.js',
|
||||
///
|
||||
/// 'lib/tinymce/plugins/paste/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/anchor/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/charmap/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/table/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/lists/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/advlist/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/hr/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/autolink/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/directionality/plugin.min.js',
|
||||
/// 'lib/tinymce/plugins/t [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string TinyMceInitialize {
|
||||
get {
|
||||
return ResourceManager.GetString("TinyMceInitialize", resourceCulture);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:9000",
|
||||
"baseUrl": "https://localhost:44331",
|
||||
"viewportHeight": 1024,
|
||||
"viewportWidth": 1200,
|
||||
"env": {
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Tests.Common.Builders
|
||||
.Build();
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(Path.Combine("css", "styles.css"), stylesheet.Path);
|
||||
Assert.AreEqual(testPath, stylesheet.Path);
|
||||
Assert.AreEqual(testContent, stylesheet.Content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,14 +25,10 @@ namespace Umbraco.Extensions
|
||||
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored.
|
||||
// TODO: Since we are dependent on these we need to register them but what happens when we call this multiple times since we are dependent on this for UseUmbracoWebsite too?
|
||||
app.UseImageSharp();
|
||||
app.UseStaticFiles(new StaticFileOptions()
|
||||
{
|
||||
|
||||
});
|
||||
app.UseStaticFiles();
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,6 @@ function dependencies() {
|
||||
|
||||
// add streams for node modules
|
||||
nodeModules.forEach(module => {
|
||||
debugger;
|
||||
var task = gulp.src(module.src, { base: module.base, allowEmpty: true });
|
||||
|
||||
_.forEach(config.roots, function(root){
|
||||
@@ -257,7 +256,6 @@ function dependencies() {
|
||||
var libTask = gulp.src(config.sources.globs.lib, { allowEmpty: true });
|
||||
|
||||
_.forEach(config.roots, function(root){
|
||||
debugger;
|
||||
libTask = libTask.pipe(gulp.dest(root + config.targets.lib))
|
||||
});
|
||||
|
||||
|
||||
@@ -119,10 +119,4 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="~\App_Data\packages\createdPackages.config" />
|
||||
<_ContentIncludedByDefault Remove="~\App_Data\packages\installedPackages.config" />
|
||||
<_ContentIncludedByDefault Remove="~\Web.config" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"umbracoDbDSN": "server=localhost;database=NetCore;user id=sa;password='1vupRebv'"
|
||||
"umbracoDbDSN": ""
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- This is used by the default log viewer in the Umbraco backoffice -->
|
||||
<add key="serilog:using:File" value="Umbraco.Infrastructure" />
|
||||
<add key="serilog:write-to:File.formatter" value="Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" />
|
||||
<add key="serilog:write-to:File.path" value="%UMBLOGDIR%/UmbracoTraceLog.%MACHINENAME%..json" />
|
||||
<add key="serilog:write-to:File.path" value="%UMBLOGDIR%/UmbracoTraceLog.%MACHINENAME%..json" /> <!-- folder seperator need to be / and not \ to support both windows and linux-->
|
||||
<add key="serilog:write-to:File.restrictedToMinimumLevel" value="Debug" />
|
||||
<add key="serilog:write-to:File.retainedFileCountLimit" value="" /> <!-- Number of log files to keep (or remove value to keep all files) -->
|
||||
<add key="serilog:write-to:File.rollingInterval" value="Day" /> <!-- Create a new log file every Minute/Hour/Day/Month/Year/infinite -->
|
||||
|
||||
68
src/Umbraco.Web.UI/Umbraco/js/UmbracoSpeechBubbleBackEnd.js
Normal file
68
src/Umbraco.Web.UI/Umbraco/js/UmbracoSpeechBubbleBackEnd.js
Normal file
@@ -0,0 +1,68 @@
|
||||
// Umbraco SpeechBubble Javascript
|
||||
|
||||
// Dependency Loader Constructor
|
||||
function UmbracoSpeechBubble(id) {
|
||||
this.id = id;
|
||||
this.ie = document.all ? true : false;
|
||||
|
||||
this.GenerateSpeechBubble();
|
||||
}
|
||||
|
||||
UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function () {
|
||||
|
||||
var sbHtml = document.getElementById(this.id);
|
||||
|
||||
sbHtml.innerHTML = '' +
|
||||
'<div class="speechBubbleTop"></div>' +
|
||||
'<div class="speechBubbleContent">' +
|
||||
'<img id="' + this.id + 'Icon" style="float: left; margin: 0px 5px 10px 3px;" />' +
|
||||
' <img class="speechClose" onClick="UmbSpeechBubble.Hide();" id="' + this.id + 'close" src="/umbraco/images/speechBubble/speechBubble_close.gif" width="18" height="18" border="0" alt="Close"' +
|
||||
' onmouseover="this.src = \'/umbraco/images/speechBubble/speechBubble_close_over.gif\';" onmouseout="this.src=\'images/speechBubble/speechBubble_close.gif\';">' +
|
||||
' <div style="float: right; width: 186px; margin-right: 10px;"><h3 id="' + this.id + 'Header">The header!</h3>' +
|
||||
' <p style="width: 185px" id="' + this.id + 'Message">Default Text Container!<br /></p></div><br style="clear: both" />' +
|
||||
'</div>' +
|
||||
'<div class="speechBubbleBottom"></div>';
|
||||
};
|
||||
|
||||
UmbracoSpeechBubble.prototype.ShowMessage = function (icon, header, message, dontAutoHide) {
|
||||
var speechBubble = jQuery("#" + this.id);
|
||||
jQuery("#" + this.id + "Header").html(header);
|
||||
jQuery("#" + this.id + "Message").html(message);
|
||||
jQuery("#" + this.id + "Icon").attr('src', 'images/speechBubble/' + icon + '.png');
|
||||
|
||||
if (!this.ie) {
|
||||
if (!dontAutoHide) {
|
||||
jQuery("#" + this.id).fadeIn("slow").animate({ opacity: 1.0 }, 5000).fadeOut("fast");
|
||||
} else {
|
||||
jQuery(".speechClose").show();
|
||||
jQuery("#" + this.id).fadeIn("slow");
|
||||
}
|
||||
} else {
|
||||
// this is special for IE as it handles fades with pngs very ugly
|
||||
jQuery("#" + this.id).show();
|
||||
if (!dontAutoHide) {
|
||||
setTimeout('UmbSpeechBubble.Hide();', 5000);
|
||||
} else {
|
||||
jQuery(".speechClose").show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
UmbracoSpeechBubble.prototype.Hide = function () {
|
||||
if (!this.ie) {
|
||||
jQuery("#" + this.id).fadeOut("slow");
|
||||
} else {
|
||||
jQuery("#" + this.id).hide();
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize
|
||||
var UmbSpeechBubble = null
|
||||
function InitUmbracoSpeechBubble() {
|
||||
if (UmbSpeechBubble == null)
|
||||
UmbSpeechBubble = new UmbracoSpeechBubble("defaultSpeechbubble");
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
InitUmbracoSpeechBubble();
|
||||
});
|
||||
48
src/Umbraco.Web.UI/Umbraco/js/dualSelectBox.js
Normal file
48
src/Umbraco.Web.UI/Umbraco/js/dualSelectBox.js
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
function dualSelectBoxShift(id) {
|
||||
var posVal = document.getElementById(id + "_posVals");
|
||||
var selVal = document.getElementById(id + "_selVals");
|
||||
|
||||
// First check the possible items
|
||||
for (var i=0;i<posVal.options.length;i++) {
|
||||
if (posVal.options[i].selected) {
|
||||
var selNew = document.createElement('option');
|
||||
selNew.text = posVal[i].text;
|
||||
selNew.value = posVal[i].value;
|
||||
try {
|
||||
selVal.add(selNew, null);
|
||||
}
|
||||
catch(ex) {
|
||||
selVal.add(selNew);
|
||||
}
|
||||
posVal.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
// do the same with the selected items, to return them
|
||||
for (var i=0;i<selVal.options.length;i++) {
|
||||
if (selVal.options[i].selected) {
|
||||
var selNew = document.createElement('option');
|
||||
selNew.text = selVal[i].text;
|
||||
selNew.value = selVal[i].value;
|
||||
try {
|
||||
posVal.add(selNew, null);
|
||||
}
|
||||
catch(ex) {
|
||||
posVal.add(selNew);
|
||||
}
|
||||
selVal.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
// update hidden value field with all values
|
||||
var hiddenVal = "";
|
||||
for (var i=0;i<selVal.options.length;i++) {
|
||||
hiddenVal += selVal.options[i].value + ",";
|
||||
}
|
||||
if (hiddenVal != "")
|
||||
hiddenVal = hiddenVal.substring(0, hiddenVal.length-1);
|
||||
document.getElementById(id + "_theValue").value = hiddenVal;
|
||||
}
|
||||
88
src/Umbraco.Web.UI/Umbraco/js/guiFunctions.js
Normal file
88
src/Umbraco.Web.UI/Umbraco/js/guiFunctions.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// ---------------------------------------------
|
||||
// guiFunctions
|
||||
// ---------------------------------------------
|
||||
function toggleTree(sender) {
|
||||
var tree = jQuery("#leftDIV");
|
||||
var frame = jQuery("#rightDIV");
|
||||
|
||||
var disp = tree.css("display")
|
||||
var link = jQuery(sender);
|
||||
|
||||
|
||||
if (disp == "none") {
|
||||
tree.show();
|
||||
link.removeClass();
|
||||
resizePage();
|
||||
}
|
||||
else {
|
||||
tree.hide();
|
||||
link.addClass("on");
|
||||
var clientWidth = jQuery(window).width();
|
||||
frame.width(clientWidth - 20);
|
||||
}
|
||||
}
|
||||
|
||||
function resizePage(sender) {
|
||||
var dashboard = jQuery("#rightDIV");
|
||||
var dashboardFrame = jQuery("#right");
|
||||
var tree = jQuery("#leftDIV");
|
||||
var treeToggle = jQuery("#treeToggle");
|
||||
var appIcons = jQuery("#PlaceHolderAppIcons");
|
||||
var uiArea = jQuery("#uiArea");
|
||||
|
||||
if (jQuery(window)) {
|
||||
var clientHeight = jQuery(window).height() - 48;
|
||||
var clientWidth = jQuery(window).width();
|
||||
var leftWidth = parseInt(clientWidth * 0.25);
|
||||
var rightWidth = parseInt(clientWidth - leftWidth - 30);
|
||||
|
||||
// check if appdock is present
|
||||
var treeHeight = parseInt(clientHeight - 5);
|
||||
|
||||
// resize leftdiv
|
||||
tree.width(leftWidth);
|
||||
|
||||
if (appIcons != null) {
|
||||
treeHeight = treeHeight - 135;
|
||||
resizeGuiWindow("PlaceHolderAppIcons", leftWidth, 140);
|
||||
}
|
||||
|
||||
resizeGuiWindow("treeWindow", leftWidth, treeHeight)
|
||||
|
||||
if (tree.css("display") == "none") {
|
||||
dashboard.width(clientWidth - 24);
|
||||
} else {
|
||||
dashboard.width(rightWidth);
|
||||
}
|
||||
if (clientHeight > 0) {
|
||||
dashboard.height(clientHeight);
|
||||
treeToggle.height(clientHeight);
|
||||
}
|
||||
|
||||
treeToggle.show();
|
||||
uiArea.show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function resizeGuiWindow(windowName, newWidth, newHeight, window) {
|
||||
//This no longer does anything and shouldn't be used.
|
||||
}
|
||||
|
||||
function resizeGuiWindowWithTabs(windowName, newWidth, newHeight) {
|
||||
right.document.all[windowName + "ContainerTable"].width = newWidth + 22
|
||||
right.document.all[windowName + "ContainerTableSpacer"].width = newWidth
|
||||
right.document.all[windowName + "Bottom"].width = newWidth + 12
|
||||
right.document.all[windowName + "BottomSpacer"].width = newWidth
|
||||
right.document.all[windowName].style.width = newWidth
|
||||
|
||||
|
||||
// Der skal forskellig størrelse på højden afhængig af om vinduet har en label i bunden
|
||||
if (right.document.all[windowName + 'BottomLabel']) {
|
||||
right.document.all[windowName + "ContainerTable"].height = newHeight - 13;
|
||||
right.document.all[windowName].style.height = newHeight - 13;
|
||||
} else {
|
||||
right.document.all[windowName + "ContainerTable"].height = newHeight + 3;
|
||||
right.document.all[windowName].style.height = newHeight + 3;
|
||||
}
|
||||
}
|
||||
7
src/Umbraco.Web.UI/Umbraco/js/installer.app.js
Normal file
7
src/Umbraco.Web.UI/Umbraco/js/installer.app.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var app = angular.module('umbraco', [
|
||||
'umbraco.directives',
|
||||
'umbraco.install',
|
||||
'ngCookies',
|
||||
'ngSanitize',
|
||||
'ngTouch'
|
||||
]);
|
||||
102
src/Umbraco.Web.UI/Umbraco/js/umbracoCheckKeys.js
Normal file
102
src/Umbraco.Web.UI/Umbraco/js/umbracoCheckKeys.js
Normal file
@@ -0,0 +1,102 @@
|
||||
var ctrlDown = false;
|
||||
var shiftDown = false;
|
||||
var keycode = 0
|
||||
|
||||
var currentRichTextDocument = null;
|
||||
var currentRichTextObject = null;
|
||||
|
||||
function umbracoCheckKeysUp(e) {
|
||||
ctrlDown = e.ctrlKey;
|
||||
shiftDown = e.shiftKey;
|
||||
}
|
||||
|
||||
function umbracoActivateKeys(ctrl, shift, key) {
|
||||
ctrlDown = ctrl;
|
||||
shiftDown = shift;
|
||||
keycode = key
|
||||
return runShortCuts();
|
||||
}
|
||||
|
||||
function umbracoActivateKeysUp(ctrl, shift, key) {
|
||||
ctrlDown = ctrl;
|
||||
shiftDown = shift;
|
||||
keycode = key;
|
||||
}
|
||||
|
||||
function umbracoCheckKeys(e) {
|
||||
ctrlDown = e.ctrlKey;
|
||||
shiftDown = e.shiftKey;
|
||||
keycode = e.keyCode;
|
||||
|
||||
return runShortCuts();
|
||||
}
|
||||
|
||||
function shortcutCheckKeysPressFirefox(e) {
|
||||
if (ctrlDown && keycode == 83)
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
|
||||
function runShortCuts() {
|
||||
if (currentRichTextObject != undefined && currentRichTextObject != null) {
|
||||
if (ctrlDown) {
|
||||
if (!shiftDown && keycode == 9)
|
||||
functionsFrame.tabSwitch(1);
|
||||
else
|
||||
if (shiftDown && keycode == 9) functionsFrame.tabSwitch(-1);
|
||||
|
||||
if (keycode == 83) {doSubmit(); return false;}
|
||||
if (shiftDown && currentRichTextObject) {
|
||||
if (keycode == 70) {functionsFrame.umbracoInsertForm(myAlias); return false;}
|
||||
if (keycode == 76) {functionsFrame.umbracoLink(myAlias); return false;}
|
||||
if (keycode == 77) {functionsFrame.umbracoInsertMacro(myAlias, umbracoPath); return false;}
|
||||
if (keycode == 80) {functionsFrame.umbracoImage(myAlias); return false;}
|
||||
if (keycode == 84) {functionsFrame.umbracoInsertTable(myAlias); return false;}
|
||||
if (keycode == 86) {functionsFrame.umbracoShowStyles(myAlias); return false;}
|
||||
if (keycode == 85) {functionsFrame.document.getElementById('TabView1_tab01layer_publish').click(); return false;}
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
if (isDialog) {
|
||||
if (keycode == 27) {window.close();} // ESC
|
||||
if (keycode == 13 && functionsFrame.submitOnEnter != undefined) {
|
||||
if (!functionsFrame.disableEnterSubmit) {
|
||||
if (functionsFrame.submitOnEnter) {
|
||||
// firefox hack
|
||||
if (window.addEventListener)
|
||||
e.preventDefault();
|
||||
doSubmit();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ctrlDown) {
|
||||
if (keycode == 83)
|
||||
doSubmit();
|
||||
else if (keycode == 85)
|
||||
document.getElementById('TabView1_tab01layer_publish').click();
|
||||
else if (!shiftDown && keycode == 9) {
|
||||
functionsFrame.tabSwitch(1);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (shiftDown && keycode == 9) {
|
||||
functionsFrame.tabSwitch(-1);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
if (window.addEventListener) {
|
||||
document.addEventListener('keyup', umbracoCheckKeysUp, false);
|
||||
document.addEventListener('keydown', umbracoCheckKeys, false);
|
||||
document.addEventListener('keypress', shortcutCheckKeysPressFirefox, false);
|
||||
} else {
|
||||
document.attachEvent( "onkeyup", umbracoCheckKeysUp);
|
||||
document.attachEvent("onkeydown", umbracoCheckKeys);
|
||||
}
|
||||
8
src/Umbraco.Web.UI/Umbraco/js/web.config
Normal file
8
src/Umbraco.Web.UI/Umbraco/js/web.config
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlCustom="private" cacheControlMode="UseMaxAge" cacheControlMaxAge="3.00:00:00" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user