From ca85b0e45c702d3ce754e6d0a114d58ab809dc4d Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 9 Aug 2018 20:53:44 +0200 Subject: [PATCH] remove umb-header --- .../_obsolete/umbheader.directive.js | 64 ------------------- .../directives/_obsolete/umb-header.html | 14 ---- 2 files changed, 78 deletions(-) delete mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbheader.directive.js delete mode 100644 src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-header.html diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbheader.directive.js deleted file mode 100644 index ccf37b14a2..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbheader.directive.js +++ /dev/null @@ -1,64 +0,0 @@ -/** -* @ngdoc directive -* @name umbraco.directives.directive:umbHeader -* @deprecated -* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use. -* @restrict E -* @function -* @description -* The header on an editor that contains tabs using bootstrap tabs - THIS IS OBSOLETE, use umbTabHeader instead -**/ - -angular.module("umbraco.directives") -.directive('umbHeader', function ($parse, $timeout) { - return { - restrict: 'E', - replace: true, - transclude: 'true', - templateUrl: 'views/directives/_obsolete/umb-header.html', - //create a new isolated scope assigning a tabs property from the attribute 'tabs' - //which is bound to the parent scope property passed in - scope: { - tabs: "=" - }, - link: function (scope, iElement, iAttrs) { - - scope.showTabs = iAttrs.tabs ? true : false; - scope.visibleTabs = []; - - //since tabs are loaded async, we need to put a watch on them to determine - // when they are loaded, then we can close the watch - var tabWatch = scope.$watch("tabs", function (newValue, oldValue) { - - angular.forEach(newValue, function(val, index){ - var tab = {id: val.id, label: val.label}; - scope.visibleTabs.push(tab); - }); - - //don't process if we cannot or have already done so - if (!newValue) {return;} - if (!newValue.length || newValue.length === 0){return;} - - //we need to do a timeout here so that the current sync operation can complete - // and update the UI, then this will fire and the UI elements will be available. - $timeout(function () { - - //use bootstrap tabs API to show the first one - iElement.find(".nav-tabs a:first").tab('show'); - - //enable the tab drop - iElement.find('.nav-pills, .nav-tabs').tabdrop(); - - //ensure to destroy tabdrop (unbinds window resize listeners) - scope.$on('$destroy', function () { - iElement.find('.nav-pills, .nav-tabs').tabdrop("destroy"); - }); - - //stop watching now - tabWatch(); - }, 200); - - }); - } - }; -}); diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-header.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-header.html deleted file mode 100644 index c65b373795..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-header.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
- -
- - -
-