Merge branch 'v8/dev' into pr_5324

This commit is contained in:
Sebastiaan Janssen
2019-04-24 13:32:29 +02:00
10 changed files with 340 additions and 111 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
"diff": "3.5.0",
"flatpickr": "4.5.2",
"font-awesome": "4.7.0",
"jquery": "3.3.1",
"jquery": "^3.4.0",
"jquery-ui-dist": "1.12.1",
"jquery-ui-touch-punch": "0.2.3",
"lazyload-js": "1.0.0",

View File

@@ -126,6 +126,7 @@
function togglePassword() {
var elem = $("form[name='vm.loginForm'] input[name='password']");
elem.attr("type", (elem.attr("type") === "text" ? "password" : "text"));
elem.focus();
$(".password-text.show, .password-text.hide").toggle();
}

View File

@@ -18,7 +18,20 @@ function MainController($scope, $location, appState, treeService, notificationsS
$scope.drawer = {};
$scope.search = {};
$scope.login = {};
$scope.tabbingActive = false;
// There are a number of ways to detect when a focus state should be shown when using the tab key and this seems to be the simplest solution.
// For more information about this approach, see https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2
function handleFirstTab(evt) {
if (evt.keyCode === 9) {
$scope.tabbingActive = true;
window.removeEventListener('keydown', handleFirstTab);
}
}
window.addEventListener("keydown", handleFirstTab);
$scope.removeNotification = function (index) {
notificationsService.remove(index);
};

View File

@@ -3,10 +3,6 @@
display: inline-block;
}
.umb-button__button:focus {
outline: none;
}
.umb-button__button {
position: relative;
}

View File

@@ -250,7 +250,10 @@ input[type="color"],
&:focus {
border-color: @inputBorderFocus;
outline: 0;
outline: none \9; /* IE6-9 */
.tabbing-active & {
outline: 2px solid @inputBorderTabFocus;
}
}
}

View File

@@ -376,6 +376,7 @@
@inputBackground: @white;
@inputBorder: @gray-8;
@inputBorderFocus: @gray-7;
@inputBorderTabFocus: @blueExtraDark;
@inputBorderRadius: 0;
@inputDisabledBackground: @gray-10;
@formActionsBackground: @gray-9;

View File

@@ -1,7 +1,7 @@
//used for the media picker dialog
angular.module("umbraco")
.controller("Umbraco.Editors.MediaPickerController",
function($scope, mediaResource, entityResource, mediaHelper, mediaTypeHelper, eventsService, treeService, localStorageService, localizationService, editorService) {
function ($scope, mediaResource, entityResource, mediaHelper, mediaTypeHelper, eventsService, userService, treeService, localStorageService, localizationService, editorService) {
if (!$scope.model.title) {
localizationService.localizeMany(["defaultdialogs_selectMedia", "general_includeFromsubFolders"])
@@ -67,15 +67,19 @@ angular.module("umbraco")
}
function onInit() {
if ($scope.startNodeId !== -1) {
entityResource.getById($scope.startNodeId, "media")
.then(function(ent) {
$scope.startNodeId = ent.id;
run();
});
} else {
run();
}
userService.getCurrentUser().then(function(userData) {
userStartNodes = userData.startMediaIds;
if ($scope.startNodeId !== -1) {
entityResource.getById($scope.startNodeId, "media")
.then(function(ent) {
$scope.startNodeId = ent.id;
run();
});
} else {
run();
}
});
}
function run() {
@@ -90,7 +94,7 @@ angular.module("umbraco")
} else {
//if a target is specified, go look it up - generally this target will just contain ids not the actual full
//media object so we need to look it up
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id;
var altText = $scope.target.altText;
mediaResource.getById(id)
.then(function (node) {
@@ -120,7 +124,7 @@ angular.module("umbraco")
$scope.submitFolder = function() {
if ($scope.model.newFolderName) {
$scope.creatingFolder = true;
$scope.model.creatingFolder = true;
mediaResource
.addFolder($scope.model.newFolderName, $scope.currentFolder.id)
.then(function(data) {
@@ -129,13 +133,13 @@ angular.module("umbraco")
cacheKey: "__media", //this is the main media tree cache key
childrenOf: data.parentId //clear the children of the parent
});
$scope.creatingFolder = false;
$scope.model.creatingFolder = false;
$scope.gotoFolder(data);
$scope.showFolderInput = false;
$scope.model.showFolderInput = false;
$scope.model.newFolderName = "";
});
} else {
$scope.showFolderInput = false;
$scope.model.showFolderInput = false;
}
};

View File

@@ -64,15 +64,15 @@
</li>
<li class="umb-breadcrumbs__ancestor" ng-show="!lockedFolder">
<a href ng-hide="showFolderInput" ng-click="showFolderInput = true">
<a href ng-hide="model.showFolderInput" ng-click="model.showFolderInput = true">
<i class="icon icon-add small"></i>
</a>
<input type="text" class="umb-breadcrumbs__add-ancestor" ng-show="showFolderInput" ng-model="model.newFolderName" ng-keydown="enterSubmitFolder($event)"
ng-blur="submitFolder()" focus-when="{{showFolderInput}}" />
<input type="text" class="umb-breadcrumbs__add-ancestor" ng-show="model.showFolderInput" ng-model="model.newFolderName" ng-keydown="enterSubmitFolder($event)"
ng-blur="submitFolder()" focus-when="{{model.showFolderInput}}" />
</li>
</ul>
<div class="umb-loader" ng-if="creatingFolder"></div>
<div class="umb-loader" ng-if="model.creatingFolder"></div>
</div>
<umb-file-dropzone

View File

@@ -43,7 +43,7 @@
@Html.RenderCssHere(
new BasicPath("Umbraco", IOHelper.ResolveUrl(SystemDirectories.Umbraco)))
</head>
<body ng-class="{'touch':touchDevice, 'emptySection':emptySection, 'umb-drawer-is-visible':drawer.show, 'umb-tour-is-visible': tour.show}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">
<body ng-class="{'touch':touchDevice, 'emptySection':emptySection, 'umb-drawer-is-visible':drawer.show, 'umb-tour-is-visible': tour.show, 'tabbing-active':tabbingActive}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">
<noscript>
<div style="margin: 10px;">