Fixes various issues with javascript services (#10800)
This commit is contained in:
committed by
GitHub
parent
d55b740b16
commit
137be33a6c
@@ -358,7 +358,7 @@ function umbTreeDirective($q, treeService, navigationService, notificationsServi
|
||||
*/
|
||||
$scope.select = function (n, ev) {
|
||||
|
||||
navigationService.closeBackdrop();
|
||||
navigationService.hideMenu();
|
||||
|
||||
if (n.metaData && n.metaData.noAccess === true) {
|
||||
ev.preventDefault();
|
||||
|
||||
@@ -32,20 +32,20 @@ angular.module('umbraco.directives')
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attr) {
|
||||
link: function (scope, element) {
|
||||
|
||||
var listItems = [];
|
||||
var currentIndex = 0;
|
||||
var focusSet = false;
|
||||
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
// get list of all links in the list
|
||||
listItems = element.find("li :tabbable");
|
||||
});
|
||||
|
||||
// Handle keydown events
|
||||
function keydown(event) {
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
checkFocus();
|
||||
// arrow down
|
||||
if (event.keyCode === 40) {
|
||||
@@ -109,7 +109,6 @@ angular.module('umbraco.directives')
|
||||
|
||||
// Stop listening when scope is destroyed.
|
||||
scope.$on('$destroy', stopListening);
|
||||
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
@@ -127,7 +127,7 @@ function navigationService($routeParams, $location, $q, $injector, eventsService
|
||||
var aboveClass = "above-backdrop";
|
||||
var leftColumn = document.getElementById("leftcolumn");
|
||||
|
||||
if(leftColumn !== null) {
|
||||
if(leftColumn) {
|
||||
var isLeftColumnOnTop = leftColumn.classList.contains(aboveClass);
|
||||
|
||||
if (isLeftColumnOnTop) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,.12),0 6px 6px rgba(0,0,0,.14);
|
||||
}
|
||||
|
||||
.umb-search__label{
|
||||
.umb-search__label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.umb-search-input {
|
||||
input.umb-search-input {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
border: none;
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
* Not equivalent to angular.forEach. But like the angularJS method this does not fail on null or undefined.
|
||||
*/
|
||||
const forEach = (obj, iterator) => {
|
||||
if (obj) {
|
||||
if (obj && isArray(obj)) {
|
||||
return obj.forEach(iterator);
|
||||
}
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user