Added "loading" parameter to "umbEditorHeader" directive
(cherry picked from commit 33668a5d95)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
345feaf16a
commit
fb881d568b
@@ -206,6 +206,7 @@ Use this directive to construct a header inside the main editor window.
|
||||
@param {boolean=} hideDescription Set to <code>true</code> to hide description.
|
||||
@param {boolean=} setpagetitle If true the page title will be set to reflect the type of data the header is working with
|
||||
@param {string=} editorfor The localization to use to aid accessibility on the edit and create screen
|
||||
@param {boolean=} loading Whether a loading indicator should be shown as part of the header.
|
||||
**/
|
||||
|
||||
(function () {
|
||||
@@ -217,8 +218,8 @@ Use this directive to construct a header inside the main editor window.
|
||||
|
||||
scope.vm = {};
|
||||
scope.vm.dropdownOpen = false;
|
||||
scope.vm.currentVariant = "";
|
||||
scope.loading = true;
|
||||
scope.vm.currentVariant = "";
|
||||
scope.initializing = true;
|
||||
scope.accessibility = {};
|
||||
scope.accessibility.a11yMessage = "";
|
||||
scope.accessibility.a11yName = "";
|
||||
@@ -237,12 +238,12 @@ Use this directive to construct a header inside the main editor window.
|
||||
// to do make it work for user group create/ edit
|
||||
// to make it work for language edit/create
|
||||
setAccessibilityForEditorState();
|
||||
scope.loading = false;
|
||||
scope.initializing = false;
|
||||
} else if (scope.name) {
|
||||
setAccessibilityForName();
|
||||
scope.loading = false;
|
||||
scope.initializing = false;
|
||||
} else {
|
||||
scope.loading = false;
|
||||
scope.initializing = false;
|
||||
}
|
||||
scope.goBack = function () {
|
||||
if (scope.onBack) {
|
||||
@@ -402,7 +403,8 @@ Use this directive to construct a header inside the main editor window.
|
||||
onBack: "&?",
|
||||
showBackButton: "<?",
|
||||
editorfor: "=",
|
||||
setpagetitle:"="
|
||||
setpagetitle: "=",
|
||||
loading: "="
|
||||
},
|
||||
link: link
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div data-element="editor-header" class="umb-editor-header" ng-class="{'-split-view-active': splitViewOpen === true}">
|
||||
<umb-loader ng-show="loading"></umb-loader>
|
||||
<div class="flex items-center" style="height: 100%;" ng-hide="loading">
|
||||
<div data-element="editor-header" class="umb-editor-header" ng-class="{'-split-view-active': splitViewOpen === true}">
|
||||
<umb-loader ng-show="initializing || loading"></umb-loader>
|
||||
<div class="flex items-center" style="height: 100%;" ng-hide="initializing">
|
||||
|
||||
<div ng-if="showBackButton === true && splitViewOpen !== true" style="margin-right: 15px;">
|
||||
<button type="button" class="umb-editor-header__back" ng-click="goBack()">
|
||||
|
||||
Reference in New Issue
Block a user