Merge remote-tracking branch 'origin/temp8' into temp8-4476-selection-colors-for-users

This commit is contained in:
Niels Lyngsø
2019-02-11 13:46:25 +01:00
12 changed files with 72 additions and 44 deletions

View File

@@ -96,6 +96,12 @@ namespace Umbraco.Core.Migrations
return tables.Any(x => x.InvariantEquals(tableName));
}
protected bool IndexExists(string indexName)
{
var indexes = SqlSyntax.GetDefinedIndexes(Context.Database);
return indexes.Any(x => x.Item2.InvariantEquals(indexName));
}
protected bool ColumnExists(string tableName, string columnName)
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).Distinct().ToArray();

View File

@@ -127,7 +127,7 @@ namespace Umbraco.Core.Migrations.Upgrade
To<ConvertRelatedLinksToMultiUrlPicker>("{ED28B66A-E248-4D94-8CDB-9BDF574023F0}");
To<UpdatePickerIntegerValuesToUdi>("{38C809D5-6C34-426B-9BEA-EFD39162595C}");
To<RenameUmbracoDomainsTable>("{6017F044-8E70-4E10-B2A3-336949692ADD}");
To<AddUserLoginDtoDateIndex>("98339BEF-E4B2-48A8-B9D1-D173DC842BBE");
//FINAL

View File

@@ -0,0 +1,22 @@
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
{
public class AddUserLoginDtoDateIndex : MigrationBase
{
public AddUserLoginDtoDateIndex(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
if (!IndexExists("IX_umbracoUserLogin_lastValidatedUtc"))
Create.Index("IX_umbracoUserLogin_lastValidatedUtc")
.OnTable(UserLoginDto.TableName)
.OnColumn("lastValidatedUtc")
.Ascending()
.WithOptions().NonClustered()
.Do();
}
}
}

View File

@@ -30,11 +30,14 @@ namespace Umbraco.Core.Persistence.Dtos
/// Updated every time a user's session is validated
/// </summary>
/// <remarks>
/// This allows us to guess if a session is timed out if a user doesn't actively log out
/// and also allows us to trim the data in the table
/// <para>This allows us to guess if a session is timed out if a user doesn't actively
/// log out and also allows us to trim the data in the table.</para>
/// <para>The index is IMPORTANT as it prevents deadlocks during deletion of
/// old sessions (DELETE ... WHERE lastValidatedUtc &lt; date).</para>
/// </remarks>
[Column("lastValidatedUtc")]
[NullSetting(NullSetting = NullSettings.NotNull)]
[Index(IndexTypes.NonClustered, Name = "IX_userLoginDto_lastValidatedUtc")]
public DateTime LastValidatedUtc { get; set; }
/// <summary>

View File

@@ -367,6 +367,7 @@
<Compile Include="Migrations\Upgrade\V_7_9_0\AddUmbracoAuditTable.cs" />
<Compile Include="Migrations\Upgrade\V_7_9_0\AddUmbracoConsentTable.cs" />
<Compile Include="Migrations\Upgrade\V_7_9_0\CreateSensitiveDataUserGroup.cs" />
<Compile Include="Migrations\Upgrade\V_8_0_0\AddUserLoginDtoDateIndex.cs" />
<Compile Include="Migrations\Upgrade\V_8_0_0\ConvertRelatedLinksToMultiUrlPicker.cs" />
<Compile Include="Migrations\Upgrade\V_8_0_0\AddContentTypeIsElementColumn.cs" />
<Compile Include="Migrations\Upgrade\V_8_0_0\AddLogTableColumns.cs" />

View File

@@ -10,7 +10,7 @@
bindings: {
layouts: '<',
activeLayout: '<',
onLayoutSelect: "&"
onLayoutSelect: '&'
}
});

View File

@@ -26,7 +26,9 @@
//dealing with requests:
'request': function(config) {
if(config.method === "POST"){
transform(config.data);
var clone = angular.copy(config);
transform(clone.data);
return clone;
}
return config;

View File

@@ -232,43 +232,40 @@ body.touch .umb-tree {
}
}
.protected,
.has-unpublished-version,
.is-container,
.locked {
.umb-tree-item__annotation {
&::before {
font-family: 'icomoon';
position: absolute;
font-size: 20px;
padding-left: 7px;
padding-top: 7px;
bottom: 0;
}
}
.protected::before {
content: "\e256";
color: @red;
}
.has-unpublished-version::before {
.has-unpublished-version > .umb-tree-item__inner > .umb-tree-item__annotation::before {
content: "\e25a";
color: @green;
font-size: 20px;
margin-left: -25px;
}
.is-container::before {
.is-container > .umb-tree-item__inner > .umb-tree-item__annotation::before {
content: "\e04e";
color: @blue;
font-size: 8px;
padding-left: 13px;
padding-top: 8px;
pointer-events: none;
font-size: 9px;
margin-left: -20px;
}
.protected > .umb-tree-item__inner > .umb-tree-item__annotation::before {
content: "\e256";
color: @red;
font-size: 20px;
margin-left: -25px;
}
.locked::before {
.locked > .umb-tree-item__inner > .umb-tree-item__annotation::before {
content: "\e0a7";
color: @red;
font-size: 9px;
margin-left: -20px;
}
.no-access {

View File

@@ -1,11 +1,12 @@
<li class="umb-tree-item" data-element="tree-item-{{::node.dataElement}}" ng-class="getNodeCssClass(node)" on-right-click="altSelect(node, $event)">
<div class="umb-tree-item__inner" ng-swipe-right="options(node, $event)" ng-dblclick="load(node)" >
<ins data-element="tree-item-expand"
ng-class="{'icon-navigation-right': !node.expanded || node.metaData.isContainer, 'icon-navigation-down': node.expanded && !node.metaData.isContainer}"
ng-style="{'visibility': (scope.enablelistviewexpand === 'true' || node.hasChildren && (!node.metaData.isContainer || isDialog)) ? 'visible' : 'hidden'}"
ng-click="load(node)">&nbsp;</ins>
ng-class="{'icon-navigation-right': !node.expanded || node.metaData.isContainer, 'icon-navigation-down': node.expanded && !node.metaData.isContainer}"
ng-style="{'visibility': (scope.enablelistviewexpand === 'true' || node.hasChildren && (!node.metaData.isContainer || isDialog)) ? 'visible' : 'hidden'}"
ng-click="load(node)">&nbsp;</ins>
<i class="icon umb-tree-icon sprTree" ng-class="::node.cssClass" title="{{::node.routePath}}" ng-click="select(node, $event)" ng-style="::node.style"></i>
<span class="umb-tree-item__annotation"></span>
<a class="umb-tree-item__label" ng-href="#/{{::node.routePath}}" ng-click="select(node, $event)">{{node.name}}</a>
<!-- NOTE: These are the 'option' elipses -->

View File

@@ -8,7 +8,7 @@
class="umb-layout-selector__dropdown shadow-depth-3 animated -half-second fadeIn"
on-outside-click="vm.closeLayoutDropdown()">
<div ng-repeat="layout in vm.layouts | filter:{selected:true} track by layout.name"
<div ng-repeat="layout in vm.layouts | filter:{selected:true} track by $id(layout)"
class="umb-layout-selector__dropdown-item"
ng-click="vm.pickLayout(layout)"
ng-class="{'-active': layout.active }"

View File

@@ -59,13 +59,10 @@
}
];
vm.activeLayout = {
"icon": "icon-thumbnails-small",
"path": "1",
"selected": true
};
// Set card layout to active by default
vm.activeLayout = vm.layouts[0];
//don't show the invite button if no email is configured
// Don't show the invite button if no email is configured
if (Umbraco.Sys.ServerVariables.umbracoSettings.showUserInvite) {
vm.defaultButton = {
labelKey: "user_inviteUser",

View File

@@ -23,21 +23,20 @@
ng-if="vm.layouts"
layouts="vm.layouts"
active-layout="vm.activeLayout"
on-layout-select="vm.selectLayout">
on-layout-select="vm.selectLayout(layout)">
</umb-layout-selector>
</umb-editor-sub-header-section>
<umb-editor-sub-header-section>
<div class="form-search -no-margin-bottom pull-right">
<div class="inner-addon left-addon">
<i class="icon icon-search"></i>
<input
class="form-control search-input"
type="text" localize="placeholder"
placeholder="@general_typeToSearch"
ng-model="vm.usersOptions.filter"
ng-change="vm.searchUsers()"
prevent-enter-submit
no-dirty-check>
<input class="form-control search-input"
type="text" localize="placeholder"
placeholder="@general_typeToSearch"
ng-model="vm.usersOptions.filter"
ng-change="vm.searchUsers()"
prevent-enter-submit
no-dirty-check>
</div>
</div>
</umb-editor-sub-header-section>
@@ -227,7 +226,7 @@
<!-- Layout: Table -->
<div ng-if="vm.activeLayout.path === '2'">
<table class="table table-hover">
<table class="table table-hover">
<thead>
<tr>
<th style="padding-left: 10px; width: 10px;">