Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcb26c4065 | |||
| 0d165db687 | |||
| 76aaafd852 | |||
| 77101783f7 | |||
| 4d4630915b | |||
| 0f7de97558 | |||
| 588493e811 | |||
| 87af9b2089 | |||
| ba3cf056fb | |||
| 619acb552b | |||
| 50b636e1c6 | |||
| cedf433bb0 | |||
| 00c19e3830 | |||
| a5742dcd9a | |||
| 63ee3c72c3 | |||
| 16155ea416 | |||
| f183e27cae | |||
| a411c9c300 | |||
| 342ac7b1b2 | |||
| f5ac5f20a8 | |||
| 56de9ff4ae | |||
| e4d8fcf019 | |||
| e1f7e835ea | |||
| d83bb6aa49 | |||
| 612138f0e1 | |||
| bfc627857d | |||
| 7d439566cd | |||
| d224a93ce1 | |||
| 3454db6ee8 | |||
| b67c06a85a | |||
| 44bd3dec9a | |||
| 68ac84aa1d | |||
| c1bf8259ef | |||
| 1b1df84863 | |||
| 05fdfc6b34 | |||
| 18b690f11a | |||
| d3b577fe37 | |||
| 720409ef54 | |||
| 919a63d0ea | |||
| ef6822e15b | |||
| 015e89b927 | |||
| 05e48376c7 | |||
| a2cc0ec411 | |||
| d4fff97814 | |||
| 06e99c3b33 | |||
| ad3d27be76 | |||
| 2e2fc6ad84 | |||
| 9f396e4b15 | |||
| f42862c42a | |||
| f7201a70bd | |||
| ec67ab83af | |||
| a725ddae5a | |||
| 8f2c253138 | |||
| e6597d47e3 | |||
| 89f69bd2a8 | |||
| 8087fc4c9a | |||
| f665f8af89 | |||
| de8a24c691 | |||
| c4163e94c0 | |||
| 62855d021f | |||
| 49430ca0a5 | |||
| 9d75e36eb4 | |||
| 5068b8ae9f | |||
| cdf3581721 | |||
| 0c6cca44d8 | |||
| f18b0aa774 | |||
| b9e8dd8b86 | |||
| 45d8d302c9 | |||
| e0ce9f1a77 | |||
| d7a0886097 | |||
| 39e8a9fa67 | |||
| 1dbf509020 | |||
| 8ce93055ef | |||
| ee4b2adbd4 | |||
| de73080e14 | |||
| 6c0d14e0f4 | |||
| ba682d95dc | |||
| fd888cab4b | |||
| 50597b5715 | |||
| f35110309a | |||
| c73860d144 | |||
| 3efbb47aed | |||
| 9a774c8f9e | |||
| f81dc16210 | |||
| c4a787331f | |||
| 3078be93b6 | |||
| 0a2fd277a6 | |||
| fd2550cfe9 | |||
| 78c01801f8 | |||
| ad99d164c9 |
@@ -28,7 +28,7 @@
|
||||
<dependency id="HtmlAgilityPack" version="[1.4.9.5, 2.0.0)" />
|
||||
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
|
||||
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
|
||||
<dependency id="ClientDependency" version="[1.9.6, 2.0.0)" />
|
||||
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
|
||||
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
|
||||
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
|
||||
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
name: 🐛 Bug Report
|
||||
about: File a bug report, if you've discovered a problem in Umbraco.
|
||||
---
|
||||
|
||||
A brief description of the issue goes here.
|
||||
|
||||
<!--
|
||||
|
||||
If you haven't yet done so, please read the "contributing guidelines"
|
||||
thoroughly. Then, proceed by filling out the rest of the details in the issue
|
||||
template below. The more details you can give us, the easier it will be for us
|
||||
to determine the cause of a problem.
|
||||
|
||||
See: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/docs/CONTRIBUTING.md
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
Reproduction
|
||||
------------
|
||||
|
||||
If you're filing a bug, please describe how to reproduce it. Include as much
|
||||
relevant information as possible, such as:
|
||||
|
||||
### Bug summary
|
||||
|
||||
<!--
|
||||
* Write a short summary of the bug
|
||||
* Try to pinpoint it as much as possible
|
||||
* Try to state the _actual problem_, and not just what you _think_ the
|
||||
solution might be.
|
||||
-->
|
||||
|
||||
### Specifics
|
||||
|
||||
<!--
|
||||
* Mention the URL where this bug occurs, if applicable
|
||||
* What version of Umbraco are you using (down to the very last digit!)
|
||||
* What browser and version you are using
|
||||
* Please mention if you've checked it in other browsers as well
|
||||
* Please include *full error messages* and *screenshots* if possible
|
||||
-->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!--
|
||||
* Clearly mention the steps to reproduce the bug
|
||||
-->
|
||||
|
||||
### Expected result
|
||||
|
||||
<!--
|
||||
* What did you _expect_ that would happen on your Umbraco site?
|
||||
* Describe the intended/desired outcome after you did the steps mentioned.
|
||||
-->
|
||||
|
||||
### Actual result
|
||||
|
||||
<!--
|
||||
* What is the actual result of the above steps?
|
||||
* Describe the behaviour of the bug
|
||||
* Please, please include **error messages** and screenshots. They might mean
|
||||
nothing to you, but they are _very_ helpful to us.
|
||||
-->
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: 📮 Feature Request
|
||||
about: Open a feature request, if you want to propose a new feature.
|
||||
---
|
||||
|
||||
A brief description of your feature request goes here.
|
||||
|
||||
|
||||
<!--
|
||||
If you want to discuss the feature you're imagining, please make sure to keep
|
||||
those discussions on the forum at https://our.umbraco.com/ (choose the
|
||||
category "Contributing to Umbraco", Umbraco HQ follows all new topics there).
|
||||
|
||||
Once you've come to a conclusion in the discussion, feel free to propose the
|
||||
new feature here.
|
||||
-->
|
||||
|
||||
How can you help?
|
||||
-------------------------------
|
||||
|
||||
<!--
|
||||
The resources (read: available time and effort) of Umbraco's core team are
|
||||
limited.
|
||||
|
||||
If we can not work on your suggestion, please don't take it personally. Most
|
||||
likely, it's either:
|
||||
|
||||
- We think your idea is valid, but we can't find the time to work on it.
|
||||
- Your idea might be better suited as a package, if it's not suitable for
|
||||
the majority of users.
|
||||
-->
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: ⁉️ Support Question
|
||||
about: Having trouble with Umbraco? -> https://our.umbraco.com
|
||||
---
|
||||
|
||||
This issue tracker is NOT meant for support questions. If you have a question,
|
||||
please join us on the forum at https://our.umbraco.com.
|
||||
|
||||
Thanks!
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: 📖 Documentation Issue
|
||||
about: See https://github.com/umbraco/UmbracoDocs/issues for documentation issues
|
||||
---
|
||||
|
||||
The Umbraco documentation has its own dedicated repository. Please open your
|
||||
documentation-related issue at https://github.com/umbraco/UmbracoDocs/issues
|
||||
|
||||
Thanks!
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: 🔐 Security Issue
|
||||
about: Discovered a Security Issue in Umbraco?
|
||||
---
|
||||
|
||||
⚠️ PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, SEE BELOW.
|
||||
|
||||
If you have found a security issue in Umbraco, please send the details to
|
||||
security@umbraco.com and don't disclose it publicly until we can provide a fix for
|
||||
it. If you wish, we'll credit you for finding verified issues, when we release
|
||||
the patched version.
|
||||
|
||||
❗ Please read more about how to report security issues on https://umbraco.com/security
|
||||
|
||||
A note on "Self XSS"
|
||||
--------------------
|
||||
|
||||
Umbraco is a CMS, that allows users to edit content on a website. As such,
|
||||
all _authenticated users_ can:
|
||||
|
||||
- Edit content, and (depending on the field types) insert HTML and CSS in that
|
||||
content, with a variety of allowed attributes.
|
||||
- Depending on the user level: Edit template files, and insert C#, HTML, CSS and
|
||||
javascript in so on.
|
||||
- Upload files to the site, which will become publicly available.
|
||||
|
||||
We see these functionalities as _features_, and not as security issues. Please
|
||||
report the mentioned items only if they can be performed by non-authorized
|
||||
users, or other exploitable vulnerabilities.
|
||||
|
||||
Thanks!
|
||||
@@ -1,11 +1,11 @@
|
||||
### Prerequisites
|
||||
|
||||
- [ ] I have written a descriptive pull-request title
|
||||
- [ ] I have linked this PR to an issue on the tracker at http://issues.umbraco.org
|
||||
- [ ] I have [created an issue](https://github.com/umbraco/Umbraco-CMS/issues) for the proposed changes in this PR, the link is:
|
||||
- [ ] I have added steps to test this contribution in the description below
|
||||
|
||||
### Description
|
||||
<!-- A description of the changes proposed in the pull-request -->
|
||||
|
||||
<!-- Make sure to link to the related issue number so we can easily find it in the issue tracker -->
|
||||
|
||||
|
||||
<!-- Thanks for contributing to Umbraco CMS! -->
|
||||
|
||||
+2
-2
@@ -11,5 +11,5 @@ using System.Resources;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyFileVersion("7.12.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.12.0")]
|
||||
[assembly: AssemblyFileVersion("7.12.4")]
|
||||
[assembly: AssemblyInformationalVersion("7.12.4")]
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Semver;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Configuration;
|
||||
using System.Threading;
|
||||
using Semver;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.ObjectResolution;
|
||||
@@ -13,7 +13,7 @@ using Umbraco.Core.Sync;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// the Umbraco Application context
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -270,7 +270,7 @@ namespace Umbraco.Core
|
||||
return _umbracoApplicationUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resets the url.
|
||||
/// </summary>
|
||||
@@ -280,10 +280,10 @@ namespace Umbraco.Core
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
internal string _umbracoApplicationUrl;
|
||||
|
||||
internal List<string> _umbracoApplicationDomains = new List<string>();
|
||||
|
||||
internal string _umbracoApplicationUrl;
|
||||
|
||||
internal ConcurrentDictionary<string, string> _umbracoApplicationDomains = new ConcurrentDictionary<string, string>();
|
||||
|
||||
internal string _umbracoApplicationDeploymentId;
|
||||
|
||||
private Lazy<bool> _configured;
|
||||
@@ -399,7 +399,7 @@ namespace Umbraco.Core
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
private void AssertIsNotReady()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("7.12.0");
|
||||
private static readonly Version Version = new Version("7.12.4");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace Umbraco.Core.Models.Membership
|
||||
{
|
||||
get
|
||||
{
|
||||
if (LastLoginDate == default(DateTime) && IsApproved == false && InvitedDate != null)
|
||||
if (LastLoginDate == default && IsApproved == false && InvitedDate != null)
|
||||
return UserState.Invited;
|
||||
|
||||
if (IsLockedOut)
|
||||
@@ -267,7 +267,11 @@ namespace Umbraco.Core.Models.Membership
|
||||
if (IsApproved == false)
|
||||
return UserState.Disabled;
|
||||
|
||||
return UserState.Active;
|
||||
// User is not disabled or locked and has never logged in before
|
||||
if (LastLoginDate == default && IsApproved && IsLockedOut == false)
|
||||
return UserState.Inactive;
|
||||
|
||||
return UserState.Active;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
Active = 0,
|
||||
Disabled = 1,
|
||||
LockedOut = 2,
|
||||
Invited = 3
|
||||
Invited = 3,
|
||||
Inactive = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,17 +6,17 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions
|
||||
{
|
||||
public ConstraintDefinition(ConstraintType type)
|
||||
{
|
||||
constraintType = type;
|
||||
_constraintType = type;
|
||||
}
|
||||
|
||||
private ConstraintType constraintType;
|
||||
public bool IsPrimaryKeyConstraint { get { return ConstraintType.PrimaryKey == constraintType; } }
|
||||
public bool IsUniqueConstraint { get { return ConstraintType.Unique == constraintType; } }
|
||||
public bool IsNonUniqueConstraint { get { return ConstraintType.NonUnique == constraintType; } }
|
||||
private readonly ConstraintType _constraintType;
|
||||
public bool IsPrimaryKeyConstraint => ConstraintType.PrimaryKey == _constraintType;
|
||||
public bool IsUniqueConstraint => ConstraintType.Unique == _constraintType;
|
||||
public bool IsNonUniqueConstraint => ConstraintType.NonUnique == _constraintType;
|
||||
|
||||
public string SchemaName { get; set; }
|
||||
public string ConstraintName { get; set; }
|
||||
public string TableName { get; set; }
|
||||
public ICollection<string> Columns = new HashSet<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Core.Persistence.DatabaseModelDefinitions
|
||||
{
|
||||
/// <summary>
|
||||
@@ -5,9 +7,17 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions
|
||||
/// </summary>
|
||||
internal class DbIndexDefinition
|
||||
{
|
||||
public virtual string IndexName { get; set; }
|
||||
public virtual string TableName { get; set; }
|
||||
public virtual string ColumnName { get; set; }
|
||||
public virtual bool IsUnique { get; set; }
|
||||
public DbIndexDefinition(Tuple<string, string, string, bool> data)
|
||||
{
|
||||
TableName = data.Item1;
|
||||
IndexName = data.Item2;
|
||||
ColumnName = data.Item3;
|
||||
IsUnique = data.Item4;
|
||||
}
|
||||
|
||||
public string IndexName { get; }
|
||||
public string TableName { get; }
|
||||
public string ColumnName { get; }
|
||||
public bool IsUnique { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,9 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
/// <returns></returns>
|
||||
internal static bool TryMatch(string text, out string mediaPath)
|
||||
{
|
||||
//TODO: In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor
|
||||
// can tell us directly what any URL is for a given property if it contains an asset
|
||||
|
||||
mediaPath = null;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
@@ -155,4 +158,4 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,13 +159,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
|
||||
//get the db index defs
|
||||
result.DbIndexDefinitions = _sqlSyntaxProvider.GetDefinedIndexes(_database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
foreach (var item in OrderedTables.OrderBy(x => x.Key))
|
||||
{
|
||||
@@ -184,6 +178,14 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This validates the Primary/Foreign keys in the database
|
||||
/// </summary>
|
||||
/// <param name="result"></param>
|
||||
/// <remarks>
|
||||
/// This does not validate any database constraints that are not PKs or FKs because Umbraco does not create a database with non PK/FK contraints.
|
||||
/// Any unique "constraints" in the database are done with unique indexes.
|
||||
/// </remarks>
|
||||
private void ValidateDbConstraints(DatabaseSchemaResult result)
|
||||
{
|
||||
//MySql doesn't conform to the "normal" naming of constraints, so there is currently no point in doing these checks.
|
||||
@@ -196,8 +198,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
var constraintsInDatabase = _sqlSyntaxProvider.GetConstraintsPerColumn(_database).DistinctBy(x => x.Item3).ToList();
|
||||
var foreignKeysInDatabase = constraintsInDatabase.Where(x => x.Item3.InvariantStartsWith("FK_")).Select(x => x.Item3).ToList();
|
||||
var primaryKeysInDatabase = constraintsInDatabase.Where(x => x.Item3.InvariantStartsWith("PK_")).Select(x => x.Item3).ToList();
|
||||
var indexesInDatabase = constraintsInDatabase.Where(x => x.Item3.InvariantStartsWith("IX_")).Select(x => x.Item3).ToList();
|
||||
var indexesInSchema = result.TableDefinitions.SelectMany(x => x.Indexes.Select(y => y.Name)).ToList();
|
||||
|
||||
var unknownConstraintsInDatabase =
|
||||
constraintsInDatabase.Where(
|
||||
x =>
|
||||
@@ -212,7 +213,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
// In theory you could have: FK_ or fk_ ...or really any standard that your development department (or developer) chooses to use.
|
||||
foreach (var unknown in unknownConstraintsInDatabase)
|
||||
{
|
||||
if (foreignKeysInSchema.InvariantContains(unknown) || primaryKeysInSchema.InvariantContains(unknown) || indexesInSchema.InvariantContains(unknown))
|
||||
if (foreignKeysInSchema.InvariantContains(unknown) || primaryKeysInSchema.InvariantContains(unknown))
|
||||
{
|
||||
result.ValidConstraints.Add(unknown);
|
||||
}
|
||||
@@ -254,23 +255,6 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
result.Errors.Add(new Tuple<string, string>("Constraint", primaryKey));
|
||||
}
|
||||
|
||||
//Constaints:
|
||||
|
||||
//NOTE: SD: The colIndex checks above should really take care of this but I need to keep this here because it was here before
|
||||
// and some schema validation checks might rely on this data remaining here!
|
||||
//Add valid and invalid index differences to the result object
|
||||
var validIndexDifferences = indexesInDatabase.Intersect(indexesInSchema, StringComparer.InvariantCultureIgnoreCase);
|
||||
foreach (var index in validIndexDifferences)
|
||||
{
|
||||
result.ValidConstraints.Add(index);
|
||||
}
|
||||
var invalidIndexDifferences =
|
||||
indexesInDatabase.Except(indexesInSchema, StringComparer.InvariantCultureIgnoreCase)
|
||||
.Union(indexesInSchema.Except(indexesInDatabase, StringComparer.InvariantCultureIgnoreCase));
|
||||
foreach (var index in invalidIndexDifferences)
|
||||
{
|
||||
result.Errors.Add(new Tuple<string, string>("Constraint", index));
|
||||
}
|
||||
}
|
||||
|
||||
private void ValidateDbColumns(DatabaseSchemaResult result)
|
||||
|
||||
+2
-8
@@ -28,13 +28,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
public override void Up()
|
||||
{
|
||||
var dbIndexes = _skipIndexCheck ? new DbIndexDefinition[]{} : SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//make sure it doesn't already exist
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsMacroProperty_Alias")) == false)
|
||||
@@ -54,4 +48,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
Delete.Index("IX_cmsMacroProperty_Alias").OnTable("cmsMacroProperty");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -30,13 +30,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
public override void Up()
|
||||
{
|
||||
var dbIndexes = _forTesting ? new DbIndexDefinition[] { } : SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//make sure it doesn't already exist
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsMacro_Alias")) == false)
|
||||
@@ -75,4 +69,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
Delete.Index("IX_cmsMacro_Alias").OnTable("cmsMacro");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -18,13 +18,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
public override void Up()
|
||||
{
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//add a foreign key to the parent id column too!
|
||||
|
||||
@@ -54,4 +48,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
throw new DataLossException("Cannot downgrade from a version 7 database to a prior version, the database schema has already been modified");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -26,13 +26,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
// it is absolutely required to exist in order to have it as a foreign key reference, so we'll need to check it's existence
|
||||
// this came to light from this issue: http://issues.umbraco.org/issue/U4-4133
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsContent")) == false)
|
||||
{
|
||||
Create.Index("IX_cmsContent").OnTable("cmsContent").OnColumn("nodeId").Ascending().WithOptions().Unique();
|
||||
@@ -95,4 +89,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
//don't do anything, these keys should have always existed!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenEightZe
|
||||
{
|
||||
Execute.Code(database =>
|
||||
{
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(database);
|
||||
|
||||
//make sure it doesn't already exist
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsPropertyTypeAlias")) == false)
|
||||
|
||||
+2
-8
@@ -62,13 +62,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
}
|
||||
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//make sure it doesn't already exist
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsDictionary_id")) == false)
|
||||
@@ -104,4 +98,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -120,13 +120,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
|
||||
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//in some databases there's an index (IX_Master) on the master column which needs to be dropped first
|
||||
var foundIndex = dbIndexes.FirstOrDefault(x => x.TableName.InvariantEquals("cmsTemplate") && x.ColumnName.InvariantEquals("master"));
|
||||
@@ -167,4 +161,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -15,13 +15,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
public override void Up()
|
||||
{
|
||||
var indexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
// drop the index if it exists
|
||||
if (indexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodeUniqueID")))
|
||||
@@ -38,4 +32,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe
|
||||
public override void Down()
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-17
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwelveZero
|
||||
@@ -16,20 +13,22 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwelveZ
|
||||
|
||||
public override void Up()
|
||||
{
|
||||
var exists = Context.Database.FirstOrDefault<RelationTypeDto>("WHERE alias=@alias", new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
|
||||
if (exists == null)
|
||||
var relationTypeCount = Context.Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoRelationType WHERE alias=@alias",
|
||||
new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
|
||||
|
||||
if (relationTypeCount > 0)
|
||||
return;
|
||||
|
||||
var uniqueId = (Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias + "____" + Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName).ToGuid();
|
||||
Insert.IntoTable("umbracoRelationType").Row(new
|
||||
{
|
||||
var uniqueId = (Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias + "____" + Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName).ToGuid();
|
||||
Insert.IntoTable("umbracoRelationType").Row(new
|
||||
{
|
||||
typeUniqueId = uniqueId,
|
||||
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
|
||||
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
|
||||
childObjectType = Constants.ObjectTypes.MediaType,
|
||||
parentObjectType = Constants.ObjectTypes.MediaType,
|
||||
dual = false
|
||||
});
|
||||
}
|
||||
typeUniqueId = uniqueId,
|
||||
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
|
||||
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
|
||||
childObjectType = Constants.ObjectTypes.MediaType,
|
||||
parentObjectType = Constants.ObjectTypes.MediaType,
|
||||
dual = false
|
||||
});
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
|
||||
+30
-14
@@ -15,21 +15,35 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwelveZ
|
||||
|
||||
public override void Up()
|
||||
{
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
|
||||
//Ensure the index exists before dropping it
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
|
||||
Execute.Code(database =>
|
||||
{
|
||||
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage");
|
||||
}
|
||||
|
||||
var localContext = new LocalMigrationContext(Context.CurrentDatabaseProvider, database, SqlSyntax, Logger);
|
||||
// Some people seem to have a constraint in their DB instead of an index, we'd need to drop that one
|
||||
// See: https://our.umbraco.com/forum/using-umbraco-and-getting-started/93282-upgrade-from-711-to-712-fails
|
||||
var constraints = SqlSyntax.GetConstraintsPerTable(database).Distinct().ToArray();
|
||||
if (constraints.Any(x => x.Item2.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
|
||||
{
|
||||
localContext.Delete.UniqueConstraint("IX_umbracoLanguage_languageISOCode").FromTable("umbracoLanguage");
|
||||
return localContext.GetSql();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
Execute.Code(database =>
|
||||
{
|
||||
var localContext = new LocalMigrationContext(Context.CurrentDatabaseProvider, database, SqlSyntax, Logger);
|
||||
|
||||
//Now check for indexes of that name and drop that if it exists
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(database)
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
|
||||
{
|
||||
localContext.Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage");
|
||||
return localContext.GetSql();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
Alter.Table("umbracoLanguage")
|
||||
.AlterColumn("languageISOCode")
|
||||
.AsString(14)
|
||||
@@ -38,6 +52,8 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwelveZ
|
||||
Create.Index("IX_umbracoLanguage_languageISOCode")
|
||||
.OnTable("umbracoLanguage")
|
||||
.OnColumn("languageISOCode")
|
||||
.Ascending()
|
||||
.WithOptions()
|
||||
.Unique();
|
||||
}
|
||||
|
||||
|
||||
+3
-9
@@ -48,14 +48,8 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwoZero
|
||||
//Some very old schemas don't have an index on the cmsContentType.nodeId column, I'm not actually sure when it was added but
|
||||
// it is absolutely required to exist in order to add other foreign keys and much better for perf, so we'll need to check it's existence
|
||||
// this came to light from this issue: http://issues.umbraco.org/issue/U4-4133
|
||||
var dbIndexes = SqlSyntaxContext.SqlSyntaxProvider.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsContentType")) == false)
|
||||
{
|
||||
Create.Index("IX_cmsContentType").OnTable("cmsContentType").OnColumn("nodeId").Ascending().WithOptions().Unique();
|
||||
@@ -82,4 +76,4 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenTwoZero
|
||||
throw new DataLossException("Cannot downgrade from a version 7.2 database to a prior version, the database schema has already been modified");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -20,13 +20,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixTwoZero
|
||||
{
|
||||
|
||||
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
|
||||
//do not create any indexes if they already exist in the database
|
||||
|
||||
@@ -118,4 +112,4 @@ DROP TABLE ""umbracoUserLogins_temp""");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,14 +331,23 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets entities by query.
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="objectTypeId"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// Note that this will also fetch all property data for media items, which can cause performance problems
|
||||
/// when used without paging, in sites with large amounts of data in cmsPropertyData.
|
||||
/// </remarks>
|
||||
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query, Guid objectTypeId)
|
||||
{
|
||||
|
||||
bool isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid;
|
||||
bool isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid;
|
||||
var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid;
|
||||
var isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid;
|
||||
|
||||
var sqlClause = GetBaseWhere(GetBase, isContent, isMedia, null, objectTypeId);
|
||||
|
||||
|
||||
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
||||
var entitySql = translator.Translate();
|
||||
|
||||
@@ -364,22 +373,49 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
}
|
||||
else
|
||||
{
|
||||
//use dynamic so that we can get ALL properties from the SQL so we can chuck that data into our AdditionalData
|
||||
var finalSql = entitySql.Append(GetGroupBy(isContent, false));
|
||||
|
||||
//query = read forward data reader, do not load everything into mem
|
||||
var dtos = _work.Database.Query<dynamic>(finalSql);
|
||||
var collection = new EntityDefinitionCollection();
|
||||
foreach (var dto in dtos)
|
||||
{
|
||||
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
||||
}
|
||||
return collection.Select(x => x.BuildFromDynamic()).ToList();
|
||||
return GetByQueryInternal(entitySql, isContent, isMedia);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets entities by query without fetching property data.
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="objectTypeId"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This is supposed to be internal and can be used when getting all entities without paging, without causing
|
||||
/// performance issues.
|
||||
/// </remarks>
|
||||
internal IEnumerable<IUmbracoEntity> GetMediaByQueryWithoutPropertyData(IQuery<IUmbracoEntity> query)
|
||||
{
|
||||
var sqlClause = GetBaseWhere(GetBase, false, true, null, UmbracoObjectTypes.Media.GetGuid());
|
||||
|
||||
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
||||
var entitySql = translator.Translate();
|
||||
|
||||
return GetByQueryInternal(entitySql, false, true);
|
||||
}
|
||||
|
||||
internal IEnumerable<IUmbracoEntity> GetByQueryInternal(Sql entitySql, bool isContent, bool isMedia)
|
||||
{
|
||||
var factory = new UmbracoEntityFactory();
|
||||
|
||||
//use dynamic so that we can get ALL properties from the SQL so we can chuck that data into our AdditionalData
|
||||
var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia));
|
||||
|
||||
//query = read forward data reader, do not load everything into mem
|
||||
var dtos = _work.Database.Query<dynamic>(finalSql);
|
||||
var collection = new EntityDefinitionCollection();
|
||||
foreach (var dto in dtos)
|
||||
{
|
||||
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, isMedia));
|
||||
}
|
||||
return collection.Select(x => x.BuildFromDynamic()).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Sql Statements
|
||||
|
||||
@@ -851,4 +887,4 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +186,8 @@ UNION
|
||||
SELECT '4CountOfLockedOut' AS colName, COUNT(id) AS num FROM umbracoUser WHERE userNoConsole = 1
|
||||
UNION
|
||||
SELECT '5CountOfInvited' AS colName, COUNT(id) AS num FROM umbracoUser WHERE lastLoginDate IS NULL AND userDisabled = 1 AND invitedDate IS NOT NULL
|
||||
UNION
|
||||
SELECT '6CountOfDisabled' AS colName, COUNT(id) AS num FROM umbracoUser WHERE userDisabled = 0 AND userNoConsole = 0 AND lastLoginDate IS NULL
|
||||
ORDER BY colName";
|
||||
|
||||
var result = Database.Fetch<dynamic>(sql);
|
||||
@@ -196,7 +198,8 @@ ORDER BY colName";
|
||||
{UserState.Active, (int)result[1].num},
|
||||
{UserState.Disabled, (int)result[2].num},
|
||||
{UserState.LockedOut, (int)result[3].num},
|
||||
{UserState.Invited, (int)result[4].num}
|
||||
{UserState.Invited, (int)result[4].num},
|
||||
{UserState.Inactive, (int) result[5].num}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -765,6 +768,12 @@ ORDER BY colName";
|
||||
sb.Append("(userDisabled = 0 AND userNoConsole = 0 AND lastLoginDate IS NOT NULL)");
|
||||
appended = true;
|
||||
}
|
||||
if (userState.Contains(UserState.Inactive))
|
||||
{
|
||||
if (appended) sb.Append(" OR ");
|
||||
sb.Append("(userDisabled = 0 AND userNoConsole = 0 AND lastLoginDate IS NULL)");
|
||||
appended = true;
|
||||
}
|
||||
if (userState.Contains(UserState.Disabled))
|
||||
{
|
||||
if (appended) sb.Append(" OR ");
|
||||
@@ -915,4 +924,4 @@ ORDER BY colName";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
string TruncateTable { get; }
|
||||
string CreateConstraint { get; }
|
||||
string DeleteConstraint { get; }
|
||||
|
||||
[Obsolete("This is never used, use the Format(ForeignKeyDefinition) instead")]
|
||||
string CreateForeignKeyConstraint { get; }
|
||||
string DeleteDefaultConstraint { get; }
|
||||
string FormatDateTime(DateTime date, bool includeTime = true);
|
||||
@@ -78,9 +80,32 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
|
||||
IEnumerable<string> GetTablesInSchema(Database db);
|
||||
IEnumerable<ColumnInfo> GetColumnsInSchema(Database db);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all constraints defined in the database (Primary keys, foreign keys, unique constraints...) (does not include indexes)
|
||||
/// </summary>
|
||||
/// <param name="db"></param>
|
||||
/// <returns>
|
||||
/// A Tuple containing: TableName, ConstraintName
|
||||
/// </returns>
|
||||
IEnumerable<Tuple<string, string>> GetConstraintsPerTable(Database db);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all constraints defined in the database (Primary keys, foreign keys, unique constraints...) (does not include indexes)
|
||||
/// </summary>
|
||||
/// <param name="db"></param>
|
||||
/// <returns>
|
||||
/// A Tuple containing: TableName, ColumnName, ConstraintName
|
||||
/// </returns>
|
||||
IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(Database db);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all defined Indexes in the database excluding primary keys
|
||||
/// </summary>
|
||||
/// <param name="db"></param>
|
||||
/// <returns>
|
||||
/// A Tuple containing: TableName, IndexName, ColumnName, IsUnique
|
||||
/// </returns>
|
||||
IEnumerable<Tuple<string, string, string, bool>> GetDefinedIndexes(Database db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string>> GetConstraintsPerTable(Database db)
|
||||
{
|
||||
List<Tuple<string, string>> list;
|
||||
@@ -100,6 +101,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(Database db)
|
||||
{
|
||||
List<Tuple<string, string, string>> list;
|
||||
@@ -126,6 +128,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string, bool>> GetDefinedIndexes(Database db)
|
||||
{
|
||||
List<Tuple<string, string, string, bool>> list;
|
||||
@@ -401,4 +404,4 @@ ORDER BY TABLE_NAME, INDEX_NAME",
|
||||
return PetaPocoExtensions.EscapeAtSymbols(MySql.Data.MySqlClient.MySqlHelper.EscapeString(val));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
/// <summary>
|
||||
/// Represents an SqlSyntaxProvider for Sql Ce
|
||||
/// </summary>
|
||||
[SqlSyntaxProviderAttribute(Constants.DatabaseProviders.SqlCe)]
|
||||
[SqlSyntaxProvider(Constants.DatabaseProviders.SqlCe)]
|
||||
public class SqlCeSyntaxProvider : MicrosoftSqlSyntaxProviderBase<SqlCeSyntaxProvider>
|
||||
{
|
||||
public SqlCeSyntaxProvider()
|
||||
@@ -123,40 +123,27 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
item.IS_NULLABLE, item.DATA_TYPE)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string>> GetConstraintsPerTable(Database db)
|
||||
{
|
||||
var items = db.Fetch<dynamic>("SELECT TABLE_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS");
|
||||
var indexItems = db.Fetch<dynamic>("SELECT TABLE_NAME, INDEX_NAME FROM INFORMATION_SCHEMA.INDEXES");
|
||||
return
|
||||
items.Select(item => new Tuple<string, string>(item.TABLE_NAME, item.CONSTRAINT_NAME))
|
||||
.Union(
|
||||
indexItems.Select(
|
||||
indexItem => new Tuple<string, string>(indexItem.TABLE_NAME, indexItem.INDEX_NAME)))
|
||||
.ToList();
|
||||
return items.Select(item => new Tuple<string, string>(item.TABLE_NAME, item.CONSTRAINT_NAME)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(Database db)
|
||||
{
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
"SELECT CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE");
|
||||
var indexItems = db.Fetch<dynamic>("SELECT INDEX_NAME, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.INDEXES");
|
||||
return
|
||||
items.Select(
|
||||
item => new Tuple<string, string, string>(item.TABLE_NAME, item.COLUMN_NAME, item.CONSTRAINT_NAME))
|
||||
.Union(
|
||||
indexItems.Select(
|
||||
indexItem =>
|
||||
new Tuple<string, string, string>(indexItem.TABLE_NAME, indexItem.COLUMN_NAME,
|
||||
indexItem.INDEX_NAME))).ToList();
|
||||
var items = db.Fetch<dynamic>("SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE");
|
||||
return items.Select(item => new Tuple<string, string, string>(item.TABLE_NAME, item.COLUMN_NAME, item.CONSTRAINT_NAME)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string, bool>> GetDefinedIndexes(Database db)
|
||||
{
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
@"SELECT TABLE_NAME, INDEX_NAME, COLUMN_NAME, [UNIQUE] FROM INFORMATION_SCHEMA.INDEXES
|
||||
WHERE INDEX_NAME NOT LIKE 'PK_%'
|
||||
WHERE PRIMARY_KEY=0
|
||||
ORDER BY TABLE_NAME, INDEX_NAME");
|
||||
return
|
||||
items.Select(
|
||||
@@ -215,4 +202,4 @@ ORDER BY TABLE_NAME, INDEX_NAME");
|
||||
public override string DropIndex { get { return "DROP INDEX {1}.{0}"; } }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
item.IS_NULLABLE, item.DATA_TYPE)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string>> GetConstraintsPerTable(Database db)
|
||||
{
|
||||
var items =
|
||||
@@ -96,6 +97,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return items.Select(item => new Tuple<string, string>(item.TABLE_NAME, item.CONSTRAINT_NAME)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(Database db)
|
||||
{
|
||||
var items =
|
||||
@@ -104,6 +106,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
return items.Select(item => new Tuple<string, string, string>(item.TABLE_NAME, item.COLUMN_NAME, item.CONSTRAINT_NAME)).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<Tuple<string, string, string, bool>> GetDefinedIndexes(Database db)
|
||||
{
|
||||
var items =
|
||||
@@ -113,7 +116,7 @@ CASE WHEN I.is_unique_constraint = 1 OR I.is_unique = 1 THEN 1 ELSE 0 END AS [U
|
||||
from sys.tables as T inner join sys.indexes as I on T.[object_id] = I.[object_id]
|
||||
inner join sys.index_columns as IC on IC.[object_id] = I.[object_id] and IC.[index_id] = I.[index_id]
|
||||
inner join sys.all_columns as AC on IC.[object_id] = AC.[object_id] and IC.[column_id] = AC.[column_id]
|
||||
WHERE I.name NOT LIKE 'PK_%'
|
||||
WHERE I.is_primary_key = 0
|
||||
order by T.name, I.name");
|
||||
return items.Select(item => new Tuple<string, string, string, bool>(item.TABLE_NAME, item.INDEX_NAME, item.COLUMN_NAME,
|
||||
item.UNIQUE == 1)).ToList();
|
||||
@@ -183,4 +186,4 @@ order by T.name, I.name");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,10 +537,11 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
|
||||
public virtual string CreateConstraint { get { return "ALTER TABLE {0} ADD CONSTRAINT {1} {2} ({3})"; } }
|
||||
public virtual string DeleteConstraint { get { return "ALTER TABLE {0} DROP CONSTRAINT {1}"; } }
|
||||
|
||||
public virtual string CreateForeignKeyConstraint { get { return "ALTER TABLE {0} ADD CONSTRAINT {1} FOREIGN KEY ({2}) REFERENCES {3} ({4}){5}{6}"; } }
|
||||
|
||||
public virtual string ConvertIntegerToOrderableString { get { return "REPLACE(STR({0}, 8), SPACE(1), '0')"; } }
|
||||
public virtual string ConvertDateToOrderableString { get { return "CONVERT(nvarchar, {0}, 102)"; } }
|
||||
public virtual string ConvertDecimalToOrderableString { get { return "REPLACE(STR({0}, 20, 9), SPACE(1), '0')"; } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
public static IEnumerable<DbIndexDefinition> GetDefinedIndexesDefinitions(this ISqlSyntaxProvider sql, Database db)
|
||||
{
|
||||
return sql.GetDefinedIndexes(db)
|
||||
.Select(x => new DbIndexDefinition()
|
||||
{
|
||||
TableName = x.Item1,
|
||||
IndexName = x.Item2,
|
||||
ColumnName = x.Item3,
|
||||
IsUnique = x.Item4
|
||||
}).ToArray();
|
||||
.Select(x => new DbIndexDefinition(x)).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -57,4 +51,4 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
In,
|
||||
NotIn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -42,18 +42,19 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
||||
return null;
|
||||
}
|
||||
|
||||
var isMultipleDataType = IsMultipleDataType(propertyType.DataTypeId, propertyType.PropertyEditorAlias);
|
||||
|
||||
var selectedValues = (string[]) source;
|
||||
|
||||
if (selectedValues.Any())
|
||||
{
|
||||
if (IsMultipleDataType(propertyType.DataTypeId, propertyType.PropertyEditorAlias))
|
||||
{
|
||||
if (isMultipleDataType)
|
||||
return selectedValues;
|
||||
}
|
||||
|
||||
return selectedValues.First();
|
||||
}
|
||||
|
||||
return source;
|
||||
return isMultipleDataType ? source : string.Empty;
|
||||
}
|
||||
|
||||
public Type GetPropertyValueType(PublishedPropertyType propertyType)
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.CodeAnnotations;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.Core.Logging;
|
||||
@@ -13,6 +11,7 @@ using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Persistence.UnitOfWork;
|
||||
|
||||
namespace Umbraco.Core.Services
|
||||
@@ -287,16 +286,35 @@ namespace Umbraco.Core.Services
|
||||
public virtual IEnumerable<IUmbracoEntity> GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType)
|
||||
{
|
||||
var objectTypeId = umbracoObjectType.GetGuid();
|
||||
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
||||
using (var uow = UowProvider.GetUnitOfWork(readOnly: true))
|
||||
{
|
||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||
var query = Query<IUmbracoEntity>.Builder.Where(x => x.ParentId == parentId);
|
||||
return repository.GetByQuery(query, objectTypeId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of children by the parent's Id and UmbracoObjectType without adding property data
|
||||
/// </summary>
|
||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||
internal IEnumerable<IUmbracoEntity> GetMediaChildrenWithoutPropertyData(int parentId)
|
||||
{
|
||||
var objectTypeId = UmbracoObjectTypes.Media.GetGuid();
|
||||
using (var uow = UowProvider.GetUnitOfWork(readOnly: true))
|
||||
{
|
||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||
var query = Query<IUmbracoEntity>.Builder.Where(x => x.ParentId == parentId);
|
||||
|
||||
var contents = repository.GetByQuery(query, objectTypeId);
|
||||
return contents;
|
||||
// Not pretty having to cast the repository, but it is the only way to get to use an internal method that we
|
||||
// do not want to make public on the interface. Unfortunately also prevents this from being unit tested.
|
||||
// See this issue for details on why we need this:
|
||||
// https://github.com/umbraco/Umbraco-CMS/issues/3457
|
||||
return ((EntityRepository)repository).GetMediaByQueryWithoutPropertyData(query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a paged collection of children
|
||||
/// </summary>
|
||||
@@ -781,4 +799,4 @@ namespace Umbraco.Core.Services
|
||||
return node.NodeId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ namespace Umbraco.Core.Services
|
||||
using (var uow = UowProvider.GetUnitOfWork(readOnly: true))
|
||||
{
|
||||
var repository = RepositoryFactory.CreateUserRepository(uow);
|
||||
return repository.GetPagedResultsByQuery(null, pageIndex, pageSize, out totalRecords, member => member.Username);
|
||||
return repository.GetPagedResultsByQuery(null, pageIndex, pageSize, out totalRecords, member => member.Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,10 +51,9 @@ namespace Umbraco.Core.Sync
|
||||
if (request != null)
|
||||
{
|
||||
var applicationUrl = GetApplicationUrlFromRequest(request);
|
||||
newApplicationUrl = !appContext._umbracoApplicationDomains.Contains(applicationUrl);
|
||||
newApplicationUrl = appContext._umbracoApplicationDomains.TryAdd(applicationUrl, applicationUrl);
|
||||
if (newApplicationUrl)
|
||||
{
|
||||
appContext._umbracoApplicationDomains.Add(applicationUrl);
|
||||
LogHelper.Info(typeof(ApplicationUrlHelper), string.Format("New ApplicationUrl detected: {0}", applicationUrl));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -45,8 +45,8 @@
|
||||
<Reference Include="AutoMapper.Net4, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core, Version=1.9.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ClientDependency.1.9.6\lib\net45\ClientDependency.Core.dll</HintPath>
|
||||
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.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>
|
||||
@@ -567,8 +567,8 @@
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddInstructionCountColumn.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddCmsMediaTable.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddUserLoginTable.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\RenameTrueFalseField.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\SetDefaultTagsStorageType.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\RenameTrueFalseField.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\SetDefaultTagsStorageType.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenNineZero\AddUmbracoAuditTable.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenNineZero\AddUmbracoConsentTable.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenNineZero\AddIsSensitiveMemberTypeColumn.cs" />
|
||||
@@ -638,7 +638,7 @@
|
||||
<Compile Include="Media\Exif\TIFFStrip.cs" />
|
||||
<Compile Include="Media\Exif\Utility.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeOne\UpdateUserLanguagesToIsoCode.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\IncreaseLanguageIsoCodeColumnLength.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\IncreaseLanguageIsoCodeColumnLength.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\UpdateUmbracoConsent.cs" />
|
||||
<Compile Include="Persistence\PocoDataDataReader.cs" />
|
||||
<Compile Include="Persistence\Querying\CachedExpression.cs" />
|
||||
@@ -1688,4 +1688,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||
<package id="ClientDependency" version="1.9.6" targetFramework="net45" />
|
||||
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
|
||||
<package id="ImageProcessor" version="2.5.6" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||
|
||||
@@ -3,37 +3,8 @@
|
||||
"browser": true
|
||||
},
|
||||
|
||||
"plugins": [
|
||||
"angular"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
"eqeqeq": 2,
|
||||
"curly": 2,
|
||||
|
||||
"no-unused-vars": 1,
|
||||
"no-eval": 1,
|
||||
"no-delete-var": 1,
|
||||
"quotes": 1,
|
||||
"dot-notation": 1,
|
||||
|
||||
"no-use-before-define": 0,
|
||||
"angular/ng_controller_as": 1,
|
||||
"angular/ng_controller_as_vm": 1,
|
||||
|
||||
|
||||
"strict": 0,
|
||||
"no-irregular-whitespace": 0,
|
||||
"no-mixed-spaces-and-tabs": 0,
|
||||
"no-multi-spaces": 0,
|
||||
"key-spacing": 0,
|
||||
"semi-spacing": 0,
|
||||
"space-infix-ops": 0,
|
||||
"comma-spacing": 0,
|
||||
"no-trailing-spaces": 0,
|
||||
"eol-last": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"camelcase": 0
|
||||
"comma-dangle": ["error", "never"]
|
||||
},
|
||||
|
||||
"globals": {
|
||||
|
||||
@@ -12,6 +12,9 @@ const imagemin = require('gulp-imagemin');
|
||||
var _ = require('lodash');
|
||||
var MergeStream = require('merge-stream');
|
||||
|
||||
// js
|
||||
const eslint = require('gulp-eslint');
|
||||
|
||||
//Less + css
|
||||
var postcss = require('gulp-postcss');
|
||||
var less = require('gulp-less');
|
||||
@@ -30,6 +33,11 @@ Helper functions
|
||||
function processJs(files, out) {
|
||||
|
||||
return gulp.src(files)
|
||||
// check for js errors
|
||||
.pipe(eslint())
|
||||
// outputs the lint results to the console
|
||||
.pipe(eslint.format())
|
||||
// sort files in stream by path or any custom sort comparator
|
||||
.pipe(sort())
|
||||
.pipe(concat(out))
|
||||
.pipe(wrap('(function(){\n%= body %\n})();'))
|
||||
|
||||
+10487
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-connect": "5.0.0",
|
||||
"gulp-eslint": "^5.0.0",
|
||||
"gulp-imagemin": "^4.1.0",
|
||||
"gulp-less": "^3.5.0",
|
||||
"gulp-ngdocs": "^0.3.0",
|
||||
|
||||
@@ -12,7 +12,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "color",
|
||||
@@ -45,12 +45,12 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "border",
|
||||
category: "Color",
|
||||
name: "Border",
|
||||
name: "Border"
|
||||
},
|
||||
{
|
||||
type: "color",
|
||||
@@ -83,7 +83,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "googlefontpicker",
|
||||
category: "Font",
|
||||
name: "Font familly",
|
||||
name: "Font familly"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -105,7 +105,7 @@ var canvasdesignerConfig = {
|
||||
name: "Margin",
|
||||
enable: ["top", "bottom"],
|
||||
schema: "#header"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -124,7 +124,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -137,7 +137,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -150,7 +150,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
@@ -163,7 +163,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "margin",
|
||||
category: "Position",
|
||||
name: "Margin",
|
||||
name: "Margin"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -177,7 +177,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
@@ -190,7 +190,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "margin",
|
||||
category: "Position",
|
||||
name: "Margin",
|
||||
name: "Margin"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -216,7 +216,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "padding",
|
||||
@@ -305,7 +305,7 @@ var canvasdesignerConfig = {
|
||||
name: "Background Hover",
|
||||
css: "background",
|
||||
schema: ".button-alt:hover"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -73,7 +73,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
topbordertype: 'solid',
|
||||
bottombordersize: '',
|
||||
bottombordercolor: '',
|
||||
bottombordertype: 'solid',
|
||||
bottombordertype: 'solid'
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: '',
|
||||
fontType: '',
|
||||
fontWeight: '',
|
||||
fontStyle: '',
|
||||
fontStyle: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontType: "safe",
|
||||
fontFamily: value,
|
||||
fontWeight: "normal",
|
||||
fontStyle: "normal",
|
||||
fontStyle: "normal"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -121,7 +121,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -161,7 +161,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedmargin = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedmargin = function (margintype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
leftmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
rightmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
topmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottommarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottommarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedpadding = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedpadding = function (paddingtype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
leftpaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
rightpaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
toppaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottompaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottompaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedradius = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedradius = function (radiustype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
topleftradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
toprightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
bottomleftradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottomrightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottomrightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ angular.module('spectrumcolorpicker', [])
|
||||
scope.colorselected = initColor;
|
||||
scope.$apply();
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@
|
||||
backdropOpacity: "=?",
|
||||
highlightElement: "=?",
|
||||
highlightPreventClick: "=?",
|
||||
disableEventsOnClick: "=?",
|
||||
disableEventsOnClick: "=?"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+20
-16
@@ -10,10 +10,12 @@
|
||||
scope.publishStatus = {};
|
||||
|
||||
scope.disableTemplates = Umbraco.Sys.ServerVariables.features.disabledFeatures.disableTemplates;
|
||||
|
||||
function onInit() {
|
||||
|
||||
scope.allowOpen = true;
|
||||
function onInit() {
|
||||
// If logged in user has access to the settings section
|
||||
// show the open anchors - if the user doesn't have
|
||||
// access, documentType is null, see ContentModelMapper
|
||||
scope.allowOpen = scope.node.documentType !== null;
|
||||
|
||||
scope.datePickerConfig = {
|
||||
pickDate: true,
|
||||
@@ -41,11 +43,13 @@
|
||||
// make sure dates are formatted to the user's locale
|
||||
formatDatesToLocal();
|
||||
|
||||
// Declare a fallback URL for the <umb-node-preview/> directive
|
||||
scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id;
|
||||
|
||||
// Make sure to set the node status
|
||||
setNodePublishStatus(scope.node);
|
||||
|
||||
|
||||
// Declare a fallback URL for the <umb-node-preview/> directive
|
||||
if (scope.documentType !== null) {
|
||||
scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id;
|
||||
}
|
||||
}
|
||||
|
||||
scope.auditTrailPageChange = function (pageNumber) {
|
||||
@@ -53,7 +57,7 @@
|
||||
loadAuditTrail();
|
||||
};
|
||||
|
||||
scope.openDocumentType = function (documentType) {
|
||||
scope.openDocumentType = function (documentType) {
|
||||
var url = "/settings/documenttypes/edit/" + documentType.id;
|
||||
$location.url(url);
|
||||
};
|
||||
@@ -99,7 +103,7 @@
|
||||
item.timestampFormatted = dateHelper.getLocalDate(item.timestamp, currentUser.locale, 'LLL');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
scope.auditTrail = data.items;
|
||||
scope.auditTrailOptions.pageNumber = data.pageNumber;
|
||||
scope.auditTrailOptions.pageSize = data.pageSize;
|
||||
@@ -107,7 +111,7 @@
|
||||
scope.auditTrailOptions.totalPages = data.totalPages;
|
||||
|
||||
setAuditTrailLogTypeColor(scope.auditTrail);
|
||||
|
||||
|
||||
scope.loadingAuditTrail = false;
|
||||
});
|
||||
|
||||
@@ -115,6 +119,7 @@
|
||||
|
||||
function setAuditTrailLogTypeColor(auditTrail) {
|
||||
angular.forEach(auditTrail, function (item) {
|
||||
|
||||
switch (item.logType) {
|
||||
case "Publish":
|
||||
item.logTypeColor = "success";
|
||||
@@ -130,7 +135,6 @@
|
||||
}
|
||||
|
||||
function setNodePublishStatus(node) {
|
||||
|
||||
// deleted node
|
||||
if(node.trashed === true) {
|
||||
scope.publishStatus.label = localizationService.localize("general_deleted");
|
||||
@@ -224,7 +228,7 @@
|
||||
eventsService.emit("editors.content.changeUnpublishDate", args);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ucfirst(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
@@ -233,13 +237,13 @@
|
||||
// get current backoffice user and format dates
|
||||
userService.getCurrentUser().then(function (currentUser) {
|
||||
scope.node.createDateFormatted = dateHelper.getLocalDate(scope.node.createDate, currentUser.locale, 'LLL');
|
||||
|
||||
|
||||
scope.node.releaseDateYear = scope.node.releaseDate ? ucfirst(dateHelper.getLocalDate(scope.node.releaseDate, currentUser.locale, 'YYYY')) : null;
|
||||
scope.node.releaseDateMonth = scope.node.releaseDate ? ucfirst(dateHelper.getLocalDate(scope.node.releaseDate, currentUser.locale, 'MMMM')) : null;
|
||||
scope.node.releaseDateDayNumber = scope.node.releaseDate ? ucfirst(dateHelper.getLocalDate(scope.node.releaseDate, currentUser.locale, 'DD')) : null;
|
||||
scope.node.releaseDateDay = scope.node.releaseDate ? ucfirst(dateHelper.getLocalDate(scope.node.releaseDate, currentUser.locale, 'dddd')) : null;
|
||||
scope.node.releaseDateTime = scope.node.releaseDate ? ucfirst(dateHelper.getLocalDate(scope.node.releaseDate, currentUser.locale, 'HH:mm')) : null;
|
||||
|
||||
|
||||
scope.node.removeDateYear = scope.node.removeDate ? ucfirst(dateHelper.getLocalDate(scope.node.removeDate, currentUser.locale, 'YYYY')) : null;
|
||||
scope.node.removeDateMonth = scope.node.removeDate ? ucfirst(dateHelper.getLocalDate(scope.node.removeDate, currentUser.locale, 'MMMM')) : null;
|
||||
scope.node.removeDateDayNumber = scope.node.removeDate ? ucfirst(dateHelper.getLocalDate(scope.node.removeDate, currentUser.locale, 'DD')) : null;
|
||||
@@ -264,8 +268,8 @@
|
||||
scope.$watch('node.updateDate', function(newValue, oldValue){
|
||||
|
||||
if(!newValue) { return; }
|
||||
if(newValue === oldValue) { return; }
|
||||
|
||||
if(newValue === oldValue) { return; }
|
||||
|
||||
if(isInfoTab) {
|
||||
loadAuditTrail();
|
||||
formatDatesToLocal();
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ angular.module("umbraco.directives")
|
||||
var $container = element.find(".crop-container");
|
||||
|
||||
//default constraints for drag n drop
|
||||
var constraints = {left: {max: scope.dimensions.margin, min: scope.dimensions.margin}, top: {max: scope.dimensions.margin, min: scope.dimensions.margin}, };
|
||||
var constraints = {left: {max: scope.dimensions.margin, min: scope.dimensions.margin}, top: {max: scope.dimensions.margin, min: scope.dimensions.margin} };
|
||||
scope.constraints = constraints;
|
||||
|
||||
|
||||
|
||||
+19
-6
@@ -8,11 +8,16 @@
|
||||
var evts = [];
|
||||
|
||||
function onInit() {
|
||||
scope.allowOpenMediaType = true;
|
||||
// If logged in user has access to the settings section
|
||||
// show the open anchors - if the user doesn't have
|
||||
// access, contentType is null, see MediaModelMapper
|
||||
scope.allowOpen = scope.node.contentType !== null;
|
||||
|
||||
// get document type details
|
||||
scope.mediaType = scope.node.contentType;
|
||||
// get node url
|
||||
scope.nodeUrl = scope.node.mediaLink;
|
||||
|
||||
// set the media link initially
|
||||
setMediaLink();
|
||||
// make sure dates are formatted to the user's locale
|
||||
formatDatesToLocal();
|
||||
}
|
||||
@@ -25,16 +30,25 @@
|
||||
});
|
||||
}
|
||||
|
||||
function setMediaLink(){
|
||||
scope.nodeUrl = scope.node.mediaLink;
|
||||
}
|
||||
|
||||
scope.openMediaType = function (mediaType) {
|
||||
// remove first "#" from url if it is prefixed else the path won't work
|
||||
var url = "/settings/mediaTypes/edit/" + mediaType.id;
|
||||
$location.path(url);
|
||||
};
|
||||
|
||||
|
||||
// watch for content updates - reload content when node is saved, published etc.
|
||||
scope.$watch('node.updateDate', function(newValue, oldValue){
|
||||
if(!newValue) { return; }
|
||||
if(newValue === oldValue) { return; }
|
||||
|
||||
// Update the media link
|
||||
setMediaLink();
|
||||
|
||||
// Update the create and update dates
|
||||
formatDatesToLocal();
|
||||
});
|
||||
|
||||
@@ -46,7 +60,6 @@
|
||||
});
|
||||
|
||||
onInit();
|
||||
|
||||
}
|
||||
|
||||
var directive = {
|
||||
@@ -64,4 +77,4 @@
|
||||
|
||||
angular.module('umbraco.directives').directive('umbMediaNodeInfo', MediaNodeInfoDirective);
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: 'views/components/umb-dropdown-item.html',
|
||||
templateUrl: 'views/components/umb-dropdown-item.html'
|
||||
};
|
||||
|
||||
return directive;
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
},
|
||||
stop: function(e, ui) {
|
||||
updateTabsSortOrder();
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
scope.sortableOptionsProperty = {
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ angular.module("umbraco.directives")
|
||||
restrict: 'A',
|
||||
replace: false,
|
||||
scope: {
|
||||
node: '=umbLaunchMiniEditor',
|
||||
node: '=umbLaunchMiniEditor'
|
||||
},
|
||||
link: function(scope, element, attrs) {
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
$http.get(url),
|
||||
'Failed to retrieve content types'
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -329,7 +329,7 @@ angular.module('umbraco.services').factory("editorState", function() {
|
||||
},
|
||||
set: function (value) {
|
||||
throw "Use editorState.set to set the value of the current entity";
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
@@ -260,7 +260,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
|
||||
// if save button is alread the default don't change it just update the label
|
||||
if (buttons.defaultButton && buttons.defaultButton.letter === "A") {
|
||||
buttons.defaultButton.labelKey = "buttons_saveAndSchedule";
|
||||
return;
|
||||
return buttons;
|
||||
}
|
||||
|
||||
if(buttons.defaultButton && buttons.subButtons && buttons.subButtons.length > 0) {
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
canDelete: _.contains(intersectPermissions, 'D'), //Magic Char = D
|
||||
canMove: _.contains(intersectPermissions, 'M'), //Magic Char = M
|
||||
canPublish: _.contains(intersectPermissions, 'U'), //Magic Char = U
|
||||
canUnpublish: _.contains(intersectPermissions, 'U'), //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
canUnpublish: _.contains(intersectPermissions, 'U') //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -641,7 +641,7 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
|
||||
|
||||
//These will show up on the dialog controller's $scope under dialogOptions
|
||||
currentNode: args.node,
|
||||
currentAction: args.action,
|
||||
currentAction: args.action
|
||||
});
|
||||
|
||||
//save the currently assigned dialog so it can be removed before a new one is created
|
||||
|
||||
@@ -761,6 +761,8 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
||||
* @param {string} input the string to parse
|
||||
*/
|
||||
getAnchorNames: function (input) {
|
||||
if (!input) return [];
|
||||
|
||||
var anchorPattern = /<a id=\\"(.*?)\\">/gi;
|
||||
var matches = input.match(anchorPattern);
|
||||
var anchors = [];
|
||||
@@ -771,7 +773,9 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
||||
});
|
||||
}
|
||||
|
||||
return anchors;
|
||||
return anchors.filter(function(val, i, self) {
|
||||
return self.indexOf(val) === i;
|
||||
});
|
||||
},
|
||||
|
||||
insertLinkInEditor: function (editor, target, anchorElm) {
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
{ "value": 0, "name": "Active", "key": "Active", "color": "success" },
|
||||
{ "value": 1, "name": "Disabled", "key": "Disabled", "color": "danger" },
|
||||
{ "value": 2, "name": "Locked out", "key": "LockedOut", "color": "danger" },
|
||||
{ "value": 3, "name": "Invited", "key": "Invited", "color": "warning" }
|
||||
{ "value": 3, "name": "Invited", "key": "Invited", "color": "warning" },
|
||||
{ "value": 4, "name": "Inactive", "key": "Inactive", "color": "warning" }
|
||||
];
|
||||
|
||||
angular.forEach(userStates, function (userState) {
|
||||
|
||||
@@ -27,12 +27,18 @@
|
||||
}
|
||||
|
||||
.umb-iconpicker-item a:hover,
|
||||
.umb-iconpicker-item a:focus,
|
||||
.umb-iconpicker-item.-selected {
|
||||
.umb-iconpicker-item a:focus {
|
||||
background: @gray-10;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.umb-iconpicker-item.-selected {
|
||||
background: @gray-10;
|
||||
border: solid 1px @turquoise-d1;
|
||||
border-radius: @baseBorderRadius;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.umb-iconpicker-item a:active {
|
||||
background: @gray-10;
|
||||
}
|
||||
@@ -54,11 +60,6 @@
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
// Hide Circle when not active
|
||||
i.small{
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Circle behind the checkmark
|
||||
i.small.active{
|
||||
font-size: 14px;
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
.nested-content
|
||||
{
|
||||
.umb-nested-content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nested-content--not-supported
|
||||
{
|
||||
.umb-nested-content--not-supported {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.nested-content-overlay
|
||||
{
|
||||
.umb-nested-content-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -19,47 +16,39 @@
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.nested-content__item
|
||||
{
|
||||
.umb-nested-content__item {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
border-top: solid 1px transparent;
|
||||
background: white;
|
||||
|
||||
|
||||
background: @white;
|
||||
}
|
||||
|
||||
.nested-content__item--active:not(.nested-content__item--single)
|
||||
{
|
||||
background: #f8f8f8;
|
||||
.umb-nested-content__item--active:not(.umb-nested-content__item--single) {
|
||||
background: @gray-10;
|
||||
}
|
||||
|
||||
.nested-content__item.ui-sortable-placeholder
|
||||
{
|
||||
background: #f8f8f8;
|
||||
border: 1px dashed #d9d9d9;
|
||||
.umb-nested-content__item.ui-sortable-placeholder {
|
||||
background: @gray-10;
|
||||
border: 1px dashed @gray-8;
|
||||
visibility: visible !important;
|
||||
height: 55px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.nested-content__item--single > .nested-content__content
|
||||
{
|
||||
.umb-nested-content__item--single > .umb-nested-content__content {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.nested-content__item--single > .nested-content__content > .umb-pane
|
||||
{
|
||||
.umb-nested-content__item--single > .umb-nested-content__content > .umb-pane {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nested-content__header-bar
|
||||
{
|
||||
.umb-nested-content__header-bar {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px dashed #e0e0e0;
|
||||
border-bottom: 1px dashed @gray-8;
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
background-color: white;
|
||||
background-color: @white;
|
||||
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
@@ -67,24 +56,21 @@
|
||||
-o-user-select: none;
|
||||
}
|
||||
|
||||
.nested-content__heading {
|
||||
.umb-nested-content__heading {
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
|
||||
&.-with-icon
|
||||
{
|
||||
&.-with-icon {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
i
|
||||
{
|
||||
color: #999; /* same icon color as the icons in the item type picker */
|
||||
i {
|
||||
color: @gray-2;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.nested-content__item-name
|
||||
{
|
||||
.umb-nested-content__item-name {
|
||||
max-height: 20px;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
@@ -94,22 +80,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.nested-content__icons
|
||||
{
|
||||
.umb-nested-content__icons {
|
||||
opacity: 0;
|
||||
|
||||
transition: opacity .15s ease-in-out;
|
||||
-moz-transition: opacity .15s ease-in-out;
|
||||
-webkit-transition: opacity .15s ease-in-out;
|
||||
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 2px;
|
||||
background-color: white;
|
||||
background-color: @white;
|
||||
padding: 5px;
|
||||
|
||||
&:before
|
||||
{
|
||||
&:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
display: block;
|
||||
@@ -117,126 +97,129 @@
|
||||
left: -30px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: -webkit-linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
background: -moz-linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
background: linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.nested-content__header-bar:hover .nested-content__icons,
|
||||
.nested-content__item--active > .nested-content__header-bar .nested-content__icons
|
||||
{
|
||||
.umb-nested-content__header-bar:hover .umb-nested-content__icons,
|
||||
.umb-nested-content__item--active > .umb-nested-content__header-bar .umb-nested-content__icons {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.nested-content__icon,
|
||||
.nested-content__icon.nested-content__icon--disabled:hover
|
||||
{
|
||||
.umb-nested-content__icon,
|
||||
.umb-nested-content__icon.umb-nested-content__icon--disabled:hover {
|
||||
display: inline-block;
|
||||
padding: 4px 6px;
|
||||
margin: 2px;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
border: 1px solid #b6b6b6;
|
||||
background: @white;
|
||||
border: 1px solid @gray-7;
|
||||
border-radius: 200px;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.nested-content__icon:hover,
|
||||
.nested-content__icon--active
|
||||
.umb-nested-content__icon:hover,
|
||||
.umb-nested-content__icon--active
|
||||
{
|
||||
color: white;
|
||||
background: #2e8aea;
|
||||
border-color: #2e8aea;
|
||||
color: @white;
|
||||
background: @turquoise-d1;
|
||||
border-color: @turquoise-d1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nested-content__icon .icon,
|
||||
.nested-content__icon.nested-content__icon--disabled:hover .icon
|
||||
{
|
||||
.umb-nested-content__icon .icon,
|
||||
.umb-nested-content__icon.umb-nested-content__icon--disabled:hover .icon {
|
||||
display: block;
|
||||
font-size: 16px !important;
|
||||
color: #5f5f5f;
|
||||
color: @gray-3;
|
||||
}
|
||||
|
||||
.nested-content__icon:hover .icon,
|
||||
.nested-content__icon--active .icon
|
||||
{
|
||||
color: white;
|
||||
.umb-nested-content__icon:hover .icon,
|
||||
.umb-nested-content__icon--active .icon {
|
||||
color: @white;
|
||||
}
|
||||
|
||||
.nested-content__icon--disabled
|
||||
{
|
||||
.umb-nested-content__icon--disabled {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
|
||||
.nested-content__footer-bar
|
||||
{
|
||||
.umb-nested-content__footer-bar {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.nested-content__content
|
||||
{
|
||||
border-bottom: 1px dashed #e0e0e0;
|
||||
.umb-nested-content__content {
|
||||
border-bottom: 1px dashed @gray-8;
|
||||
}
|
||||
|
||||
.nested-content__content .umb-control-group {
|
||||
.umb-nested-content__content .umb-control-group {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.nested-content__item.ui-sortable-helper .nested-content__content
|
||||
{
|
||||
.umb-nested-content__item.ui-sortable-helper .umb-nested-content__content {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.nested-content__help-text
|
||||
{
|
||||
.umb-nested-content__help-text {
|
||||
display: inline-block;
|
||||
padding: 10px 20px 10px 20px;
|
||||
clear: both;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
background: #f8f8f8;
|
||||
color: @gray-3;
|
||||
background: @gray-10;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.nested-content__doctypepicker table input, .nested-content__doctypepicker table select {
|
||||
.umb-nested-content__doctypepicker table input,
|
||||
.umb-nested-content__doctypepicker table select {
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.nested-content__doctypepicker table td.icon-navigation, .nested-content__doctypepicker i.nested-content__help-icon {
|
||||
.umb-nested-content__doctypepicker table td.icon-navigation,
|
||||
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
|
||||
vertical-align: middle;
|
||||
color: #CCC;
|
||||
color: @gray-7;
|
||||
}
|
||||
|
||||
.nested-content__doctypepicker table td.icon-navigation:hover, .nested-content__doctypepicker i.nested-content__help-icon:hover {
|
||||
color: #343434;
|
||||
.umb-nested-content__doctypepicker table td.icon-navigation:hover,
|
||||
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon:hover {
|
||||
color: @gray-2;
|
||||
}
|
||||
|
||||
.nested-content__doctypepicker i.nested-content__help-icon {
|
||||
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.form-horizontal .nested-content--narrow .controls-row
|
||||
.form-horizontal .umb-nested-content--narrow .controls-row
|
||||
{
|
||||
margin-left: 40% !important;
|
||||
}
|
||||
|
||||
.form-horizontal .nested-content--narrow .controls-row .umb-textstring,
|
||||
.form-horizontal .nested-content--narrow .controls-row .umb-textarea
|
||||
.form-horizontal .umb-nested-content--narrow .controls-row .umb-textstring,
|
||||
.form-horizontal .umb-nested-content--narrow .controls-row .umb-textarea
|
||||
{
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.form-horizontal .nested-content--narrow .controls-row .umb-dropdown {
|
||||
.form-horizontal .umb-nested-content--narrow .controls-row .umb-dropdown {
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
.usky-grid.nested-content__node-type-picker .cell-tools-menu {
|
||||
.usky-grid.umb-nested-content__node-type-picker .cell-tools-menu {
|
||||
position: relative;
|
||||
transform: translate(-50%, -25%);
|
||||
}
|
||||
|
||||
|
||||
// this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors
|
||||
// the attribute selector ensures the change only applies to the linkpicker overlay
|
||||
.form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row {
|
||||
margin-left:0!important;
|
||||
|
||||
.umb-textarea, .umb-textstring {
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 10000;
|
||||
z-index: 65537;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0 !important;
|
||||
|
||||
@@ -16,7 +16,7 @@ function LegacyDeleteController($scope, legacyResource, treeService, navigationS
|
||||
legacyResource.deleteItem({
|
||||
nodeId: $scope.currentNode.id,
|
||||
nodeType: $scope.currentNode.nodeType,
|
||||
alias: $scope.currentNode.name,
|
||||
alias: $scope.currentNode.name
|
||||
}).then(function () {
|
||||
$scope.currentNode.loading = false;
|
||||
//TODO: Need to sync tree, etc...
|
||||
|
||||
@@ -40,11 +40,18 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
||||
// if a link exists, get the properties to build the anchor name list
|
||||
contentResource.getById(id).then(function (resp) {
|
||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
||||
$scope.model.target.url = resp.urls[0];
|
||||
$scope.target.url = resp.urls[0];
|
||||
});
|
||||
} else if ($scope.target.url.length) {
|
||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||
$scope.target.url = $scope.model.url.substring(0, $scope.model.url.search(/(#|\?)/));
|
||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||
// only do the substring if there's a # or a ?
|
||||
var indexOfAnchor = $scope.target.url.search(/(#|\?)/);
|
||||
if (indexOfAnchor > -1) {
|
||||
// populate the anchor
|
||||
$scope.target.anchor = $scope.target.url.substring(indexOfAnchor);
|
||||
// then rewrite the model and populate the link
|
||||
$scope.target.url = $scope.target.url.substring(0, indexOfAnchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +88,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
||||
} else {
|
||||
contentResource.getById(args.node.id).then(function (resp) {
|
||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
||||
$scope.model.target.url = resp.urls[0];
|
||||
$scope.target.url = resp.urls[0];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -106,7 +113,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
||||
hasChildren: false,
|
||||
name: searchText,
|
||||
metaData: {
|
||||
listViewNode: child,
|
||||
listViewNode: child
|
||||
},
|
||||
cssClass: "icon umb-tree-icon sprTree icon-search",
|
||||
cssClasses: ["not-published"]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
placeholder="@general_url"
|
||||
class="umb-editor umb-textstring"
|
||||
ng-model="target.url"
|
||||
ng-disabled="target.id" />
|
||||
ng-disabled="target.id || target.udi" />
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-property--push">
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
modalClass: "login-overlay",
|
||||
animation: "slide",
|
||||
show: true,
|
||||
callback: callback,
|
||||
callback: callback
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<form method="POST" name="requestPasswordResetForm" ng-submit="requestPasswordResetSubmit(email)">
|
||||
<div class="control-group" ng-class="{error: requestPasswordResetForm.email.$invalid}">
|
||||
<label><localize key="general_email">Email</localize></label>
|
||||
<input type="email" ng-model="email" name="email" class="-full-width-input" localize="placeholder" placeholder="@placeholders_email" />
|
||||
<input type="email" val-email ng-model="email" name="email" class="-full-width-input" localize="placeholder" placeholder="@placeholders_email" />
|
||||
</div>
|
||||
|
||||
<div class="control-group" ng-show="requestPasswordResetForm.$invalid">
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ angular.module("umbraco").controller('Umbraco.Dialogs.Template.QueryBuilderContr
|
||||
sort:{
|
||||
property:{
|
||||
alias: "",
|
||||
name: "",
|
||||
name: ""
|
||||
},
|
||||
direction: "ascending"
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
||||
},
|
||||
name: searchText,
|
||||
metaData: {
|
||||
listViewNode: child,
|
||||
listViewNode: child
|
||||
},
|
||||
cssClass: "icon-search",
|
||||
cssClasses: ["not-published"]
|
||||
|
||||
+9
-4
@@ -3,8 +3,6 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
||||
function ($scope, eventsService, dialogService, entityResource, contentResource, mediaHelper, userService, localizationService, tinyMceService) {
|
||||
var dialogOptions = $scope.model;
|
||||
|
||||
var anchorPattern = /<a id=\\"(.*?)\\">/gi;
|
||||
|
||||
var searchText = "Search...";
|
||||
localizationService.localize("general_search").then(function (value) {
|
||||
searchText = value + "...";
|
||||
@@ -52,8 +50,15 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
||||
$scope.model.target.url = resp.urls[0];
|
||||
});
|
||||
} else if ($scope.model.target.url.length) {
|
||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||
$scope.model.target.url = $scope.model.target.url.substring(0, $scope.model.target.url.search(/(#|\?)/));
|
||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||
// only do the substring if there's a # or a ?
|
||||
var indexOfAnchor = $scope.model.target.url.search(/(#|\?)/);
|
||||
if (indexOfAnchor > -1) {
|
||||
// populate the anchor
|
||||
$scope.model.target.anchor = $scope.model.target.url.substring(indexOfAnchor);
|
||||
// then rewrite the model and populate the link
|
||||
$scope.model.target.url = $scope.model.target.url.substring(0, indexOfAnchor);
|
||||
}
|
||||
}
|
||||
} else if (dialogOptions.anchors) {
|
||||
$scope.anchorValues = dialogOptions.anchors;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
placeholder="@general_url"
|
||||
class="umb-editor umb-textstring"
|
||||
ng-model="model.target.url"
|
||||
ng-disabled="model.target.id" />
|
||||
ng-disabled="model.target.id || model.target.udi" />
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-property--push">
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ angular.module("umbraco")
|
||||
pageSize: 100,
|
||||
totalItems: 0,
|
||||
totalPages: 0,
|
||||
filter: '',
|
||||
filter: ''
|
||||
};
|
||||
|
||||
//preload selected item
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
label-key="general_upload"
|
||||
action="upload()"
|
||||
disabled="lockedFolder"
|
||||
button-style="info"
|
||||
ng-if="acceptedMediatypes.length > 0">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
+10
-1
@@ -24,7 +24,16 @@ angular.module("umbraco").controller("Umbraco.Overlays.MemberGroupPickerControll
|
||||
}
|
||||
|
||||
function selectMemberGroups(id) {
|
||||
$scope.model.selectedMemberGroups.push(id);
|
||||
var index = $scope.model.selectedMemberGroups.indexOf(id);
|
||||
|
||||
if(index === -1){
|
||||
// If the id does not exists in the array then add it
|
||||
$scope.model.selectedMemberGroups.push(id);
|
||||
}
|
||||
else{
|
||||
// Otherwise we will remove it from the array instead
|
||||
$scope.model.selectedMemberGroups.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/** Method used for selecting a node */
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
sort: {
|
||||
property: {
|
||||
alias: "",
|
||||
name: "",
|
||||
name: ""
|
||||
},
|
||||
direction: "ascending", //This is the value for sorting sent to server
|
||||
translation: {
|
||||
|
||||
+3
-1
@@ -162,7 +162,9 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
||||
|
||||
tree = args.tree;
|
||||
|
||||
if (node && node.path) {
|
||||
var nodeHasPath = typeof node !== "undefined" && typeof node.path !== "undefined";
|
||||
var startNodeNotDefined = typeof dialogOptions.startNodeId === "undefined" || dialogOptions.startNodeId === "" || dialogOptions.startNodeId === "-1";
|
||||
if (startNodeNotDefined && nodeHasPath) {
|
||||
$scope.dialogTreeEventHandler.syncTree({ path: node.path, activate: false });
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<button ng-click="click()" class="umb-toggle dib" ng-class="{'umb-toggle--checked': checked}">
|
||||
<button ng-click="click()" type="button" class="umb-toggle dib" ng-class="{'umb-toggle--checked': checked}">
|
||||
|
||||
<span ng-if="!labelPosition && showLabels === 'true' || labelPosition === 'left' && showLabels === 'true'">
|
||||
<span ng-if="!checked" class="umb-toggle__label umb-toggle__label--left">{{ displayLabelOff }}</span>
|
||||
|
||||
@@ -178,15 +178,16 @@
|
||||
<umb-control-group data-element="node-info-document-type" label="@content_documentType">
|
||||
<umb-node-preview
|
||||
style="max-width: 100%; margin-bottom: 0;"
|
||||
icon="documentType.icon"
|
||||
name="documentType.name"
|
||||
icon="node.icon"
|
||||
name="node.contentTypeName"
|
||||
allow-open="allowOpen"
|
||||
on-open="openDocumentType(documentType)"
|
||||
open-url="previewOpenUrl">
|
||||
open-url="previewOpenUrl">
|
||||
</umb-node-preview>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group ng-if="disableTemplates == false" data-element="node-info-template" label="@template_template">
|
||||
|
||||
<div class="flex items-center">
|
||||
<select class="input-block-level"
|
||||
ng-model="node.template"
|
||||
@@ -194,7 +195,7 @@
|
||||
ng-change="updateTemplate(node.template)">
|
||||
<option value=""><localize key="general_choose">Choose</localize>...</option>
|
||||
</select>
|
||||
<a href="" class="umb-node-preview__action" style="margin-left:15px;" ng-click="openTemplate()" ng-if="node.template !== null">
|
||||
<a href="" class="umb-node-preview__action" style="margin-left:15px;" ng-click="openTemplate()" ng-if="node.template !== null && allowOpen">
|
||||
<localize key="general_open">Open</localize>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
size="small">
|
||||
<localize key="content_noMediaLink"></localize>
|
||||
</umb-empty-state>
|
||||
|
||||
|
||||
<ul ng-if="nodeUrl" class="nav nav-stacked" style="margin-bottom: 0;">
|
||||
<li>
|
||||
<a href="{{nodeUrl}}" target="_blank">
|
||||
@@ -28,7 +28,7 @@
|
||||
<umb-box data-element="node-info-general">
|
||||
<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">
|
||||
{{node.createDateFormatted}} by {{ node.owner.name }}
|
||||
</umb-control-group>
|
||||
@@ -36,13 +36,13 @@
|
||||
<umb-control-group data-element="node-info-update-date" label="@content_updateDate">
|
||||
{{node.updateDateFormatted}}
|
||||
</umb-control-group>
|
||||
|
||||
|
||||
<umb-control-group data-element="node-info-media-type" label="@content_mediatype">
|
||||
<umb-node-preview
|
||||
style="max-width: 100%; margin-bottom: 0px;"
|
||||
icon="mediaType.icon"
|
||||
name="mediaType.name"
|
||||
allow-open="allowOpenMediaType"
|
||||
icon="node.icon"
|
||||
name="node.contentTypeName"
|
||||
allow-open="allowOpen"
|
||||
on-open="openMediaType(mediaType)">
|
||||
</umb-node-preview>
|
||||
</umb-control-group>
|
||||
@@ -52,8 +52,8 @@
|
||||
<small>{{ node.key }}</small>
|
||||
</umb-control-group>
|
||||
|
||||
</umb-box-content>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-node-preview__actions">
|
||||
<a class="umb-node-preview__action" title="Open" href="{{editUrl}}" ng-if="allowEdit" ng-click="onEdit()"><localize key="general_edit">Edit</localize></a>
|
||||
<a class="umb-node-preview__action" title="Edit" href="{{editUrl}}" ng-if="allowEdit" ng-click="onEdit()"><localize key="general_edit">Edit</localize></a>
|
||||
<a class="umb-node-preview__action" title="Open" href="{{openUrl}}" ng-if="allowOpen" ng-click="onOpen()"><localize key="general_open">Open</localize></a>
|
||||
<a class="umb-node-preview__action umb-node-preview__action--red" title="Remove" href="{{removeUrl}}" ng-if="allowRemove" ng-click="onRemove()"><localize key="general_remove">Remove</localize></i></a>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="hideDropzone" ngf-drag-over-class="hide" class="text-center">
|
||||
<small>
|
||||
<localize key="media_dragFilesHereToUpload">You can drag files here to upload</localize>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- List of uploading/uploaded files -->
|
||||
<ul class="file-list" ng-show="done.length > 0 || queue.length > 0 || rejected.length > 0 || filesHolder.length > 0">
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
|
||||
label: preVals[i].label,
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value,
|
||||
config: preVals[i].config,
|
||||
config: preVals[i].config
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<umb-toggle
|
||||
data-element="permissions-allow-as-root"
|
||||
checked="model.allowAsRoot"
|
||||
on-click="vm.toggle()"
|
||||
hotkey="alt+shift+r"
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
});
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ angular.module("umbraco")
|
||||
name: "1 column layout",
|
||||
sections: [
|
||||
{
|
||||
grid: 12,
|
||||
grid: 12
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -36,7 +36,7 @@ angular.module("umbraco")
|
||||
name: "2 column layout",
|
||||
sections: [
|
||||
{
|
||||
grid: 4,
|
||||
grid: 4
|
||||
},
|
||||
{
|
||||
grid: 8
|
||||
|
||||
@@ -57,10 +57,10 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
totalPages: 0,
|
||||
items: []
|
||||
};
|
||||
|
||||
|
||||
//when this is null, we don't check permissions
|
||||
$scope.currentNodePermissions = null;
|
||||
|
||||
$scope.currentNodePermissions = null;
|
||||
|
||||
if ($scope.entityType === "content") {
|
||||
//Just ensure we do have an editorState
|
||||
if (editorState.current) {
|
||||
@@ -75,9 +75,9 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
"canDelete": _.contains(currentUserPermissions, 'D'), //Magic Char = D
|
||||
"canMove": _.contains(currentUserPermissions, 'M'), //Magic Char = M
|
||||
"canPublish": _.contains(currentUserPermissions, 'U'), //Magic Char = U
|
||||
"canUnpublish": _.contains(currentUserPermissions, 'U'), //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
"canUnpublish": _.contains(currentUserPermissions, 'U') //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//when this is null, we don't check permissions
|
||||
|
||||
+3
-3
@@ -229,10 +229,10 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
$scope.sortableOptions = {
|
||||
axis: 'y',
|
||||
cursor: "move",
|
||||
handle: ".nested-content__icon--move",
|
||||
handle: ".umb-nested-content__icon--move",
|
||||
start: function (ev, ui) {
|
||||
// Yea, yea, we shouldn't modify the dom, sue me
|
||||
$("#nested-content--" + $scope.model.id + " .umb-rte textarea").each(function () {
|
||||
$("#umb-nested-content--" + $scope.model.id + " .umb-rte textarea").each(function () {
|
||||
tinymce.execCommand('mceRemoveEditor', false, $(this).attr('id'));
|
||||
$(this).css("visibility", "hidden");
|
||||
});
|
||||
@@ -244,7 +244,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
$scope.setDirty();
|
||||
},
|
||||
stop: function (ev, ui) {
|
||||
$("#nested-content--" + $scope.model.id + " .umb-rte textarea").each(function () {
|
||||
$("#umb-nested-content--" + $scope.model.id + " .umb-rte textarea").each(function () {
|
||||
tinymce.execCommand('mceAddEditor', true, $(this).attr('id'));
|
||||
$(this).css("visibility", "visible");
|
||||
});
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<div id="{{model.alias}}" class="nested-content__doctypepicker" ng-controller="Umbraco.PropertyEditors.NestedContent.DocTypePickerController">
|
||||
<div id="{{model.alias}}" class="umb-nested-content__doctypepicker" ng-controller="Umbraco.PropertyEditors.NestedContent.DocTypePickerController">
|
||||
<div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
@@ -45,11 +45,11 @@
|
||||
<a class="btn" ng-click="add()">
|
||||
<localize key="general_add">Add</localize>
|
||||
</a>
|
||||
<i class="icon icon-help-alt medium nested-content__help-icon" ng-click="showHelpText = !showHelpText"></i>
|
||||
<i class="icon icon-help-alt medium umb-nested-content__help-icon" ng-click="showHelpText = !showHelpText"></i>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="nested-content__help-text" ng-show="showHelpText">
|
||||
<div class="umb-nested-content__help-text" ng-show="showHelpText">
|
||||
<p>
|
||||
<b><localize key="editcontenttype_tab">Tab</localize>:</b><br/>
|
||||
Select the tab who's properties should be displayed. If left blank, the first tab on the doc type will be used.
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
<div class="umb-pane">
|
||||
<div ng-repeat="property in tab.properties" style="position: relative;">
|
||||
|
||||
<umb-property property="property" ng-class="{'nested-content--not-supported': property.notSupported}">
|
||||
<umb-property property="property" ng-class="{'umb-nested-content--not-supported': property.notSupported}">
|
||||
<umb-editor model="property"></umb-editor>
|
||||
</umb-property>
|
||||
|
||||
<div ng-if="property.notSupported" class="nested-content-overlay"></div>
|
||||
<div ng-if="property.notSupported" class="umb-nested-content-overlay"></div>
|
||||
|
||||
<p ng-if="property.notSupported">{{property.notSupportedMessage}}</p>
|
||||
|
||||
|
||||
+15
-15
@@ -1,48 +1,48 @@
|
||||
<div id="nested-content--{{model.id}}" class="nested-content"
|
||||
<div id="umb-nested-content--{{model.id}}" class="umb-nested-content"
|
||||
ng-controller="Umbraco.PropertyEditors.NestedContent.PropertyEditorController"
|
||||
ng-class="{'nested-content--narrow':!wideMode, 'nested-content--wide':wideMode}">
|
||||
ng-class="{'umb-nested-content--narrow':!wideMode, 'umb-nested-content--wide':wideMode}">
|
||||
<ng-form>
|
||||
|
||||
<div class="nested-content__items" ng-hide="nodes.length == 0" ui-sortable="sortableOptions" ng-model="nodes">
|
||||
<div class="umb-nested-content__items" ng-hide="nodes.length == 0" ui-sortable="sortableOptions" ng-model="nodes">
|
||||
|
||||
<div class="nested-content__item" ng-repeat="node in nodes" ng-class="{ 'nested-content__item--active' : $parent.realCurrentNode.key == node.key, 'nested-content__item--single' : $parent.singleMode }">
|
||||
<div class="umb-nested-content__item" ng-repeat="node in nodes" ng-class="{ 'umb-nested-content__item--active' : $parent.realCurrentNode.key == node.key, 'umb-nested-content__item--single' : $parent.singleMode }">
|
||||
|
||||
<div class="nested-content__header-bar" ng-click="$parent.editNode($index)" ng-hide="$parent.singleMode">
|
||||
<div class="umb-nested-content__header-bar" ng-click="$parent.editNode($index)" ng-hide="$parent.singleMode">
|
||||
|
||||
<div class="nested-content__heading" ng-class="{'-with-icon': showIcons}"><i ng-if="showIcons" class="icon" ng-class="$parent.getIcon($index)"></i><span class="nested-content__item-name" ng-bind="$parent.getName($index)"></span></div>
|
||||
<div class="umb-nested-content__heading" ng-class="{'-with-icon': showIcons}"><i ng-if="showIcons" class="icon" ng-class="$parent.getIcon($index)"></i><span class="umb-nested-content__item-name" ng-bind="$parent.getName($index)"></span></div>
|
||||
|
||||
<div class="nested-content__icons">
|
||||
<a class="nested-content__icon nested-content__icon--edit" title="{{editIconTitle}}" ng-class="{ 'nested-content__icon--active' : $parent.realCurrentNode.id == node.id }" ng-click="$parent.editNode($index); $event.stopPropagation();" ng-show="$parent.maxItems > 1" prevent-default>
|
||||
<div class="umb-nested-content__icons">
|
||||
<a class="umb-nested-content__icon umb-nested-content__icon--edit" title="{{editIconTitle}}" ng-class="{ 'umb-nested-content__icon--active' : $parent.realCurrentNode.id == node.id }" ng-click="$parent.editNode($index); $event.stopPropagation();" ng-show="$parent.maxItems > 1" prevent-default>
|
||||
<i class="icon icon-edit"></i>
|
||||
</a>
|
||||
<a class="nested-content__icon nested-content__icon--move" title="{{moveIconTitle}}" ng-click="$event.stopPropagation();" ng-show="$parent.nodes.length > 1" prevent-default>
|
||||
<a class="umb-nested-content__icon umb-nested-content__icon--move" title="{{moveIconTitle}}" ng-click="$event.stopPropagation();" ng-show="$parent.nodes.length > 1" prevent-default>
|
||||
<i class="icon icon-navigation"></i>
|
||||
</a>
|
||||
<a class="nested-content__icon nested-content__icon--delete" title="{{deleteIconTitle}}" ng-class="{ 'nested-content__icon--disabled': $parent.nodes.length <= $parent.minItems }" ng-click="$parent.deleteNode($index); $event.stopPropagation();" prevent-default>
|
||||
<a class="umb-nested-content__icon umb-nested-content__icon--delete" title="{{deleteIconTitle}}" ng-class="{ 'umb-nested-content__icon--disabled': $parent.nodes.length <= $parent.minItems }" ng-click="$parent.deleteNode($index); $event.stopPropagation();" prevent-default>
|
||||
<i class="icon icon-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nested-content__content" ng-if="$parent.realCurrentNode.key == node.key && !$parent.sorting">
|
||||
<div class="umb-nested-content__content" ng-if="$parent.realCurrentNode.key == node.key && !$parent.sorting">
|
||||
<umb-nested-content-editor ng-model="node" tab-alias="ncTabAlias" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nested-content__help-text" ng-show="nodes.length == 0">
|
||||
<div class="umb-nested-content__help-text" ng-show="nodes.length == 0">
|
||||
<localize key="grid_addElement"></localize>
|
||||
</div>
|
||||
|
||||
<div class="nested-content__footer-bar" ng-hide="nodes.length >= maxItems">
|
||||
<a class="nested-content__icon" ng-click="openNodeTypePicker($event)" prevent-default>
|
||||
<div class="umb-nested-content__footer-bar" ng-hide="nodes.length >= maxItems">
|
||||
<a class="umb-nested-content__icon" ng-click="openNodeTypePicker($event)" prevent-default>
|
||||
<i class="icon icon-add"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="usky-grid nested-content__node-type-picker" ng-if="overlayMenu.show">
|
||||
<div class="usky-grid umb-nested-content__node-type-picker" ng-if="overlayMenu.show">
|
||||
<div class="cell-tools-menu" ng-style="overlayMenu.style" style="margin: 0;" delayed-mouseleave="closeNodeTypePicker()" on-delayed-mouseleave="closeNodeTypePicker()">
|
||||
<h5>
|
||||
<localize key="grid_insertControl" />
|
||||
|
||||
@@ -183,7 +183,7 @@ angular.module("umbraco")
|
||||
tagsHound.get(query, function (suggestions) {
|
||||
cb(removeCurrentTagsFromSuggestions(suggestions));
|
||||
});
|
||||
},
|
||||
}
|
||||
}).bind("typeahead:selected", function (obj, datum, name) {
|
||||
angularHelper.safeApply($scope, function () {
|
||||
addTag(datum["value"]);
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
});
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
}
|
||||
]);
|
||||
|
||||
// initial cursor placement
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user