Compare commits

..

5 Commits

Author SHA1 Message Date
Sebastiaan Janssen 5d5ce72178 Whitespace updates and use CleanFilename everywhere 2018-10-04 14:00:07 +02:00
Sebastiaan Janssen 871da7036f Puts CleanForXss back but replace backslashes with forward slashes so it doesn't mess with the JS 2018-10-04 13:59:36 +02:00
Kim Holzmann 9828e36e72 #3001 Styles cannot be saved
Fixed
can now create with folders.
Save file and changes.
rename fielname. (not copying)

and added a check for existing filename, to prevent owerwriting existing stylesheet file.
2018-10-03 22:24:00 +02:00
Kim Holzmann aa703caaf0 Revert "#3001 Styles cannot be saved - Not sure if oldName is legacy"
This reverts commit 362f9db6f8.
2018-10-03 21:06:43 +02:00
Kim Holzmann 362f9db6f8 #3001 Styles cannot be saved - Not sure if oldName is legacy
Works now -
But is not sure, is oldName used anymore, It fails when used, in both create new stylefile and save filestyle.
If oldName is legacy, I think we should clean up metode and the calls to it.
2018-10-03 03:52:34 +02:00
82 changed files with 652 additions and 1007 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ Assume positive intent and try to understand before being understood.
Treat others as you would like to be treated.
This also goes for treating the HQ with respect. For example: dont promote products on [our.umbraco.com](https://our.umbraco.com) that directly compete with our commercial offerings which enables us to work for a sustainable Umbraco.
This also goes for treating the HQ with respect. For example: dont promote products on [our.umbraco.org](https://our.umbraco.org) that directly compete with our commercial offerings which enables us to work for a sustainable Umbraco.
## Open
+1 -1
View File
@@ -82,7 +82,7 @@ These wonderful volunteers will provide you with a first reply to your PR, revie
You can get in touch with [the PR team](#the-pr-team) in multiple ways, we love open conversations and we are a friendly bunch. No question you have is stupid. Any questions you have usually helps out multiple people with the same question. Ask away:
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.com/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.org/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely
- We're also [active in the Gitter chatroom](https://gitter.im/umbraco/Umbraco-CMS)
## Code of Conduct
+5 -5
View File
@@ -31,7 +31,7 @@ Before creating bug reports, please check [this list](#before-submitting-a-bug-r
##### Before Submitting A Bug Report
* Most importantly, check **if you can reproduce the problem** in the [latest version of Umbraco](https://our.umbraco.com/download/). We might have already fixed your particular problem.
* Most importantly, check **if you can reproduce the problem** in the [latest version of Umbraco](https://our.umbraco.org/download/). We might have already fixed your particular problem.
* It also helps tremendously to check if the issue you're experiencing is present in **a clean install** of the Umbraco version you're currently using. Custom code can have side-effects that don't occur in a clean install.
* **Use the Google**. Whatever you're experiencing, Google it plus "Umbraco" - usually you can get some pretty good hints from the search results, including open issues and further troubleshooting hints.
* If you do find and existing issue has **and the issue is still open**, add a comment to the existing issue if you have additional information. If you have the same problem and no new info to add, just "star" the issue.
@@ -65,7 +65,7 @@ Most of the suggestions in the [reporting bugs](#reporting-bugs) section also co
Some additional hints that may be helpful:
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Umbraco which the suggestion is related to.
* **Explain why this enhancement would be useful to most Umbraco users** and isn't something that can or should be implemented as a [community package](https://our.umbraco.com/projects/).
* **Explain why this enhancement would be useful to most Umbraco users** and isn't something that can or should be implemented as a [community package](https://our.umbraco.org/projects/).
### Your First Code Contribution
@@ -80,7 +80,7 @@ The most successful pull requests usually look a like this:
* Fill in the required template
* Include screenshots and animated GIFs in your pull request whenever possible.
* Unit tests, while optional are awesome, thank you!
* New code is commented with documentation from which [the reference documentation](https://our.umbraco.com/documentation/Reference/) is generated
* New code is commented with documentation from which [the reference documentation](https://our.umbraco.org/documentation/Reference/) is generated
Again, these are guidelines, not strict requirements.
@@ -116,8 +116,8 @@ There's two big areas that you should know about:
To find the general areas of something you're looking to fix or improve, have a look at the following two parts of the API documentation.
* [The AngularJS based backoffice files](https://our.umbraco.com/apidocs/ui/#/api) (to be found in `src\Umbraco.Web.UI.Client\src`)
* [The rest](https://our.umbraco.com/apidocs/csharp/)
* [The AngularJS based backoffice files](https://our.umbraco.org/apidocs/ui/#/api) (to be found in `src\Umbraco.Web.UI.Client\src`)
* [The rest](https://our.umbraco.org/apidocs/csharp/)
### What branch should I target for my contributions?
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT) #
Copyright (c) 2013-present Umbraco
Copyright (c) 2013 Umbraco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -8,7 +8,7 @@
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
<meta name="generator" content="docfx {{_docfxVersion}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
<link rel="icon" type="image/png" href="https://our.umbraco.com/assets/images/app-icons/favicon.png">
<link rel="icon" type="image/png" href="https://our.umbraco.org/assets/images/app-icons/favicon.png">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
+1 -1
View File
@@ -63,7 +63,7 @@ a:focus {
}
.navbar-header .navbar-brand {
background: url(https://our.umbraco.com/assets/images/logo.svg) left center no-repeat;
background: url(https://our.umbraco.org/assets/images/logo.svg) left center no-repeat;
background-size: 40px auto;
width:50px;
}
+2 -2
View File
@@ -2,7 +2,7 @@
using System.Resources;
[assembly: AssemblyCompany("Umbraco")]
[assembly: AssemblyCopyright("Copyright © Umbraco 2018")]
[assembly: AssemblyCopyright("Copyright © Umbraco 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -12,4 +12,4 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.13.0")]
[assembly: AssemblyInformationalVersion("7.13.0")]
[assembly: AssemblyInformationalVersion("7.13.0")]
@@ -202,4 +202,4 @@ namespace Umbraco.Core.Configuration
//TODO: Add other configurations here !
}
}
}
@@ -139,8 +139,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
internal CommaDelimitedConfigurationElement DisallowedUploadFiles
{
get { return GetOptionalDelimitedElement("disallowedUploadFiles", new[] {"ashx", "aspx", "ascx", "config", "cshtml", "vbhtml", "asmx", "air", "axd"}); }
}
}
[ConfigurationProperty("allowedUploadFiles")]
internal CommaDelimitedConfigurationElement AllowedUploadFiles
{
@@ -195,6 +195,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return GetOptionalTextElement("loginBackgroundImage", string.Empty); }
}
[ConfigurationProperty("StripUdiAttributes")]
internal InnerTextConfigurationElement<bool> StripUdiAttributes
{
get { return GetOptionalTextElement("StripUdiAttributes", true); }
}
string IContentSection.NotificationEmailAddress
{
get { return Notifications.NotificationEmailAddress; }
@@ -313,8 +319,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
IEnumerable<string> IContentSection.DisallowedUploadFiles
{
get { return DisallowedUploadFiles; }
}
}
IEnumerable<string> IContentSection.AllowedUploadFiles
{
get { return AllowedUploadFiles; }
@@ -357,7 +363,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
string IContentSection.LoginBackgroundImage
{
get { return LoginBackgroundImage; }
}
}
bool IContentSection.StripUdiAttributes
{
get { return StripUdiAttributes; }
}
}
}
@@ -75,6 +75,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool EnablePropertyValueConverters { get; }
string LoginBackgroundImage { get; }
bool StripUdiAttributes { get; }
}
}
}
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
@@ -10,9 +11,6 @@ using Umbraco.Core.Services;
namespace Umbraco.Core.Persistence
{
/// <summary>
/// Helper class for working with databases and schemas.
/// </summary>
public class DatabaseSchemaHelper
{
private readonly Database _db;
@@ -20,22 +18,6 @@ namespace Umbraco.Core.Persistence
private readonly ISqlSyntaxProvider _syntaxProvider;
private readonly BaseDataCreation _baseDataCreation;
/// <summary>
/// Intializes a new helper instance.
/// </summary>
/// <param name="db">The database to be used.</param>
/// <param name="logger">The logger.</param>
/// <param name="syntaxProvider">The syntax provider.</param>
/// <example>
/// A new instance could be initialized like:
/// <code>
/// var schemaHelper = new DatabaseSchemaHelper(
/// ApplicationContext.Current.DatabaseContext.Database,
/// ApplicationContext.Current.ProfilingLogger.Logger,
/// ApplicationContext.Current.DatabaseContext.SqlSyntax
/// );
/// </code>
/// </example>
public DatabaseSchemaHelper(Database db, ILogger logger, ISqlSyntaxProvider syntaxProvider)
{
_db = db;
@@ -44,41 +26,11 @@ namespace Umbraco.Core.Persistence
_baseDataCreation = new BaseDataCreation(db, logger);
}
/// <summary>
/// Returns whether a table with the specified <paramref name="tableName"/> exists in the database.
/// </summary>
/// <param name="tableName">The name of the table.</param>
/// <returns><c>true</c> if the table exists; otherwise <c>false</c>.</returns>
/// <example>
/// <code>
/// if (schemaHelper.TableExist("MyTable"))
/// {
/// // do something when the table exists
/// }
/// </code>
/// </example>
public bool TableExist(string tableName)
{
return _syntaxProvider.DoesTableExist(_db, tableName);
}
/// <summary>
/// Returns whether the table for the specified <typeparamref name="T"/> exists in the database.
///
/// If <typeparamref name="T"/> has been decorated with an <see cref="TableNameAttribute"/>, the name from that
/// attribute will be used for the table name. If the attribute is not present, the name
/// <typeparamref name="T"/> will be used instead.
/// </summary>
/// <typeparam name="T">The type representing the DTO/table.</typeparam>
/// <returns><c>true</c> if the table exists; otherwise <c>false</c>.</returns>
/// <example>
/// <code>
/// if (schemaHelper.TableExist&lt;MyDto&gt;)
/// {
/// // do something when the table exists
/// }
/// </code>
/// </example>
public bool TableExist<T>()
{
var poco = Database.PocoData.ForType(typeof(T));
@@ -138,17 +90,6 @@ namespace Umbraco.Core.Persistence
_logger.Info<Database>("Finalized database schema creation");
}
/// Creates a new table in the database based on the type of <typeparamref name="T"/>.
///
/// If <typeparamref name="T"/> has been decorated with an <see cref="TableNameAttribute"/>, the name from that
/// attribute will be used for the table name. If the attribute is not present, the name
/// <typeparamref name="T"/> will be used instead.
///
/// If a table with the same name already exists, the <paramref name="overwrite"/> parameter will determine
/// whether the table is overwritten. If <c>true</c>, the table will be overwritten, whereas this method will
/// not do anything if the parameter is <c>false</c>.
/// <typeparam name="T">The type representing the DTO/table.</typeparam>
/// <param name="overwrite">Whether the table should be overwritten if it already exists.</param>
public void CreateTable<T>(bool overwrite)
where T : new()
{
@@ -156,16 +97,6 @@ namespace Umbraco.Core.Persistence
CreateTable(overwrite, tableType);
}
/// <summary>
/// Creates a new table in the database based on the type of <typeparamref name="T"/>.
///
/// If <typeparamref name="T"/> has been decorated with an <see cref="TableNameAttribute"/>, the name from that
/// attribute will be used for the table name. If the attribute is not present, the name
/// <typeparamref name="T"/> will be used instead.
///
/// If a table with the same name already exists, this method will not do anything.
/// </summary>
/// <typeparam name="T">The type representing the DTO/table.</typeparam>
public void CreateTable<T>()
where T : new()
{
@@ -173,19 +104,6 @@ namespace Umbraco.Core.Persistence
CreateTable(false, tableType);
}
/// <summary>
/// Creates a new table in the database for the specified <paramref name="modelType"/>.
///
/// If <paramref name="modelType"/> has been decorated with an <see cref="TableNameAttribute"/>, the name from
/// that attribute will be used for the table name. If the attribute is not present, the name
/// <paramref name="modelType"/> will be used instead.
///
/// If a table with the same name already exists, the <paramref name="overwrite"/> parameter will determine
/// whether the table is overwritten. If <c>true</c>, the table will be overwritten, whereas this method will
/// not do anything if the parameter is <c>false</c>.
/// </summary>
/// <param name="overwrite">Whether the table should be overwritten if it already exists.</param>
/// <param name="modelType">The the representing the table.</param>
public void CreateTable(bool overwrite, Type modelType)
{
var tableDefinition = DefinitionFactory.GetTableDefinition(_syntaxProvider, modelType);
@@ -199,8 +117,6 @@ namespace Umbraco.Core.Persistence
var tableExist = TableExist(tableName);
if (overwrite && tableExist)
{
_logger.Info<Database>(string.Format("Table '{0}' already exists, but will be recreated", tableName));
DropTable(tableName);
tableExist = false;
}
@@ -253,37 +169,15 @@ namespace Umbraco.Core.Persistence
_logger.Info<Database>(string.Format("Create Foreign Key sql {0}:\n {1}", createdFk, sql));
}
transaction.Complete();
if (overwrite)
{
_logger.Info<Database>(string.Format("Table '{0}' was recreated", tableName));
}
else
{
_logger.Info<Database>(string.Format("New table '{0}' was created", tableName));
}
}
}
else
{
// The table exists and was not recreated/overwritten.
_logger.Info<Database>(string.Format("Table '{0}' already exists - no changes were made", tableName));
}
_logger.Info<Database>(string.Format("New table '{0}' was created", tableName));
}
/// <summary>
/// Drops the table for the specified <typeparamref name="T"/>.
///
/// If <typeparamref name="T"/> has been decorated with an <see cref="TableNameAttribute"/>, the name from that
/// attribute will be used for the table name. If the attribute is not present, the name
/// <typeparamref name="T"/> will be used instead.
/// </summary>
/// <typeparam name="T">The type representing the DTO/table.</typeparam>
/// <example>
/// <code>
/// schemaHelper.DropTable&lt;MyDto&gt;);
/// </code>
/// </example>
public void DropTable<T>()
where T : new()
{
@@ -299,15 +193,6 @@ namespace Umbraco.Core.Persistence
DropTable(tableName);
}
/// <summary>
/// Drops the table with the specified <paramref name="tableName"/>.
/// </summary>
/// <param name="tableName">The name of the table.</param>
/// <example>
/// <code>
/// schemaHelper.DropTable("MyTable");
/// </code>
/// </example>
public void DropTable(string tableName)
{
var sql = new Sql(string.Format(
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
if(tableName.Equals("umbracoNode"))
{
CreateUmbracoNodeData();
CreateUmbracNodeData();
}
if (tableName.Equals("umbracoLock"))
@@ -111,7 +111,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
}
private void CreateUmbracoNodeData()
private void CreateUmbracNodeData()
{
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = new Guid(Constants.ObjectTypes.SystemRoot), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.ContentRecycleBin), CreateDate = DateTime.Now });
@@ -134,7 +134,7 @@ namespace Umbraco.Core.Persistence.Repositories
.InnerJoin<ContentDto>(SqlSyntax)
.On<ContentVersionDto, ContentDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
.InnerJoin<NodeDto>(SqlSyntax)
.On<ContentDto, NodeDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
.On<ContentDto, NodeDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
.InnerJoin<ContentTypeDto>()
.On<ContentTypeDto, ContentDto>(left => left.NodeId, right => right.ContentTypeId);
//TODO: IF we want to enable querying on content type information this will need to be joined
@@ -836,19 +836,19 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder",
}
public int CountPublished(string contentTypeAlias = null)
{
if (contentTypeAlias.IsNullOrWhiteSpace())
{
{
if (contentTypeAlias.IsNullOrWhiteSpace())
{
var sql = GetBaseQuery(true).Where<NodeDto>(x => x.Trashed == false)
.Where<DocumentDto>(x => x.Published == true);
return Database.ExecuteScalar<int>(sql);
.Where<DocumentDto>(x => x.Published == true);
return Database.ExecuteScalar<int>(sql);
}
else
{
else
{
var sql = GetBaseQuery(true).Where<NodeDto>(x => x.Trashed == false)
.Where<DocumentDto>(x => x.Published == true)
.Where<ContentTypeDto>(x => x.Alias == contentTypeAlias);
return Database.ExecuteScalar<int>(sql);
.Where<DocumentDto>(x => x.Published == true)
.Where<ContentTypeDto>(x => x.Alias == contentTypeAlias);
return Database.ExecuteScalar<int>(sql);
}
}
@@ -1220,14 +1220,7 @@ ORDER BY cmsContentVersion.id DESC
if (def.DocumentDto.TemplateId.HasValue)
templates.TryGetValue(def.DocumentDto.TemplateId.Value, out template); // else null
cc.Template = template;
if (propertyData.ContainsKey(cc.Version))
{
cc.Properties = propertyData[cc.Version];
}
else
{
throw new InvalidOperationException($"No property data found for version: '{cc.Version}'.");
}
cc.Properties = propertyData[cc.Version];
//on initial construction we don't want to have dirty properties tracked
// http://issues.umbraco.org/issue/U4-1946
@@ -1314,4 +1307,4 @@ ORDER BY cmsContentVersion.id DESC
}
}
}
}
}
+5 -8
View File
@@ -2060,15 +2060,12 @@ namespace Umbraco.Core.Services
using (new WriteLock(Locker))
{
var allContent = GetByIds(ids).ToDictionary(x => x.Id, x => x);
if (allContent.Any() == false)
{
return false;
}
var items = ids.Select(x => allContent[x]).ToArray();
var items = ids.Select(x => allContent[x]);
using (var uow = UowProvider.GetUnitOfWork())
{
var saveEventArgs = new SaveEventArgs<IContent>(items);
var asArray = items.ToArray();
var saveEventArgs = new SaveEventArgs<IContent>(asArray);
if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving"))
{
uow.Commit();
@@ -2078,7 +2075,7 @@ namespace Umbraco.Core.Services
var repository = RepositoryFactory.CreateContentRepository(uow);
var i = 0;
foreach (var content in items)
foreach (var content in asArray)
{
//If the current sort order equals that of the content
//we don't need to update it, so just increment the sort order
@@ -2125,7 +2122,7 @@ namespace Umbraco.Core.Services
_publishingStrategy.PublishingFinalized(uow, shouldBePublished, false);
}
Audit(uow, AuditType.Sort, "Sort child items performed by user", userId, items.First().ParentId);
Audit(uow, AuditType.Sort, "Sorting content performed by user", userId, 0);
uow.Commit();
}
}
+3
View File
@@ -65,6 +65,9 @@
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
@@ -1,6 +1,6 @@
using System;
using System.Linq;
using System.Web;
using HtmlAgilityPack;
using Moq;
using NUnit.Framework;
using Umbraco.Core;
@@ -10,7 +10,6 @@ using Umbraco.Core.Models;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Profiling;
using Umbraco.Core.Scoping;
using Umbraco.Core.Services;
using Umbraco.Tests.TestHelpers;
using Umbraco.Web;
using Umbraco.Web.Routing;
@@ -34,6 +33,14 @@ namespace Umbraco.Tests.Web
[TestCase("hello href=\"{localLink:umb://document-type/9931BDE0AAC34BABB838909A7B47570E}\" world ", "hello href=\"/my-test-url\" world ")]
//this one has an invalid char so won't match
[TestCase("hello href=\"{localLink:umb^://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570E}\" world ", "hello href=\"{localLink:umb^://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570E}\" world ")]
// with a-tag with data-udi attribute, that needs to be stripped
[TestCase("hello <a data-udi=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" href=\"{localLink:umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570E}\"> world</a> ", "hello <a href=\"/my-test-url\"> world</a> ")]
// with a-tag with data-udi attribute spelled wrong, so don't need stripping
[TestCase("hello <a data-uid=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" href=\"{localLink:umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570E}\"> world</a> ", "hello <a data-uid=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" href=\"/my-test-url\"> world</a> ")]
// with a img-tag with data-udi id, that needs to be strippde
[TestCase("hello <img data-udi=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" src=\"imageofcats.jpg\"> world ", "hello <img src=\"imageofcats.jpg\"> world ")]
// with a img-tag with data-udi id spelled wrong, so don't need stripping
[TestCase("hello <img data-uid=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" src=\"imageofcats.jpg\"> world ", "hello <img data-uid=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" src=\"imageofcats.jpg\"> world ")]
public void ParseLocalLinks(string input, string result)
{
var serviceCtxMock = MockHelper.GetMockedServiceContext();
@@ -63,7 +70,7 @@ namespace Umbraco.Tests.Web
//setup a quick mock of the WebRouting section
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == Mock.Of<IWebRoutingSection>(routingSection => routingSection.UrlProviderMode == "AutoLegacy")),
//pass in the custom url provider
new[]{ testUrlProvider.Object },
new[] { testUrlProvider.Object },
true))
{
var output = TemplateUtilities.ParseInternalLinks(input, umbCtx.UrlProvider);
@@ -71,5 +78,27 @@ namespace Umbraco.Tests.Web
Assert.AreEqual(result, output);
}
}
[Test]
public void StripDataUdiAttributesUsingSrtringOnLinks()
{
var input = "hello <a data-udi=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" href=\"/my-test-url\"> world</a> ";
var expected = "hello <a href=\"/my-test-url\"> world</a> ";
var result = TemplateUtilities.StripUdiDataAttributes(input);
Assert.AreEqual(expected, result);
}
[Test]
public void StripDataUdiAttributesUsingStringOnImages()
{
var input = "hello <img data-udi=\"umb://document-type/9931BDE0-AAC3-4BAB-B838-909A7B47570\" src=\"imageofcats.jpg\"> world ";
var expected = "hello <img src=\"imageofcats.jpg\"> world ";
var result = TemplateUtilities.StripUdiDataAttributes(input);
Assert.AreEqual(expected, result);
}
}
}
}
+1
View File
@@ -3,6 +3,7 @@
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
<package id="Examine" version="0.1.89" targetFramework="net45" />
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
@@ -1,17 +1,4 @@
/**
@ngdoc directive
@name umbraco.directives.directive:umbTourStep
@restrict E
@scope
@description
<b>Added in Umbraco 7.8</b>. The tour step component is a component that can be used in custom views for tour steps.
@param {callback} onClose The callback which should be performened when the close button of the tour step is clicked
@param {boolean=} hideClose A boolean indicating if the close button needs to be shown
**/
(function () {
(function() {
'use strict';
function TourStepDirective() {
@@ -1,17 +1,4 @@
/**
@ngdoc directive
@name umbraco.directives.directive:umbTourStepContent
@restrict E
@scope
@description
<b>Added in Umbraco 7.8</b>. The tour step content component is a component that can be used in custom views for tour steps.
It's meant to be used in the umb-tour-step directive.
All markup in the body of the directive will be shown after the content attribute
@param {string} content The content that needs to be shown
**/
(function () {
(function() {
'use strict';
function TourStepContentDirective() {
@@ -1,18 +1,4 @@
/**
@ngdoc directive
@name umbraco.directives.directive:umbTourStepCounter
@restrict E
@scope
@description
<b>Added in Umbraco 7.8</b>. The tour step counter component is a component that can be used in custom views for tour steps.
It's meant to be used in the umb-tour-step-footer directive. It will show the progress you have made in a tour eg. step 2/12
@param {int} currentStep The current step the tour is on
@param {int} totalSteps The current step the tour is on
**/
(function () {
(function() {
'use strict';
function TourStepCounterDirective() {
@@ -1,16 +1,4 @@
/**
@ngdoc directive
@name umbraco.directives.directive:umbTourStepFooter
@restrict E
@scope
@description
<b>Added in Umbraco 7.8</b>. The tour step footer component is a component that can be used in custom views for tour steps. It's meant to be used in the umb-tour-step directive.
All markup in the body of the directive will be shown as the footer of the tour step
**/
(function () {
(function() {
'use strict';
function TourStepFooterDirective() {
@@ -1,16 +1,4 @@
/**
@ngdoc directive
@name umbraco.directives.directive:umbTourStepHeader
@restrict E
@scope
@description
<b>Added in Umbraco 7.8</b>. The tour step header component is a component that can be used in custom views for tour steps. It's meant to be used in the umb-tour-step directive.
@param {string} title The title that needs to be shown
**/
(function () {
(function() {
'use strict';
function TourStepHeaderDirective() {
@@ -125,19 +125,13 @@ Use this directive to generate a thumbnail grid of media items.
i--;
}
// If subfolder search is not enabled remove the media items that's not needed
// Make sure that includeSubFolder is not undefined since the directive is used
// in contexts where it should not be used. Currently only used when we trigger
// a media picker
if(scope.includeSubFolders !== undefined){
if (scope.includeSubFolders !== 'true') {
if (item.parentId !== parseInt(scope.currentFolderId)) {
scope.items.splice(i, 1);
i--;
}
if (scope.includeSubFolders !== 'true') {
if (item.parentId !== parseInt(scope.currentFolderId)) {
scope.items.splice(i, 1);
i--;
}
}
}
@@ -158,7 +152,7 @@ Use this directive to generate a thumbnail grid of media items.
}
if (!item.isFolder) {
// handle entity
if(item.image) {
item.thumbnail = mediaHelper.resolveFileFromEntity(item, true);
@@ -167,7 +161,7 @@ Use this directive to generate a thumbnail grid of media items.
} else {
item.thumbnail = mediaHelper.resolveFile(item, true);
item.image = mediaHelper.resolveFile(item, false);
var fileProp = _.find(item.properties, function (v) {
return (v.alias === "umbracoFile");
});
@@ -46,7 +46,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function() {
* $scope.complete = true;
* });
* </pre>
* </pre>
* @param {Object} args arguments object
* @param {Int} args.parentId the ID of the parent node
* @param {Array} options.sortedIds array of node IDs as they should be sorted
@@ -87,9 +87,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function() {
* alert("node was moved");
* }, function(err){
* alert("node didnt move:" + err.data.Message);
* alert("node didnt move:" + err.data.Message);
* });
* </pre>
* </pre>
* @param {Object} args arguments object
* @param {Int} args.idd the ID of the node to move
* @param {Int} args.parentId the ID of the parent node to move to
@@ -109,23 +109,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostMove"),
{
parentId: args.parentId,
id: args.id
}),
{
error: function(data){
var errorMsg = 'Failed to move media';
if(data.parentId === data.id){
errorMsg = 'Media can\'t be moved into itself';
}
return {
errorMsg: errorMsg
};
}
});
{
parentId: args.parentId,
id: args.id
}),
'Failed to move media');
},
@@ -141,12 +129,12 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* <pre>
* mediaResource.getById(1234)
* .then(function(media) {
* var myMedia = media;
* var myMedia = media;
* alert('its here!');
* });
* </pre>
*
* @param {Int} id id of media item to return
* </pre>
*
* @param {Int} id id of media item to return
* @returns {Promise} resourcePromise object containing the media item.
*
*/
@@ -175,9 +163,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function() {
* alert('its gone!');
* });
* </pre>
*
* @param {Int} id id of media item to delete
* </pre>
*
* @param {Int} id id of media item to delete
* @returns {Promise} resourcePromise object.
*
*/
@@ -203,12 +191,12 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* <pre>
* mediaResource.getByIds( [1234,2526,28262])
* .then(function(mediaArray) {
* var myDoc = contentArray;
* var myDoc = contentArray;
* alert('they are here!');
* });
* </pre>
*
* @param {Array} ids ids of media items to return as an array
* </pre>
*
* @param {Array} ids ids of media items to return as an array
* @returns {Promise} resourcePromise object containing the media items array.
*
*/
@@ -235,28 +223,28 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
*
* @description
* Returns a scaffold of an empty media item, given the id of the media item to place it underneath and the media type alias.
*
*
* - Parent Id must be provided so umbraco knows where to store the media
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
*
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
*
* The scaffold is used to build editors for media that has not yet been populated with data.
*
*
* ##usage
* <pre>
* mediaResource.getScaffold(1234, 'folder')
* .then(function(scaffold) {
* var myDoc = scaffold;
* myDoc.name = "My new media item";
* myDoc.name = "My new media item";
*
* mediaResource.save(myDoc, true)
* .then(function(media){
* alert("Retrieved, updated and saved again");
* });
* });
* </pre>
*
* </pre>
*
* @param {Int} parentId id of media item to return
* @param {String} alias mediatype alias to base the scaffold on
* @param {String} alias mediatype alias to base the scaffold on
* @returns {Promise} resourcePromise object containing the media scaffold.
*
*/
@@ -295,11 +283,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* <pre>
* mediaResource.getChildren(1234, {pageSize: 10, pageNumber: 2})
* .then(function(contentArray) {
* var children = contentArray;
* var children = contentArray;
* alert('they are here!');
* });
* </pre>
*
* </pre>
*
* @param {Int} parentid id of content item to return children of
* @param {Object} options optional options object
* @param {Int} options.pageSize if paging data, number of nodes per page, default = 0
@@ -373,9 +361,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
*
* @description
* Saves changes made to a media item, if the media item is new, the isNew paramater must be passed to force creation
* if the media item needs to have files attached, they must be provided as the files param and passed separately
*
*
* if the media item needs to have files attached, they must be provided as the files param and passed separately
*
*
* ##usage
* <pre>
* mediaResource.getById(1234)
@@ -386,11 +374,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* alert("Retrieved, updated and saved again");
* });
* });
* </pre>
*
* </pre>
*
* @param {Object} media The media item object with changes applied
* @param {Bool} isNew set to true to create a new item or to update an existing
* @param {Array} files collection of files for the media item
* @param {Bool} isNew set to true to create a new item or to update an existing
* @param {Array} files collection of files for the media item
* @returns {Promise} resourcePromise object containing the saved media item.
*
*/
@@ -412,10 +400,10 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function(folder) {
* alert('New folder');
* });
* </pre>
* </pre>
*
* @param {string} name Name of the folder to create
* @param {int} parentId Id of the media item to create the folder underneath
* @param {int} parentId Id of the media item to create the folder underneath
* @returns {Promise} resourcePromise object.
*
*/
@@ -439,18 +427,18 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* Retrieves all media children with types used as folders.
* Uses the convention of looking for media items with mediaTypes ending in
* *Folder so will match "Folder", "bannerFolder", "secureFolder" etc,
*
*
* NOTE: This will return a max of 500 folders, if more is required it needs to be paged
*
*
* ##usage
* <pre>
* mediaResource.getChildFolders(1234)
* .then(function(data) {
* alert('folders');
* });
* </pre>
* </pre>
*
* @param {int} parentId Id of the media item to query for child folders
* @param {int} parentId Id of the media item to query for child folders
* @returns {Promise} resourcePromise object.
*
*/
@@ -485,8 +473,8 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function() {
* alert('its empty!');
* });
* </pre>
*
* </pre>
*
* @returns {Promise} resourcePromise object.
*
*/
@@ -513,8 +501,8 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function(searchResult) {
* alert('it's here!');
* });
* </pre>
*
* </pre>
*
* @param {string} query The search query
* @param {int} pageNumber The page number
* @param {int} pageSize The number of media items on a page
@@ -525,7 +513,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
search: function (query, pageNumber, pageSize, searchFrom) {
var args = [
{ "query": query },
{ "query": query },
{ "pageNumber": pageNumber },
{ "pageSize": pageSize },
{ "searchFrom": searchFrom }
@@ -661,10 +661,10 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
*/
hideDialog: function (showMenu) {
if (showMenu) {
setMode("default");
if(showMenu){
this.showMenu(undefined, { skipDefault: true, node: appState.getMenuState("currentNode") });
} else {
setMode("default");
}
},
/**
@@ -146,7 +146,6 @@
@import "components/umb-mini-editor.less";
@import "components/users/umb-user-cards.less";
@import "components/users/umb-user-details.less";
@import "components/users/umb-user-group-picker-list.less";
@import "components/users/umb-user-group-preview.less";
@import "components/users/umb-user-preview.less";
@@ -63,6 +63,9 @@
.btn-group>.btn+.dropdown-toggle {
box-shadow: none;
-webkit-box-shadow:none;
}
.btn-group .btn.dropdown-toggle {
border-left-width: 1px;
border-left-style: solid;
}
@@ -81,9 +81,9 @@ a, a:hover{
.wait {
display: block;
height: 100%;
height: 280px;
width: 100%;
background:#fff center center url(../img/loader.gif) no-repeat;
background: center center url(../img/loader.gif) no-repeat;
}
/****************************/
@@ -156,7 +156,6 @@
margin-bottom: 1px;
border-radius: 0;
border-bottom: 1px solid @gray-9;
padding: 10px;
}
.umb-help-list-item__group-title i {
@@ -187,7 +186,6 @@
.umb-help-list-item__title {
font-size: 14px;
display: block;
margin-left: 26px;
}
.umb-help-list-item__description {
@@ -200,7 +198,6 @@
margin-right: 8px;
color: @gray-4;
font-size: 18px;
float: left;
}
.umb-help-list-item__open-icon {
@@ -215,4 +212,4 @@
[data-element*="tour-"].umb-help-list-item:hover .umb-help-list-item__title {
text-decoration:none;
}
}
@@ -10,10 +10,6 @@
}
}
.umb-toggle:focus .umb-toggle__toggle{
box-shadow: 0 1px 3px fade(@black, 12%), 0 1px 2px fade(@black, 24%);
}
.umb-toggle__handler {
position: absolute;
top: 0;
@@ -34,7 +30,6 @@
background: @gray-8;
border-radius: 90px;
position: relative;
transition: box-shadow .3s;
}
.umb-toggle--checked .umb-toggle__toggle {
@@ -48,6 +43,7 @@
/* Labels */
.umb-toggle__label {
font-size: 12px;
color: @gray-2;
}
@@ -3,8 +3,8 @@
flex-flow: row wrap;
.umb-color-box {
border: 1px solid @gray-8;
color: @white;
border: none;
color: white;
cursor: pointer;
padding: 1px;
text-align: center;
@@ -19,7 +19,7 @@
justify-content: center;
&:hover, &:focus {
box-shadow: 0 1px 3px fade(@black, 12%), 0 1px 2px fade(@black, 24%);
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
&.active {
@@ -56,7 +56,7 @@
padding-top: 10px;
.umb-color-box__label {
background: @white;
background: #fff;
font-size: 14px;
display: flex;
flex-flow: column wrap;
@@ -69,8 +69,7 @@
margin-right: -1px;
text-indent: 0;
text-align: left;
border-top: 1px solid @gray-8;
border-bottom: 1px solid @gray-8;
border: 1px solid @gray-8;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
overflow: hidden;
@@ -1,6 +1,5 @@
.umb-nested-content {
text-align: center;
position: relative;
}
.umb-nested-content--not-supported {
@@ -209,26 +208,12 @@
width: 99%;
}
.usky-grid.umb-nested-content__node-type-picker {
.cell-tools-menu {
position: relative;
transform: translate(-50%, -25%);
}
.elements li {
&:hover {
i {
color: @white !important;
}
}
i {
// make sure the item icons shown are in the correct color according to their doc type icon instead of the grid editor item color
color: unset;
}
}
.usky-grid.umb-nested-content__node-type-picker .cell-tools-menu {
position: relative;
transform: translate(-50%, -25%);
}
// this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors
// the attribute selector ensures the change only applies to the linkpicker overlay
.form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row {
@@ -1,15 +1,15 @@
.umb-nav-tabs {
position: absolute;
z-index: 999;
}
.umb-nav-tabs.-padding-left {
padding-left: 20px;
}
.umb-tab-content {
padding-top: 20px;
position: relative;
top: 31px;
border-top: 1px solid @purple-l3;
}
.umb-nav-tabs {
position: absolute;
z-index: 999;
}
.umb-nav-tabs.-padding-left {
padding-left: 20px;
}
.umb-tab-content {
padding-top: 20px;
position: relative;
top: 22px;
border-top: 1px solid @purple-l3;
}
@@ -1,122 +0,0 @@
.umb-user-details-avtar {
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #d8d7d9;
}
div.umb-user-details-actions > div {
margin-bottom: 20px;
}
.umb-user-details-actions .umb-button {
margin-bottom: 20px;
}
.umb-user-details-view-title {
font-size: 20px;
font-weight: bold;
color: @black;
margin-bottom: 30px;
}
.umb-user-details-view-wrapper {
padding: 20px 60px;
}
@media (max-width: 768px) {
.umb-user-details-view-wrapper {
padding: 0;
}
}
.umb-user-details-section {
margin-bottom: 40px;
}
.umb-user-details-details {
display: flex;
}
a.umb-user-details-details__back-link {
font-weight: bold;
color: @black;
}
.umb-user-details-details__back-link:hover {
color: @gray-4;
text-decoration: none;
}
@sidebarwidth: 350px; // Width of sidebar. Ugly hack because of old version of Less
.umb-user-details-details__main-content {
flex: 1 1 auto;
margin-right: 30px;
width: calc(~'100%' - ~'@{sidebarwidth}' - ~'30px'); // Make sure that the main content area doesn't gets affected by inline styling
}
.umb-user-details-details__main-content .umb-node-preview-add {
max-width: 100%;
}
.umb-user-details-details__sidebar {
flex: 0 0 @sidebarwidth;
}
@media (max-width: 768px) {
.umb-user-details-details {
flex-direction: column;
}
.umb-user-details-details__main-content {
flex: 1 1 auto;
width: 100%;
margin-bottom: 30px;
margin-right: 0;
}
.umb-user-details-details__sidebar {
flex: 1 1 auto;
width: 100%;
}
}
.umb-user-details-details__section {
background: @gray-10;
padding: 20px;
margin-bottom: 20px;
border-radius: 3px;
border: 1px solid @gray-8;
}
.umb-user-details-details__section-title {
font-size: 17px;
font-weight: bold;
color: @black;
margin-top: 0;
margin-bottom: 15px;
}
.umb-user-details-details__section-description {
font-size: 12px;
line-height: 1.6em;
margin-bottom: 15px;
}
.umb-user-details-details__information-item {
margin-bottom: 10px;
font-size: 13px;
}
.umb-user-details-details__information-item-label {
color: @black;
font-weight: bold;
}
.umb-user-details-details__information-item-content {
word-break: break-word;
}
@@ -105,63 +105,6 @@
border-top: 1px solid @purple-l3;
}
.umb-dialog .propertyItemheader {
width: 140px !Important;
}
.umb-dialog .diffDropdown
{
width:400px;
}
.umb-dialog .diffPanel {
height: 400px;
}
.umb-dialog .diff {
margin-top: 10px;
height: 100%;
overflow: auto;
border-top: 1px solid #ccc;
border-top: 1px solid #ccc;
padding: 5px;
}
.umb-dialog .diff table{
width:95%;
max-width:95%;
margin: 0 3px;
}
.umb-dialog .diff table th {
padding: 5px;
width: 25%;
border-bottom: 1px solid #ccc;
}
.umb-dialog .diff table td {
border-bottom: 1px solid #ccc;
padding: 3px;
}
.umb-dialog .diff del {
background: rgb(255, 230, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.umb-dialog .diff ins {
background: rgb(230, 255, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.umb-dialog .diff .diffnotice {
text-align: center;
margin-bottom: 10px;
}
/*we will always make sure to wrap iframe dialogs in proper padding*/
.umbracoDialog{
width: auto !Important;
+1 -10
View File
@@ -52,16 +52,6 @@
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
&__toggle{
margin: 10px 0;
label{
margin-right: 10px;
position: relative;
top: -2px;
}
}
}
.upload-button {
@@ -368,6 +358,7 @@
flex-direction: column;
height: 99px;
padding: 0 20px;
overflow-y: hidden;
}
.umb-panel-header-content {
@@ -115,13 +115,6 @@ div.umb-codeeditor .umb-btn-toolbar {
//
// RTE
// --------------------------------------------------
.umb-rte {
position: relative;
.-loading {
position: absolute;
}
}
.mce-tinymce{border: 1px solid @gray-8 !important; border-radius: 0px !important;}
.mce-panel{background: @gray-10 !important; border-color: @gray-8 !important;}
.mce-btn-group, .mce-btn{border: none !important; background: none !important;}
@@ -144,14 +137,11 @@ div.umb-codeeditor .umb-btn-toolbar {
/* pre-value editor */
.control-group.color-picker-preval {
.thumbnail {
width: 34px;
height: 34px;
width: 36px;
min-width: auto;
border: none;
cursor: move;
border-radius: 3px;
margin-top: auto;
margin-bottom: auto;
}
.handle {
@@ -163,19 +153,19 @@ div.umb-codeeditor .umb-btn-toolbar {
div.color-picker-prediv {
display: inline-flex;
align-items: center;
max-width: 100%;
flex: 1;
max-width: 85%;
pre {
display: inline-flex;
font-family: monospace;
margin-left: 15px;
margin-right: 15px;
margin-right: 10px;
margin-left: 10px;
white-space: nowrap;
overflow: hidden;
margin-bottom: 0;
vertical-align: middle;
padding: 6px 10px;
padding-top: 7px;
padding-bottom: 7px;
background: #f7f7f7;
flex: 0 0 auto;
}
@@ -204,11 +194,11 @@ div.umb-codeeditor .umb-btn-toolbar {
label {
border: 1px solid #fff;
padding: 6px 10px;
padding: 7px 10px;
font-family: monospace;
border: 1px solid #dfdfe1;
background: #f7f7f7;
margin: 0 15px 0 3px;
margin: 0 15px 0 0;
border-radius: 3px;
}
}
@@ -315,7 +305,7 @@ div.umb-codeeditor .umb-btn-toolbar {
.umb-mediapicker .umb-sortable-thumbnails li {
flex-direction: column;
margin: 0 0 5px 5px;
margin: 0 5px 5px 0;
padding: 5px;
}
@@ -574,16 +564,6 @@ div.umb-codeeditor .umb-btn-toolbar {
}
}
.imagecropper .umb-cropper__container .button-drawer {
display: flex;
justify-content: flex-end;
padding: 10px;
button {
margin-left: 4px;
}
}
.umb-close-cropper {
position: absolute;
top: 3px;
@@ -19,6 +19,7 @@ angular.module("umbraco")
$scope.classes.splice(0, 0, "noclass");
})
assetsService.loadCss("/App_Plugins/Lecoati.uSky.Grid/lib/uSky.Grid.ApprovedColorPicker.css", $scope);
assetsService.loadCss(cssPath, $scope);
});
});
@@ -151,7 +151,7 @@ angular.module("umbraco")
if (folder.id > 0) {
entityResource.getAncestors(folder.id, "media")
.then(function(anc) {
.then(function(anc) {
$scope.path = _.filter(anc,
function(f) {
return f.path.indexOf($scope.startNodeId) !== -1;
@@ -237,10 +237,7 @@ angular.module("umbraco")
$scope.onUploadComplete = function(files) {
$scope.gotoFolder($scope.currentFolder).then(function() {
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
var image = $scope.images[$scope.images.length - 1];
$scope.target = image;
$scope.target.url = mediaHelper.resolveFile(image);
selectImage(image);
selectImage($scope.images[$scope.images.length - 1]);
}
});
};
@@ -309,23 +306,6 @@ angular.module("umbraco")
debounceSearchMedia();
};
/**
* Toggle the $scope.model.allowAsRoot value to either true or false
*/
$scope.toggle = function(){
// Make sure to activate the changeSearch function everytime the toggle is clicked
$scope.changeSearch();
// Toggle the showChilds option
if($scope.showChilds){
$scope.showChilds = false;
return;
}
$scope.showChilds = true;
}
$scope.changePagination = function(pageNumber) {
$scope.loading = true;
$scope.searchOptions.pageNumber = pageNumber;
@@ -20,17 +20,12 @@
ng-change="changeSearch()"
type="text"
no-dirty-check />
<div class="form-search__toggle">
<label>
<localize key="general_includeFromsubFolders">Include subfolders in search</localize>
</label>
<umb-toggle
checked="showChilds"
on-click="toggle()">
</umb-toggle>
</div>
<br />
<label>
<localize key="general_includeFromsubFolders">Include subfolders in search</localize>
<input type="checkbox" ng-model="showChilds"
ng-change="changeSearch()">
</label>
</div>
<div class="upload-button">
@@ -1,4 +1,4 @@
<button ng-click="click()" type="button" class="umb-toggle" ng-class="{'umb-toggle--checked': checked}">
<button ng-click="click()" type="button" class="umb-toggle dib" ng-class="{'umb-toggle--checked': checked}">
<span ng-if="!labelPosition && showLabels === 'true' || labelPosition === 'left' && showLabels === 'true'">
<span ng-if="!checked" class="umb-toggle__label umb-toggle__label--left">{{ displayLabelOff }}</span>
@@ -2,7 +2,7 @@
<div class="umb-package-details__main-content">
<umb-box ng-if="node.urls" data-element="node-info-urls">
<umb-box data-element="node-info-urls">
<umb-box-header title-key="general_links"></umb-box-header>
<umb-box-content class="block-form">
<ul class="nav nav-stacked" style="margin-bottom: 0;">
@@ -29,11 +29,11 @@
<umb-box-header title-key="general_general"></umb-box-header>
<umb-box-content class="block-form">
<umb-control-group ng-if="node.id !== 0" data-element="node-info-create-date" label="@content_createDate">
<umb-control-group data-element="node-info-create-date" label="@content_createDate">
{{node.createDateFormatted}} by {{ node.owner.name }}
</umb-control-group>
<umb-control-group ng-if="node.id !== 0" data-element="node-info-update-date" label="@content_updateDate">
<umb-control-group data-element="node-info-update-date" label="@content_updateDate">
{{node.updateDateFormatted}}
</umb-control-group>
@@ -47,7 +47,7 @@
</umb-node-preview>
</umb-control-group>
<umb-control-group ng-if="node.id !== 0" data-element="node-info-id" label="Id">
<umb-control-group data-element="node-info-id" label="Id">
<div>{{ node.id }}</div>
<small>{{ node.key }}</small>
</umb-control-group>
@@ -1,6 +1,6 @@
<div class="umb-color-swatches" ng-class="{ 'with-labels': useLabel }">
<button type="button" class="umb-color-box umb-color-box--{{size}} btn-{{color.value}}" ng-repeat="color in colors" title="{{useLabel ? color.label : '#' + color.value}}" hex-bg-inline="{{useColorClass === false}}" hex-bg-color="{{color.value}}" ng-class="{ 'active': color.value === selectedColor }" ng-click="setColor(color.value)">
<button type="button" class="umb-color-box umb-color-box--{{size}} btn-{{color.value}}" ng-repeat="color in colors" title="{{color.label}}" hex-bg-inline="{{useColorClass === false}}" hex-bg-color="{{color.value}}" ng-class="{ 'active': color.value === selectedColor }" ng-click="setColor(color.value)">
<div class="umb-color-box-inner">
<div class="check_circle">
<i class="icon icon-check small"></i>
@@ -27,8 +27,8 @@ function DocumentTypesCreateController($scope, $location, navigationService, con
$scope.showCreateDocTypeCollection = function () {
$scope.model.creatingDoctypeCollection = true;
$scope.model.collectionCreateTemplate = !$scope.model.disableTemplates;
$scope.model.collectionItemCreateTemplate = !$scope.model.disableTemplates;
$scope.model.collectionCreateTemplate = true;
$scope.model.collectionItemCreateTemplate = true;
};
$scope.createContainer = function () {
@@ -19,8 +19,8 @@
<i class="large icon-item-arrangement"></i>
<span class="menu-label">
<localize ng-if="model.disableTemplates === false" key="create_documentTypeWithoutTemplate"></localize>
<localize ng-if="model.disableTemplates === true" key="content_documentType">Document type></localize>
<localize ng-if="model.disableTemplates == false" key="create_documentTypeWithoutTemplate"></localize>
<localize ng-if="model.disableTemplates == true" key="content_documentType">Document type></localize>
</span>
</a>
</li>
@@ -80,18 +80,14 @@
<umb-control-group label="Name of the Parent Document Type" hide-label="false">
<input type="text" name="collectionName" ng-model="model.collectionName" class="umb-textstring textstring input-block-level" umb-auto-focus required />
<span ng-if="model.disableTemplates === false">
<umb-toggle on-click="model.collectionCreateTemplate = !model.collectionCreateTemplate" checked="model.collectionCreateTemplate"></umb-toggle>
<label>Create template for the Parent Document Type</label>
</span>
<umb-toggle on-click="model.collectionCreateTemplate = !model.collectionCreateTemplate" checked="model.collectionCreateTemplate"></umb-toggle>
<label>Create template for the Parent Document Type</label>
</umb-control-group>
<umb-control-group label="Name of the Item Document Type" hide-label="false">
<input type="text" name="collectionItemName" ng-model="model.collectionItemName" class="umb-textstring textstring input-block-level" required />
<span ng-if="model.disableTemplates === false">
<umb-toggle on-click="model.collectionItemCreateTemplate = !model.collectionItemCreateTemplate" checked="model.collectionItemCreateTemplate"></umb-toggle>
<label>Create template for the Item Document Type</label>
</span>
<umb-toggle on-click="model.collectionItemCreateTemplate = !model.collectionItemCreateTemplate" checked="model.collectionItemCreateTemplate"></umb-toggle>
<label>Create template for the Item Document Type</label>
</umb-control-group>
<button type="submit" class="btn btn-primary"><localize key="general_create">Create</localize></button>
@@ -1,4 +1,4 @@
function booleanEditorController($scope) {
function booleanEditorController($scope, $rootScope, assetsService) {
function setupViewModel() {
$scope.renderModel = {
@@ -1,10 +1,6 @@
<div class="umb-editor umb-boolean" ng-controller="Umbraco.PropertyEditors.BooleanController">
<umb-toggle
checked="renderModel.value"
on-click="toggle()"
show-labels="{{model.config.labelOn ? 'true': 'false'}}"
label-position="right"
label-on="{{model.config.labelOn}}"
label-off="{{model.config.labelOn}}">
on-click="toggle()">
</umb-toggle>
</div>
@@ -1,6 +1,5 @@
<div ng-controller="Umbraco.PropertyEditors.ColorPickerController">
<div ng-if="!isConfigured">
<localize key="colorpicker_noColors">You haven't defined any colors</localize>
</div>
@@ -3,22 +3,18 @@
<div class="umb-prevalues-multivalues__left">
<input name="newColor" type="hidden" />
<label for="newColor" val-highlight="{{hasError}}">#{{newColor}}</label>
<input name="newLabel" type="text" ng-model="newLabel" focus-when="{{focusOnNew}}" class="umb-editor color-label" placeholder="Label" ng-show="labelEnabled" />
<input name="newLabel" type="text" ng-model="newLabel" class="umb-editor color-label" placeholder="Label" ng-show="labelEnabled" />
</div>
<div class="umb-prevalues-multivalues__right">
<button class="btn btn-info add" ng-click="add($event)"><localize key="general_add">Add</localize></button>
</div>
</div>
<div ui-sortable="sortableOptions" ng-model="model.value">
<div class="control-group umb-prevalues-multivalues__listitem color-picker-preval" ng-repeat="item in model.value track by $id(item)">
<div class="control-group umb-prevalues-multivalues__listitem color-picker-preval" ng-repeat="item in model.value">
<i class="icon icon-navigation handle"></i>
<div class="umb-prevalues-multivalues__left">
<div class="thumbnail span1" hex-bg-color="{{item.value}}" hex-bg-orig="transparent"></div>
<div class="color-picker-prediv">
<pre>#{{item.value}}</pre>
<span ng-bind="item.label" ng-if="!labelEnabled"></span>
<input type="text" ng-if="labelEnabled" ng-model="item.label" val-server="item_{{$index}}" required />
</div>
<div class="thumbnail span1" hex-bg-color="{{item.value}}" bg-orig="transparent"></div>
<div class="color-picker-prediv"><pre>#{{item.value}}</pre><span>{{item.label}}</span></div>
</div>
<div class="umb-prevalues-multivalues__right">
<a class="umb-node-preview__action umb-node-preview__action--red" ng-click="remove(item, $event)"><localize key="general_remove">Remove</localize></a>
@@ -5,9 +5,8 @@
var defaultLabel = null;
$scope.newColor = defaultColor;
$scope.newLabel = defaultLabel;
$scope.newLavel = defaultLabel;
$scope.hasError = false;
$scope.focusOnNew = false;
$scope.labels = {};
@@ -105,6 +104,7 @@
};
$scope.add = function (evt) {
evt.preventDefault();
if ($scope.newColor) {
@@ -117,9 +117,7 @@
value: $scope.newColor,
label: newLabel
});
$scope.newLabel = "";
$scope.hasError = false;
$scope.focusOnNew = true;
return;
}
@@ -281,12 +281,10 @@ angular.module("umbraco")
availableItems: area.$allowedEditors,
event: event,
show: true,
submit: function (model) {
if (model.selectedItem) {
$scope.addControl(model.selectedItem, area, index);
$scope.editorOverlay.show = false;
$scope.editorOverlay = null;
}
submit: function(model) {
$scope.addControl(model.selectedItem, area, index);
$scope.editorOverlay.show = false;
$scope.editorOverlay = null;
}
};
};
@@ -36,32 +36,12 @@ angular.module('umbraco')
//crop a specific crop
$scope.crop = function (crop) {
// clone the crop so we can discard the changes
$scope.currentCrop = angular.copy(crop);
$scope.currentCrop = crop;
$scope.currentPoint = undefined;
};
//done cropping
$scope.done = function () {
if (!$scope.currentCrop) {
return;
}
// find the original crop by crop alias and update its coordinates
var editedCrop = _.find($scope.model.value.crops, function(crop) {
return crop.alias === $scope.currentCrop.alias;
});
editedCrop.coordinates = $scope.currentCrop.coordinates;
$scope.close();
};
//reset the current crop
$scope.reset = function() {
$scope.currentCrop.coordinates = undefined;
$scope.done();
}
//close crop overlay
$scope.close = function (crop) {
$scope.currentCrop = undefined;
$scope.currentPoint = undefined;
};
@@ -18,6 +18,8 @@
<div ng-if="currentCrop" style="float:left; max-width: 100%;" class="clearfix">
<div class="umb-cropper__container">
<i ng-click="done()" class="icon icon-delete btn-round umb-close-cropper"></i>
<div>
<umb-image-crop height="{{currentCrop.height}}"
width="{{currentCrop.width}}"
@@ -28,11 +30,10 @@
</umb-image-crop>
</div>
<div class="button-drawer">
<button class="btn btn-link" ng-click="reset()"><localize key="imagecropper_reset">Reset this crop</localize></button>
<button class="btn" ng-click="close()"><localize key="imagecropper_undoEditCrop">Undo edits</localize></button>
<button class="btn btn-success" ng-click="done()"><localize key="imagecropper_updateEditCrop">Done</localize></button>
</div>
<a href style="margin:auto; text-align: center; font-size: 11px;" class="btn btn-link red"
ng-click="currentCrop.coordinates = undefined; done()">
<localize key="imagecropper_reset">Reset</localize>
</a>
</div>
</div>
@@ -37,18 +37,6 @@
});
});
$scope.selectableDocTypesFor = function (config) {
// return all doctypes that are:
// 1. either already selected for this config, or
// 2. not selected in any other config
return _.filter($scope.model.docTypes, function (docType) {
return docType.alias === config.ncAlias || !_.find($scope.model.value, function(c) {
return docType.alias === c.ncAlias;
});
});
}
if (!$scope.model.value) {
$scope.model.value = [];
$scope.add();
@@ -243,7 +231,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
cursor: "move",
handle: ".umb-nested-content__icon--move",
start: function (ev, ui) {
updateModel();
// Yea, yea, we shouldn't modify the dom, sue me
$("#umb-nested-content--" + $scope.model.id + " .umb-rte textarea").each(function () {
tinymce.execCommand('mceRemoveEditor', false, $(this).attr('id'));
@@ -22,7 +22,7 @@
</td>
<td>
<select id="{{model.alias}}_doctype_select"
ng-options="dt.alias as dt.name for dt in selectableDocTypesFor(config) | orderBy: 'name'"
ng-options="dt.alias as dt.name for dt in model.docTypes | orderBy: 'name'"
ng-model="config.ncAlias" required></select>
</td>
<td>
@@ -1,5 +1,5 @@
<div ng-controller="Umbraco.PropertyEditors.RTEController" class="umb-editor umb-rte">
<div class="-loading" ng-if="isLoading"><localize key="general_loading">Loading</localize>...</div>
<div ng-if="isLoading"><localize key="general_loading">Loading</localize>...</div>
<textarea ng-style="{ visibility : isLoading ? 'hidden' : 'visible'}"
ng-model="model.value" rows="10"
id="{{textAreaHtmlId}}"></textarea>
@@ -15,7 +15,7 @@
<umb-editor-container>
<div ng-if="!vm.loading" class="umb-user-details-view-wrapper" style="padding: 0;">
<div ng-if="!vm.loading" class="umb-packages-view-wrapper" style="padding: 0;">
<umb-editor-sub-views
ng-if="!vm.loading"
@@ -83,4 +83,4 @@
position="right">
</umb-overlay>
</div>
</div>
@@ -1,6 +1,6 @@
<div class="umb-user-details-details">
<div class="umb-package-details">
<div class="umb-user-details-details__main-content">
<div class="umb-package-details__main-content">
<umb-box>
@@ -95,8 +95,8 @@
<a href=""
ng-if="!model.user.isCurrentUser"
style="max-width: 100%;"
class="umb-node-preview-add"
id="content-start-add"
ng-click="model.openContentPicker()"
prevent-default>
<localize key="general_add">Add</localize>
@@ -121,9 +121,9 @@
<a href=""
ng-if="!model.user.isCurrentUser"
class="umb-node-preview-add"
style="max-width: 100%;"
class="umb-node-preview-add"
ng-click="model.openMediaPicker()"
id="media-start-add"
prevent-default>
<localize key="general_add">Add</localize>
</a>
@@ -165,12 +165,12 @@
</umb-box>
</div>
<div class="umb-user-details-details__sidebar">
<div class="umb-package-details__sidebar">
<div class="umb-user-details-details__section">
<div class="umb-package-details__section">
<!-- Avatar -->
<div class="umb-user-details-avtar">
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #d8d7d9;">
<ng-form name="avatarForm" class="flex flex-column justify-center items-center">
<umb-avatar style="margin-bottom: 15px;"
@@ -214,9 +214,9 @@
</div>
<!-- Actions -->
<div class="umb-user-details-actions">
<div style="margin-bottom: 20px;">
<div>
<div style="margin-bottom: 10px;">
<umb-button ng-if="model.user.userDisplayState.key === 'Disabled' && !model.user.isCurrentUser"
type="button"
button-style="[success,block]"
@@ -228,7 +228,7 @@
</umb-button>
</div>
<div>
<div style="margin-bottom: 10px;">
<umb-button ng-if="model.user.userDisplayState.key === 'LockedOut' && !model.user.isCurrentUser"
type="button"
button-style="[success,block]"
@@ -239,7 +239,8 @@
size="s">
</umb-button>
</div>
<div>
<div style="margin-bottom: 10px;">
<umb-button ng-if="model.user.userDisplayState.key !== 'Disabled' && model.user.userDisplayState.key !== 'Invited' && !model.user.isCurrentUser"
type="button"
button-style="[info,block]"
@@ -250,27 +251,25 @@
size="s">
</umb-button>
</div>
<div>
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited'"
button-style="[info,block]"
action="model.toggleChangePassword()"
label="Change password"
label-key="general_changePassword"
state="changePasswordButtonState"
ng-if="model.changePasswordModel.isChanging === false"
size="s">
</umb-button>
</div>
<div>
<umb-button type="button" ng-if="!model.user.lastLoginDate"
button-style="[danger,block]"
action="model.deleteNonLoggedInUser()"
label="Delete"
label-key="user_deleteUser"
state="deleteNotLoggedInUserButtonState"
size="s">
</umb-button>
</div>
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited'"
button-style="[info,block]"
action="model.toggleChangePassword()"
label="Change password"
label-key="general_changePassword"
state="changePasswordButtonState"
ng-if="model.changePasswordModel.isChanging === false"
size="s">
</umb-button>
<umb-button type="button" ng-if="!model.user.lastLoginDate"
button-style="[danger,block]"
action="model.deleteNonLoggedInUser()"
label="Delete"
label-key="user_deleteUser"
state="deleteNotLoggedInUserButtonState"
size="s">
</umb-button>
<ng-form ng-if="model.changePasswordModel.isChanging" name="passwordForm" class="block-form" val-form-manager>
@@ -294,26 +293,26 @@
</div>
<!-- User stats -->
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="general_status">Status</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
<umb-badge style="margin-top: 4px;" size="s" color="{{model.user.userDisplayState.color}}">
{{model.user.userDisplayState.name}}
</umb-badge>
</div>
</div>
<div ng-if="model.user.userDisplayState.key === 'Invited' && !model.user.isCurrentUser">
<div style="margin-bottom: 10px;" ng-if="model.user.userDisplayState.key === 'Invited' && !model.user.isCurrentUser">
<textarea name="resendInviteMessage"
type="text"
class="input-block-level"
localize="placeholder"
placeholder="@placeholders_enterMessage"
ng-model="model.resendInviteMessage"
rows="4">
</textarea>
type="text"
class="input-block-level"
localize="placeholder"
placeholder="@placeholders_enterMessage"
ng-model="model.resendInviteMessage"
rows="4">
</textarea>
<umb-button type="button"
button-style="[info,block]"
action="model.resendInvite()"
@@ -324,30 +323,30 @@
</umb-button>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_lastLogin">Last login</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
<span ng-if="model.user.lastLoginDate">{{ model.user.formattedLastLogin }}</span>
<span ng-if="!model.user.lastLoginDate">{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLogin">has not logged in yet</localize></span>
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_failedPasswordAttempts">Failed login attempts</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
{{ model.user.failedPasswordAttempts }}
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_lastLockoutDate">Last lockout date</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
<span ng-if="model.user.lastLockoutDate === '0001-01-01T00:00:00'">
{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLockouts">hasn't been locked out</localize>
</span>
@@ -355,11 +354,11 @@
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_lastPasswordChangeDate">Password is last changed</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
<span ng-if="model.user.lastPasswordChangeDate === '0001-01-01T00:00:00'">
<localize key="user_noPasswordChange">The password hasn't been changed</localize>
</span>
@@ -367,20 +366,20 @@
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_createDate">User is created</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
{{ model.user.formattedCreateDate }}
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<localize key="user_updateDate">User is last updated</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
<div class="umb-package-details__information-item-content">
{{ model.user.formattedUpdateDate }}
</div>
</div>
@@ -20,7 +20,7 @@
@Html.Partial(Model.PreviewExtendedHeaderView)
}
<div id="demo-iframe-wrapper" class="{{previewDevice.css}}">
<div id="demo-iframe-wrapper" ng-show="frameLoaded" class="{{previewDevice.css}}">
<iframe id="resultFrame" ng-src="{{pageUrl}}" frameborder="0" iframe-is-loaded></iframe>
</div>
<div class="canvasdesigner" ng-init="showDevicesPreview = true; showDevices = !@(disableDevicePreview); showPalettePicker = true" ng-mouseenter="positionSelectedHide()">
@@ -124,7 +124,7 @@
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, umbraco">
<urlShemeRegex><![CDATA[twitgoo\.com/]]></urlShemeRegex>
</provider>
<!-- Twitter Settings -->
<!-- Twitter Settigs -->
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
<urlShemeRegex><![CDATA[twitter\.com/]]></urlShemeRegex>
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
@@ -124,7 +124,7 @@
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, umbraco">
<urlShemeRegex><![CDATA[twitgoo\.com/]]></urlShemeRegex>
</provider>
<!-- Twitter Settings -->
<!-- Twitter Settigs -->
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
<urlShemeRegex><![CDATA[twitter\.com/]]></urlShemeRegex>
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
@@ -147,7 +147,6 @@
<key alias="rollback">Brugeren har tilbagerullet indholdet til en tidligere tilstand</key>
<key alias="sendtopublish">Brugeren har sendt indholdet til udgivelse</key>
<key alias="sendtotranslate">Brugeren har sendt indholdet til oversættelse</key>
<key alias="sort">Brugeren har sorteret de underliggende sider</key>
<key alias="smallCopy">Kopieret</key>
<key alias="smallPublish">Udgivet</key>
<key alias="smallMove">Flyttet</key>
@@ -157,7 +156,6 @@
<key alias="smallRollBack">Indhold tilbagerullet</key>
<key alias="smallSendToPublish">Sendt til udgivelse</key>
<key alias="smallSendToTranslate">Sendt til oversættelse</key>
<key alias="smallSort">Sorteret</key>
</area>
<area alias="changeDocType">
<key alias="changeDocTypeInstruction">For at skifte det valgte indholds dokumenttype, skal du først vælge en ny dokumenttype, som er gyldig på denne placering.</key>
@@ -261,7 +259,7 @@
<key alias="dropFilesHere">Slip filerne her...</key>
<key alias="urls">Link til medie</key>
<key alias="orClickHereToUpload">eller klik her for at vælge filer</key>
<key alias="dragFilesHereToUpload">Du kan trække filer herind for at uploade.</key>
<key alias="dragFilesHereToUpload">Du kan trække filer herind for at uploade</key>
<key alias="onlyAllowedFiles">Tilladte filtyper er kun</key>
<key alias="disallowedFileType">Kan ikke uploade denne fil, den har ikke en godkendt filtype</key>
<key alias="maxFileSize">Maks filstørrelse er</key>
@@ -991,8 +989,6 @@ Mange hilsner fra Umbraco robotten
</area>
<area alias="imagecropper">
<key alias="reset">Nulstil</key>
<key alias="updateEditCrop">Acceptér</key>
<key alias="undoEditCrop">Fortryd</key>
</area>
@@ -153,7 +153,6 @@
<key alias="rollback">Content rollback performed by user</key>
<key alias="sendtopublish">Content Send To Publish performed by user</key>
<key alias="sendtotranslate">Content Send To Translation performed by user</key>
<key alias="sort">Sort child items performed by user</key>
<key alias="smallCopy">Copy</key>
<key alias="smallPublish">Publish</key>
<key alias="smallMove">Move</key>
@@ -163,7 +162,6 @@
<key alias="smallRollBack">Rollback</key>
<key alias="smallSendToPublish">Send To Publish</key>
<key alias="smallSendToTranslate">Send To Translation</key>
<key alias="smallSort">Sort</key>
</area>
<area alias="changeDocType">
<key alias="changeDocTypeInstruction">To change the document type for the selected content, first select from the list of valid types for this location.</key>
@@ -269,7 +267,7 @@
<key alias="dropFilesHere">Drop your files here...</key>
<key alias="urls">Link to media</key>
<key alias="orClickHereToUpload">or click here to choose files</key>
<key alias="dragFilesHereToUpload">You can drag files here to upload.</key>
<key alias="dragFilesHereToUpload">You can drag files here to upload</key>
<key alias="onlyAllowedFiles">Only allowed file types are</key>
<key alias="disallowedFileType">Cannot upload this file, it does not have an approved file type</key>
<key alias="maxFileSize">Max file size is</key>
@@ -289,7 +287,7 @@
<key alias="documentTypeWithoutTemplate">Document Type without a template</key>
<key alias="newFolder">New folder</key>
<key alias="newDataType">New data type</key>
<key alias="newJavascriptFile">New JavaScript file</key>
<key alias="newJavascriptFile">New javascript file</key>
<key alias="newEmptyPartialView">New empty partial view</key>
<key alias="newPartialViewMacro">New partial view macro</key>
<key alias="newPartialViewFromSnippet">New partial view from snippet</key>
@@ -649,7 +647,7 @@
<key alias="rights">Permissions</key>
<key alias="scheduledPublishing">Scheduled Publishing</key>
<key alias="search">Search</key>
<key alias="searchNoResult">Sorry, we can not find what you are looking for.</key>
<key alias="searchNoResult">Sorry, we can not find what you are looking for</key>
<key alias="noItemsInList">No items have been added</key>
<key alias="server">Server</key>
<key alias="show">Show</key>
@@ -1219,7 +1217,7 @@ To manage your website, simply open the Umbraco back office and start adding con
</area>
<area alias="publicAccess">
<key alias="paAdvanced">Role based protection</key>
<key alias="paAdvancedHelp">If you wish to control access to the page using role-based authentication, using Umbraco's member groups.</key>
<key alias="paAdvancedHelp"><![CDATA[If you wish to control access to the page using role-based authentication,<br /> using Umbraco's member groups.]]></key>
<key alias="paAdvancedNoGroups">You need to create a membergroup before you can use role-based authentication</key>
<key alias="paErrorPage">Error Page</key>
<key alias="paErrorPageHelp">Used when people are logged on, but do not have access</key>
@@ -1296,13 +1294,11 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="externalLinkPlaceholder">Enter the link</key>
</area>
<area alias="imagecropper">
<key alias="reset">Reset crop</key>
<key alias="reset">Reset</key>
<key alias="defineCrop">Define crop</key>
<key alias="defineCropDescription">Give the crop an alias and its default width and height</key>
<key alias="saveCrop">Save crop</key>
<key alias="addCrop">Add new crop</key>
<key alias="updateEditCrop">Done</key>
<key alias="undoEditCrop">Undo edits</key>
</area>
<area alias="rollback">
<key alias="currentVersion">Current version</key>
@@ -153,7 +153,6 @@
<key alias="rollback">Content rollback performed by user</key>
<key alias="sendtopublish">Content Send To Publish performed by user</key>
<key alias="sendtotranslate">Content Send To Translation performed by user</key>
<key alias="sort">Sort child items performed by user</key>
<key alias="smallCopy">Copy</key>
<key alias="smallPublish">Publish</key>
<key alias="smallMove">Move</key>
@@ -163,7 +162,6 @@
<key alias="smallRollBack">Rollback</key>
<key alias="smallSendToPublish">Send To Publish</key>
<key alias="smallSendToTranslate">Send To Translation</key>
<key alias="smallSort">Sort</key>
</area>
<area alias="changeDocType">
@@ -270,7 +268,7 @@
<key alias="dropFilesHere">Drop your files here...</key>
<key alias="urls">Link to media</key>
<key alias="orClickHereToUpload">or click here to choose files</key>
<key alias="dragFilesHereToUpload">You can drag files here to upload.</key>
<key alias="dragFilesHereToUpload">You can drag files here to upload</key>
<key alias="onlyAllowedFiles">Only allowed file types are</key>
<key alias="disallowedFileType">Cannot upload this file, it does not have an approved file type</key>
<key alias="maxFileSize">Max file size is</key>
@@ -290,7 +288,7 @@
<key alias="documentTypeWithoutTemplate">Document Type without a template</key>
<key alias="newFolder">New folder</key>
<key alias="newDataType">New data type</key>
<key alias="newJavascriptFile">New JavaScript file</key>
<key alias="newJavascriptFile">New javascript file</key>
<key alias="newEmptyPartialView">New empty partial view</key>
<key alias="newPartialViewMacro">New partial view macro</key>
<key alias="newPartialViewFromSnippet">New partial view from snippet</key>
@@ -649,7 +647,7 @@
<key alias="rights">Permissions</key>
<key alias="scheduledPublishing">Scheduled Publishing</key>
<key alias="search">Search</key>
<key alias="searchNoResult">Sorry, we can not find what you are looking for.</key>
<key alias="searchNoResult">Sorry, we can not find what you are looking for</key>
<key alias="noItemsInList">No items have been added</key>
<key alias="server">Server</key>
<key alias="show">Show</key>
@@ -1217,7 +1215,7 @@ To manage your website, simply open the Umbraco back office and start adding con
</area>
<area alias="publicAccess">
<key alias="paAdvanced">Role based protection</key>
<key alias="paAdvancedHelp">If you wish to control access to the page using role-based authentication, using Umbraco's member groups.</key>
<key alias="paAdvancedHelp"><![CDATA[If you wish to control access to the page using role-based authentication,<br /> using Umbraco's member groups.]]></key>
<key alias="paAdvancedNoGroups">You need to create a membergroup before you can use role-based authentication</key>
<key alias="paErrorPage">Error Page</key>
<key alias="paErrorPageHelp">Used when people are logged on, but do not have access</key>
@@ -1294,13 +1292,11 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="externalLinkPlaceholder">Enter the link</key>
</area>
<area alias="imagecropper">
<key alias="reset">Reset crop</key>
<key alias="reset">Reset</key>
<key alias="defineCrop">Define crop</key>
<key alias="defineCropDescription">Give the crop an alias and its default width and height</key>
<key alias="saveCrop">Save crop</key>
<key alias="addCrop">Add new crop</key>
<key alias="updateEditCrop">Done</key>
<key alias="undoEditCrop">Undo edits</key>
</area>
<area alias="rollback">
<key alias="currentVersion">Current version</key>
@@ -75,19 +75,15 @@
<asp:Content ContentPlaceHolderID="body" runat="server">
<style> .umb-dialog { overflow: auto; } .umb-dialog-footer { position: relative; }</style>
<input id="tempFile" type="hidden" name="tempFile" runat="server" />
<asp:Panel ID="p_feedback" runat="server" Visible="False">
<div class="alert alert-success">
<asp:Literal runat="server" ID="feedback_text"></asp:Literal>
</div>
<button class="btn btn-primary" onclick="UmbClientMgr.closeModalWindow()"><%= umbraco.ui.Text("general", "ok")%></button>
</asp:Panel>
<cc1:Feedback ID="feedback" runat="server" />
<asp:Panel ID="p_mode" runat="server" CssClass="pa-umb-overlay">
<div class="umb-dialog-body">
<div class="umg-dialog-body">
<cc1:Pane ID="pane_chooseMode" runat="server" Text="Choose how to restict access to this page">
@@ -120,72 +116,74 @@
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
<asp:Button ID="bt_selectMode" runat="server" CssClass="btn btn-primary" OnClick="selectMode" />
<asp:Button ID="bt_selectMode" runat="server" Text="select" CssClass="btn btn-primary" OnClick="selectMode" />
</div>
</asp:Panel>
<asp:Panel ID="p_setup" runat="server" Visible="false" CssClass="pa-umb-overlay">
<div class="umb-dialog-body">
<cc1:Pane ID="pane_simple" runat="server" Visible="false" Text="Set the login and password for this page" CssClass="pa-umb-overlay">
<div class="pa-form">
<cc1:PropertyPanel Text="Login" ID="pp_login" runat="server">
<asp:TextBox ID="simpleLogin" runat="server" Width="250px"></asp:TextBox>
<asp:Label runat="server" ID="SimpleLoginLabel" Visible="False"></asp:Label>
</cc1:PropertyPanel>
</div>
<cc1:Pane ID="pane_simple" runat="server" Visible="false" Text="Set the login and password for this page" CssClass="pa-umb-overlay">
<div class="pa-form">
<cc1:PropertyPanel Text="Password" ID="pp_pass" runat="server">
<asp:TextBox ID="simplePassword" runat="server" Width="250px"></asp:TextBox>
</cc1:PropertyPanel>
</div>
<asp:CustomValidator CssClass="alert alert-danger" runat="server" ID="SimpleLoginNameValidator" Display="Dynamic" EnableViewState="False">
<p class="alert">Member name already exists, click <asp:LinkButton runat="server" OnClick="ChangeOnClick" CssClass="btn btn-mini btn-warning">Change</asp:LinkButton> to use a different name or Update to continue</p>
</asp:CustomValidator>
</cc1:Pane>
<cc1:Pane ID="pane_advanced" runat="server" Visible="false" Text="Role based protection">
<cc1:PropertyPanel ID="PropertyPanel3" runat="server">
<p><%= umbraco.ui.Text("publicAccess", "paSelectRoles", UmbracoUser)%></p>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="PropertyPanel2" runat="server">
<asp:PlaceHolder ID="groupsSelector" runat="server"></asp:PlaceHolder>
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane runat="server" ID="pane_pages" Text="Select the pages that contain login form and error messages">
<cc1:PropertyPanel runat="server" ID="pp_loginPage" CssClass="pa-select-pages">
<small class="umb-detail">
<%=umbraco.ui.Text("paLoginPageHelp")%>
</small>
<div class="pa-choose-page">
<asp:PlaceHolder ID="ph_loginpage" runat="server" />
</div>
<asp:CustomValidator ErrorMessage="Please pick a login page" runat="server" ID="cv_loginPage" ForeColor="Red" />
</cc1:PropertyPanel>
<cc1:PropertyPanel runat="server" ID="pp_errorPage" CssClass="pa-select-pages">
<small class="umb-detail">
<%=umbraco.ui.Text("paErrorPageHelp")%>
</small>
<div class="pa-choose-page">
<asp:PlaceHolder ID="ph_errorpage" runat="server" />
</div>
<asp:CustomValidator ErrorMessage="Please pick an error page" runat="server" ID="cv_errorPage" ForeColor="Red" />
</cc1:PropertyPanel>
</cc1:Pane>
<div class="pa-form">
<cc1:PropertyPanel Text="Login" ID="pp_login" runat="server">
<asp:TextBox ID="simpleLogin" runat="server" Width="250px"></asp:TextBox>
<asp:Label runat="server" ID="SimpleLoginLabel" Visible="False"></asp:Label>
</cc1:PropertyPanel>
</div>
<div class="pa-form">
<cc1:PropertyPanel Text="Password" ID="pp_pass" runat="server">
<asp:TextBox ID="simplePassword" runat="server" Width="250px"></asp:TextBox>
</cc1:PropertyPanel>
</div>
<asp:CustomValidator CssClass="alert alert-danger" runat="server" ID="SimpleLoginNameValidator" Display="Dynamic" EnableViewState="False">
<p class="alert">Member name already exists, click <asp:LinkButton runat="server" OnClick="ChangeOnClick" CssClass="btn btn-mini btn-warning">Change</asp:LinkButton> to use a different name or Update to continue</p>
</asp:CustomValidator>
</cc1:Pane>
<cc1:Pane ID="pane_advanced" runat="server" Visible="false" Text="Role based protection">
<cc1:PropertyPanel ID="PropertyPanel3" runat="server">
<p><%= umbraco.ui.Text("publicAccess", "paSelectRoles", UmbracoUser)%></p>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="PropertyPanel2" runat="server">
<asp:PlaceHolder ID="groupsSelector" runat="server"></asp:PlaceHolder>
</cc1:PropertyPanel>
</cc1:Pane>
<asp:Panel ID="p_buttons" runat="server" Visible="false" CssClass="pa-umb-overlay">
<cc1:Pane runat="server" ID="pane_pages" Text="Select the pages that contain login form and error messages">
<cc1:PropertyPanel runat="server" ID="pp_loginPage" CssClass="pa-select-pages">
<small class="umb-detail">
<%=umbraco.ui.Text("paLoginPageHelp")%>
</small>
<div class="pa-choose-page">
<asp:PlaceHolder ID="ph_loginpage" runat="server" />
</div>
<asp:CustomValidator ErrorMessage="Please pick a login page" runat="server" ID="cv_loginPage" ForeColor="Red" />
</cc1:PropertyPanel>
<cc1:PropertyPanel runat="server" ID="pp_errorPage" CssClass="pa-select-pages">
<small class="umb-detail">
<%=umbraco.ui.Text("paErrorPageHelp")%>
</small>
<div class="pa-choose-page">
<asp:PlaceHolder ID="ph_errorpage" runat="server" />
</div>
<asp:CustomValidator ErrorMessage="Please pick an error page" runat="server" ID="cv_errorPage" ForeColor="Red" />
</cc1:PropertyPanel>
</cc1:Pane>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
<asp:Button ID="bt_protect" CssClass="btn btn-primary" runat="server" OnCommand="protect_Click"></asp:Button>
<asp:Button ID="bt_buttonRemoveProtection" CssClass="btn btn-danger" runat="server" Visible="False" OnClick="buttonRemoveProtection_Click" />
</div>
</asp:Panel>
<input id="errorId" type="hidden" runat="server" /><input id="loginId" type="hidden" runat="server" />
@@ -13,6 +13,43 @@
var submitOnEnter = true;
</script>
<style type="text/css">
.propertyItemheader {
width: 140px !Important;
}
.diff {
margin-top: 10px;
height: 100%;
overflow: auto;
border-top: 1px solid #efefef;
padding: 5px;
}
.diff table td {
border-bottom: 1px solid #ccc;
padding: 3px;
}
.diff del {
background: rgb(255, 230, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.diff ins {
background: rgb(230, 255, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.diff .diffnotice {
text-align: center;
margin-bottom: 10px;
}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
@@ -26,7 +63,7 @@
<asp:Literal ID="currentVersionTitle" runat="server" />
<small>(<asp:Literal ID="currentVersionMeta" runat="server" />)</small></cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_rollBackTo" Text="Rollback to" runat="server">
<asp:DropDownList OnSelectedIndexChanged="version_load" ID="allVersions" runat="server" AutoPostBack="True" CssClass="guiInputTextTiny diffDropdown" />
<asp:DropDownList OnSelectedIndexChanged="version_load" ID="allVersions" runat="server" Width="400px" AutoPostBack="True" CssClass="guiInputTextTiny" />
</cc1:PropertyPanel>
<cc1:PropertyPanel id="pp_view" Text="View" runat="server">
@@ -39,7 +76,7 @@
</cc1:PropertyPanel>
</cc1:Pane>
<asp:Panel ID="diffPanel" Visible="false" runat="server" CssClass="diffPanel">
<asp:Panel ID="diffPanel" Visible="false" runat="server" Height="300px">
<div class="diff">
<div class="diffnotice">
<p>
@@ -47,7 +84,7 @@
</p>
</div>
<table>
<table border="0" style="width: 95%;">
<asp:Literal ID="propertiesCompare" runat="server"></asp:Literal>
</table>
</div>
+5 -3
View File
@@ -30,10 +30,12 @@
</div>
<div id="sortingDone" style="display: none;" class="success">
<div class="alert alert-success">
<p>
<asp:Literal runat="server" ID="sortDone"></asp:Literal>
</div>
<button class="btn btn-primary" onclick="UmbClientMgr.closeModalWindow()"><%= umbraco.ui.Text("general", "ok")%></button>
</p>
<p>
<a href="#" onclick="UmbClientMgr.closeModalWindow()"><%= umbraco.ui.Text("defaultdialogs", "closeThisWindow")%></a>
</p>
</div>
<div id="sortArea">
+7 -7
View File
@@ -546,9 +546,9 @@ namespace Umbraco.Web.Editors
EnsureUniqueName(name, content, "name");
var blueprint = Services.ContentService.CreateContentFromBlueprint(content, name, Security.CurrentUser.Id);
var blueprint = Services.ContentService.CreateContentFromBlueprint(content, name, Security.GetUserId());
Services.ContentService.SaveBlueprint(blueprint, Security.CurrentUser.Id);
Services.ContentService.SaveBlueprint(blueprint, Security.GetUserId());
var notificationModel = new SimpleNotificationModel();
notificationModel.AddSuccessNotification(
@@ -755,7 +755,7 @@ namespace Umbraco.Web.Editors
return HandleContentNotFound(id, false);
}
var publishResult = Services.ContentService.PublishWithStatus(foundContent, Security.CurrentUser.Id);
var publishResult = Services.ContentService.PublishWithStatus(foundContent, Security.GetUserId());
if (publishResult.Success == false)
{
var notificationModel = new SimpleNotificationModel();
@@ -808,7 +808,7 @@ namespace Umbraco.Web.Editors
//if the current item is in the recycle bin
if (foundContent.IsInRecycleBin() == false)
{
var moveResult = Services.ContentService.WithResult().MoveToRecycleBin(foundContent, Security.CurrentUser.Id);
var moveResult = Services.ContentService.WithResult().MoveToRecycleBin(foundContent, Security.GetUserId());
if (moveResult == false)
{
//returning an object of INotificationModel will ensure that any pending
@@ -818,7 +818,7 @@ namespace Umbraco.Web.Editors
}
else
{
var deleteResult = Services.ContentService.WithResult().Delete(foundContent, Security.CurrentUser.Id);
var deleteResult = Services.ContentService.WithResult().Delete(foundContent, Security.GetUserId());
if (deleteResult == false)
{
//returning an object of INotificationModel will ensure that any pending
@@ -871,7 +871,7 @@ namespace Umbraco.Web.Editors
var contentService = Services.ContentService;
// Save content with new sort order and update content xml in db accordingly
if (contentService.Sort(sorted.IdSortOrder, Security.CurrentUser.Id) == false)
if (contentService.Sort(sorted.IdSortOrder) == false)
{
LogHelper.Warn<ContentController>("Content sorting failed, this was probably caused by an event being cancelled");
return Request.CreateValidationErrorResponse("Content sorting failed, this was probably caused by an event being cancelled");
@@ -895,7 +895,7 @@ namespace Umbraco.Web.Editors
{
var toMove = ValidateMoveOrCopy(move);
Services.ContentService.Move(toMove, move.ParentId, Security.CurrentUser.Id);
Services.ContentService.Move(toMove, move.ParentId);
var response = Request.CreateResponse(HttpStatusCode.OK);
response.Content = new StringContent(toMove.Path, Encoding.UTF8, "application/json");
@@ -0,0 +1,63 @@
using System.Collections.Generic;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;
namespace Umbraco.Web.HealthCheck.Checks.DataIntegrity
{
/// <summary>
/// U4-9544 Health check to detect if the database has any missing indexes or constraints
/// </summary>
[HealthCheck(
"0873D589-2064-4EA3-A152-C43417FE00A4",
"Database Schema Validation",
Description = "This checks the Umbraco database by doing a comparison of current indexes and schema items with the current state of the database and returns any problems it found. Useful to detect if the database hasn't been upgraded correctly.",
Group = "Data Integrity")]
public class DatabaseSchemaValidationHealthCheck : HealthCheck
{
private readonly DatabaseContext _databaseContext;
private readonly ILocalizedTextService _textService;
private readonly ILogger _logger;
public DatabaseSchemaValidationHealthCheck(HealthCheckContext healthCheckContext) : base(healthCheckContext)
{
_databaseContext = HealthCheckContext.ApplicationContext.DatabaseContext;
_textService = healthCheckContext.ApplicationContext.Services.TextService;
_logger = healthCheckContext.ApplicationContext.ProfilingLogger.Logger;
}
public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
{
return CheckDatabase();
}
public override IEnumerable<HealthCheckStatus> GetStatus()
{
//return the statuses
return new[] { CheckDatabase() };
}
private HealthCheckStatus CheckDatabase()
{
var results = _databaseContext.ValidateDatabaseSchema();
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), _textService.Localize("databaseSchemaValidationCheckDatabaseLogMessage"));
foreach(var error in results.Errors)
{
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), error.Item1 + ": " + error.Item2);
}
if(results.Errors.Count > 0)
return new HealthCheckStatus(_textService.Localize("healthcheck/databaseSchemaValidationCheckDatabaseErrors", new[] { results.Errors.Count.ToString() }))
{
ResultType = StatusResultType.Error,
View = "Umbraco.Dashboard.DatabaseSchemaValidationController"
};
return new HealthCheckStatus(_textService.Localize("healthcheck/databaseSchemaValidationCheckDatabaseOk"))
{
ResultType = StatusResultType.Success
};
}
}
}
@@ -120,8 +120,9 @@ namespace Umbraco.Web.PropertyEditors
var label = x["label"].ToString();
sortOrder++;
var value = JsonConvert.SerializeObject(new { value = color, label = label, sortOrder = sortOrder });
var value = useLabel
? JsonConvert.SerializeObject(new { value = color, label = label, sortOrder = sortOrder })
: color;
return new PreValue(id, value, sortOrder);
})
@@ -158,16 +158,8 @@ namespace Umbraco.Web.PropertyEditors
{
var preValues = editorValue.PreValues.FormatAsDictionary();
var sizes = preValues.Any() ? preValues.First().Value.Value : string.Empty;
try
{
using (var image = Image.FromStream(filestream))
_mediaFileSystem.GenerateThumbnails(image, filepath, sizes);
}
catch (ArgumentException ex)
{
// send any argument errors caused by the thumbnail generation to the log instead of failing miserably
LogHelper.WarnWithException<ImageCropperPropertyValueEditor>("Could not extract image thumbnails.", ex);
}
using (var image = Image.FromStream(filestream))
_mediaFileSystem.GenerateThumbnails(image, filepath, sizes);
}
// all related properties (auto-fill) are managed by ImageCropperPropertyEditor
@@ -15,17 +15,6 @@ namespace Umbraco.Web.PropertyEditors
{
[PreValueField("default", "Default Value", "boolean")]
public string Default { get; set; }
public TrueFalsePreValueEditor()
{
Fields.Add(new PreValueField()
{
Description = "Write a label text",
Key = "labelOn",
Name = "Label",
View = "textstring"
});
}
}
}
}
}
@@ -35,8 +35,6 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private readonly XmlNode _xmlNode;
private readonly bool _isPreviewing;
private readonly object _initializeLock = new object();
private bool _nodeInitialized;
private bool _parentInitialized;
private bool _childrenInitialized;
@@ -70,14 +68,15 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized(andChildren: true);
if (_nodeInitialized == false) InitializeNode();
if (_childrenInitialized == false) InitializeChildren();
return _children;
}
}
public override IPublishedProperty GetProperty(string alias)
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
IPublishedProperty property;
return _properties.TryGetValue(alias, out property) ? property : null;
}
@@ -115,7 +114,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized(andParent: true);
if (_nodeInitialized == false) InitializeNode();
if (_parentInitialized == false) InitializeParent();
return _parent;
}
}
@@ -124,7 +124,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _id;
}
}
@@ -133,7 +133,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _key;
}
}
@@ -142,7 +142,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _template;
}
}
@@ -151,7 +151,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _sortOrder;
}
}
@@ -160,7 +160,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _name;
}
}
@@ -169,7 +169,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _docTypeAlias;
}
}
@@ -178,7 +178,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _docTypeId;
}
}
@@ -187,7 +187,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _writerName;
}
}
@@ -196,7 +196,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _creatorName;
}
}
@@ -205,7 +205,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _writerId;
}
}
@@ -214,7 +214,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _creatorId;
}
}
@@ -223,7 +223,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _path;
}
}
@@ -232,7 +232,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _createDate;
}
}
@@ -241,7 +241,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _updateDate;
}
}
@@ -250,7 +250,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _version;
}
}
@@ -259,7 +259,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _urlName;
}
}
@@ -268,7 +268,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _level;
}
}
@@ -277,7 +277,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _isDraft;
}
}
@@ -286,7 +286,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _properties.Values;
}
}
@@ -295,7 +295,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
EnsureNodeInitialized();
if (_nodeInitialized == false) InitializeNode();
return _contentType;
}
}
@@ -310,27 +310,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
if (parent.Name == "node" || (parent.Attributes != null && parent.Attributes.GetNamedItem("isDoc") != null))
_parent = Get(parent, _isPreviewing);
// warn: this is not thread-safe...
_parentInitialized = true;
}
private void EnsureNodeInitialized(bool andChildren = false, bool andParent = false)
{
// In *theory* XmlPublishedContent are a per-request thing, and so should not
// end up being involved into multi-threaded situations - however, it's been
// reported that some users ended up seeing 100% CPU due to infinite loops in
// the properties dictionary in InitializeNode, which would indicate that the
// dictionary *is* indeed involved in some multi-threaded operation. No idea
// what users are doing that cause this, but let's be friendly and use a true
// lock around initialization.
lock (_initializeLock)
{
if (_nodeInitialized == false) InitializeNode();
if (andChildren && _childrenInitialized == false) InitializeChildren();
if (andParent && _parentInitialized == false) InitializeParent();
}
}
private void InitializeNode()
{
InitializeNode(_xmlNode, UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema, _isPreviewing,
@@ -339,10 +322,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
out _version, out _createDate, out _updateDate, out _level, out _isDraft, out _contentType, out _properties,
PublishedContentType.Get);
// warn: this is not thread-safe...
_nodeInitialized = true;
}
// internal for some benchmarks
internal static void InitializeNode(XmlNode xmlNode, bool legacy, bool isPreviewing,
out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName,
out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path,
@@ -507,6 +490,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
.OrderBy(x => x.SortOrder)
.ToList();
// warn: this is not thread-safe
_childrenInitialized = true;
}
@@ -538,4 +522,4 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private const string CacheKeyPrefix = "CONTENTCACHE_XMLPUBLISHEDCONTENT_";
}
}
}
@@ -54,17 +54,10 @@ namespace Umbraco.Web.Routing
alias = alias.TrimStart('/');
var xpathBuilder = new StringBuilder();
xpathBuilder.Append(XPathStringsDefinition.Root);
if (rootNodeId > 0)
{
xpathBuilder.AppendFormat(XPathStrings.DescendantDocumentById, rootNodeId);
}
else
{
xpathBuilder.Append(XPathStringsDefinition.Root);
}
XPathVariable var = null;
if (alias.Contains('\'') || alias.Contains('"'))
@@ -99,20 +92,20 @@ namespace Umbraco.Web.Routing
{
// legacy XML schema
case 0:
DescendantDocumentById = "id({0})";
DescendantDocumentById = "//node [@id={0}]";
DescendantDocumentByAlias = "//node[("
+ "contains(concat(',',translate(translate(data [@alias='umbracoUrlAlias'], ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',{0},')"
+ " or contains(concat(',',translate(translate(data [@alias='umbracoUrlAlias'], ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',/{0},')"
+ ")]";
+ "contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',{0},')"
+ " or contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',/{0},')"
+ ")]";
break;
// default XML schema as of 4.10
case 1:
DescendantDocumentById = "id({0})[@isDoc]";
DescendantDocumentById = "//* [@isDoc and @id={0}]";
DescendantDocumentByAlias = "//* [@isDoc and ("
+ "contains(concat(',',translate(translate(umbracoUrlAlias, ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',{0},')"
+ " or contains(concat(',',translate(translate(umbracoUrlAlias, ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',/{0},')"
+ ")]";
+ "contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',{0},')"
+ " or contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',/{0},')"
+ ")]";
break;
default:
@@ -140,4 +133,4 @@ namespace Umbraco.Web.Routing
#endregion
}
}
}
+32 -1
View File
@@ -1,4 +1,6 @@
using System;
using HtmlAgilityPack;
using System;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using Umbraco.Core;
using Umbraco.Core.Configuration;
@@ -46,6 +48,11 @@ namespace Umbraco.Web.Templates
{
if (urlProvider == null) throw new ArgumentNullException("urlProvider");
if(string.IsNullOrEmpty(text))
{
return text;
}
// Parse internal links
var tags = LocalLinkPattern.Matches(text);
foreach (Match tag in tags)
@@ -74,6 +81,11 @@ namespace Umbraco.Web.Templates
}
}
if (UmbracoConfig.For.UmbracoSettings().Content.StripUdiAttributes)
{
text = StripUdiDataAttributes(text);
}
return text;
}
@@ -102,6 +114,9 @@ namespace Umbraco.Web.Templates
private static readonly Regex ResolveUrlPattern = new Regex("(=[\"\']?)(\\W?\\~(?:.(?![\"\']?\\s+(?:\\S+)=|[>\"\']))+.)[\"\']?",
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
private static readonly Regex UdiDataAttributePattern = new Regex("data-udi=\"[^\\\"]*\"",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
/// <summary>
/// The RegEx matches any HTML attribute values that start with a tilde (~), those that match are passed to ResolveUrl to replace the tilde with the application path.
/// </summary>
@@ -145,5 +160,21 @@ namespace Umbraco.Web.Templates
{
return text.CleanForXss(ignoreFromClean);
}
/// <summary>
/// Strips data-udi attributes from rich text
/// </summary>
/// <param name="input">A html string</param>
/// <returns>A string stripped from the data-uid attributes</returns>
public static string StripUdiDataAttributes(string input)
{
if (string.IsNullOrEmpty(input))
{
return string.Empty;
}
return UdiDataAttributePattern.Replace(input, string.Empty);
}
}
}
@@ -117,11 +117,21 @@ namespace Umbraco.Web.Trees
if (enableInheritedDocumentTypes)
{
menu.Items.Add<ActionNew>(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias)));
//no move action if this is a child doc type
if (parent == null)
{
menu.Items.Add<ActionMove>(Services.TextService.Localize(string.Format("actions/{0}", ActionMove.Instance.Alias)), true);
}
}
//no move action if this is a child doc type
if (parent == null)
else
{
menu.Items.Add<ActionMove>(Services.TextService.Localize(string.Format("actions/{0}", ActionMove.Instance.Alias)), true);
menu.Items.Add<ActionMove>(Services.TextService.Localize(string.Format("actions/{0}", ActionMove.Instance.Alias)));
//no move action if this is a child doc type
if (parent == null)
{
menu.Items.Add<ActionMove>(Services.TextService.Localize(string.Format("actions/{0}", ActionMove.Instance.Alias)), true);
}
}
menu.Items.Add<ActionCopy>(Services.TextService.Localize(string.Format("actions/{0}", ActionCopy.Instance.Alias)));
menu.Items.Add<ActionExport>(Services.TextService.Localize(string.Format("actions/{0}", ActionExport.Instance.Alias)), true).ConvertLegacyMenuItem(new UmbracoEntity
+1
View File
@@ -338,6 +338,7 @@
<Compile Include="Editors\CodeFileController.cs" />
<Compile Include="Editors\TourController.cs" />
<Compile Include="Features\EnabledFeatures.cs" />
<Compile Include="HealthCheck\Checks\DataIntegrity\DatabaseSchemaValidationHealthCheck.cs" />
<Compile Include="HealthCheck\Checks\Security\XssProtectionCheck.cs" />
<Compile Include="HealthCheck\Checks\Security\HstsCheck.cs" />
<Compile Include="Models\BackOfficeTourFilter.cs" />
@@ -41,15 +41,6 @@ namespace umbraco.controls
}
}
public new int Height
{
set
{
_possibleValues.Height = new Unit(value);
_selectedValues.Height = new Unit(value);
}
}
protected override void CreateChildControls()
{
_possibleValues.ID = "posVals";
@@ -41,7 +41,7 @@ namespace umbraco.presentation.umbraco.dialogs
protected void selectMode(object sender, EventArgs e)
{
p_mode.Visible = false;
p_setup.Visible = true;
p_buttons.Visible = true;
if (rb_simple.Checked)
{
@@ -124,15 +124,14 @@ namespace umbraco.presentation.umbraco.dialogs
bt_protect.CommandName = "advanced";
}
p_buttons.Visible = true;
p_mode.Visible = false;
p_setup.Visible = true;
}
}
// Load up membergrouops
_memberGroups.ID = "Membergroups";
_memberGroups.Width = 175;
_memberGroups.Height = 165;
var selectedGroups = "";
// get roles from the membership provider
@@ -161,8 +160,7 @@ namespace umbraco.presentation.umbraco.dialogs
groupsSelector.Controls.Add(_memberGroups);
bt_selectMode.Text = ui.Text("buttons", "select");
bt_protect.Text = ui.Text("save");
bt_protect.Text = ui.Text("update");
bt_buttonRemoveProtection.Text = ui.Text("paRemoveProtection");
// Put user code to initialize the page here
@@ -268,33 +266,37 @@ namespace umbraco.presentation.umbraco.dialogs
}
}
feedback_text.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text);
feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
p_setup.Visible = false;
p_feedback.Visible = true;
p_buttons.Visible = false;
pane_advanced.Visible = false;
pane_simple.Visible = false;
var content = ApplicationContext.Current.Services.ContentService.GetById(pageId);
//reloads the current node in the tree
ClientTools.SyncTree(content.Path, true);
//reloads the current node's children in the tree
ClientTools.ReloadActionNode(false, true);
feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
}
protected void buttonRemoveProtection_Click(object sender, System.EventArgs e)
{
int pageId = int.Parse(helper.Request("nodeId"));
p_setup.Visible = false;
p_buttons.Visible = false;
pane_advanced.Visible = false;
pane_simple.Visible = false;
Access.RemoveProtection(pageId);
feedback_text.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text);
p_feedback.Visible = true;
feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
var content = ApplicationContext.Current.Services.ContentService.GetById(pageId);
//reloads the current node in the tree
ClientTools.SyncTree(content.Path, true);
//reloads the current node's children in the tree
ClientTools.ReloadActionNode(false, true);
feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
}
protected CustomValidator SimpleLoginNameValidator;
@@ -310,13 +312,13 @@ namespace umbraco.presentation.umbraco.dialogs
protected global::System.Web.UI.HtmlControls.HtmlInputHidden tempFile;
/// <summary>
/// p_feedback control.
/// feedback 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.Panel p_feedback;
protected global::umbraco.uicontrols.Feedback feedback;
/// <summary>
/// p_mode control.
@@ -327,15 +329,6 @@ namespace umbraco.presentation.umbraco.dialogs
/// </remarks>
protected global::System.Web.UI.WebControls.Panel p_mode;
/// <summary>
/// p_setup 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.Panel p_setup;
/// <summary>
/// pane_chooseMode control.
/// </summary>
@@ -471,6 +464,15 @@ namespace umbraco.presentation.umbraco.dialogs
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder groupsSelector;
/// <summary>
/// p_buttons 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.Panel p_buttons;
/// <summary>
/// pane_pages control.
/// </summary>
@@ -579,15 +581,6 @@ namespace umbraco.presentation.umbraco.dialogs
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder js;
/// <summary>
/// feedback_text 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.Literal feedback_text;
}
}
@@ -13,7 +13,44 @@
var submitOnEnter = true;
</script>
<style type="text/css">
.propertyItemheader {
width: 140px !Important;
}
.diff {
margin-top: 10px;
height: 100%;
overflow: auto;
border-top: 1px solid #ccc;
border-top: 1px solid #ccc;
padding: 5px;
}
.diff table td {
border-bottom: 1px solid #ccc;
padding: 3px;
}
.diff del {
background: rgb(255, 230, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.diff ins {
background: rgb(230, 255, 230) none repeat scroll 0%;
-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;
}
.diff .diffnotice {
text-align: center;
margin-bottom: 10px;
}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
@@ -34,8 +34,8 @@ namespace umbraco.presentation.dialogs
diffPanel.Visible = true;
Document rollback = new Document(currentDoc.Id, new Guid(allVersions.SelectedValue));
propertiesCompare.Text = "<tr><th>" + ui.Text("general", "name") + ":</th><td>" + rollback.Text + "</td></tr>";
propertiesCompare.Text += "<tr><th>" + ui.Text("content", "createDate") + ":</th><td>" + rollback.VersionDate.ToLongDateString() + " " + rollback.VersionDate.ToLongTimeString() + " " + ui.Text("general", "by") + ": " + rollback.Writer.Name + "</td></tr>";
propertiesCompare.Text = "<tr><th style='width: 25%;' valign='top'>" + ui.Text("general", "name") + ":</th><td>" + rollback.Text + "</td></tr>";
propertiesCompare.Text += "<tr><th style='width: 25%;' valign='top'>" + ui.Text("content", "createDate") + ":</th><td>" + rollback.VersionDate.ToLongDateString() + " " + rollback.VersionDate.ToLongTimeString() + " " + ui.Text("general", "by") + ": " + rollback.Writer.Name + "</td></tr>";
if (rbl_mode.SelectedValue == "diff")
lt_notice.Text = ui.Text("rollback", "diffHelp");
@@ -66,14 +66,14 @@ namespace umbraco.presentation.dialogs
string cThevalue = library.StripHtml(cP.Value.ToString());
propertiesCompare.Text += "<tr><th>" + p.PropertyType.Name + ":</th><td>" + library.ReplaceLineBreaks(cms.businesslogic.utilities.Diff.Diff2Html(cThevalue, thevalue)) + "</td></tr>";
propertiesCompare.Text += "<tr><th style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + library.ReplaceLineBreaks(cms.businesslogic.utilities.Diff.Diff2Html(cThevalue, thevalue)) + "</td></tr>";
}
else
{
//If no current version of the value... display with no diff.
propertiesCompare.Text += "<tr><th>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
propertiesCompare.Text += "<tr><th style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
}
@@ -81,7 +81,7 @@ namespace umbraco.presentation.dialogs
else
{
//If display mode is html
propertiesCompare.Text += "<tr><th>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
propertiesCompare.Text += "<tr><th style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
}
//previewVersionContent.Controls.Add(new LiteralControl("<div style=\"margin-top: 4px; border: 1px solid #DEDEDE; padding: 4px;\"><p style=\"padding: 0px; margin: 0px;\" class=\"guiDialogNormal\"><b>" + p.PropertyType.Name + "</b><br/>"));