Compare commits

..

67 Commits

Author SHA1 Message Date
Rasmus John Pedersen 87716c7ed8 Only add "Move" action once 2018-10-11 19:46:43 +02:00
Kenn Jacobsen afa3e9b5eb Improve image cropper UX (#3149) 2018-10-09 22:54:51 +02:00
Jan Skovgaard 3aece09e09 3223 - Minor tweaks and code alignment for the checkbox and color picker styling (#3224)
* Make the focus effect on the toggle use the same box-shadow as is already being used in the color picker instead of doing it differently

* Use the color variables instead of hard coded color and also make use of LESS' fade function outputting an rgba() color
2018-10-09 22:25:42 +02:00
Dave Woestenborghs fd1a9bb365 #3214 - umbracoUrlAlias with uppercase characters (#3220) 2018-10-09 21:51:04 +02:00
Kenn Jacobsen 4d1b361f8f Style Public access dialog (#3194) 2018-10-09 21:32:54 +02:00
Sebastiaan Janssen ee4a252b07 Revert "Fixed udi's rendered in rte content (#2531)"
This reverts commit b0374695b1.
2018-10-09 21:19:55 +02:00
Jan Skovgaard d1b1a1cf6d #3178 - Make the Checkbox/TrueFalse property editor configurable (#3179) 2018-10-09 14:23:09 +02:00
Poornima Nayar 7e16cf360a Issue with the bottom border looking out of place on the select editor screen fixed 2018-10-09 12:36:28 +02:00
Poornima Nayar 9986c10cec Cleaned up the view by removing inline styles and style tags on the view itself.
Removed inline styles in the code behind files
Moved all styles into the modals.less stylesheet
2018-10-09 12:35:32 +02:00
Anders Bjerner 9b4f879b6d Added XML documentation to the DatabaseSchemaHelper class (#3205) 2018-10-09 12:28:43 +02:00
Kenn Jacobsen 62d65f0e3a Style the sort result so it looks like e.g. the copy dialog result 2018-10-09 12:09:12 +02:00
Jan Skovgaard 8d35dac9b6 #3187 - Small UI fixes for the toggle directive (#3188) 2018-10-09 12:00:29 +02:00
Kenn Jacobsen b8890aee25 Safe(r) handling of invalid images in the image cropper 2018-10-09 11:12:47 +02:00
Paul Seal bb23e8e200 - fix styling of Learn Umbraco help list (#3184) 2018-10-09 10:56:54 +02:00
Paul Seal cbc3ca0768 Updated copyright year 2018-10-09 10:56:18 +02:00
Søren Kottal e76d7cf060 removes selector 2018-10-09 10:45:03 +02:00
Jan Skovgaard 471e47e11b #3163 - Don't overwrite the label name even though labels are disabled in the color picker (#3164) 2018-10-09 10:41:31 +02:00
Sebastiaan Janssen 747edaa6ce #3141 fixed broken Do something else button (#3154) 2018-10-09 10:20:46 +02:00
Nathan Woulfe 08818c6358 removes ng-show from iframe, make loader background a solid color to hide iframe while it loads 2018-10-09 10:08:51 +02:00
Dave Woestenborghs 94922ccbd2 #3141 fixed the problem differently after input from @markadrake 2018-10-09 08:51:02 +02:00
Poornima Nayar 3977d24eb2 Button styling on inactive user profile & clean up user view (#3170) 2018-10-08 15:29:09 +02:00
Kenn Jacobsen 2e135d2006 Register an audit on the parent node when sorting child nodes. 2018-10-08 15:11:51 +02:00
Kenn Jacobsen b820baf643 Whe moving an item, make sure the current user is registered in Audit instead of the default user (#3150) 2018-10-08 14:27:18 +02:00
Kim Holzmann a3cf1d7d58 #3138 - Can add a null item to the grid
Don't perform submit function if selectedItem is undefined
2018-10-08 14:22:04 +02:00
KimHolzmann 4d7a36e017 #3001 Styles cannot be saved - Not sure if oldName is legacy (#3123) 2018-10-08 14:04:52 +02:00
Sebastiaan Janssen a9756e065c Don't show toggles to create templates when that feature is disabled.
Also default the toggle to false when the feature is disabled.
2018-10-08 13:07:54 +02:00
Robert 59962c7afe Merge pull request #3136 from umbraco/temp-3063-xmlPublishedContent-lock
Lock XmlPublishedContent initialization for thread-safety
2018-10-08 09:58:58 +02:00
Jan Skovgaard 0f3da1ae14 #3159 - Add border around the colors from the approved color picker (#3161) 2018-10-08 08:38:24 +02:00
Poornima Nayar 774f1d706c Fixed issue with actions dropdown menu being partially visible. 2018-10-08 08:17:48 +02:00
Sebastiaan Janssen 6b55c11321 Merge pull request #3156 from jannikanker/patch-1
Lecoati CSS reference removed (issue #3147)
2018-10-08 08:13:04 +02:00
Sebastiaan Janssen 2737085161 Merge pull request #3167 from rahulkumaran/licsene-patch
Update LICENSE.md
2018-10-08 08:10:21 +02:00
Rahul Arulkumaran e7d7de6273 Update LICENSE.md 2018-10-05 11:43:41 +05:30
Jannik Anker b6c3297884 Lecoati CSS reference removed (issue #3147)
ApprovedColorPickerController had a reference for no apparent reason.
2018-10-04 17:16:57 +02:00
Dave Woestenborghs 9d36ee6bd8 #3141 fixed broken Do something else button 2018-10-04 15:49:32 +02:00
Bjarne Fyrstenborg 7355ba4b23 Add option to rename colorpicker labels (#3121) 2018-10-04 08:36:21 +02:00
Jan Skovgaard deca5d7bdb Refactor error handling to serve different error messages depending on the context. If we know that the id being moved is the same as the id we want to move it to then show a specific error message hinting the editor what's wrong and otherwise show the usual generic error message. 2018-10-04 08:19:51 +02:00
Anders Bjerner bc081db9e6 Sentences should end with a period (#3144) 2018-10-04 08:16:11 +02:00
Sebastiaan Janssen b6966055b4 Merge pull request #3140 from StrikerRUS/domain
updated domain in links to Umbraco community
2018-10-03 18:29:11 +02:00
Sebastiaan Janssen 2389901ba9 Merge pull request #3139 from ThomasAdams2/twitter-settings-typo
Fix typo in twitter settings section of EmbeddedMedia configs
2018-10-03 18:23:09 +02:00
Claus 9579b97dde fixes #3124 - logging in BaseDataCreation. 2018-10-03 18:17:46 +02:00
Claus c27b9d76db fixes #3126 - If no property data is found for a specific version - a null exception is thrown.
- Throwing an exception with a description instead of hitting a null exception.
2018-10-03 18:16:56 +02:00
KimHolzmann a8df8f484f #3022 media uploader in rte doesn't select uploaded image (#3117) 2018-10-03 18:13:35 +02:00
Jan Skovgaard 0a245dda43 Add an outer check to make sure the scope.includeSubFolders property is not undefined, which makes the media render in the view again 2018-10-03 17:38:44 +02:00
BatJan 125bbdd5bd #3102 - Make styling for media search dialogue prettier (#3103) 2018-10-03 17:20:04 +02:00
Dave Woestenborghs 321460c395 #3099 Added docs for tour directives (#3100) 2018-10-03 17:05:25 +02:00
Sebastiaan Janssen 6bd31636f0 Merge pull request #3086 from kjac/fix-nc-dragging-discards-changes
Avoid data loss when dragging an unsaved Nested Content item
2018-10-03 17:03:49 +02:00
Sebastiaan Janssen e80c450e42 Merge pull request #3085 from kjac/fix-nc-config-duplicate-doctypes
Don't let the same doctype be selectable twice in the Nested Content configuration
2018-10-03 16:52:58 +02:00
Sebastiaan Janssen 262f7aff7c Merge pull request #3084 from kjac/fix-nc-rte-loading-v2
Fix loading issue for RTE's in Nested Content
2018-10-03 16:33:28 +02:00
StrikerRUS 62a82c17c2 updated domain in links to Umbraco community 2018-10-03 17:33:11 +03:00
Thomas Adams 833137772d Fix typo in twitter settings section of EmbeddedMedia configs 2018-10-03 15:04:33 +01:00
Sebastiaan Janssen 69528704ca Merge pull request #3106 from umbraco/abjerner-patch-3
Hide the "Links" box when there are no links
2018-10-03 15:36:16 +02:00
Sebastiaan Janssen be140bd06c Merge pull request #3104 from umbraco/abjerner-patch-2
Hide "Created Date" field when the media hasn't yet been created
2018-10-03 15:35:35 +02:00
Sebastiaan Janssen 2bda1a211d Merge pull request #3107 from umbraco/abjerner-patch-4
Should be "JavaScript" instead of "javascript"
2018-10-03 15:34:40 +02:00
Stephan f42bb663ff Lock XmlPublishedContent initialization for thread-safety 2018-10-03 15:17:32 +02:00
Sebastiaan Janssen ff0b95b337 Merge pull request #3083 from kjac/fix-nc-dragging-offset
Fix Nested Content "second time dragging" issue
2018-10-03 11:46:35 +02:00
Sebastiaan Janssen 7c28e8979a Merge pull request #3082 from kjac/fix-nc-icon-colors
Ensure the correct color for items in the Nested Content item picker
2018-10-03 11:17:27 +02:00
Sebastiaan Janssen 93ae55c919 Removes the DatabaseSchemaValidationHealthCheck for now until we can improve it
Fixes #3132
2018-10-03 10:27:07 +02:00
Claus 985e1cc1b7 fixing annoying typo... 2018-10-03 07:49:36 +02:00
Anders Bjerner 3dffb59f72 Should be "JavaScript" instead of "javascript" 2018-10-01 21:55:13 +02:00
Anders Bjerner 38bd53978b Should be "JavaScript" instead of "javascript" 2018-10-01 21:53:53 +02:00
Anders Bjerner 9c04abc5ad Hide the "Links" box when there are no links 2018-10-01 21:40:24 +02:00
Anders Bjerner 66221364ca Hide "Created Date" field when the media hasn't yet been created 2018-10-01 21:21:17 +02:00
Kenn Jacobsen 2c9256c672 Don't let the same doctype be selectable twice in the Nested Content configuration 2018-09-30 18:50:33 +02:00
Kenn Jacobsen 0dbbb585ad Fix loading issue for RTE's in Nested Content 2018-09-29 17:06:04 +02:00
Kenn Jacobsen a7573ce31f Avoid data loss when dragging an unsaved Nested Content item (#3014) 2018-09-29 07:35:16 +02:00
Kenn Jacobsen c6e2ced971 Fix Nested Content "second time dragging" issue 2018-09-29 07:30:27 +02:00
Kenn Jacobsen 45f574ed3a Ensure the correct color for items in the Nested Content item picker 2018-09-29 07:27:39 +02:00
82 changed files with 1003 additions and 648 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.org](https://our.umbraco.org) 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.com](https://our.umbraco.com) 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.org/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.com/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.org/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.com/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.org/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.com/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.org/documentation/Reference/) is generated
* New code is commented with documentation from which [the reference documentation](https://our.umbraco.com/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.org/apidocs/ui/#/api) (to be found in `src\Umbraco.Web.UI.Client\src`)
* [The rest](https://our.umbraco.org/apidocs/csharp/)
* [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/)
### What branch should I target for my contributions?
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT) #
Copyright (c) 2013 Umbraco
Copyright (c) 2013-present 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.org/assets/images/app-icons/favicon.png">
<link rel="icon" type="image/png" href="https://our.umbraco.com/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.org/assets/images/logo.svg) left center no-repeat;
background: url(https://our.umbraco.com/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 2017")]
[assembly: AssemblyCopyright("Copyright © Umbraco 2018")]
[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,12 +195,6 @@ 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; }
@@ -319,8 +313,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
IEnumerable<string> IContentSection.DisallowedUploadFiles
{
get { return DisallowedUploadFiles; }
}
}
IEnumerable<string> IContentSection.AllowedUploadFiles
{
get { return AllowedUploadFiles; }
@@ -363,11 +357,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
string IContentSection.LoginBackgroundImage
{
get { return LoginBackgroundImage; }
}
bool IContentSection.StripUdiAttributes
{
get { return StripUdiAttributes; }
}
}
}
}
@@ -75,8 +75,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool EnablePropertyValueConverters { get; }
string LoginBackgroundImage { get; }
bool StripUdiAttributes { get; }
}
}
}
@@ -1,6 +1,5 @@
using System;
using System.Linq;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
@@ -11,6 +10,9 @@ 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;
@@ -18,6 +20,22 @@ 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;
@@ -26,11 +44,41 @@ 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));
@@ -90,6 +138,17 @@ 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()
{
@@ -97,6 +156,16 @@ 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()
{
@@ -104,6 +173,19 @@ 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);
@@ -117,6 +199,8 @@ 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;
}
@@ -169,15 +253,37 @@ 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));
}
}
}
_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));
}
}
/// <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()
{
@@ -193,6 +299,15 @@ 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"))
{
CreateUmbracNodeData();
CreateUmbracoNodeData();
}
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 CreateUmbracNodeData()
private void CreateUmbracoNodeData()
{
_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,7 +1220,14 @@ ORDER BY cmsContentVersion.id DESC
if (def.DocumentDto.TemplateId.HasValue)
templates.TryGetValue(def.DocumentDto.TemplateId.Value, out template); // else null
cc.Template = template;
cc.Properties = propertyData[cc.Version];
if (propertyData.ContainsKey(cc.Version))
{
cc.Properties = propertyData[cc.Version];
}
else
{
throw new InvalidOperationException($"No property data found for version: '{cc.Version}'.");
}
//on initial construction we don't want to have dirty properties tracked
// http://issues.umbraco.org/issue/U4-1946
@@ -1307,4 +1314,4 @@ ORDER BY cmsContentVersion.id DESC
}
}
}
}
}
+8 -5
View File
@@ -2060,12 +2060,15 @@ namespace Umbraco.Core.Services
using (new WriteLock(Locker))
{
var allContent = GetByIds(ids).ToDictionary(x => x.Id, x => x);
var items = ids.Select(x => allContent[x]);
if (allContent.Any() == false)
{
return false;
}
var items = ids.Select(x => allContent[x]).ToArray();
using (var uow = UowProvider.GetUnitOfWork())
{
var asArray = items.ToArray();
var saveEventArgs = new SaveEventArgs<IContent>(asArray);
var saveEventArgs = new SaveEventArgs<IContent>(items);
if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving"))
{
uow.Commit();
@@ -2075,7 +2078,7 @@ namespace Umbraco.Core.Services
var repository = RepositoryFactory.CreateContentRepository(uow);
var i = 0;
foreach (var content in asArray)
foreach (var content in items)
{
//If the current sort order equals that of the content
//we don't need to update it, so just increment the sort order
@@ -2122,7 +2125,7 @@ namespace Umbraco.Core.Services
_publishingStrategy.PublishingFinalized(uow, shouldBePublished, false);
}
Audit(uow, AuditType.Sort, "Sorting content performed by user", userId, 0);
Audit(uow, AuditType.Sort, "Sort child items performed by user", userId, items.First().ParentId);
uow.Commit();
}
}
-3
View File
@@ -65,9 +65,6 @@
<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,6 +10,7 @@ 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;
@@ -33,14 +34,6 @@ 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();
@@ -70,7 +63,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);
@@ -78,27 +71,5 @@ 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,7 +3,6 @@
<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,4 +1,17 @@
(function() {
/**
@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 () {
'use strict';
function TourStepDirective() {
@@ -1,4 +1,17 @@
(function() {
/**
@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 () {
'use strict';
function TourStepContentDirective() {
@@ -1,4 +1,18 @@
(function() {
/**
@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 () {
'use strict';
function TourStepCounterDirective() {
@@ -1,4 +1,16 @@
(function() {
/**
@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 () {
'use strict';
function TourStepFooterDirective() {
@@ -1,4 +1,16 @@
(function() {
/**
@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 () {
'use strict';
function TourStepHeaderDirective() {
@@ -125,13 +125,19 @@ Use this directive to generate a thumbnail grid of media items.
i--;
}
if (scope.includeSubFolders !== 'true') {
if (item.parentId !== parseInt(scope.currentFolderId)) {
scope.items.splice(i, 1);
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--;
}
}
}
}
@@ -152,7 +158,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);
@@ -161,7 +167,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,11 +109,23 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostMove"),
{
parentId: args.parentId,
id: args.id
}),
'Failed to move media');
{
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
};
}
});
},
@@ -129,12 +141,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.
*
*/
@@ -163,9 +175,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.
*
*/
@@ -191,12 +203,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.
*
*/
@@ -223,28 +235,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.
*
*/
@@ -283,11 +295,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
@@ -361,9 +373,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)
@@ -374,11 +386,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.
*
*/
@@ -400,10 +412,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.
*
*/
@@ -427,18 +439,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.
*
*/
@@ -473,8 +485,8 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
* .then(function() {
* alert('its empty!');
* });
* </pre>
*
* </pre>
*
* @returns {Promise} resourcePromise object.
*
*/
@@ -501,8 +513,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
@@ -513,7 +525,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) {
setMode("default");
if(showMenu){
if (showMenu) {
this.showMenu(undefined, { skipDefault: true, node: appState.getMenuState("currentNode") });
} else {
setMode("default");
}
},
/**
@@ -146,6 +146,7 @@
@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,9 +63,6 @@
.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: 280px;
height: 100%;
width: 100%;
background: center center url(../img/loader.gif) no-repeat;
background:#fff center center url(../img/loader.gif) no-repeat;
}
/****************************/
@@ -156,6 +156,7 @@
margin-bottom: 1px;
border-radius: 0;
border-bottom: 1px solid @gray-9;
padding: 10px;
}
.umb-help-list-item__group-title i {
@@ -186,6 +187,7 @@
.umb-help-list-item__title {
font-size: 14px;
display: block;
margin-left: 26px;
}
.umb-help-list-item__description {
@@ -198,6 +200,7 @@
margin-right: 8px;
color: @gray-4;
font-size: 18px;
float: left;
}
.umb-help-list-item__open-icon {
@@ -212,4 +215,4 @@
[data-element*="tour-"].umb-help-list-item:hover .umb-help-list-item__title {
text-decoration:none;
}
}
@@ -10,6 +10,10 @@
}
}
.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;
@@ -30,6 +34,7 @@
background: @gray-8;
border-radius: 90px;
position: relative;
transition: box-shadow .3s;
}
.umb-toggle--checked .umb-toggle__toggle {
@@ -43,7 +48,6 @@
/* Labels */
.umb-toggle__label {
font-size: 12px;
color: @gray-2;
}
@@ -3,8 +3,8 @@
flex-flow: row wrap;
.umb-color-box {
border: none;
color: white;
border: 1px solid @gray-8;
color: @white;
cursor: pointer;
padding: 1px;
text-align: center;
@@ -19,7 +19,7 @@
justify-content: center;
&:hover, &:focus {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
box-shadow: 0 1px 3px fade(@black, 12%), 0 1px 2px fade(@black, 24%);
}
&.active {
@@ -56,7 +56,7 @@
padding-top: 10px;
.umb-color-box__label {
background: #fff;
background: @white;
font-size: 14px;
display: flex;
flex-flow: column wrap;
@@ -69,7 +69,8 @@
margin-right: -1px;
text-indent: 0;
text-align: left;
border: 1px solid @gray-8;
border-top: 1px solid @gray-8;
border-bottom: 1px solid @gray-8;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
overflow: hidden;
@@ -1,5 +1,6 @@
.umb-nested-content {
text-align: center;
position: relative;
}
.umb-nested-content--not-supported {
@@ -208,11 +209,25 @@
width: 99%;
}
.usky-grid.umb-nested-content__node-type-picker .cell-tools-menu {
position: relative;
transform: translate(-50%, -25%);
}
.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;
}
}
}
// 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
@@ -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: 22px;
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: 31px;
border-top: 1px solid @purple-l3;
}
@@ -0,0 +1,122 @@
.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,6 +105,63 @@
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;
+10 -1
View File
@@ -52,6 +52,16 @@
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
&__toggle{
margin: 10px 0;
label{
margin-right: 10px;
position: relative;
top: -2px;
}
}
}
.upload-button {
@@ -358,7 +368,6 @@
flex-direction: column;
height: 99px;
padding: 0 20px;
overflow-y: hidden;
}
.umb-panel-header-content {
@@ -115,6 +115,13 @@ 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;}
@@ -137,11 +144,14 @@ div.umb-codeeditor .umb-btn-toolbar {
/* pre-value editor */
.control-group.color-picker-preval {
.thumbnail {
width: 36px;
width: 34px;
height: 34px;
min-width: auto;
border: none;
cursor: move;
border-radius: 3px;
margin-top: auto;
margin-bottom: auto;
}
.handle {
@@ -153,19 +163,19 @@ div.umb-codeeditor .umb-btn-toolbar {
div.color-picker-prediv {
display: inline-flex;
align-items: center;
max-width: 85%;
max-width: 100%;
flex: 1;
pre {
display: inline-flex;
font-family: monospace;
margin-right: 10px;
margin-left: 10px;
margin-left: 15px;
margin-right: 15px;
white-space: nowrap;
overflow: hidden;
margin-bottom: 0;
vertical-align: middle;
padding-top: 7px;
padding-bottom: 7px;
padding: 6px 10px;
background: #f7f7f7;
flex: 0 0 auto;
}
@@ -194,11 +204,11 @@ div.umb-codeeditor .umb-btn-toolbar {
label {
border: 1px solid #fff;
padding: 7px 10px;
padding: 6px 10px;
font-family: monospace;
border: 1px solid #dfdfe1;
background: #f7f7f7;
margin: 0 15px 0 0;
margin: 0 15px 0 3px;
border-radius: 3px;
}
}
@@ -305,7 +315,7 @@ div.umb-codeeditor .umb-btn-toolbar {
.umb-mediapicker .umb-sortable-thumbnails li {
flex-direction: column;
margin: 0 5px 5px 0;
margin: 0 0 5px 5px;
padding: 5px;
}
@@ -564,6 +574,16 @@ 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,7 +19,6 @@ 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,7 +237,10 @@ angular.module("umbraco")
$scope.onUploadComplete = function(files) {
$scope.gotoFolder($scope.currentFolder).then(function() {
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
selectImage($scope.images[$scope.images.length - 1]);
var image = $scope.images[$scope.images.length - 1];
$scope.target = image;
$scope.target.url = mediaHelper.resolveFile(image);
selectImage(image);
}
});
};
@@ -306,6 +309,23 @@ 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,12 +20,17 @@
ng-change="changeSearch()"
type="text"
no-dirty-check />
<br />
<label>
<localize key="general_includeFromsubFolders">Include subfolders in search</localize>
<input type="checkbox" ng-model="showChilds"
ng-change="changeSearch()">
</label>
<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>
</div>
<div class="upload-button">
@@ -1,4 +1,4 @@
<button ng-click="click()" type="button" class="umb-toggle dib" ng-class="{'umb-toggle--checked': checked}">
<button ng-click="click()" type="button" class="umb-toggle" 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 data-element="node-info-urls">
<umb-box ng-if="node.urls" 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 data-element="node-info-create-date" label="@content_createDate">
<umb-control-group ng-if="node.id !== 0" data-element="node-info-create-date" label="@content_createDate">
{{node.createDateFormatted}} by {{ node.owner.name }}
</umb-control-group>
<umb-control-group data-element="node-info-update-date" label="@content_updateDate">
<umb-control-group ng-if="node.id !== 0" 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 data-element="node-info-id" label="Id">
<umb-control-group ng-if="node.id !== 0" 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="{{color.label}}" 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="{{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)">
<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 = true;
$scope.model.collectionItemCreateTemplate = true;
$scope.model.collectionCreateTemplate = !$scope.model.disableTemplates;
$scope.model.collectionItemCreateTemplate = !$scope.model.disableTemplates;
};
$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,14 +80,18 @@
<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 />
<umb-toggle on-click="model.collectionCreateTemplate = !model.collectionCreateTemplate" checked="model.collectionCreateTemplate"></umb-toggle>
<label>Create template for the Parent Document Type</label>
<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-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 />
<umb-toggle on-click="model.collectionItemCreateTemplate = !model.collectionItemCreateTemplate" checked="model.collectionItemCreateTemplate"></umb-toggle>
<label>Create template for the Item Document Type</label>
<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-control-group>
<button type="submit" class="btn btn-primary"><localize key="general_create">Create</localize></button>
@@ -1,4 +1,4 @@
function booleanEditorController($scope, $rootScope, assetsService) {
function booleanEditorController($scope) {
function setupViewModel() {
$scope.renderModel = {
@@ -1,6 +1,10 @@
<div class="umb-editor umb-boolean" ng-controller="Umbraco.PropertyEditors.BooleanController">
<umb-toggle
checked="renderModel.value"
on-click="toggle()">
on-click="toggle()"
show-labels="{{model.config.labelOn ? 'true': 'false'}}"
label-position="right"
label-on="{{model.config.labelOn}}"
label-off="{{model.config.labelOn}}">
</umb-toggle>
</div>
@@ -1,5 +1,6 @@
<div ng-controller="Umbraco.PropertyEditors.ColorPickerController">
<div ng-if="!isConfigured">
<localize key="colorpicker_noColors">You haven't defined any colors</localize>
</div>
@@ -3,18 +3,22 @@
<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" class="umb-editor color-label" placeholder="Label" ng-show="labelEnabled" />
<input name="newLabel" type="text" ng-model="newLabel" focus-when="{{focusOnNew}}" 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">
<div class="control-group umb-prevalues-multivalues__listitem color-picker-preval" ng-repeat="item in model.value track by $id(item)">
<i class="icon icon-navigation handle"></i>
<div class="umb-prevalues-multivalues__left">
<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 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>
<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,8 +5,9 @@
var defaultLabel = null;
$scope.newColor = defaultColor;
$scope.newLavel = defaultLabel;
$scope.newLabel = defaultLabel;
$scope.hasError = false;
$scope.focusOnNew = false;
$scope.labels = {};
@@ -104,7 +105,6 @@
};
$scope.add = function (evt) {
evt.preventDefault();
if ($scope.newColor) {
@@ -117,7 +117,9 @@
value: $scope.newColor,
label: newLabel
});
$scope.newLabel = "";
$scope.hasError = false;
$scope.focusOnNew = true;
return;
}
@@ -281,10 +281,12 @@ angular.module("umbraco")
availableItems: area.$allowedEditors,
event: event,
show: true,
submit: function(model) {
$scope.addControl(model.selectedItem, area, index);
$scope.editorOverlay.show = false;
$scope.editorOverlay = null;
submit: function (model) {
if (model.selectedItem) {
$scope.addControl(model.selectedItem, area, index);
$scope.editorOverlay.show = false;
$scope.editorOverlay = null;
}
}
};
};
@@ -36,12 +36,32 @@ angular.module('umbraco')
//crop a specific crop
$scope.crop = function (crop) {
$scope.currentCrop = crop;
// clone the crop so we can discard the changes
$scope.currentCrop = angular.copy(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,8 +18,6 @@
<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}}"
@@ -30,10 +28,11 @@
</umb-image-crop>
</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 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>
</div>
</div>
@@ -37,6 +37,18 @@
});
});
$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();
@@ -231,6 +243,7 @@ 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 model.docTypes | orderBy: 'name'"
ng-options="dt.alias as dt.name for dt in selectableDocTypesFor(config) | 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 ng-if="isLoading"><localize key="general_loading">Loading</localize>...</div>
<div class="-loading" 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-packages-view-wrapper" style="padding: 0;">
<div ng-if="!vm.loading" class="umb-user-details-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-package-details">
<div class="umb-user-details-details">
<div class="umb-package-details__main-content">
<div class="umb-user-details-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"
style="max-width: 100%;"
class="umb-node-preview-add"
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-package-details__sidebar">
<div class="umb-user-details-details__sidebar">
<div class="umb-package-details__section">
<div class="umb-user-details-details__section">
<!-- Avatar -->
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #d8d7d9;">
<div class="umb-user-details-avtar">
<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 style="margin-bottom: 20px;">
<div class="umb-user-details-actions">
<div style="margin-bottom: 10px;">
<div>
<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 style="margin-bottom: 10px;">
<div>
<umb-button ng-if="model.user.userDisplayState.key === 'LockedOut' && !model.user.isCurrentUser"
type="button"
button-style="[success,block]"
@@ -239,8 +239,7 @@
size="s">
</umb-button>
</div>
<div style="margin-bottom: 10px;">
<div>
<umb-button ng-if="model.user.userDisplayState.key !== 'Disabled' && model.user.userDisplayState.key !== 'Invited' && !model.user.isCurrentUser"
type="button"
button-style="[info,block]"
@@ -251,25 +250,27 @@
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>
<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>
<ng-form ng-if="model.changePasswordModel.isChanging" name="passwordForm" class="block-form" val-form-manager>
@@ -293,26 +294,26 @@
</div>
<!-- User stats -->
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="general_status">Status</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-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 style="margin-bottom: 10px;" ng-if="model.user.userDisplayState.key === 'Invited' && !model.user.isCurrentUser">
<div 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()"
@@ -323,30 +324,30 @@
</umb-button>
</div>
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_lastLogin">Last login</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-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-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_failedPasswordAttempts">Failed login attempts</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-details__information-item-content">
{{ model.user.failedPasswordAttempts }}
</div>
</div>
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_lastLockoutDate">Last lockout date</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-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>
@@ -354,11 +355,11 @@
</div>
</div>
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_lastPasswordChangeDate">Password is last changed</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-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>
@@ -366,20 +367,20 @@
</div>
</div>
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_createDate">User is created</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-details__information-item-content">
{{ model.user.formattedCreateDate }}
</div>
</div>
<div class="umb-package-details__information-item">
<div class="umb-package-details__information-item-label">
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="user_updateDate">User is last updated</localize>:
</div>
<div class="umb-package-details__information-item-content">
<div class="umb-user-details-details__information-item-content">
{{ model.user.formattedUpdateDate }}
</div>
</div>
@@ -20,7 +20,7 @@
@Html.Partial(Model.PreviewExtendedHeaderView)
}
<div id="demo-iframe-wrapper" ng-show="frameLoaded" class="{{previewDevice.css}}">
<div id="demo-iframe-wrapper" 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 Settigs -->
<!-- Twitter Settings -->
<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 Settigs -->
<!-- Twitter Settings -->
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
<urlShemeRegex><![CDATA[twitter\.com/]]></urlShemeRegex>
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
@@ -147,6 +147,7 @@
<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>
@@ -156,6 +157,7 @@
<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>
@@ -259,7 +261,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>
@@ -989,6 +991,8 @@ 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,6 +153,7 @@
<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>
@@ -162,6 +163,7 @@
<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>
@@ -267,7 +269,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>
@@ -287,7 +289,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>
@@ -647,7 +649,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 +1219,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"><![CDATA[If you wish to control access to the page using role-based authentication,<br /> using Umbraco's member groups.]]></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="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,11 +1296,13 @@ 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</key>
<key alias="reset">Reset crop</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,6 +153,7 @@
<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>
@@ -162,6 +163,7 @@
<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">
@@ -268,7 +270,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>
@@ -288,7 +290,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>
@@ -647,7 +649,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>
@@ -1215,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"><![CDATA[If you wish to control access to the page using role-based authentication,<br /> using Umbraco's member groups.]]></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="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>
@@ -1292,11 +1294,13 @@ 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</key>
<key alias="reset">Reset crop</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,15 +75,19 @@
<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" />
<cc1:Feedback ID="feedback" 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>
<asp:Panel ID="p_mode" runat="server" CssClass="pa-umb-overlay">
<div class="umg-dialog-body">
<div class="umb-dialog-body">
<cc1:Pane ID="pane_chooseMode" runat="server" Text="Choose how to restict access to this page">
@@ -116,74 +120,72 @@
<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" Text="select" CssClass="btn btn-primary" OnClick="selectMode" />
<asp:Button ID="bt_selectMode" runat="server" 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">
<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>
<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 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>
<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 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 ErrorMessage="Please pick an error page" runat="server" ID="cv_errorPage" ForeColor="Red" />
</cc1:PropertyPanel>
</cc1:Pane>
<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>
<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,43 +13,6 @@
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">
@@ -63,7 +26,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" Width="400px" AutoPostBack="True" CssClass="guiInputTextTiny" />
<asp:DropDownList OnSelectedIndexChanged="version_load" ID="allVersions" runat="server" AutoPostBack="True" CssClass="guiInputTextTiny diffDropdown" />
</cc1:PropertyPanel>
<cc1:PropertyPanel id="pp_view" Text="View" runat="server">
@@ -76,7 +39,7 @@
</cc1:PropertyPanel>
</cc1:Pane>
<asp:Panel ID="diffPanel" Visible="false" runat="server" Height="300px">
<asp:Panel ID="diffPanel" Visible="false" runat="server" CssClass="diffPanel">
<div class="diff">
<div class="diffnotice">
<p>
@@ -84,7 +47,7 @@
</p>
</div>
<table border="0" style="width: 95%;">
<table>
<asp:Literal ID="propertiesCompare" runat="server"></asp:Literal>
</table>
</div>
+3 -5
View File
@@ -30,12 +30,10 @@
</div>
<div id="sortingDone" style="display: none;" class="success">
<p>
<div class="alert alert-success">
<asp:Literal runat="server" ID="sortDone"></asp:Literal>
</p>
<p>
<a href="#" onclick="UmbClientMgr.closeModalWindow()"><%= umbraco.ui.Text("defaultdialogs", "closeThisWindow")%></a>
</p>
</div>
<button class="btn btn-primary" onclick="UmbClientMgr.closeModalWindow()"><%= umbraco.ui.Text("general", "ok")%></button>
</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.GetUserId());
var blueprint = Services.ContentService.CreateContentFromBlueprint(content, name, Security.CurrentUser.Id);
Services.ContentService.SaveBlueprint(blueprint, Security.GetUserId());
Services.ContentService.SaveBlueprint(blueprint, Security.CurrentUser.Id);
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.GetUserId());
var publishResult = Services.ContentService.PublishWithStatus(foundContent, Security.CurrentUser.Id);
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.GetUserId());
var moveResult = Services.ContentService.WithResult().MoveToRecycleBin(foundContent, Security.CurrentUser.Id);
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.GetUserId());
var deleteResult = Services.ContentService.WithResult().Delete(foundContent, Security.CurrentUser.Id);
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) == false)
if (contentService.Sort(sorted.IdSortOrder, Security.CurrentUser.Id) == 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);
Services.ContentService.Move(toMove, move.ParentId, Security.CurrentUser.Id);
var response = Request.CreateResponse(HttpStatusCode.OK);
response.Content = new StringContent(toMove.Path, Encoding.UTF8, "application/json");
@@ -1,63 +0,0 @@
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,9 +120,8 @@ namespace Umbraco.Web.PropertyEditors
var label = x["label"].ToString();
sortOrder++;
var value = useLabel
? JsonConvert.SerializeObject(new { value = color, label = label, sortOrder = sortOrder })
: color;
var value = JsonConvert.SerializeObject(new { value = color, label = label, sortOrder = sortOrder });
return new PreValue(id, value, sortOrder);
})
@@ -158,8 +158,16 @@ namespace Umbraco.Web.PropertyEditors
{
var preValues = editorValue.PreValues.FormatAsDictionary();
var sizes = preValues.Any() ? preValues.First().Value.Value : string.Empty;
using (var image = Image.FromStream(filestream))
_mediaFileSystem.GenerateThumbnails(image, filepath, sizes);
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);
}
}
// all related properties (auto-fill) are managed by ImageCropperPropertyEditor
@@ -15,6 +15,17 @@ 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,6 +35,8 @@ 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;
@@ -68,15 +70,14 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
if (_childrenInitialized == false) InitializeChildren();
EnsureNodeInitialized(andChildren: true);
return _children;
}
}
public override IPublishedProperty GetProperty(string alias)
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
IPublishedProperty property;
return _properties.TryGetValue(alias, out property) ? property : null;
}
@@ -114,8 +115,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
if (_parentInitialized == false) InitializeParent();
EnsureNodeInitialized(andParent: true);
return _parent;
}
}
@@ -124,7 +124,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _id;
}
}
@@ -133,7 +133,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _key;
}
}
@@ -142,7 +142,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _template;
}
}
@@ -151,7 +151,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _sortOrder;
}
}
@@ -160,7 +160,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _name;
}
}
@@ -169,7 +169,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _docTypeAlias;
}
}
@@ -178,7 +178,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _docTypeId;
}
}
@@ -187,7 +187,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _writerName;
}
}
@@ -196,7 +196,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _creatorName;
}
}
@@ -205,7 +205,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _writerId;
}
}
@@ -214,7 +214,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _creatorId;
}
}
@@ -223,7 +223,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _path;
}
}
@@ -232,7 +232,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _createDate;
}
}
@@ -241,7 +241,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _updateDate;
}
}
@@ -250,7 +250,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _version;
}
}
@@ -259,7 +259,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _urlName;
}
}
@@ -268,7 +268,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _level;
}
}
@@ -277,7 +277,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _isDraft;
}
}
@@ -286,7 +286,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _properties.Values;
}
}
@@ -295,7 +295,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
get
{
if (_nodeInitialized == false) InitializeNode();
EnsureNodeInitialized();
return _contentType;
}
}
@@ -310,10 +310,27 @@ 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,
@@ -322,10 +339,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,
@@ -490,7 +507,6 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
.OrderBy(x => x.SortOrder)
.ToList();
// warn: this is not thread-safe
_childrenInitialized = true;
}
@@ -522,4 +538,4 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private const string CacheKeyPrefix = "CONTENTCACHE_XMLPUBLISHEDCONTENT_";
}
}
}
@@ -54,10 +54,17 @@ 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('"'))
@@ -92,20 +99,20 @@ namespace Umbraco.Web.Routing
{
// legacy XML schema
case 0:
DescendantDocumentById = "//node [@id={0}]";
DescendantDocumentById = "id({0})";
DescendantDocumentByAlias = "//node[("
+ "contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',{0},')"
+ " or contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',/{0},')"
+ ")]";
+ "contains(concat(',',translate(translate(data [@alias='umbracoUrlAlias'], ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',{0},')"
+ " or contains(concat(',',translate(translate(data [@alias='umbracoUrlAlias'], ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',/{0},')"
+ ")]";
break;
// default XML schema as of 4.10
case 1:
DescendantDocumentById = "//* [@isDoc and @id={0}]";
DescendantDocumentById = "id({0})[@isDoc]";
DescendantDocumentByAlias = "//* [@isDoc and ("
+ "contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',{0},')"
+ " or contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',/{0},')"
+ ")]";
+ "contains(concat(',',translate(translate(umbracoUrlAlias, ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',{0},')"
+ " or contains(concat(',',translate(translate(umbracoUrlAlias, ' ', ''),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),','),',/{0},')"
+ ")]";
break;
default:
@@ -133,4 +140,4 @@ namespace Umbraco.Web.Routing
#endregion
}
}
}
+1 -32
View File
@@ -1,6 +1,4 @@
using HtmlAgilityPack;
using System;
using System.Runtime.CompilerServices;
using System;
using System.Text.RegularExpressions;
using Umbraco.Core;
using Umbraco.Core.Configuration;
@@ -48,11 +46,6 @@ 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)
@@ -81,11 +74,6 @@ namespace Umbraco.Web.Templates
}
}
if (UmbracoConfig.For.UmbracoSettings().Content.StripUdiAttributes)
{
text = StripUdiDataAttributes(text);
}
return text;
}
@@ -114,9 +102,6 @@ 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>
@@ -160,21 +145,5 @@ 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,21 +117,11 @@ 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);
}
}
else
//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)));
//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<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,7 +338,6 @@
<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,6 +41,15 @@ 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_buttons.Visible = true;
p_setup.Visible = true;
if (rb_simple.Checked)
{
@@ -124,14 +124,15 @@ 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
@@ -160,7 +161,8 @@ namespace umbraco.presentation.umbraco.dialogs
groupsSelector.Controls.Add(_memberGroups);
bt_protect.Text = ui.Text("update");
bt_selectMode.Text = ui.Text("buttons", "select");
bt_protect.Text = ui.Text("save");
bt_buttonRemoveProtection.Text = ui.Text("paRemoveProtection");
// Put user code to initialize the page here
@@ -266,37 +268,33 @@ namespace umbraco.presentation.umbraco.dialogs
}
}
feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
feedback_text.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text);
p_buttons.Visible = false;
pane_advanced.Visible = false;
pane_simple.Visible = false;
p_setup.Visible = false;
p_feedback.Visible = true;
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_buttons.Visible = false;
pane_advanced.Visible = false;
pane_simple.Visible = false;
p_setup.Visible = false;
Access.RemoveProtection(pageId);
feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
feedback_text.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text);
p_feedback.Visible = true;
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;
@@ -312,13 +310,13 @@ namespace umbraco.presentation.umbraco.dialogs
protected global::System.Web.UI.HtmlControls.HtmlInputHidden tempFile;
/// <summary>
/// feedback control.
/// p_feedback control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Feedback feedback;
protected global::System.Web.UI.WebControls.Panel p_feedback;
/// <summary>
/// p_mode control.
@@ -329,6 +327,15 @@ 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>
@@ -464,15 +471,6 @@ 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>
@@ -581,6 +579,15 @@ 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,44 +13,7 @@
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 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>";
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>";
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 style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + library.ReplaceLineBreaks(cms.businesslogic.utilities.Diff.Diff2Html(cThevalue, thevalue)) + "</td></tr>";
propertiesCompare.Text += "<tr><th>" + 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 style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
propertiesCompare.Text += "<tr><th>" + 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 style='width: 25%;' valign='top'>" + p.PropertyType.Name + ":</th><td>" + thevalue + "</td></tr>";
propertiesCompare.Text += "<tr><th>" + 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/>"));