diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js index 74e80569b8..04dc25ab3b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js @@ -36,9 +36,30 @@ scope.showVariationsQuickSwitch = false; }; - scope.toggleSubItems = function(item) { + scope.toggleSubItems = function(item, $event) { item.showSubItems = !item.showSubItems; + $event.preventDefault(); + $event.stopPropagation(); + }; + + scope.selectItem = function(language, variation) { + + if(language) { + scope.language = language.language; + } else { + scope.language = ""; + } + + if(variation) { + scope.variation = variation.name; + } else { + scope.variation = ""; + } + + scope.showVariationsQuickSwitch = false; + }; + } var directive = { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html index 18d80b1f44..3f888a5285 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-header.html @@ -32,16 +32,16 @@ umb-auto-focus required /> -
+
-
+
-
English (United States)
+
{{ language }}
-
+
-
Mobile
+
{{ variation }}
@@ -59,16 +59,16 @@
  • - + {{variation.language}} - variations ▾ + variations ▾