DO NOT DOWNLOAD, STABLE RELEASE AVAILABLE ON THE RELEASES TAB
Fixes up a couple of JavaScript bugs and some live editing issues [TFS Changeset #59213]
This commit is contained in:
@@ -15,7 +15,7 @@ using ClientDependency.Core.Controls;
|
||||
|
||||
namespace umbraco.editorControls.macrocontainer
|
||||
{
|
||||
//[ClientDependency(100, ClientDependencyType.Javascript, "webservices/MacroContainerService.asmx/js", "UmbracoRoot")]
|
||||
[ClientDependency(100, ClientDependencyType.Javascript, "webservices/MacroContainerService.asmx/js", "UmbracoRoot", ForceProvider = "CanvasProvider")]
|
||||
public class Editor : UpdatePanel, IDataEditor
|
||||
{
|
||||
private IData _data;
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Web.UI;
|
||||
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using ClientDependency.Core;
|
||||
using umbraco.presentation;
|
||||
using ClientDependency.Core.Controls;
|
||||
namespace umbraco.editorControls
|
||||
{
|
||||
/// <summary>
|
||||
@@ -10,7 +12,7 @@ namespace umbraco.editorControls
|
||||
/// </summary>
|
||||
[ClientDependency(100, ClientDependencyType.Css, "js/submodal/submodal.css", "UmbracoRoot")]
|
||||
[ClientDependency(101, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")]
|
||||
[ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "initPopUp")]
|
||||
[ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "initPopUp")]
|
||||
[ValidationProperty("Value")]
|
||||
public class mediaChooser : System.Web.UI.WebControls.HiddenField, interfaces.IDataEditor
|
||||
{
|
||||
@@ -70,7 +72,10 @@ namespace umbraco.editorControls
|
||||
base.OnLoad(e);
|
||||
|
||||
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
if (!UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
else
|
||||
ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript);
|
||||
|
||||
// And a reference to the media picker calls
|
||||
ScriptManager sm = ScriptManager.GetCurrent(base.Page);
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Web.UI;
|
||||
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using ClientDependency.Core;
|
||||
using umbraco.presentation;
|
||||
using ClientDependency.Core.Controls;
|
||||
namespace umbraco.editorControls
|
||||
{
|
||||
/// <summary>
|
||||
@@ -10,7 +12,7 @@ namespace umbraco.editorControls
|
||||
/// </summary>
|
||||
[ClientDependency(100, ClientDependencyType.Css, "js/submodal/submodal.css", "UmbracoRoot")]
|
||||
[ClientDependency(101, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")]
|
||||
[ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "initPopUp")]
|
||||
[ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "initPopUp")]
|
||||
[ValidationProperty("Value")]
|
||||
public class pagePicker : System.Web.UI.WebControls.HiddenField, interfaces.IDataEditor
|
||||
{
|
||||
@@ -52,7 +54,10 @@ namespace umbraco.editorControls
|
||||
base.OnInit(e);
|
||||
|
||||
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
if (!UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
else
|
||||
ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript);
|
||||
|
||||
if (_data != null && _data.Value != null)
|
||||
base.Value = _data.Value.ToString();
|
||||
|
||||
Binary file not shown.
@@ -4,8 +4,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
foreign dlls\AjaxControlToolkit.dll = foreign dlls\AjaxControlToolkit.dll
|
||||
build.xml = build.xml
|
||||
foreign dlls\ClientDependency.Core.dll = foreign dlls\ClientDependency.Core.dll
|
||||
foreign dlls\CookComputing.XmlRpcV2.dll = foreign dlls\CookComputing.XmlRpcV2.dll
|
||||
foreign dlls\ICSharpCode.SharpZipLib.dll = foreign dlls\ICSharpCode.SharpZipLib.dll
|
||||
foreign dlls\IronMath.dll = foreign dlls\IronMath.dll
|
||||
IronPython License.Rtf = IronPython License.Rtf
|
||||
foreign dlls\IronPython.dll = foreign dlls\IronPython.dll
|
||||
@@ -13,11 +13,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
foreign dlls\Lucene.Net.dll = foreign dlls\Lucene.Net.dll
|
||||
foreign dlls\Microsoft.ApplicationBlocks.Data.dll = foreign dlls\Microsoft.ApplicationBlocks.Data.dll
|
||||
foreign dlls\MySql.Data.dll = foreign dlls\MySql.Data.dll
|
||||
foreign dlls\System.Web.Abstractions.dll = foreign dlls\System.Web.Abstractions.dll
|
||||
foreign dlls\System.Web.Abstractions.xml = foreign dlls\System.Web.Abstractions.xml
|
||||
foreign dlls\TidyNet.dll = foreign dlls\TidyNet.dll
|
||||
umbraco weekly.build = umbraco weekly.build
|
||||
umbraco.build = umbraco.build
|
||||
foreign dlls\umbraco.Linq.DTMetal.CodeBuilder.dll = foreign dlls\umbraco.Linq.DTMetal.CodeBuilder.dll
|
||||
foreign dlls\umbraco.Linq.DTMetal.Engine.dll = foreign dlls\umbraco.Linq.DTMetal.Engine.dll
|
||||
foreign dlls\UmbracoExamine.Core.dll = foreign dlls\UmbracoExamine.Core.dll
|
||||
foreign dlls\UmbracoExamine.Providers.dll = foreign dlls\UmbracoExamine.Providers.dll
|
||||
foreign dlls\UrlRewritingNet.UrlRewriter.dll = foreign dlls\UrlRewritingNet.UrlRewriter.dll
|
||||
foreign dlls\VistaDB For Umbraco.dll = foreign dlls\VistaDB For Umbraco.dll
|
||||
foreign dlls\VistaDB.NET20.dll = foreign dlls\VistaDB.NET20.dll
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<clientDependency isDebugMode="false ">
|
||||
<clientDependency isDebugMode="true ">
|
||||
<fileRegistration defaultProvider="PageHeaderProvider" fileDependencyExtensions="js,css" enableCompositeFiles="true">
|
||||
<providers>
|
||||
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
|
||||
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
|
||||
<add name="CanvasProvider" type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco" />
|
||||
</providers>
|
||||
</fileRegistration>
|
||||
<compositeFiles defaultProvider="CompositeFileProcessor" compositeFilePath="~/App_Data/ClientDependency" compositeFileHandlerPath="DependencyHandler.axd">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{651E1350-91B6-44B7-BD60-7207006D7003}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
@@ -940,6 +940,7 @@
|
||||
<Compile Include="umbraco\keepalive.aspx.designer.cs">
|
||||
<DependentUpon>keepalive.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\LiveEditing\CanvasClientDependencyProvider.cs" />
|
||||
<Compile Include="umbraco\LiveEditing\Controls\Communicator.cs" />
|
||||
<Compile Include="umbraco\LiveEditing\Modules\BaseModule.cs" />
|
||||
<Compile Include="umbraco\LiveEditing\Modules\Separator.cs" />
|
||||
@@ -2738,7 +2739,6 @@
|
||||
<None Include="umbraco\schemas\umbraco.xsx">
|
||||
<DependentUpon>umbraco.xsd</DependentUpon>
|
||||
</None>
|
||||
<Content Include="web.config" />
|
||||
<Content Include="config\UrlRewriting.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ClientDependency.Core.FileRegistration.Providers;
|
||||
using umbraco.presentation;
|
||||
|
||||
namespace umbraco.presentation.LiveEditing
|
||||
{
|
||||
public class CanvasClientDependencyProvider : LazyLoadProvider
|
||||
{
|
||||
protected override void ProcessSingleCssFile(string css)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
base.ProcessSingleCssFile(css);
|
||||
}
|
||||
|
||||
protected override void ProcessSingleJsFile(string js)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
base.ProcessSingleJsFile(js);
|
||||
}
|
||||
|
||||
//protected override void RegisterCssFiles(List<ClientDependency.Core.IClientDependencyFile> cssDependencies)
|
||||
//{
|
||||
// throw new NotImplementedException();
|
||||
//}
|
||||
|
||||
//protected override void RegisterJsFiles(List<ClientDependency.Core.IClientDependencyFile> jsDependencies)
|
||||
//{
|
||||
// throw new NotImplementedException();
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -9,16 +9,17 @@ using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using ClientDependency.Core;
|
||||
using umbraco.presentation;
|
||||
using ClientDependency.Core.Controls;
|
||||
|
||||
namespace umbraco.controls
|
||||
{
|
||||
|
||||
[ClientDependency(ClientDependencyType.Javascript, "js/xmlextras.js", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "js/xmlRequest.js", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "webservices/ajax.js", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")]
|
||||
[ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")]
|
||||
public class ContentPicker : System.Web.UI.WebControls.WebControl
|
||||
{
|
||||
|
||||
@@ -80,7 +81,10 @@ namespace umbraco.controls
|
||||
base.OnInit(e);
|
||||
|
||||
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
if (!UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
|
||||
else
|
||||
ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ Umbraco.Application.Actions = function() {
|
||||
|
||||
addEventHandler: function(fnName, fn) {
|
||||
/// <summary>Adds an event listener to the event name event</summary>
|
||||
jQuery(this).bind(fnName, fn);
|
||||
if (typeof(jQuery)!="undefined") jQuery(this).bind(fnName, fn); //if there's no jQuery, there is no events
|
||||
},
|
||||
|
||||
removeEventHandler: function(fnName, fn) {
|
||||
/// <summary>Removes an event listener to the event name event</summary>
|
||||
jQuery(this).unbind(fnName, fn);
|
||||
if (typeof (jQuery) != "undefined") jQuery(this).unbind(fnName, fn); //if there's no jQuery, there is no events
|
||||
},
|
||||
|
||||
launchHelp: function(lang, userType) {
|
||||
|
||||
@@ -16,6 +16,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
|
||||
_debug: false,
|
||||
_mainTree: null,
|
||||
_appActions: null,
|
||||
_rootPath: "/umbraco", //this is the default
|
||||
|
||||
|
||||
@@ -40,7 +41,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
/// </summary>
|
||||
|
||||
if (this._mainTree == null) {
|
||||
if (this.mainWindow().jQuery(".umbTree").UmbracoTreeAPI() == null) {
|
||||
if (this.mainWindow().jQuery == null
|
||||
|| this.mainWindow().jQuery(".umbTree").length == 0
|
||||
|| this.mainWindow().jQuery(".umbTree").UmbracoTreeAPI() == null) {
|
||||
|
||||
this._mainTree = $("<div id='falseTree' />").appendTo("body").hide().UmbracoTree({
|
||||
uiKeys: this.uiKeys(),
|
||||
jsonFullMenu: {},
|
||||
@@ -59,12 +63,14 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
/// Returns a reference to the application actions object
|
||||
/// </summary>
|
||||
|
||||
//TODO: If there is no main window, we need to go retrieve the appActions from the server!
|
||||
if (typeof this.mainWindow().appActions == 'undefined') {
|
||||
var w = this.mainWindow();
|
||||
w.appActions = new Umbraco.Application.Actions();
|
||||
//if the main window has no actions, we'll create some
|
||||
if (this._appActions == null) {
|
||||
if (typeof this.mainWindow().appActions == 'undefined') {
|
||||
this._appActions = new Umbraco.Application.Actions();
|
||||
}
|
||||
else this._appActions = this.mainWindow().appActions;
|
||||
}
|
||||
return this.mainWindow().appActions;
|
||||
return this._appActions;
|
||||
},
|
||||
uiKeys: function() {
|
||||
/// <summary>
|
||||
@@ -100,7 +106,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
}
|
||||
|
||||
this._debug("contentFrame: parsed location: " + strLocation);
|
||||
|
||||
|
||||
this.mainWindow().right.location.href = strLocation;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user