Merge branch '7.0.0' into 7.0.0-pubcontent
Conflicts: src/Umbraco.Core/PublishedContentHelper.cs
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,6 +38,7 @@ src/Umbraco.Tests/App_Data/*
|
||||
src/Umbraco.Web.UI/[Mm]edia/*
|
||||
src/Umbraco.Web.UI/[Mm]aster[Pp]ages/*
|
||||
src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/*
|
||||
!src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/[Ww]eb.[Cc]onfig
|
||||
src/Umbraco.Web.UI/[Xx]slt/*
|
||||
src/Umbraco.Web.UI/[Ii]mages/*
|
||||
src/Umbraco.Web.UI/[Ss]cripts/*
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Umbraco CMS
|
||||
===========
|
||||
##Note: Building version 7 from source##
|
||||
If you're interested in using the source code and building version 7, make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
|
||||
|
||||
## Watch a five minute introduction video ##
|
||||
|
||||
[](http://umbraco.org/help-and-support/video-tutorials/getting-started/what-is-umbraco)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@ECHO OFF
|
||||
SET release=7.0.0
|
||||
SET comment=
|
||||
SET comment=alpha
|
||||
SET version=%release%
|
||||
|
||||
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>UmbracoCms.Core</id>
|
||||
<version>6.1.2</version>
|
||||
<version>7.0.0</version>
|
||||
<title>Umbraco Cms Core Binaries</title>
|
||||
<authors>Morten Christensen</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
@@ -14,57 +14,58 @@
|
||||
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
|
||||
<language>en-US</language>
|
||||
<tags>umbraco</tags>
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
<dependency id="Microsoft.AspNet.Mvc" version="4.0" />
|
||||
<dependency id="Microsoft.AspNet.WebApi" version="4.0" />
|
||||
<dependency id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" />
|
||||
<dependency id="MiniProfiler" version="2.1.0" />
|
||||
<dependency id="HtmlAgilityPack" version="1.4.6" />
|
||||
<dependency id="Lucene.Net" version="[2.9.4.1]" />
|
||||
<dependency id="SharpZipLib" version="0.86.0" />
|
||||
<dependency id="MySql.Data" version="[6.6.5]" />
|
||||
<dependency id="xmlrpcnet" version="2.5.0" />
|
||||
<dependency id="ClientDependency" version="[1.7.0,1.7.1)" />
|
||||
<dependency id="ClientDependency-Mvc" version="[1.7.0,1.7.1)" />
|
||||
<dependency id="Microsoft.AspNet.WebApi" version="4.0" />
|
||||
<dependency id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" />
|
||||
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
|
||||
<dependency id="HtmlAgilityPack" version="[1.4.6, 2.0.0)" />
|
||||
<dependency id="Lucene.Net" version="[2.9.4.1]" />
|
||||
<dependency id="SharpZipLib" version="[0.86.0, 1.0.0)" />
|
||||
<dependency id="MySql.Data" version="[6.6.5]" />
|
||||
<dependency id="xmlrpcnet" version="[2.5.0, 3.0.0)" />
|
||||
<dependency id="ClientDependency" version="[1.7.0, 1.7.1)" />
|
||||
<dependency id="ClientDependency-Mvc" version="[1.7.0, 1.7.1)" />
|
||||
<dependency id="AutoMapper" version="[2.2.1, 3.0.0)" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\_BuildOutput\WebApp\bin\businesslogic.dll" target="lib\businesslogic.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\businesslogic.xml" target="lib\businesslogic.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\cms.dll" target="lib\cms.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\cms.xml" target="lib\cms.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\controls.dll" target="lib\controls.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\controls.xml" target="lib\controls.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Examine.dll" target="lib\Examine.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.dll" target="lib\interfaces.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.xml" target="lib\interfaces.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\Microsoft.ApplicationBlocks.Data.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.Web.Helpers.dll" target="lib\Microsoft.Web.Helpers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.47x.dll" target="lib\Our.Umbraco.uGoLive.47x.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.Checks.dll" target="lib\Our.Umbraco.uGoLive.Checks.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.dll" target="lib\Our.Umbraco.uGoLive.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\SQLCE4Umbraco.dll" target="lib\SQLCE4Umbraco.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\System.Data.SqlServerCe.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\System.Data.SqlServerCe.Entity.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\TidyNet.dll" target="lib\TidyNet.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.dll" target="lib\Umbraco.Core.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.xml" target="lib\Umbraco.Core.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.dll" target="lib\umbraco.DataLayer.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.xml" target="lib\umbraco.DataLayer.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.dll" target="lib\umbraco.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.xml" target="lib\umbraco.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.dll" target="lib\umbraco.editorControls.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.xml" target="lib\umbraco.editorControls.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.dll" target="lib\umbraco.MacroEngines.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.xml" target="lib\umbraco.MacroEngines.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.dll" target="lib\umbraco.macroRenderings.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.xml" target="lib\umbraco.macroRenderings.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.dll" target="lib\umbraco.providers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.xml" target="lib\umbraco.providers.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Web.UI.dll" target="lib\Umbraco.Web.UI.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.XmlSerializers.dll" target="lib\umbraco.XmlSerializers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\UmbracoExamine.dll" target="lib\UmbracoExamine.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\UrlRewritingNet.UrlRewriter.dll" target="lib\UrlRewritingNet.UrlRewriter.dll" />
|
||||
</files>
|
||||
<files>
|
||||
<file src="..\_BuildOutput\WebApp\bin\businesslogic.dll" target="lib\businesslogic.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\businesslogic.xml" target="lib\businesslogic.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\cms.dll" target="lib\cms.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\cms.xml" target="lib\cms.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\controls.dll" target="lib\controls.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\controls.xml" target="lib\controls.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Examine.dll" target="lib\Examine.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.dll" target="lib\interfaces.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.xml" target="lib\interfaces.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\Microsoft.ApplicationBlocks.Data.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.Web.Helpers.dll" target="lib\Microsoft.Web.Helpers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.47x.dll" target="lib\Our.Umbraco.uGoLive.47x.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.Checks.dll" target="lib\Our.Umbraco.uGoLive.Checks.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.dll" target="lib\Our.Umbraco.uGoLive.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\SQLCE4Umbraco.dll" target="lib\SQLCE4Umbraco.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\System.Data.SqlServerCe.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\System.Data.SqlServerCe.Entity.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\TidyNet.dll" target="lib\TidyNet.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.dll" target="lib\Umbraco.Core.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.xml" target="lib\Umbraco.Core.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.dll" target="lib\umbraco.DataLayer.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.xml" target="lib\umbraco.DataLayer.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.dll" target="lib\umbraco.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.xml" target="lib\umbraco.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.dll" target="lib\umbraco.editorControls.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.xml" target="lib\umbraco.editorControls.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.dll" target="lib\umbraco.MacroEngines.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.xml" target="lib\umbraco.MacroEngines.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.dll" target="lib\umbraco.macroRenderings.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.xml" target="lib\umbraco.macroRenderings.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.dll" target="lib\umbraco.providers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.xml" target="lib\umbraco.providers.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Web.UI.dll" target="lib\Umbraco.Web.UI.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\umbraco.XmlSerializers.dll" target="lib\umbraco.XmlSerializers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\UmbracoExamine.dll" target="lib\UmbracoExamine.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\UrlRewritingNet.UrlRewriter.dll" target="lib\UrlRewritingNet.UrlRewriter.dll" />
|
||||
</files>
|
||||
</package>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>UmbracoCms</id>
|
||||
<version>6.1.2</version>
|
||||
<version>7.0.0</version>
|
||||
<title>Umbraco Cms</title>
|
||||
<authors>Morten Christensen</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration
|
||||
/// Gets the version comment (like beta or RC).
|
||||
/// </summary>
|
||||
/// <value>The version comment.</value>
|
||||
public static string CurrentComment { get { return ""; } }
|
||||
public static string CurrentComment { get { return "alpha"; } }
|
||||
|
||||
// Get the version of the umbraco.dll by looking at a class in that dll
|
||||
// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx
|
||||
|
||||
@@ -191,10 +191,14 @@ namespace Umbraco.Core.Models
|
||||
/// Id of the DataType control
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
||||
public Guid ControlId
|
||||
{
|
||||
get { return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, true).Value; }
|
||||
get
|
||||
{
|
||||
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
||||
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
||||
|
||||
@@ -141,10 +141,14 @@ namespace Umbraco.Core.Models
|
||||
/// Gets of Sets the Id of the DataType control
|
||||
/// </summary>
|
||||
/// <remarks>This is the Id of the actual DataType control</remarks>
|
||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
||||
public Guid DataTypeId
|
||||
{
|
||||
get { return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, true).Value; }
|
||||
get
|
||||
{
|
||||
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
||||
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
||||
|
||||
@@ -23,8 +23,9 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
//change the type (keep the data)
|
||||
Alter.Table("cmsMacroProperty").AlterColumn("macroPropertyType").AsString(255);
|
||||
//rename the column
|
||||
Alter.Table("cmsMacroProperty").AddColumn("editorAlias").AsString(255).NotNullable().WithDefaultValue("");
|
||||
Rename.Column("macroPropertyType").OnTable("cmsMacroProperty").To("editorAlias");
|
||||
|
||||
Delete.Column("macroPropertyType").FromTable("cmsMacroProperty");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
|
||||
@@ -12,7 +12,10 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
public override void Up()
|
||||
{
|
||||
Alter.Table("cmsDataType").AlterColumn("controlId").AsString(255);
|
||||
Alter.Table("cmsDataType").AddColumn("propertyEditorAlias").AsString(255).NotNullable().WithDefaultValue("");
|
||||
Rename.Column("controlId").OnTable("cmsDataType").To("propertyEditorAlias");
|
||||
|
||||
Delete.Column("controlId").FromTable("cmsDataType");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
|
||||
42
src/Umbraco.Core/PropertyEditors/BackwardsCompatibleData.cs
Normal file
42
src/Umbraco.Core/PropertyEditors/BackwardsCompatibleData.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is used purelty to attempt to maintain some backwards compatibility with new property editors that don't have a
|
||||
/// legacy property editor predecessor when developers are using the legacy APIs
|
||||
/// </summary>
|
||||
internal class BackwardsCompatibleData : IData
|
||||
{
|
||||
public int PropertyId { set; get; }
|
||||
|
||||
public object Value { get; set; }
|
||||
|
||||
|
||||
public XmlNode ToXMl(XmlDocument data)
|
||||
{
|
||||
//TODO: We need to get the xml property value converters in place, then this method will need to call in to that converter to
|
||||
// get the xml, for now we're just creating a CDATA section with the raw value.
|
||||
|
||||
var sValue = Value != null ? Value.ToString() : String.Empty;
|
||||
return data.CreateCDataSection(sValue);
|
||||
|
||||
}
|
||||
|
||||
public void MakeNew(int PropertyId)
|
||||
{
|
||||
//DO nothing
|
||||
}
|
||||
|
||||
public void Delete()
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
typeof(IData)
|
||||
+ " is a legacy object and is not supported by runtime generated "
|
||||
+ " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is used purelty to attempt to maintain some backwards compatibility with new property editors that don't have a
|
||||
/// legacy property editor predecessor when developers are using the legacy APIs
|
||||
/// </summary>
|
||||
internal class BackwardsCompatibleDataType : IDataType
|
||||
{
|
||||
public Guid Id { get; private set; }
|
||||
public string DataTypeName { get; private set; }
|
||||
public IData Data { get; private set; }
|
||||
public int DataTypeDefinitionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a runtime instance
|
||||
/// </summary>
|
||||
/// <param name="propEdAlias"></param>
|
||||
/// <param name="legacyId"></param>
|
||||
/// <param name="dataTypeDefId"></param>
|
||||
/// <returns></returns>
|
||||
internal static BackwardsCompatibleDataType Create(string propEdAlias, Guid legacyId, int dataTypeDefId)
|
||||
{
|
||||
var dt = new BackwardsCompatibleDataType
|
||||
{
|
||||
Id = legacyId,
|
||||
DataTypeName = propEdAlias,
|
||||
DataTypeDefinitionId = dataTypeDefId,
|
||||
Data = new BackwardsCompatibleData()
|
||||
};
|
||||
|
||||
return dt;
|
||||
}
|
||||
|
||||
public IDataEditor DataEditor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
typeof(IDataEditor)
|
||||
+ " is a legacy object and is not supported by runtime generated "
|
||||
+ typeof(IDataType)
|
||||
+ " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs.");
|
||||
}
|
||||
}
|
||||
public IDataPrevalue PrevalueEditor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
typeof(IDataPrevalue)
|
||||
+ " is a legacy object and is not supported by runtime generated "
|
||||
+ typeof(IDataType)
|
||||
+ " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Logging;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
@@ -14,6 +15,14 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// </remarks>
|
||||
public static class LegacyPropertyEditorIdToAliasConverter
|
||||
{
|
||||
|
||||
public enum NotFoundLegacyIdResponseBehavior
|
||||
{
|
||||
ThrowException,
|
||||
ReturnNull,
|
||||
GenerateId
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The map consists of a key which is always the GUID (lowercase, no hyphens + alias (trimmed))
|
||||
/// </summary>
|
||||
@@ -55,18 +64,27 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// Gets a legacy Id based on the alias
|
||||
/// </summary>
|
||||
/// <param name="alias"></param>
|
||||
/// <param name="throwIfNotFound">if set to true will throw an exception if the map isn't found</param>
|
||||
/// <param name="notFoundBehavior"></param>
|
||||
/// <returns>Returns the legacy GUID of a property editor if found, otherwise returns null</returns>
|
||||
public static Guid? GetLegacyIdFromAlias(string alias, bool throwIfNotFound = false)
|
||||
public static Guid? GetLegacyIdFromAlias(string alias, NotFoundLegacyIdResponseBehavior notFoundBehavior)
|
||||
{
|
||||
var found = _map.FirstOrDefault(x => x.Value.Item2 == alias);
|
||||
if (found.Equals(default(KeyValuePair<string, Tuple<Guid, string>>)))
|
||||
{
|
||||
if (throwIfNotFound)
|
||||
switch (notFoundBehavior)
|
||||
{
|
||||
throw new ObjectNotFoundException("Could not find a map for a property editor with an alias of " + alias + ". Consider using the new business logic APIs instead of the old obsoleted ones.");
|
||||
case NotFoundLegacyIdResponseBehavior.ThrowException:
|
||||
throw new ObjectNotFoundException("Could not find a map for a property editor with an alias of " + alias + ". Consider using the new business logic APIs instead of the old obsoleted ones.");
|
||||
case NotFoundLegacyIdResponseBehavior.ReturnNull:
|
||||
return null;
|
||||
case NotFoundLegacyIdResponseBehavior.GenerateId:
|
||||
var generated = alias.EncodeAsGuid();
|
||||
CreateMap(generated, alias);
|
||||
|
||||
LogHelper.Warn(typeof(LegacyPropertyEditorIdToAliasConverter), "A legacy GUID id was generated for property editor " + alias + ". This occurs when the legacy APIs are used and done to attempt to maintain backwards compatibility. Consider upgrading all code to use the new Services APIs instead to avoid any potential issues.");
|
||||
|
||||
return generated;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return found.Value.Item1;
|
||||
}
|
||||
|
||||
@@ -437,6 +437,8 @@
|
||||
<Compile Include="Persistence\Relators\MacroPropertyRelator.cs" />
|
||||
<Compile Include="Persistence\Repositories\Interfaces\IMacroRepository.cs" />
|
||||
<Compile Include="Persistence\Repositories\MacroRepository.cs" />
|
||||
<Compile Include="PropertyEditors\BackwardsCompatibleData.cs" />
|
||||
<Compile Include="PropertyEditors\BackwardsCompatibleDataType.cs" />
|
||||
<Compile Include="PropertyEditors\LegacyParameterEditorAliasConverter.cs" />
|
||||
<Compile Include="PropertyEditors\LegacyPropertyEditorIdToAliasConverter.cs" />
|
||||
<Compile Include="Persistence\Mappers\MapperForAttribute.cs" />
|
||||
|
||||
@@ -28,7 +28,11 @@ namespace Umbraco.Tests.PropertyEditors
|
||||
var id = Guid.NewGuid();
|
||||
LegacyPropertyEditorIdToAliasConverter.CreateMap(id, "test");
|
||||
|
||||
Assert.AreEqual(id, LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("test", true));
|
||||
Assert.AreEqual(
|
||||
id,
|
||||
LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
||||
"test",
|
||||
LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.ThrowException));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -37,7 +41,22 @@ namespace Umbraco.Tests.PropertyEditors
|
||||
var id = Guid.NewGuid();
|
||||
LegacyPropertyEditorIdToAliasConverter.CreateMap(id, "test");
|
||||
|
||||
Assert.AreEqual("test", LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(id, true));
|
||||
Assert.AreEqual(
|
||||
"test",
|
||||
LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(
|
||||
id,
|
||||
true));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Generate_Id_From_Missing_Alias()
|
||||
{
|
||||
var gen1 = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("Donotfindthisone", LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId);
|
||||
var gen2 = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("Donotfindthisone", LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId);
|
||||
|
||||
Assert.IsNotNull(gen1);
|
||||
Assert.IsNotNull(gen2);
|
||||
Assert.AreEqual(gen1, gen2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name umbraco.directives.directive:umbContentName
|
||||
* @restrict E
|
||||
* @function
|
||||
* @description
|
||||
* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form.
|
||||
**/
|
||||
angular.module("umbraco.directives")
|
||||
.directive('umbContentName', function ($timeout) {
|
||||
return {
|
||||
require: "ngModel",
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
templateUrl: 'views/directives/umb-content-name.html',
|
||||
scope: {
|
||||
placeholder: '@placeholder',
|
||||
model: '=ngModel'
|
||||
},
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
|
||||
ngModel.$render = function(){
|
||||
$timeout(function(){
|
||||
if(scope.model === ""){
|
||||
scope.goEdit();
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
|
||||
scope.goEdit = function(){
|
||||
scope.editMode = true;
|
||||
$timeout(function(){
|
||||
element.find("input").focus();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
scope.exitEdit = function(){
|
||||
scope.editMode = false;
|
||||
|
||||
if(scope.model === ""){
|
||||
scope.model = "Empty...";
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
angular.module("umbraco.directives")
|
||||
.directive('localize', function ($log, localizationService) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope:{
|
||||
key: '@'
|
||||
},
|
||||
replace: true,
|
||||
link: function (scope, element, attrs) {
|
||||
var key = scope.key;
|
||||
if(key[0] === '#')
|
||||
{
|
||||
key = key.slice(1);
|
||||
}
|
||||
|
||||
var value = localizationService.getLocalizedString(key);
|
||||
element.html(value);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name umbraco.directives.directive:umbContentName
|
||||
* @restrict E
|
||||
* @function
|
||||
* @description
|
||||
* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form.
|
||||
**/
|
||||
angular.module("umbraco.directives")
|
||||
.directive('umbContentName', function ($timeout) {
|
||||
return {
|
||||
require: "ngModel",
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
templateUrl: 'views/directives/umb-content-name.html',
|
||||
scope: {
|
||||
placeholder: '@placeholder',
|
||||
model: '=ngModel'
|
||||
},
|
||||
link: function(scope, element, attrs, modelCtrl) {
|
||||
|
||||
var input = $(element).find('input');
|
||||
var h1 = $(element).find('h1');
|
||||
input.hide();
|
||||
|
||||
|
||||
input.on("blur", function () {
|
||||
//Don't hide the input field if there is no value in it
|
||||
var val = input.val() || "empty";
|
||||
input.hide();
|
||||
|
||||
h1.text(val);
|
||||
h1.show();
|
||||
});
|
||||
|
||||
|
||||
h1.on("click", function () {
|
||||
h1.hide();
|
||||
input.show().focus();
|
||||
});
|
||||
|
||||
$timeout(function(){
|
||||
if(!scope.model){
|
||||
h1.hide();
|
||||
input.show().focus();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -206,18 +206,19 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
* @methodOf umbraco.resources.entityResource
|
||||
*
|
||||
* @description
|
||||
* Gets an array of entities, given a lucene query
|
||||
* Gets an array of entities, given a lucene query and a type
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* entityResource.search("news")
|
||||
* entityResource.search("news", "Media")
|
||||
* .then(function(mediaArray) {
|
||||
* var myDoc = mediaArray;
|
||||
* alert('they are here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {String} Query search query
|
||||
* @param {String} Query search query
|
||||
* @param {String} Type type of conten to search
|
||||
* @returns {Promise} resourcePromise object containing the entity array.
|
||||
*
|
||||
*/
|
||||
@@ -227,7 +228,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"entityApiBaseUrl",
|
||||
"SearchMedia",
|
||||
"Search",
|
||||
[{ query: query }, {type: type}])),
|
||||
'Failed to retreive entity data for query ' + query);
|
||||
}
|
||||
|
||||
107
src/Umbraco.Web.UI.Client/src/common/resources/log.resource.js
Normal file
107
src/Umbraco.Web.UI.Client/src/common/resources/log.resource.js
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name umbraco.resources.logResource
|
||||
* @description Retrives log history from umbraco
|
||||
*
|
||||
*
|
||||
**/
|
||||
function logResource($q, $http, umbRequestHelper) {
|
||||
|
||||
//the factory object returned
|
||||
return {
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.userResource#getEntityLog
|
||||
* @methodOf umbraco.resources.logResource
|
||||
*
|
||||
* @description
|
||||
* Gets the log history for a give entity id
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* logResource.getEntityLog(1234)
|
||||
* .then(function(log) {
|
||||
* alert('its here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of entity to return log history
|
||||
* @returns {Promise} resourcePromise object containing the log.
|
||||
*
|
||||
*/
|
||||
getEntityLog: function (id) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"logApiBaseUrl",
|
||||
"GetEntityLog",
|
||||
[{ id: id }])),
|
||||
'Failed to retreive user data for id ' + id);
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.userResource#getUserLog
|
||||
* @methodOf umbraco.resources.logResource
|
||||
*
|
||||
* @description
|
||||
* Gets the current users' log history for a given type of log entry
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* logResource.getUserLog("save", new Date())
|
||||
* .then(function(log) {
|
||||
* alert('its here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {String} type logtype to query for
|
||||
* @param {DateTime} since query the log back to this date, by defalt 7 days ago
|
||||
* @returns {Promise} resourcePromise object containing the log.
|
||||
*
|
||||
*/
|
||||
getUserLog: function (type, since) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"logApiBaseUrl",
|
||||
"GetCurrentUserLog",
|
||||
[{ logtype: type, sinceDate: since }])),
|
||||
'Failed to retreive user data for id ' + id);
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.userResource#getLog
|
||||
* @methodOf umbraco.resources.logResource
|
||||
*
|
||||
* @description
|
||||
* Gets the log history for a given type of log entry
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* logResource.getLog("save", new Date())
|
||||
* .then(function(log) {
|
||||
* alert('its here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {String} type logtype to query for
|
||||
* @param {DateTime} since query the log back to this date, by defalt 7 days ago
|
||||
* @returns {Promise} resourcePromise object containing the log.
|
||||
*
|
||||
*/
|
||||
getLog: function (type, since) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"logApiBaseUrl",
|
||||
"GetLog",
|
||||
[{ logtype: type, sinceDate: since }])),
|
||||
'Failed to retreive user data for id ' + id);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('umbraco.resources').factory('logResource', logResource);
|
||||
@@ -0,0 +1,84 @@
|
||||
angular.module('umbraco.services')
|
||||
.factory('localizationService', function ($http, $q, $rootScope, $window, $filter, userService) {
|
||||
var localize = {
|
||||
// use the $window service to get the language of the user's browser
|
||||
language: userService.getCurrentUser().locale,
|
||||
// array to hold the localized resource string entries
|
||||
dictionary:[],
|
||||
// location of the resource file
|
||||
url: "js/language.aspx",
|
||||
// flag to indicate if the service hs loaded the resource file
|
||||
resourceFileLoaded:false,
|
||||
|
||||
// success handler for all server communication
|
||||
successCallback:function (data) {
|
||||
// store the returned array in the dictionary
|
||||
localize.dictionary = data;
|
||||
// set the flag that the resource are loaded
|
||||
localize.resourceFileLoaded = true;
|
||||
// broadcast that the file has been loaded
|
||||
$rootScope.$broadcast('localizeResourcesUpdates');
|
||||
},
|
||||
|
||||
// allows setting of language on the fly
|
||||
setLanguage: function(value) {
|
||||
localize.language = value;
|
||||
localize.initLocalizedResources();
|
||||
},
|
||||
|
||||
// allows setting of resource url on the fly
|
||||
setUrl: function(value) {
|
||||
localize.url = value;
|
||||
localize.initLocalizedResources();
|
||||
},
|
||||
|
||||
// builds the url for locating the resource file
|
||||
buildUrl: function() {
|
||||
return '/i18n/resources-locale_' + localize.language + '.js';
|
||||
},
|
||||
|
||||
// loads the language resource file from the server
|
||||
initLocalizedResources:function () {
|
||||
var deferred = $q.defer();
|
||||
// build the url to retrieve the localized resource file
|
||||
$http({ method:"GET", url:localize.url, cache:false })
|
||||
.then(function(response){
|
||||
localize.resourceFileLoaded = true;
|
||||
localize.dictionary = response.data;
|
||||
|
||||
$rootScope.$broadcast('localizeResourcesUpdates');
|
||||
|
||||
return deferred.resolve(localize.dictionary);
|
||||
}, function(err){
|
||||
return deferred.reject("Something broke");
|
||||
});
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
// checks the dictionary for a localized resource string
|
||||
getLocalizedString: function(value) {
|
||||
if(localize.resourceFileLoaded){
|
||||
return _lookup(value);
|
||||
}else{
|
||||
localize.initLocalizedResources().then(function(dic){
|
||||
return _lookup(value);
|
||||
});
|
||||
}
|
||||
},
|
||||
_lookup: function(value){
|
||||
var entry = localize.dictionary[value];
|
||||
if(entry){
|
||||
return entry;
|
||||
}
|
||||
return "[" + value + "]";
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
// force the load of the resource file
|
||||
localize.initLocalizedResources();
|
||||
|
||||
// return the local instance when called
|
||||
return localize;
|
||||
});
|
||||
@@ -1,39 +1,48 @@
|
||||
angular.module('umbraco.services')
|
||||
.factory('searchService', function () {
|
||||
.factory('searchService', function ($q, $log, entityResource) {
|
||||
var m = {results: []};
|
||||
return {
|
||||
search: function(term, section){
|
||||
return [
|
||||
{
|
||||
section: "settings",
|
||||
tree: "documentTypes",
|
||||
matches:[
|
||||
{ name: "News archive", path:"/News Archive", id: 1234, icon: "icon-list-alt", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "Meta Data", path:"/Seo/Meta Data", id: 1234, icon: "icon-list-alt", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "Dooo", path:"/Woop/dee/dooo", id: 1234, icon: "icon-list-alt red", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
section: "content",
|
||||
tree: "content",
|
||||
matches:[
|
||||
{ name: "News", path:"/archive/news", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "Data types", path:"/Something/About/Data-Types", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "Dooo", path:"/Woop/dee/dooo", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }
|
||||
]
|
||||
},
|
||||
results: m,
|
||||
search: function(term){
|
||||
m.results.length = 0;
|
||||
|
||||
{
|
||||
section: "developer",
|
||||
tree: "macros",
|
||||
matches:[
|
||||
{ name: "Navigation", path:"/Macros/Navigation.xslt", id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "List of stuff", path:"/Macros/Navigation.xslt", id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 },
|
||||
{ name: "Something else", path:"/Macros/Navigation.xslt",id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }
|
||||
]
|
||||
}
|
||||
];
|
||||
var deferred = $q.defer();
|
||||
var i = 0;
|
||||
|
||||
entityResource.search(term, "Document").then(function(data){
|
||||
$log.log(data);
|
||||
|
||||
m.results.push({
|
||||
icon: "icon-document",
|
||||
editor: "content/content/edit/",
|
||||
matches: data
|
||||
});
|
||||
i++;
|
||||
|
||||
//deferred.notify(results);
|
||||
|
||||
|
||||
if(i === 2){
|
||||
deferred.resolve(m);
|
||||
}
|
||||
});
|
||||
|
||||
entityResource.search(term, "Media").then(function(data){
|
||||
$log.log(data);
|
||||
|
||||
m.results.push({
|
||||
icon: "icon-picture",
|
||||
editor: "media/media/edit/",
|
||||
matches: data
|
||||
});
|
||||
i++;
|
||||
|
||||
if(i === 2){
|
||||
deferred.resolve(m);
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
setCurrent: function(sectionAlias){
|
||||
|
||||
@@ -47,7 +47,7 @@ function tinyMceService(dialogService, $log, imageHelper, assetsService, $timeou
|
||||
*/
|
||||
createMediaPicker: function (editor, $scope) {
|
||||
editor.addButton('umbmediapicker', {
|
||||
icon: 'media',
|
||||
icon: 'custom icon-picture',
|
||||
tooltip: 'Media Picker',
|
||||
onclick: function () {
|
||||
dialogService.mediaPicker({
|
||||
@@ -82,38 +82,6 @@ function tinyMceService(dialogService, $log, imageHelper, assetsService, $timeou
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.tinyMceService#createIconPicker
|
||||
* @methodOf umbraco.services.tinyMceService
|
||||
*
|
||||
* @description
|
||||
* Creates the umbrco insert icon tinymce plugin
|
||||
*
|
||||
* @param {Object} editor the TinyMCE editor instance
|
||||
* @param {Object} $scope the current controller scope
|
||||
*/
|
||||
createIconPicker: function (editor, $scope) {
|
||||
editor.addButton('umbiconpicker', {
|
||||
icon: 'media',
|
||||
tooltip: 'Icon Picker',
|
||||
onclick: function () {
|
||||
dialogService.open({
|
||||
show: true, template: "views/common/dialogs/iconpicker.html", scope: $scope, callback: function (c) {
|
||||
|
||||
var data = {
|
||||
style: 'font-size: 60px'
|
||||
};
|
||||
|
||||
var i = editor.dom.createHTML('i', data);
|
||||
tinyMCE.activeEditor.dom.addClass(i, c);
|
||||
editor.insertContent(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.tinyMceService#createUmbracoMacro
|
||||
|
||||
@@ -323,6 +323,9 @@ function iconHelper($q) {
|
||||
{ oldIcon: ".sprTreeUserType", newIcon: "" },
|
||||
*/
|
||||
|
||||
{ oldIcon: "folder.png", newIcon: "icon-folder" },
|
||||
{ oldIcon: "mediaphoto.gif", newIcon: "icon-picture" },
|
||||
{ oldIcon: "mediafile.gif", newIcon: "icon-document" },
|
||||
|
||||
{ oldIcon: ".sprTreeDeveloperCacheItem", newIcon: "icon-box" },
|
||||
{ oldIcon: ".sprTreeDeveloperCacheTypes", newIcon: "icon-box" },
|
||||
|
||||
@@ -22,6 +22,11 @@ label.control-label {
|
||||
padding-top: 8px !important;
|
||||
}
|
||||
|
||||
.umb-status-label{
|
||||
color: @gray !important;
|
||||
}
|
||||
|
||||
|
||||
.controls-row label{padding: 0px 10px 0px 10px; vertical-align: center}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
@@ -37,7 +37,7 @@ iframe, .content-column-body {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* ng-cloak support with requirejs */
|
||||
/* ng-cloak support with lazyloading */
|
||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -54,38 +54,7 @@ div.umb-codeeditor .umb-btn-toolbar {
|
||||
background: #f7f7f7
|
||||
}
|
||||
|
||||
/* FILE UPLOAD*/
|
||||
.umb-fileupload .preview {
|
||||
border-radius: 5px;
|
||||
border: 1px solid #a0a0a0;
|
||||
padding: 3px;
|
||||
background: #efefef;
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
margin-bottom: 30px
|
||||
}
|
||||
.umb-fileupload ul {
|
||||
list-style: none;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 0px
|
||||
}
|
||||
.umb-fileupload label {
|
||||
vertical-align: middle;
|
||||
padding-left: 7px;
|
||||
font-weight: normal
|
||||
}
|
||||
.umb-fileupload .preview-file {
|
||||
color: #666;
|
||||
height: 45px;
|
||||
width: 55px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 10px;
|
||||
padding-top: 27px
|
||||
}
|
||||
.umb-fileupload input {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* MISC FORM ELEMENTS */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
top: 101px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 20px;
|
||||
position: relative;
|
||||
bottom: 0px;
|
||||
position: absolute;
|
||||
clear: both;
|
||||
}
|
||||
.umb-panel-body.no-header {
|
||||
@@ -63,16 +63,7 @@ h1.headline{height: 40px; padding: 30px 0 0 20px;}
|
||||
margin: -2px 0 0 0;
|
||||
}
|
||||
|
||||
.umb-headline-editor-wrapper input{
|
||||
display: none;
|
||||
font-size: @fontSizeMedium
|
||||
}
|
||||
|
||||
.umb-headline-editor-wrapper h1.umb-headline-editor:hover, .umb-headline-editor-wrapper input {
|
||||
border-bottom: 1px dashed @grayLight;
|
||||
}
|
||||
|
||||
.umb-headline-editor-wrapper input:focus {
|
||||
.umb-headline-editor-wrapper input {
|
||||
background: none;
|
||||
border: none;
|
||||
width: auto;
|
||||
|
||||
@@ -198,3 +198,39 @@ ul.color-picker li a {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// File upload
|
||||
// --------------------------------------------------
|
||||
.umb-fileupload .preview {
|
||||
border-radius: 5px;
|
||||
border: 1px solid #a0a0a0;
|
||||
padding: 3px;
|
||||
background: #efefef;
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
margin-bottom: 30px
|
||||
}
|
||||
.umb-fileupload ul {
|
||||
list-style: none;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 0px
|
||||
}
|
||||
.umb-fileupload label {
|
||||
vertical-align: middle;
|
||||
padding-left: 7px;
|
||||
font-weight: normal
|
||||
}
|
||||
.umb-fileupload .preview-file {
|
||||
color: #666;
|
||||
height: 45px;
|
||||
width: 55px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 10px;
|
||||
padding-top: 27px
|
||||
}
|
||||
.umb-fileupload input {
|
||||
font-size: 12px
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
width: auto;
|
||||
display: block
|
||||
}
|
||||
|
||||
.umb-item-list li {
|
||||
display: block;
|
||||
width: auto;
|
||||
@@ -424,30 +423,6 @@ height:1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Search
|
||||
// -------------------------
|
||||
/*
|
||||
.umb-search-field {
|
||||
font-size: 12px;
|
||||
width: 235px;
|
||||
border-radius: 0 !important;
|
||||
border-color: #f5f5f5;
|
||||
padding: 5px 7px !important;
|
||||
background: url(../img/applicationIcons/search.png) no-repeat 225px 8px #fff;
|
||||
margin: 27px 20px 20px 20px;
|
||||
}
|
||||
*/
|
||||
#search-results h5 {
|
||||
margin: 0px 0px 7px 20px;
|
||||
}
|
||||
#search-results ul {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border-bottom: 1px solid #efefef
|
||||
}
|
||||
|
||||
body.touch .umb-tree .icon{font-size: 17px;}
|
||||
body.touch .umb-tree ins{font-size: 14px; visibility: visible; padding: 7px;}
|
||||
body.touch .umb-tree li div {
|
||||
|
||||
@@ -8,7 +8,6 @@ angular.module("umbraco").controller("Umbraco.Dialogs.ContentPickerController",
|
||||
args.event.preventDefault();
|
||||
args.event.stopPropagation();
|
||||
|
||||
|
||||
eventsService.publish("Umbraco.Dialogs.ContentPickerController.Select", args).then(function(args){
|
||||
if(dialogOptions && dialogOptions.multipicker){
|
||||
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<div class="umb-panel" ng-controller="Umbraco.Dialogs.ContentPickerController">
|
||||
<div class="umb-panel-header">
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar">
|
||||
<input type="button" ng-click="submit(dialogData)" class="btn btn-primary" value="select" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-panel-body umb-scrollable" auto-scale="1">
|
||||
<div class="umb-panel-body no-header">
|
||||
<div class="tab-content umb-control-group">
|
||||
<div class="umb-pane">
|
||||
<umb-tree
|
||||
@@ -20,4 +12,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-panel-footer" ng-show="multipicker">
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar">
|
||||
<input type="button" ng-click="submit(dialogData)" class="btn btn-primary" value="select" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,7 +42,7 @@ data-file-upload="options" data-file-upload-progress="" data-ng-class="{'fileupl
|
||||
ng-show="showFolderInput"
|
||||
ng-model="newFolderName"
|
||||
ng-keyup="submitFolder($event)"
|
||||
ng-blur="showFolderInput = false">
|
||||
on-blur="showFolderInput = false">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<div class="umb-panel" ng-controller="Umbraco.Dialogs.TreePickerController">
|
||||
<div class="umb-panel-header">
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar">
|
||||
<input type="button" ng-click="submit(dialogData)" class="btn btn-primary" value="select" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-panel-body umb-scrollable">
|
||||
<div class="umb-panel-body no-header umb-scrollable">
|
||||
<div class="tab-content umb-control-group">
|
||||
<div class="umb-pane">
|
||||
<umb-tree
|
||||
@@ -21,4 +13,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-panel-footer" ng-show="multipicker">
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
||||
<input type="button" ng-click="submit(dialogData)" class="btn btn-primary" value="select" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -8,21 +8,21 @@
|
||||
*
|
||||
*/
|
||||
function SearchController($scope, searchService, $log, navigationService) {
|
||||
|
||||
|
||||
var currentTerm = "";
|
||||
navigationService.ui.search = searchService.results;
|
||||
|
||||
$scope.deActivateSearch = function () {
|
||||
currentTerm = "";
|
||||
};
|
||||
|
||||
$scope.performSearch = function (term) {
|
||||
if (term != undefined && term != currentTerm) {
|
||||
if (term.length > 3) {
|
||||
navigationService.ui.selectedSearchResult = -1;
|
||||
navigationService.showSearch();
|
||||
currentTerm = term;
|
||||
navigationService.ui.searchResults = searchService.search(term, navigationService.currentSection);
|
||||
} else {
|
||||
navigationService.ui.searchResults = [];
|
||||
}
|
||||
searchService.search(term);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for the content editor
|
||||
*/
|
||||
function ContentEditController($scope, $routeParams, contentResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) {
|
||||
function ContentEditController($scope, $routeParams, $q, $timeout, $window, contentResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) {
|
||||
|
||||
//initialize the file manager
|
||||
fileManager.clearFiles();
|
||||
@@ -39,6 +39,8 @@ function ContentEditController($scope, $routeParams, contentResource, notificati
|
||||
//TODO: Need to figure out a way to share the saving and event broadcasting with all editors!
|
||||
|
||||
$scope.saveAndPublish = function () {
|
||||
|
||||
$scope.setStatus("Publishing...");
|
||||
$scope.$broadcast("saving", { scope: $scope });
|
||||
|
||||
var currentForm = angularHelper.getRequiredCurrentForm($scope);
|
||||
@@ -68,7 +70,28 @@ function ContentEditController($scope, $routeParams, contentResource, notificati
|
||||
});
|
||||
};
|
||||
|
||||
$scope.preview = function(content){
|
||||
if(!content.id){
|
||||
$scope.save().then(function(data){
|
||||
$window.open('dialogs/preview.aspx?id='+data.id,'umbpreview');
|
||||
});
|
||||
}else{
|
||||
$window.open('dialogs/preview.aspx?id='+content.id,'umbpreview');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.setStatus = function(status){
|
||||
//add localization
|
||||
$scope.status = status;
|
||||
$timeout(function(){
|
||||
$scope.status = undefined;
|
||||
}, 2500);
|
||||
};
|
||||
|
||||
$scope.save = function () {
|
||||
var deferred = $q.defer();
|
||||
|
||||
$scope.setStatus("Saving...");
|
||||
$scope.$broadcast("saving", { scope: $scope });
|
||||
|
||||
var currentForm = angularHelper.getRequiredCurrentForm($scope);
|
||||
@@ -86,6 +109,8 @@ function ContentEditController($scope, $routeParams, contentResource, notificati
|
||||
newContent: data,
|
||||
rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data)
|
||||
});
|
||||
|
||||
deferred.resolve(data);
|
||||
|
||||
}, function (err) {
|
||||
contentEditingHelper.handleSaveError({
|
||||
@@ -93,7 +118,11 @@ function ContentEditController($scope, $routeParams, contentResource, notificati
|
||||
allNewProps: contentEditingHelper.getAllProps(err.data),
|
||||
allOrigProps: contentEditingHelper.getAllProps($scope.content)
|
||||
});
|
||||
|
||||
deferred.reject(err);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!--
|
||||
<li class="add">
|
||||
<a href="#settings/documenttype/create/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="nav.hideNavigation()">
|
||||
<i class="large icon-add"></i>
|
||||
@@ -28,7 +28,7 @@
|
||||
</small>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
ng-show="loaded"
|
||||
ng-submit="save()">
|
||||
<umb-panel val-show-validation>
|
||||
|
||||
<umb-header tabs="content.tabs">
|
||||
|
||||
<div class="span4">
|
||||
@@ -13,13 +12,18 @@
|
||||
</div>
|
||||
|
||||
<div class="span8">
|
||||
|
||||
<div class="btn-toolbar pull-right umb-btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<a class="btn" ng-click="preview(content)">Preview page</a>
|
||||
data-hotkey="ctrl+s">Preview page</a>
|
||||
<div class="btn-group" ng-animate="'fade'" ng-show="status">
|
||||
<p class="btn btn-link umb-status-label">{{status}}</p>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a class="btn" ng-click="preview(content)">Preview page</a>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
<a class="btn btn-success" href="#" ng-click="saveAndPublish()"
|
||||
prevent-default data-hotkey="ctrl+p">Publish</a>
|
||||
|
||||
@@ -38,7 +42,6 @@
|
||||
|
||||
<umb-tab-view>
|
||||
<umb-tab id="tab{{tab.id}}" rel="{{tab.id}}" ng-repeat="tab in content.tabs">
|
||||
|
||||
<div class="umb-pane">
|
||||
<umb-property
|
||||
property="property"
|
||||
@@ -47,7 +50,6 @@
|
||||
<umb-editor model="property"></umb-editor>
|
||||
</umb-property>
|
||||
</div>
|
||||
|
||||
</umb-tab>
|
||||
</umb-tab-view>
|
||||
|
||||
|
||||
@@ -16,19 +16,66 @@ function startUpVideosDashboardController($scope, xmlhelper, $log, $http) {
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Dashboard.StartupVideosController", startUpVideosDashboardController);
|
||||
|
||||
function startupLatestEditsController($scope) {
|
||||
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Dashboard.StartupLatestEditsController", startupLatestEditsController);
|
||||
|
||||
function MediaFolderBrowserDashboardController($scope, xmlhelper, $log, userResource) {
|
||||
//this is the model we will pass to the service
|
||||
$scope.profile = {};
|
||||
function MediaFolderBrowserDashboardController($rootScope, $scope, assetsService, $routeParams, $timeout, $element, $location, umbRequestHelper, mediaResource, imageHelper) {
|
||||
var dialogOptions = $scope.$parent.dialogOptions;
|
||||
|
||||
$scope.changePassword = function (p) {
|
||||
userResource.changePassword(p.oldPassword, p.newPassword).then(function () {
|
||||
$scope.passwordForm.$setValidity(true);
|
||||
}, function () {
|
||||
//this only happens if there is a wrong oldPassword sent along
|
||||
$scope.passwordForm.oldpass.$setValidity("oldPassword", false);
|
||||
$scope.filesUploading = [];
|
||||
$scope.options = {
|
||||
url: umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostAddFile"),
|
||||
autoUpload: true,
|
||||
disableImageResize: /Android(?!.*Chrome)|Opera/
|
||||
.test(window.navigator.userAgent),
|
||||
previewMaxWidth: 200,
|
||||
previewMaxHeight: 200,
|
||||
previewCrop: true,
|
||||
formData:{
|
||||
currentFolder: -1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$scope.loadChildren = function(){
|
||||
mediaResource.getChildren(-1)
|
||||
.then(function(data) {
|
||||
$scope.images = data.items;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('fileuploadstop', function(event, files){
|
||||
$scope.loadChildren($scope.options.formData.currentFolder);
|
||||
$scope.queue = [];
|
||||
$scope.filesUploading = [];
|
||||
});
|
||||
}
|
||||
|
||||
$scope.$on('fileuploadprocessalways', function(e,data) {
|
||||
var i;
|
||||
$scope.$apply(function() {
|
||||
$scope.filesUploading.push(data.files[data.index]);
|
||||
});
|
||||
});
|
||||
|
||||
// All these sit-ups are to add dropzone area and make sure it gets removed if dragging is aborted!
|
||||
$scope.$on('fileuploaddragover', function(event, files) {
|
||||
if (!$scope.dragClearTimeout) {
|
||||
$scope.$apply(function() {
|
||||
$scope.dropping = true;
|
||||
});
|
||||
} else {
|
||||
$timeout.cancel($scope.dragClearTimeout);
|
||||
}
|
||||
$scope.dragClearTimeout = $timeout(function () {
|
||||
$scope.dropping = null;
|
||||
$scope.dragClearTimeout = null;
|
||||
}, 300);
|
||||
});
|
||||
|
||||
//init load
|
||||
$scope.loadChildren();
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Dashboard.MediaFolderBrowserDashboardController", MediaFolderBrowserDashboardController);
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<div class="" ng-controller="Umbraco.Dashboard.MediaFolderBrowserDashboardController">
|
||||
|
||||
</div>
|
||||
<form ng-controller="Umbraco.Dashboard.MediaFolderBrowserDashboardController" id="fileupload"
|
||||
style="width: 100%"
|
||||
method="POST" enctype="multipart/form-data"
|
||||
class="umb-editor umb-folderbrowser"
|
||||
data-file-upload="options"
|
||||
data-file-upload-progress=""
|
||||
data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
|
||||
|
||||
<umb-upload-dropzone dropping="dropping" files="filesUploading">
|
||||
</umb-upload-dropzone>
|
||||
|
||||
<umb-photo-folder
|
||||
min-height="220"
|
||||
min-width="220"
|
||||
on-click="clickHandler"
|
||||
ng-model="images"
|
||||
/>
|
||||
</form>
|
||||
@@ -2,8 +2,15 @@
|
||||
|
||||
<ng-form name="contentNameForm">
|
||||
|
||||
<h1>{{model}}</h1>
|
||||
<input name="name" type="text" placeholder="{{placeholder}}" ng-model="model"
|
||||
<h1 ng-click="goEdit()" ng-hide="editMode">{{model}}</h1>
|
||||
|
||||
<input
|
||||
on-blur="exitEdit()"
|
||||
ng-show="editMode"
|
||||
name="name"
|
||||
type="text"
|
||||
placeholder="{{placeholder}}"
|
||||
ng-model="model"
|
||||
required
|
||||
val-server-field="Name" />
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<input type="text"
|
||||
ng-model="nav.ui.searchTerm"
|
||||
class="umb-search-field search-query"
|
||||
placeholder="{{localization.app.search.typeToSearch}}"
|
||||
placeholder="Type to search..."
|
||||
on-blur="deActivateSearch()"
|
||||
on-keyup="performSearch(nav.ui.searchTerm)">
|
||||
</form>
|
||||
@@ -54,18 +54,28 @@
|
||||
<div id="search-results" class="umb-modalcolumn-body"
|
||||
ng-show="nav.ui.showSearchResults">
|
||||
|
||||
<h5 class="umb-tree-header">Search results</h5>
|
||||
<ul class="umb-item-list" ng-repeat="resultGroup in nav.ui.searchResults">
|
||||
<li class="umb-icon-item" ng-class="{selected:$index==nav.ui.selectedSearchResult}" ng-repeat="result in resultGroup.matches">
|
||||
<i class="icon umb-tree-icon sprTree {{result.icon}}" ng-show="$first"></i>
|
||||
<a ng-href="#{{result.view}}">{{result.name}}
|
||||
<small>{{result.path}}</small>
|
||||
</a>
|
||||
<ul class="umb-tree">
|
||||
<li class="root">
|
||||
<div>
|
||||
<h5>Search results</h5>
|
||||
</div>
|
||||
|
||||
<ul class="umb-search-group" ng-repeat="resultGroup in nav.ui.search.results">
|
||||
<li ng-repeat="result in resultGroup.matches">
|
||||
<div style="padding-left: 20px">
|
||||
<a ng-class="{'first':$first}" ng-href="#/{{resultGroup.editor}}{{result.id}}">
|
||||
<i
|
||||
class="icon umb-tree-icon sprTree {{resultGroup.icon}}"></i>
|
||||
{{result.name}}
|
||||
</a>
|
||||
|
||||
<a href class="umb-options"><i></i><i></i><i></i></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<i class="umb-options" ng-click="nav.showMenu(result, $event)"><i></i><i></i><i></i></i>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="umb-panel-body umb-scrollable row-fluid" auto-scale="1">
|
||||
<div class="umb-panel-body umb-scrollable row-fluid">
|
||||
<div class="tab-content form-horizontal" ng-transclude>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="umb-dialog" ng-controller="Umbraco.Editors.Media.CreateController">
|
||||
<div class="umb-dialog umb-pane" ng-controller="Umbraco.Editors.Media.CreateController">
|
||||
<div class="umb-dialog-body" auto-scale="90">
|
||||
<p class="umb-abstract">Create a page under {{currentNode.name}}</p>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!--
|
||||
<li class="add">
|
||||
<a href="#settings/documenttype/create/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="nav.hideNavigation()">
|
||||
<i class="icon-large icon-plus"></i>
|
||||
@@ -28,7 +28,7 @@
|
||||
</small>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -11,11 +11,12 @@
|
||||
|
||||
<div class="span8">
|
||||
<div class="btn-toolbar pull-right umb-btn-toolbar">
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
<button type="submit" class="btn btn-success">Save</button>
|
||||
<div class="btn-group" ng-animate="'fade'" ng-show="status">
|
||||
<p class="btn btn-link umb-status-label">{{status}}</p>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="submit" data-hotkey="ctrl+s" class="btn btn-success">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
function mediaCreateController($scope, $routeParams, mediaTypeResource, iconHelper) {
|
||||
|
||||
mediaTypeResource.getAllowedTypes($scope.currentNode.id).then(function(data) {
|
||||
$scope.allowedTypes = iconHelper.formatContentTypeThumbnails(data);
|
||||
$scope.allowedTypes = iconHelper.formatContentTypeIcons(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for the media editor
|
||||
*/
|
||||
function mediaEditController($scope, $routeParams, mediaResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) {
|
||||
function mediaEditController($scope, $routeParams, mediaResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService, $timeout) {
|
||||
|
||||
//initialize the file manager
|
||||
fileManager.clearFiles();
|
||||
@@ -37,9 +37,19 @@ function mediaEditController($scope, $routeParams, mediaResource, notificationsS
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$scope.setStatus = function(status){
|
||||
//add localization
|
||||
$scope.status = status;
|
||||
$timeout(function(){
|
||||
$scope.status = undefined;
|
||||
}, 2500);
|
||||
};
|
||||
|
||||
$scope.save = function () {
|
||||
|
||||
$scope.setStatus("Saving...");
|
||||
|
||||
$scope.$broadcast("saving", { scope: $scope });
|
||||
|
||||
var currentForm = angularHelper.getRequiredCurrentForm($scope);
|
||||
|
||||
@@ -81,9 +81,6 @@ angular.module("umbraco")
|
||||
//Create the insert media plugin
|
||||
tinyMceService.createMediaPicker(editor, $scope);
|
||||
|
||||
//Create the insert icon plugin
|
||||
tinyMceService.createIconPicker(editor, $scope);
|
||||
|
||||
//Create the insert icon plugin
|
||||
tinyMceService.createInsertEmbeddedMedia(editor, $scope);
|
||||
|
||||
|
||||
57
src/Umbraco.Web.UI/MacroScripts/Web.config
Normal file
57
src/Umbraco.Web.UI/MacroScripts/Web.config
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines"/>
|
||||
<pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
|
||||
<namespaces>
|
||||
<add namespace="Microsoft.Web.Helpers" />
|
||||
<add namespace="umbraco" />
|
||||
<add namespace="Examine" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dashBoard>
|
||||
|
||||
<section alias="StartupSettingsDashboardSection">
|
||||
<areas>
|
||||
<area>settings</area>
|
||||
@@ -26,7 +27,11 @@
|
||||
views/dashboard/developer/developerdashboardvideos.html
|
||||
</control>
|
||||
</tab>
|
||||
<tab caption="Examine Management">
|
||||
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupMediaDashboardSection">
|
||||
<areas>
|
||||
<area>media</area>
|
||||
@@ -51,6 +56,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupDashboardSection">
|
||||
<access>
|
||||
<deny>translator</deny>
|
||||
@@ -63,17 +69,17 @@
|
||||
<grant>admin</grant>
|
||||
</access>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardintro.html
|
||||
views/dashboard/default/startupdashboardintro.html
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardkits.html
|
||||
views/dashboard/default/startupdashboardkits.html
|
||||
<access>
|
||||
<deny>editor</deny>
|
||||
<deny>writer</deny>
|
||||
</access>
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardvideos.html
|
||||
views/dashboard/default/startupdashboardvideos.html
|
||||
</control>
|
||||
</tab>
|
||||
<tab caption="Last Edits">
|
||||
@@ -85,6 +91,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupMemberDashboardSection">
|
||||
<areas>
|
||||
<area>member</area>
|
||||
@@ -101,13 +108,4 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="ExamineManagement">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
</areas>
|
||||
<tab caption="Examine Management">
|
||||
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
</dashBoard>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dashBoard>
|
||||
|
||||
<section alias="StartupSettingsDashboardSection">
|
||||
<areas>
|
||||
<area>settings</area>
|
||||
@@ -13,7 +14,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
|
||||
<section alias="StartupDeveloperDashboardSection">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
@@ -26,7 +27,11 @@
|
||||
views/dashboard/developer/developerdashboardvideos.html
|
||||
</control>
|
||||
</tab>
|
||||
<tab caption="Examine Management">
|
||||
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupMediaDashboardSection">
|
||||
<areas>
|
||||
<area>media</area>
|
||||
@@ -51,6 +56,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupDashboardSection">
|
||||
<access>
|
||||
<deny>translator</deny>
|
||||
@@ -63,13 +69,17 @@
|
||||
<grant>admin</grant>
|
||||
</access>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardintro.html
|
||||
views/dashboard/default/startupdashboardintro.html
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardkits.html
|
||||
<access><deny>editor</deny><deny>writer</deny></access></control>
|
||||
views/dashboard/default/startupdashboardkits.html
|
||||
<access>
|
||||
<deny>editor</deny>
|
||||
<deny>writer</deny>
|
||||
</access>
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
views/dashboard/startupdashboardvideos.html
|
||||
views/dashboard/default/startupdashboardvideos.html
|
||||
</control>
|
||||
</tab>
|
||||
<tab caption="Last Edits">
|
||||
@@ -81,6 +91,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="StartupMemberDashboardSection">
|
||||
<areas>
|
||||
<area>member</area>
|
||||
@@ -97,17 +108,4 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="ExamineManagement">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
</areas>
|
||||
<tab caption="Examine Management">
|
||||
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> d689ad488c8ef902054b47389a65412edf59c4e7
|
||||
</dashBoard>
|
||||
@@ -3,49 +3,49 @@
|
||||
|
||||
<!--Content-->
|
||||
<add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTreeController, umbraco" action="" />
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="folder.gif" iconOpen="folder_o.gif" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco" action="" />
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco" action="" />
|
||||
|
||||
<!--Media-->
|
||||
<add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTreeController, umbraco" />
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="folder.gif" iconOpen="folder_o.gif" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
|
||||
|
||||
<!--Settings-->
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
|
||||
<add application="settings" alias="templates" title="Templates" type="umbraco.loadTemplates, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="Umbraco.Web.Trees.PartialViewsTree, umbraco" sortOrder="2" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="umbraco.loadScripts, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="3" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" action="openDictionary()" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" type="umbraco.loadLanguages, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="5" />
|
||||
<add application="settings" alias="mediaTypes" title="Media Types" type="umbraco.loadMediaTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="6" />
|
||||
<add application="settings" alias="nodeTypes" title="Document Types" type="umbraco.loadNodeTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="7" />
|
||||
<add application="settings" alias="templates" title="Templates" type="umbraco.loadTemplates, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTree, umbraco" sortOrder="2" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="umbraco.loadScripts, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" action="openDictionary()" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" type="umbraco.loadLanguages, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
|
||||
<add application="settings" alias="mediaTypes" title="Media Types" type="umbraco.loadMediaTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add application="settings" alias="nodeTypes" title="Document Types" type="umbraco.loadNodeTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="7" />
|
||||
|
||||
<!--Developer-->
|
||||
<add initialize="true" sortOrder="0" alias="datatype" application="developer" title="Data Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco" />
|
||||
<add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="developer" alias="packager" title="Packages" type="umbraco.loadPackager, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" sortOrder="3" />
|
||||
<add application="developer" alias="packagerPackages" title="Packager Packages" type="umbraco.loadPackages, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" initialize="false" sortOrder="3" />
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="4" />
|
||||
<add application="developer" alias="python" title="Scripting Files" type="umbraco.loadPython, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" sortOrder="4" />
|
||||
<add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="5" />
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" />
|
||||
<add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
<add application="developer" alias="packager" title="Packages" type="umbraco.loadPackager, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
|
||||
<add application="developer" alias="packagerPackages" title="Packager Packages" type="umbraco.loadPackages, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" initialize="false" sortOrder="3" />
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="developer" alias="python" title="Scripting Files" type="umbraco.loadPython, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder" />
|
||||
|
||||
<!--Users-->
|
||||
<add application="users" alias="users" title="Users" type="umbraco.loadUsers, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="users" alias="userTypes" title="User Types" type="umbraco.cms.presentation.Trees.UserTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="users" alias="userPermissions" title="User Permissions" type="umbraco.cms.presentation.Trees.UserPermissions, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="users" alias="users" title="Users" type="umbraco.loadUsers, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="users" alias="userTypes" title="User Types" type="umbraco.cms.presentation.Trees.UserTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="users" alias="userPermissions" title="User Permissions" type="umbraco.cms.presentation.Trees.UserPermissions, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
|
||||
<!--Members-->
|
||||
<add application="member" alias="member" title="Members" type="umbraco.loadMembers, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="member" alias="memberGroup" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="member" alias="memberType" title="Member Types" type="umbraco.loadMemberTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="member" alias="member" title="Members" type="umbraco.loadMembers, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="member" alias="memberGroup" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="member" alias="memberType" title="Member Types" type="umbraco.loadMemberTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
|
||||
<!--Translation-->
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="umbraco.loadOpenTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="umbraco.loadYourTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco" action="" />
|
||||
|
||||
<!-- Custom -->
|
||||
<!--<add application="myApplication" alias="myTree" title="Me Tree" type="MyNamespace.myTree, MyAssembly"
|
||||
iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="10" />-->
|
||||
iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />-->
|
||||
|
||||
</trees>
|
||||
@@ -1,42 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<trees>
|
||||
|
||||
<!--Content-->
|
||||
<add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTreeController,umbraco" />
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="folder.gif" iconOpen="folder_o.gif" type="umbraco.cms.presentation.Trees.ContentRecycleBin,umbraco" action="" />
|
||||
<add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.ContentTreeController, umbraco" action="" />
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco" action="" />
|
||||
|
||||
<!--Media-->
|
||||
<add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTreeController,umbraco" />
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="folder.gif" iconOpen="folder_o.gif" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
|
||||
<add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.MediaTreeController, umbraco" />
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
|
||||
|
||||
<!--Settings-->
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets,umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
|
||||
<add application="settings" alias="templates" title="Templates" type="umbraco.loadTemplates, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="Umbraco.Web.Trees.PartialViewsTree, umbraco" sortOrder="2" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="umbraco.loadScripts, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="3" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" action="openDictionary()" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" type="umbraco.loadLanguages, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="5" />
|
||||
<add application="settings" alias="mediaTypes" title="Media Types" type="umbraco.loadMediaTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="6" />
|
||||
<add application="settings" alias="nodeTypes" title="Document Types" type="umbraco.loadNodeTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="7" />
|
||||
<add application="settings" alias="templates" title="Templates" type="umbraco.loadTemplates, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTree, umbraco" sortOrder="2" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="umbraco.loadScripts, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" action="openDictionary()" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" type="umbraco.loadLanguages, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
|
||||
<add application="settings" alias="mediaTypes" title="Media Types" type="umbraco.loadMediaTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add application="settings" alias="nodeTypes" title="Document Types" type="umbraco.loadNodeTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="7" />
|
||||
|
||||
<!--Developer-->
|
||||
<add initialize="true" sortOrder="0" alias="datatype" application="developer" title="Data Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco" />
|
||||
<add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="developer" alias="packager" title="Packages" type="umbraco.loadPackager, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" sortOrder="3" />
|
||||
<add application="developer" alias="packagerPackages" title="Packager Packages" type="umbraco.loadPackages, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" initialize="false" sortOrder="3" />
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="4" />
|
||||
<add application="developer" alias="python" title="Scripting Files" type="umbraco.loadPython, umbraco" iconClosed="folder.gif" iconOpen="folder_o.gif" sortOrder="4" />
|
||||
<add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="5" />
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" />
|
||||
<add initialize="true" sortOrder="0" alias="datatype" application="developer" title="Data Types" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco" />
|
||||
<add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
<add application="developer" alias="packager" title="Packages" type="umbraco.loadPackager, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
|
||||
<add application="developer" alias="packagerPackages" title="Packager Packages" type="umbraco.loadPackages, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" initialize="false" sortOrder="3" />
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="developer" alias="python" title="Scripting Files" type="umbraco.loadPython, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder" />
|
||||
|
||||
<!--Users-->
|
||||
<add application="users" alias="users" title="Users" type="umbraco.loadUsers, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="users" alias="userTypes" title="User Types" type="umbraco.cms.presentation.Trees.UserTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="users" alias="userPermissions" title="User Permissions" type="umbraco.cms.presentation.Trees.UserPermissions, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="users" alias="users" title="Users" type="umbraco.loadUsers, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="users" alias="userTypes" title="User Types" type="umbraco.cms.presentation.Trees.UserTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="users" alias="userPermissions" title="User Permissions" type="umbraco.cms.presentation.Trees.UserPermissions, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
|
||||
<!--Members-->
|
||||
<add application="member" alias="member" title="Members" type="umbraco.loadMembers, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="0" />
|
||||
<add application="member" alias="memberGroup" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="1" />
|
||||
<add application="member" alias="memberType" title="Member Types" type="umbraco.loadMemberTypes, umbraco" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="2" />
|
||||
<add application="member" alias="member" title="Members" type="umbraco.loadMembers, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="member" alias="memberGroup" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="1" />
|
||||
<add application="member" alias="memberType" title="Member Types" type="umbraco.loadMemberTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
|
||||
|
||||
<!--Translation-->
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="umbraco.loadOpenTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" type="umbraco.loadYourTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, umbraco" action="" />
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco" action="" />
|
||||
|
||||
<!-- Custom -->
|
||||
<!--<add application="myApplication" alias="myTree" title="Me Tree" type="MyNamespace.myTree, MyAssembly"
|
||||
iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" sortOrder="10" />-->
|
||||
iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />-->
|
||||
|
||||
</trees>
|
||||
@@ -1,24 +1,30 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="nodeType.ascx.cs" Inherits="umbraco.cms.presentation.create.controls.nodeType" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
|
||||
<p style="margin: 4px 0;">Master Document Type:<br />
|
||||
<asp:ListBox id="masterType" Runat="server" cssClass="bigInput" Rows="1" SelectionMode="Single"></asp:ListBox>
|
||||
<asp:Literal ID="masterTypePreDefined" runat="server" Visible="false"></asp:Literal>
|
||||
</p>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<div style="MARGIN-TOP: 0px"><%=umbraco.ui.Text("name")%>:
|
||||
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator><br />
|
||||
<asp:TextBox id="rename" Runat="server" Width="350" CssClass="bigInput"></asp:TextBox>
|
||||
</div>
|
||||
<cc1:Pane runat="server">
|
||||
<cc1:PropertyPanel runat="server" text="Master Document Type">
|
||||
<asp:ListBox id="masterType" Runat="server" cssClass="bigInput input-large-type input-block-level" Rows="1" SelectionMode="Single"></asp:ListBox>
|
||||
<asp:Literal ID="masterTypePreDefined" runat="server" Visible="false"></asp:Literal>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" id="pp_name" text="Name">
|
||||
<asp:TextBox id="rename" Runat="server" CssClass="bigInput input-large-type input-block-level"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<div style="margin-top: 0px; margin-left: -3px; margin-bottom: 0;">
|
||||
<asp:CheckBox ID="createTemplate" Runat="server" Checked="true" Text="Create matching template"></asp:CheckBox>
|
||||
</div>
|
||||
<cc1:PropertyPanel runat="server">
|
||||
<asp:CheckBox ID="createTemplate" Runat="server" Checked="true" Text="Create matching template"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<asp:TextBox runat="server" style="visibility:hidden;display:none;" ID="Textbox1"/>
|
||||
|
||||
<div style="margin-top: 10px;">
|
||||
<asp:CustomValidator ID="CustomValidation1" ErrorMessage="* A document type with this name/alias already exists" OnServerValidate="validationDoctypeName" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:CustomValidator ID="CustomValidation2" ErrorMessage="<br/>* The name of the document type will result in an invalid alias" OnServerValidate="validationDoctypeAlias" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:Button id="sbmt" Runat="server" style="MARGIN-TOP: 14px" Width="90" onclick="sbmt_Click"></asp:Button>
|
||||
<em> or </em>
|
||||
<a href="#" style="color: Blue; margin-left: 6px;" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
</div>
|
||||
<asp:TextBox runat="server" style="visibility:hidden;display:none;" ID="Textbox1"/>
|
||||
|
||||
|
||||
<asp:CustomValidator ID="CustomValidation1" ErrorMessage="* A document type with this name/alias already exists" OnServerValidate="validationDoctypeName" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:CustomValidator ID="CustomValidation2" ErrorMessage="<br/>* The name of the document type will result in an invalid alias" OnServerValidate="validationDoctypeAlias" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane runat="server" CssClass="btn-toolbar umb-btn-toolbar">
|
||||
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
<asp:Button id="sbmt" Runat="server" CssClass="btn btn-primary" onclick="sbmt_Click"></asp:Button>
|
||||
</cc1:Pane>
|
||||
@@ -1,14 +1,11 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="LatestEdits.ascx.cs" Inherits="dashboardUtilities.LatestEdits" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
|
||||
<umb:CssInclude runat="server" FilePath="propertypane/style.css" PathNameAlias="UmbracoClient" />
|
||||
|
||||
<div class="dashboardWrapper">
|
||||
<h2><%=umbraco.ui.Text("defaultdialogs", "lastEdited")%></h2>
|
||||
<img src="./dashboard/images/logo32x32.png" alt="Umbraco" class="dashboardIcon" />
|
||||
<asp:Repeater id="Repeater1" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# PrintNodeName(DataBinder.Eval(Container.DataItem, "NodeId"), DataBinder.Eval(Container.DataItem, "datestamp")) %>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<h3><%=umbraco.ui.Text("defaultdialogs", "lastEdited")%></h3>
|
||||
<ul class="nav nav-stacked">
|
||||
<asp:Repeater id="Repeater1" runat="server">
|
||||
<ItemTemplate>
|
||||
<li><%# PrintNodeName(DataBinder.Eval(Container.DataItem, "NodeId"), DataBinder.Eval(Container.DataItem, "datestamp")) %></li>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</ul>
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
<%@ Page language="c#" MasterPageFile="../masterpages/umbracoPage.Master" Codebehind="EditMemberType.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.members.EditMemberType" %>
|
||||
<%@ Page Async="true" language="c#" MasterPageFile="../masterpages/umbracoPage.Master" Codebehind="EditMemberType.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.members.EditMemberType" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<%@ Page Language="c#" CodeBehind="EditMediaType.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master"
|
||||
Async="true" AsyncTimeOut="300"
|
||||
AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.EditMediaType" %>
|
||||
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
|
||||
@@ -130,15 +130,16 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
}
|
||||
|
||||
this._debug("contentFrame: parsed location: " + strLocation);
|
||||
var self = this;
|
||||
window.setTimeout(function() {
|
||||
if (typeof self.mainWindow().right != "undefined") {
|
||||
self.mainWindow().right.location.href = strLocation;
|
||||
}
|
||||
else {
|
||||
self.mainWindow().location.href = strLocation; //set the current windows location if the right frame doesn't exist int he current context
|
||||
}
|
||||
}, 200);
|
||||
|
||||
if (!this.mainWindow().UmbClientMgr) {
|
||||
window.setTimeout(function() {
|
||||
var self = this;
|
||||
self.mainWindow().location.href = strLocation;
|
||||
}, 200);
|
||||
}
|
||||
else {
|
||||
this.mainWindow().UmbClientMgr.contentFrame(strLocation);
|
||||
}
|
||||
}
|
||||
},
|
||||
reloadContentFrameUrlIfPathLoaded: function (url) {
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
</appSettings>
|
||||
|
||||
<system.web>
|
||||
<xhtmlConformance xdt:Transform="Remove"/>
|
||||
<membership defaultProvider="UmbracoMembershipProvider">
|
||||
<providers>
|
||||
<add name="UmbracoMembershipProvider" defaultMemberTypeAlias="Member"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
|
||||
<add key="umbracoPath" value="~/umbraco" />
|
||||
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
|
||||
<add key="umbracoUseDirectoryUrls" value="false" />
|
||||
<add key="umbracoUseDirectoryUrls" value="true" />
|
||||
<add key="umbracoTimeOutInMinutes" value="20" />
|
||||
<add key="umbracoDefaultUILanguage" value="en" />
|
||||
<add key="umbracoUseSSL" value="false" />
|
||||
@@ -75,8 +75,7 @@
|
||||
|
||||
<system.web>
|
||||
<customErrors mode="RemoteOnly" />
|
||||
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
||||
<xhtmlConformance mode="Strict" />
|
||||
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
||||
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" />
|
||||
<!--
|
||||
If you are deploying to a cloud environment that has multiple web server instances,
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace Umbraco.Web.Editors
|
||||
{"entityApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<EntityController>("GetById")},
|
||||
{"dataTypeApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<DataTypeController>("GetById")},
|
||||
{"dashboardApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<DashboardController>("GetDashboard")},
|
||||
{"logApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<LogController>("GetEntityLog")}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -32,9 +32,13 @@ namespace Umbraco.Web.Editors
|
||||
/// </remarks>
|
||||
[PluginController("UmbracoApi")]
|
||||
public class EntityController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
{
|
||||
[HttpGet]
|
||||
public IEnumerable<EntityBasic> Search([FromUri] string query, UmbracoEntityTypes type)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query))
|
||||
return null;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case UmbracoEntityTypes.Document:
|
||||
|
||||
47
src/Umbraco.Web/Editors/LogController.cs
Normal file
47
src/Umbraco.Web/Editors/LogController.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using umbraco.BusinessLogic;
|
||||
using Umbraco.Web.Mvc;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// The API controller used for getting log history
|
||||
/// </summary>
|
||||
[PluginController("UmbracoApi")]
|
||||
public class LogController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
public IEnumerable<AuditLog> GetEntityLog(int id)
|
||||
{
|
||||
return Mapper.Map<IEnumerable<AuditLog>>(
|
||||
Log.Instance.GetLogItems(id));
|
||||
}
|
||||
|
||||
public IEnumerable<AuditLog> GetCurrentUserLog(AuditLogType logType, DateTime? sinceDate)
|
||||
{
|
||||
if (sinceDate == null)
|
||||
sinceDate = DateTime.Now.Subtract(new TimeSpan(7, 0, 0, 0, 0));
|
||||
|
||||
var u = new User(Security.CurrentUser);
|
||||
return Mapper.Map<IEnumerable<AuditLog>>(
|
||||
Log.Instance.GetLogItems(u, Enum<LogTypes>.Parse(logType.ToString()), sinceDate.Value));
|
||||
}
|
||||
|
||||
public IEnumerable<AuditLog> GetLog(AuditLogType logType, DateTime? sinceDate)
|
||||
{
|
||||
if (sinceDate == null)
|
||||
sinceDate = DateTime.Now.Subtract(new TimeSpan(7, 0, 0, 0, 0));
|
||||
|
||||
return Mapper.Map<IEnumerable<AuditLog>>(
|
||||
Log.Instance.GetLogItems(Enum<LogTypes>.Parse(logType.ToString()), sinceDate.Value));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ using Umbraco.Web.WebApi.Filters;
|
||||
using umbraco;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
using Umbraco.Core.Configuration;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
{
|
||||
@@ -347,16 +348,24 @@ namespace Umbraco.Web.Editors
|
||||
foreach (var file in result.FileData)
|
||||
{
|
||||
var fileName = file.Headers.ContentDisposition.FileName.Trim(new[] { '\"' });
|
||||
var ext = fileName.Substring(fileName.LastIndexOf('.')+1).ToLower();
|
||||
|
||||
var mediaService = ApplicationContext.Services.MediaService;
|
||||
var f = mediaService.CreateMedia(fileName, parentId, Constants.Conventions.MediaTypes.Image);
|
||||
|
||||
using (var fs = System.IO.File.OpenRead(file.LocalFileName))
|
||||
if (!UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Contains(ext))
|
||||
{
|
||||
f.SetValue(Constants.Conventions.Media.File, fileName, fs);
|
||||
}
|
||||
var mediaType = Constants.Conventions.MediaTypes.File;
|
||||
|
||||
mediaService.Save(f);
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.ImageFileTypes.Contains(ext))
|
||||
mediaType = Constants.Conventions.MediaTypes.Image;
|
||||
|
||||
var mediaService = ApplicationContext.Services.MediaService;
|
||||
var f = mediaService.CreateMedia(fileName, parentId, mediaType);
|
||||
using (var fs = System.IO.File.OpenRead(file.LocalFileName))
|
||||
{
|
||||
f.SetValue(Constants.Conventions.Media.File, fileName, fs);
|
||||
}
|
||||
|
||||
mediaService.Save(f);
|
||||
}
|
||||
|
||||
//now we can remove the temp file
|
||||
System.IO.File.Delete(file.LocalFileName);
|
||||
|
||||
24
src/Umbraco.Web/Models/ContentEditing/AuditLog.cs
Normal file
24
src/Umbraco.Web/Models/ContentEditing/AuditLog.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
[DataContract(Name = "auditLog", Namespace = "")]
|
||||
public class AuditLog
|
||||
{
|
||||
[DataMember(Name = "userId", IsRequired = true)]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[DataMember(Name = "nodeId", IsRequired = true)]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[DataMember(Name = "timestamp", IsRequired = true)]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[DataMember(Name = "logType", IsRequired = true)]
|
||||
public AuditLogType LogType { get; set; }
|
||||
|
||||
[DataMember(Name = "comment", IsRequired = true)]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
84
src/Umbraco.Web/Models/ContentEditing/AuditLogType.cs
Normal file
84
src/Umbraco.Web/Models/ContentEditing/AuditLogType.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines audit trail log types
|
||||
/// </summary>
|
||||
public enum AuditLogType
|
||||
{
|
||||
/// <summary>
|
||||
/// Used when new nodes are added
|
||||
/// </summary>
|
||||
New,
|
||||
/// <summary>
|
||||
/// Used when nodes are saved
|
||||
/// </summary>
|
||||
Save,
|
||||
/// <summary>
|
||||
/// Used when nodes are opened
|
||||
/// </summary>
|
||||
Open,
|
||||
/// <summary>
|
||||
/// Used when nodes are deleted
|
||||
/// </summary>
|
||||
Delete,
|
||||
/// <summary>
|
||||
/// Used when nodes are published
|
||||
/// </summary>
|
||||
Publish,
|
||||
/// <summary>
|
||||
/// Used when nodes are send to publishing
|
||||
/// </summary>
|
||||
SendToPublish,
|
||||
/// <summary>
|
||||
/// Used when nodes are unpublished
|
||||
/// </summary>
|
||||
UnPublish,
|
||||
/// <summary>
|
||||
/// Used when nodes are moved
|
||||
/// </summary>
|
||||
Move,
|
||||
/// <summary>
|
||||
/// Used when nodes are copied
|
||||
/// </summary>
|
||||
Copy,
|
||||
/// <summary>
|
||||
/// Used when nodes are assígned a domain
|
||||
/// </summary>
|
||||
AssignDomain,
|
||||
/// <summary>
|
||||
/// Used when public access are changed for a node
|
||||
/// </summary>
|
||||
PublicAccess,
|
||||
/// <summary>
|
||||
/// Used when nodes are sorted
|
||||
/// </summary>
|
||||
Sort,
|
||||
/// <summary>
|
||||
/// Used when a notification are send to a user
|
||||
/// </summary>
|
||||
Notify,
|
||||
|
||||
/// <summary>
|
||||
/// Used when a node's content is rolled back to a previous version
|
||||
/// </summary>
|
||||
RollBack,
|
||||
/// <summary>
|
||||
/// Used when a package is installed
|
||||
/// </summary>
|
||||
PackagerInstall,
|
||||
/// <summary>
|
||||
/// Used when a package is uninstalled
|
||||
/// </summary>
|
||||
PackagerUninstall,
|
||||
/// <summary>
|
||||
/// Used when a node is send to translation
|
||||
/// </summary>
|
||||
SendToTranslate
|
||||
|
||||
}
|
||||
}
|
||||
17
src/Umbraco.Web/Models/Mapping/LogModelMapper.cs
Normal file
17
src/Umbraco.Web/Models/Mapping/LogModelMapper.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models.Mapping;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using umbraco.BusinessLogic;
|
||||
|
||||
namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
internal class LogModelMapper : MapperConfiguration
|
||||
{
|
||||
public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
|
||||
{
|
||||
config.CreateMap<LogItem, AuditLog>()
|
||||
.ForMember(log => log.LogType, expression => expression.MapFrom(item => Enum<AuditLogType>.Parse(item.LogType.ToString())));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,9 +303,13 @@
|
||||
<Compile Include="Editors\DashboardController.cs" />
|
||||
<Compile Include="Editors\DataTypeController.cs" />
|
||||
<Compile Include="Editors\DataTypeValidateAttribute.cs" />
|
||||
<Compile Include="Editors\LogController.cs" />
|
||||
<Compile Include="Editors\MacroController.cs" />
|
||||
<Compile Include="Models\ContentEditing\AuditLog.cs" />
|
||||
<Compile Include="Models\ContentEditing\MacroParameter.cs" />
|
||||
<Compile Include="Models\ContentEditing\UmbracoEntityTypes.cs" />
|
||||
<Compile Include="Models\ContentEditing\AuditLogType.cs" />
|
||||
<Compile Include="Models\Mapping\LogModelMapper.cs" />
|
||||
<Compile Include="Models\Mapping\MacroModelMapper.cs" />
|
||||
<Compile Include="PropertyEditors\ColorListPreValueEditor.cs" />
|
||||
<Compile Include="PropertyEditors\ListViewPropertyEditor.cs" />
|
||||
|
||||
@@ -413,8 +413,8 @@ namespace Umbraco.Web
|
||||
return
|
||||
//StateHelper.Cookies.Preview.HasValue // has preview cookie
|
||||
HttpContext.Request.HasPreviewCookie()
|
||||
&& UmbracoUser != null // has user
|
||||
&& currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false; // is not in admin UI
|
||||
&& currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false
|
||||
&& UmbracoUser != null; // has user
|
||||
}
|
||||
|
||||
private HttpRequestBase GetRequestFromContext()
|
||||
|
||||
@@ -171,7 +171,7 @@ function openMedia(id) {
|
||||
foreach (var property in entity.UmbracoProperties)
|
||||
{
|
||||
//required for backwards compatibility with v7 with changing the GUID -> alias
|
||||
var controlId = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(property.PropertyEditorAlias);
|
||||
var controlId = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(property.PropertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.ReturnNull);
|
||||
if (controlId != null)
|
||||
{
|
||||
if (LinkableMediaDataTypes.Contains(controlId.Value) &&
|
||||
|
||||
@@ -61,8 +61,8 @@ function openDictionary() {
|
||||
xNode.NodeID = l.id.ToString(); //"language_" + l.id.ToString();
|
||||
xNode.Text = l.FriendlyName;
|
||||
xNode.Action = "javascript:openLanguage(" + l.id + ");";
|
||||
xNode.Icon = "settingLanguage.gif";
|
||||
xNode.OpenIcon = "settingLanguage.gif";
|
||||
xNode.Icon = "icon-flag-alt";
|
||||
xNode.OpenIcon = "icon-flag-alt";
|
||||
|
||||
OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
if (xNode != null)
|
||||
|
||||
@@ -52,10 +52,11 @@ function openMediaType(id) {
|
||||
xNode.NodeID = mediaType.Id.ToString(CultureInfo.InvariantCulture);
|
||||
xNode.Text = mediaType.Name;
|
||||
xNode.Action = string.Format("javascript:openMediaType({0});", mediaType.Id);
|
||||
xNode.Icon = "settingDataType.gif";
|
||||
xNode.OpenIcon = "settingDataType.gif";
|
||||
xNode.Icon = "icon-item-arrangement";
|
||||
xNode.OpenIcon = "icon-item-arrangement";
|
||||
xNode.Source = GetTreeServiceUrl(mediaType.Id);
|
||||
xNode.HasChildren = hasChildren;
|
||||
|
||||
if (hasChildren)
|
||||
{
|
||||
xNode.Icon = "settingMasterDataType.gif";
|
||||
|
||||
@@ -135,15 +135,6 @@ namespace umbraco
|
||||
xNode.OpenIcon = "icon-folder";
|
||||
xNode.NodeType = "packagesCategory" + cat.Id;
|
||||
tree.Add(xNode);
|
||||
/*
|
||||
XmlElement catElement = Tree.CreateElement("tree");
|
||||
catElement.SetAttribute("text", cat.Text);
|
||||
//catElement.SetAttribute("menu", "");
|
||||
catElement.SetAttribute("icon", "folder.gif");
|
||||
catElement.SetAttribute("openIcon", "folder_o.gif");
|
||||
catElement.SetAttribute("nodeType", "packagesCategory" + cat.Id);
|
||||
catElement.SetAttribute("action", "javascript:openPackageCategory('BrowseRepository.aspx?category=" + cat.Id + "&repoGuid=" + currentRepo.Guid + "');");
|
||||
root.AppendChild(catElement);*/
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -172,6 +163,7 @@ namespace umbraco
|
||||
set { m_app = value; }
|
||||
}
|
||||
|
||||
|
||||
void ITree.Render(ref XmlDocument Tree)
|
||||
{
|
||||
m_packageType = HttpContext.Current.Request.QueryString["packageType"];
|
||||
|
||||
@@ -32,7 +32,7 @@ using Umbraco.Core;
|
||||
|
||||
namespace umbraco
|
||||
{
|
||||
[Tree(Constants.Applications.Settings, "scripts", "Scripts", "folder.gif", "folder_o.gif", sortOrder: 2)]
|
||||
[Tree(Constants.Applications.Settings, "scripts", "Scripts", "icon-folder", "icon-folder", sortOrder: 2)]
|
||||
public class loadScripts : FileSystemTree
|
||||
{
|
||||
public loadScripts(string application) : base(application) { }
|
||||
@@ -76,7 +76,7 @@ namespace umbraco
|
||||
{
|
||||
xNode.Action = xNode.Action.Replace("openFile", "openScriptEditor");
|
||||
xNode.Icon = "icon-code";
|
||||
xNode.OpenIcon = "icon.code";
|
||||
xNode.OpenIcon = "icon-code";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="nodeType.ascx.cs" Inherits="umbraco.cms.presentation.create.controls.nodeType" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
|
||||
<p style="margin: 4px 0;">Master Document Type:<br />
|
||||
<asp:ListBox id="masterType" Runat="server" cssClass="bigInput" Rows="1" SelectionMode="Single"></asp:ListBox>
|
||||
<asp:Literal ID="masterTypePreDefined" runat="server" Visible="false"></asp:Literal>
|
||||
</p>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<div style="MARGIN-TOP: 0px"><%=umbraco.ui.Text("name")%>:
|
||||
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator><br />
|
||||
<asp:TextBox id="rename" Runat="server" Width="350" CssClass="bigInput"></asp:TextBox>
|
||||
</div>
|
||||
<cc1:Pane runat="server">
|
||||
<cc1:PropertyPanel runat="server" text="Master Document Type">
|
||||
<asp:ListBox id="masterType" Runat="server" cssClass="bigInput input-large-type input-block-level" Rows="1" SelectionMode="Single"></asp:ListBox>
|
||||
<asp:Literal ID="masterTypePreDefined" runat="server" Visible="false"></asp:Literal>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" id="pp_name" text="Name">
|
||||
<asp:TextBox id="rename" Runat="server" CssClass="bigInput input-large-type input-block-level"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<div style="margin-top: 0px; margin-left: -3px; margin-bottom: 0;">
|
||||
<asp:CheckBox ID="createTemplate" Runat="server" Checked="true" Text="Create matching template"></asp:CheckBox>
|
||||
</div>
|
||||
<cc1:PropertyPanel runat="server">
|
||||
<asp:CheckBox ID="createTemplate" Runat="server" Checked="true" Text="Create matching template"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<asp:TextBox runat="server" style="visibility:hidden;display:none;" ID="Textbox1"/>
|
||||
|
||||
<div style="margin-top: 10px;">
|
||||
<asp:CustomValidator ID="CustomValidation1" ErrorMessage="* A document type with this name/alias already exists" OnServerValidate="validationDoctypeName" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:CustomValidator ID="CustomValidation2" ErrorMessage="<br/>* The name of the document type will result in an invalid alias" OnServerValidate="validationDoctypeAlias" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:Button id="sbmt" Runat="server" style="MARGIN-TOP: 14px" Width="90" onclick="sbmt_Click"></asp:Button>
|
||||
<em> or </em>
|
||||
<a href="#" style="color: Blue; margin-left: 6px;" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
</div>
|
||||
<asp:TextBox runat="server" style="visibility:hidden;display:none;" ID="Textbox1"/>
|
||||
|
||||
|
||||
<asp:CustomValidator ID="CustomValidation1" ErrorMessage="* A document type with this name/alias already exists" OnServerValidate="validationDoctypeName" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
<asp:CustomValidator ID="CustomValidation2" ErrorMessage="<br/>* The name of the document type will result in an invalid alias" OnServerValidate="validationDoctypeAlias" ControlToValidate="rename" ForeColor="red" runat="server" />
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane runat="server" CssClass="btn-toolbar umb-btn-toolbar">
|
||||
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
<asp:Button id="sbmt" Runat="server" CssClass="btn btn-primary" onclick="sbmt_Click"></asp:Button>
|
||||
</cc1:Pane>
|
||||
@@ -23,12 +23,13 @@ namespace umbraco.cms.presentation.create.controls
|
||||
protected void Page_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
sbmt.Text = ui.Text("create");
|
||||
pp_name.Text = ui.Text("name");
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string nodeId = umbraco.helper.Request("nodeId");
|
||||
if (String.IsNullOrEmpty(nodeId) || nodeId == "init")
|
||||
{
|
||||
masterType.Attributes.Add("style", "width: 350px;");
|
||||
masterType.Items.Add(new ListItem(ui.Text("none") + "...", "0"));
|
||||
foreach (cms.businesslogic.web.DocumentType dt in cms.businesslogic.web.DocumentType.GetAllAsList())
|
||||
{
|
||||
|
||||
@@ -31,13 +31,13 @@ namespace umbraco.cms.presentation.create.controls {
|
||||
protected global::System.Web.UI.WebControls.Literal masterTypePreDefined;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// pp_name control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_name;
|
||||
|
||||
/// <summary>
|
||||
/// rename control.
|
||||
@@ -48,6 +48,15 @@ namespace umbraco.cms.presentation.create.controls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox rename;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
|
||||
/// <summary>
|
||||
/// createTemplate control.
|
||||
/// </summary>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<cc1:Pane runat="server">
|
||||
<cc1:PropertyPane runat="server" text="Filename (without .xslt)">
|
||||
<asp:TextBox id="rename" Runat="server" CssClass="input-larger-type input-block-input"></asp:TextBox>
|
||||
<cc1:PropertyPanel runat="server" text="Filename (without .xslt)">
|
||||
<asp:TextBox id="rename" Runat="server" CssClass="bigInput input-large-type input-block-level"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator>
|
||||
</cc1:PropertyPane>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Template">
|
||||
<asp:ListBox id="xsltTemplate" Runat="server" Width="350" CssClass="bigInput input-large-type input-block-level" Rows="1" SelectionMode="Single">
|
||||
<asp:ListBox id="xsltTemplate" Runat="server" CssClass="bigInput input-large-type input-block-level" Rows="1" SelectionMode="Single">
|
||||
<asp:ListItem Value="clean.xslt">Clean</asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace dashboardUtilities
|
||||
Document d = new Document(int.Parse(NodeId.ToString()));
|
||||
count++;
|
||||
return
|
||||
"<a href=\"editContent.aspx?id=" + NodeId.ToString() + "\" style=\"text-decoration: none\"><img src=\"" + IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/images/forward.png\" align=\"absmiddle\" border=\"0\"/> " + d.Text + "</a>. " + umbraco.ui.Text("general", "edited", User.GetCurrent()) + " " + umbraco.library.ShortDateWithTimeAndGlobal(DateTime.Parse(Date.ToString()).ToString(), umbraco.ui.Culture(User.GetCurrent())) + "<br/>";
|
||||
"<a href=\"#/content/content/edit/" + NodeId.ToString() + "\" style=\"text-decoration: none\"><i class='icon icon-document'></i> " + d.Text + " - " + umbraco.ui.Text("general", "edited", User.GetCurrent()) + " " + umbraco.library.ShortDateWithTimeAndGlobal(DateTime.Parse(Date.ToString()).ToString(), umbraco.ui.Culture(User.GetCurrent())) + "</a>";
|
||||
}
|
||||
catch {
|
||||
return "";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml;
|
||||
@@ -7,10 +8,7 @@ using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Models;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.presentation;
|
||||
using System.Linq;
|
||||
using umbraco.cms.businesslogic;
|
||||
using umbraco.cms.presentation.user;
|
||||
using umbraco.interfaces;
|
||||
using Umbraco.Web;
|
||||
@@ -51,20 +49,21 @@ namespace umbraco.dialogs
|
||||
ok.Text = ui.Text("general", "ok", UmbracoUser);
|
||||
ok.Attributes.Add("style", "width: 60px");
|
||||
|
||||
var documentType = new DocumentType(int.Parse(Request.GetItemAsString("id")));
|
||||
var documentType = Services.ContentTypeService.GetContentType(int.Parse(Request.GetItemAsString("id")));
|
||||
|
||||
//Load master types...
|
||||
masterType.Attributes.Add("style", "width: 350px;");
|
||||
masterType.Items.Add(new ListItem(ui.Text("none") + "...", "0"));
|
||||
foreach (var docT in DocumentType.GetAllAsList())
|
||||
|
||||
foreach (var docT in Services.ContentTypeService.GetAllContentTypes().OrderBy(x => x.Name))
|
||||
{
|
||||
masterType.Items.Add(new ListItem(docT.Text, docT.Id.ToString()));
|
||||
masterType.Items.Add(new ListItem(docT.Name, docT.Id.ToString(CultureInfo.InvariantCulture)));
|
||||
}
|
||||
|
||||
masterType.SelectedValue = documentType.MasterContentType.ToString();
|
||||
masterType.SelectedValue = (documentType.ParentId > 0 ? documentType.ParentId : 0).ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
rename.Text = documentType.Text + " (copy)";
|
||||
pane_settings.Text = "Make a copy of the document type '" + documentType.Text + "' and save it under a new name";
|
||||
rename.Text = documentType.Name + " (copy)";
|
||||
pane_settings.Text = "Make a copy of the document type '" + documentType.Name + "' and save it under a new name";
|
||||
|
||||
}
|
||||
else
|
||||
@@ -272,16 +271,16 @@ namespace umbraco.dialogs
|
||||
{
|
||||
if (CurrentApp == Constants.Applications.Content)
|
||||
{
|
||||
//Backwards comp. change, so old events are fired #U4-2731
|
||||
var doc = new Document(currContent as IContent);
|
||||
doc.Move(Request.GetItemAs<int>("copyTo"));
|
||||
var doc = (IContent)currContent;
|
||||
var copyToId = Request.GetItemAs<int>("copyTo");
|
||||
Services.ContentService.Move(doc, copyToId, UmbracoUser.Id);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//Backwards comp. change, so old events are fired #U4-2731
|
||||
var media = new umbraco.cms.businesslogic.media.Media(currContent as IMedia);
|
||||
media.Move(Request.GetItemAs<int>("copyTo"));
|
||||
library.ClearLibraryCacheForMedia(currContent.Id);
|
||||
var media = (IMedia)currContent;
|
||||
var copyToId = Request.GetItemAs<int>("copyTo");
|
||||
Services.MediaService.Move(media, copyToId, UmbracoUser.Id);
|
||||
}
|
||||
|
||||
feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, UmbracoUser) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
@@ -293,12 +292,11 @@ namespace umbraco.dialogs
|
||||
else
|
||||
{
|
||||
//NOTE: We ONLY support Copy on content not media for some reason.
|
||||
|
||||
//Backwards comp. change, so old events are fired #U4-2731
|
||||
var newContent = new Document(currContent as IContent);
|
||||
newContent.Copy(Request.GetItemAs<int>("copyTo"), getUser(), RelateDocuments.Checked);
|
||||
|
||||
feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
var newContent = (IContent)currContent;
|
||||
Services.ContentService.Copy(newContent, Request.GetItemAs<int>("copyTo"), RelateDocuments.Checked, UmbracoUser.Id);
|
||||
|
||||
feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, UmbracoUser) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
feedback.type = uicontrols.Feedback.feedbacktype.success;
|
||||
|
||||
// refresh tree
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
using umbraco.BasePages;
|
||||
using umbraco.BusinessLogic;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace umbraco.js
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
Response.ContentType = "text/javascript";
|
||||
Response.ContentType = "application/json";
|
||||
User u = base.getUser();
|
||||
if(u == null)
|
||||
return;
|
||||
@@ -18,29 +18,48 @@ namespace umbraco.js
|
||||
XmlDocument all = ui.getLanguageFile(lang);
|
||||
if(all == null)
|
||||
return;
|
||||
Response.Write("\nvar uiKeys = new Array();\n");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("{");
|
||||
foreach(XmlNode x in all.DocumentElement.ChildNodes)
|
||||
{
|
||||
if(x == null)
|
||||
continue;
|
||||
foreach(XmlNode key in x.ChildNodes)
|
||||
{
|
||||
if (key.FirstChild == null || string.IsNullOrEmpty(key.FirstChild.Value))
|
||||
continue;
|
||||
|
||||
XmlNode n1 = x.Attributes.GetNamedItem("alias");
|
||||
if(n1 == null)
|
||||
continue;
|
||||
XmlNode n2 = key.Attributes.GetNamedItem("alias");
|
||||
if(n2 == null)
|
||||
continue;
|
||||
string _tempKey = string.Format("{0}_{1}", n1.Value, n2.Value);
|
||||
sb.Append("\n");
|
||||
|
||||
for (int i = 0; i < x.ChildNodes.Count; i++)
|
||||
{
|
||||
sb.Append("\n");
|
||||
|
||||
XmlNode key = x.ChildNodes[i];
|
||||
if (key.FirstChild == null || string.IsNullOrEmpty(key.FirstChild.Value))
|
||||
continue;
|
||||
|
||||
XmlNode n1 = x.Attributes.GetNamedItem("alias");
|
||||
if (n1 == null)
|
||||
continue;
|
||||
XmlNode n2 = key.Attributes.GetNamedItem("alias");
|
||||
if (n2 == null)
|
||||
continue;
|
||||
string _tempKey = string.Format("{0}_{1}", n1.Value, n2.Value);
|
||||
|
||||
// we need to remove linie breaks as they can't break js
|
||||
string tmpStr = key.FirstChild.Value.Replace("\\", "\\\\").Replace("'", "\\'").Replace("\r", "").Replace("\n", "");
|
||||
Response.Write(string.Format("uiKeys['{0}'] = '{1}';\n", _tempKey, tmpStr));
|
||||
}
|
||||
string tmpStr = key.FirstChild.Value.Replace("\\", "\\\\").Replace("\"", "'").Replace("\r", "").Replace("\n", "");
|
||||
|
||||
sb.Append("\"" + _tempKey + "\": \"" + tmpStr + "\",");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
sb.Remove(sb.Length - 1, 1);
|
||||
sb.Append("}");
|
||||
|
||||
Response.Write(sb.ToString());
|
||||
}
|
||||
|
||||
#region Web Form Designer generated code
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace umbraco.settings
|
||||
uicontrols.Pane p = new uicontrols.Pane();
|
||||
|
||||
var save = Panel1.Menu.NewButton();
|
||||
save.Text = ui.Text("save");
|
||||
save.Click += save_Click;
|
||||
save.ToolTip = ui.Text("save");
|
||||
save.ID = "save";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<%@ Page Language="c#" CodeBehind="EditMediaType.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master"
|
||||
Async="true" AsyncTimeOut="300"
|
||||
AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.EditMediaType" %>
|
||||
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
|
||||
@@ -19,6 +19,6 @@ namespace umbraco.cms.presentation.settings {
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.controls.ContentTypeControlNew ContentTypeControlNew1;
|
||||
protected global::System.Web.UI.UserControl ContentTypeControlNew1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ using Umbraco.Core;
|
||||
|
||||
namespace umbraco.cms.businesslogic.datatype
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Datatypedefinitions is the basic buildingblocks of umbraco's documents/medias/members generic datastructure
|
||||
///
|
||||
@@ -59,12 +62,27 @@ namespace umbraco.cms.businesslogic.datatype
|
||||
if (_propertyEditorAlias.IsNullOrWhiteSpace())
|
||||
return null;
|
||||
|
||||
var controlId = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, true);
|
||||
//Attempt to resolve a legacy control id from the alias. If one is not found we'll generate one -
|
||||
// the reason one will not be found is if there's a new v7 property editor created that doesn't have a legacy
|
||||
// property editor predecessor.
|
||||
//So, we'll generate an id for it based on the alias which will remain consistent, but then we'll try to resolve a legacy
|
||||
// IDataType which of course will not exist. In this case we'll have to create a new one on the fly for backwards compatibility but
|
||||
// this instance will have limited capabilities and will really only work for saving data so the legacy APIs continue to work.
|
||||
var controlId = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId);
|
||||
|
||||
var dt = DataTypesResolver.Current.GetById(controlId.Value);
|
||||
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
dt.DataTypeDefinitionId = Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Ok so it was not found, we can only assume that this is because this is a new property editor that does not have a legacy predecessor.
|
||||
//we'll have to attempt to generate one at runtime.
|
||||
dt = BackwardsCompatibleDataType.Create(_propertyEditorAlias, controlId.Value, Id);
|
||||
}
|
||||
|
||||
|
||||
return dt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user