Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/805-migrate-from-7

This commit is contained in:
Bjarke Berg
2019-05-29 10:14:31 +02:00
10 changed files with 41 additions and 19 deletions

View File

@@ -39,6 +39,8 @@
<dependency id="Serilog.Formatting.Compact.Reader" version="[1.0.3,1.999999)" />
<dependency id="Serilog.Settings.AppSettings" version="[2.2.2,2.999999)" />
<dependency id="Serilog.Sinks.File" version="[4.0.0,4.999999)" />
<dependency id="Serilog.Sinks.Map" version="[1.0.0,1.999999)" />
<dependency id="Serilog.Sinks.Async" version="[1.3.0,1.999999)" />
<dependency id="Umbraco.SqlServerCE" version="[4.0.0.1,4.999999)" />
<dependency id="NPoco" version="[3.9.4,3.999999)" />
</group>

View File

@@ -29,6 +29,7 @@ using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.Testing.Objects.Accessors;
using Umbraco.Web;
using Umbraco.Web.Cache;
using Umbraco.Web.Macros;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Runtime;
@@ -81,7 +82,7 @@ namespace Umbraco.Tests.Runtimes
var composerTypes = typeLoader.GetTypes<IComposer>() // all of them
.Where(x => !x.FullName.StartsWith("Umbraco.Tests.")) // exclude test components
.Where(x => x != typeof(WebInitialComposer)); // exclude web runtime
.Where(x => x != typeof(WebInitialComposer) && x != typeof(WebFinalComposer)); // exclude web runtime
var composers = new Composers(composition, composerTypes, profilingLogger);
composers.Compose();
@@ -101,6 +102,8 @@ namespace Umbraco.Tests.Runtimes
composition.RegisterUnique<IDistributedCacheBinder, DistributedCacheBinder>();
composition.RegisterUnique<IExamineManager>(f => ExamineManager.Instance);
composition.RegisterUnique<IUmbracoContextFactory, UmbracoContextFactory>();
composition.RegisterUnique<IMacroRenderer, MacroRenderer>();
composition.RegisterUnique<MediaUrlProviderCollection>(_ => new MediaUrlProviderCollection(Enumerable.Empty<IMediaUrlProvider>()));
// initialize some components only/individually
composition.WithCollectionBuilder<ComponentCollectionBuilder>()
@@ -124,14 +127,15 @@ namespace Umbraco.Tests.Runtimes
if (true || runtimeState.Level == RuntimeLevel.Install)
{
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var file = Path.Combine(path, "Umbraco.sdf");
var file = databaseFactory.Configured ? Path.Combine(path, "UmbracoNPocoTests.sdf") : Path.Combine(path, "Umbraco.sdf");
if (File.Exists(file))
File.Delete(file);
// create the database file
// databaseBuilder.ConfigureEmbeddedDatabaseConnection() can do it too,
// but then it wants to write the connection string to web.config = bad
using (var engine = new SqlCeEngine("Data Source=|DataDirectory|\\Umbraco.sdf;Flush Interval=1;"))
var connectionString = databaseFactory.Configured ? databaseFactory.ConnectionString : "Data Source=|DataDirectory|\\Umbraco.sdf;Flush Interval=1;";
using (var engine = new SqlCeEngine(connectionString))
{
engine.CreateDatabase();
}
@@ -140,7 +144,8 @@ namespace Umbraco.Tests.Runtimes
//databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
//databaseBuilder.CreateDatabaseSchemaAndData();
databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
if (!databaseFactory.Configured)
databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
var scopeProvider = factory.GetInstance<IScopeProvider>();
using (var scope = scopeProvider.CreateScope())
@@ -154,6 +159,8 @@ namespace Umbraco.Tests.Runtimes
// done installing
runtimeState.Level = RuntimeLevel.Run;
components.Initialize();
// instantiate to register events
// should be done by Initialize?
// should we invoke Initialize?

View File

@@ -66,7 +66,7 @@
(function () {
'use strict';
function ToggleDirective(localizationService, eventsService) {
function ToggleDirective(localizationService, eventsService, $timeout) {
function link(scope, el, attr, ctrl) {
@@ -75,7 +75,11 @@
function onInit() {
setLabelText();
eventsService.emit("toggleValue", { value: scope.checked });
// must wait until the current digest cycle is finished before we emit this event on init,
// otherwise other property editors might not yet be ready to receive the event
$timeout(function () {
eventsService.emit("toggleValue", { value: scope.checked });
}, 100);
}
function setLabelText() {

View File

@@ -286,11 +286,11 @@ Opens an overlay to show a custom YSOD. </br>
$(document).on("keydown.overlay-" + overlayNumber, function(event) {
if (event.which === 27) {
if (event.which === 27) {
numberOfOverlays = overlayHelper.getNumberOfOverlays();
if (numberOfOverlays === overlayNumber) {
if (numberOfOverlays === overlayNumber && !scope.model.disableEscKey) {
scope.$apply(function () {
scope.closeOverLay();
});

View File

@@ -281,6 +281,10 @@
opts.callbacks.unshift(options.onLoad);
}
if (opts.autoFocus === true) {
acee.focus();
}
// EVENTS
// unbind old change listener

View File

@@ -165,6 +165,7 @@ function valFormManager(serverValidationManager, $rootScope, $timeout, $location
"title": labels.unsavedChangesTitle,
"content": labels.unsavedChangesContent,
"disableBackdropClick": true,
"disableEscKey": true,
"submitButtonLabel": labels.stayButton,
"closeButtonLabel": labels.discardChangesButton,
submit: function() {

View File

@@ -12,6 +12,7 @@
display: flex;
flex-wrap: nowrap;
flex-direction: column;
height: 100%;
}
.umb-overlay .umb-overlay-header {
@@ -23,8 +24,6 @@
padding: 20px 30px 0;
}
.umb-overlay__section-header {
width: 100%;
margin-top:30px;
@@ -113,10 +112,6 @@
padding: 30px 30px 0;
}
.umb-overlay.umb-overlay-center .umb-overlay__form {
}
.umb-overlay.umb-overlay-center .umb-overlay-drawer {
border: none;
background: transparent;

View File

@@ -63,12 +63,14 @@
.umb-user-card__goToUser {
&:hover, &:focus {
text-decoration: none;
.umb-user-card__name {
text-decoration: underline;
color: @ui-option-type-hover;
}
.umb-avatar {
border: 1px solid @ui-option-type-hover;
box-shadow: 0px 1px 3px rgba(0, 0, 0, .5);
}
}
}

View File

@@ -3,16 +3,21 @@
.umb-user-table-col-avatar {
flex: 0 0 32px;
padding: 15px 0;
> a {
overflow: visible;
}
.umb-checkmark {
margin-left:5px;
}
}
.umb-table-cell a {
&:hover, &:focus {
.umb-avatar {
border: 1px solid @ui-option-type-hover;
box-shadow: 0px 1px 3px rgba(0, 0, 0, .5);
}
}
}

View File

@@ -12,11 +12,13 @@
mode: "razor",
theme: "chrome",
showPrintMargin: false,
autoFocus: true,
advanced: {
fontSize: "14px",
enableSnippets: false, //The Razor mode snippets are awful (Need a way to override these)
enableBasicAutocompletion: true,
enableLiveAutocompletion: false
enableLiveAutocompletion: false,
wrap: true
},
onLoad: function(aceEditor) {
vm.aceEditor = aceEditor;