diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/_readme.md b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/_readme.md
deleted file mode 100644
index 8feb0377db..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/_readme.md
+++ /dev/null
@@ -1,3 +0,0 @@
-#Obsolete directives
-
-Folder contains directives we plan to remove in the next major version of umbraco (8.0) these are not recommended to use.
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/autoscale.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/autoscale.directive.js
deleted file mode 100644
index f9ca4350e2..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/autoscale.directive.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:autoScale
-* @element div
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-* @function
-* @description
-* Resize div's automatically to fit to the bottom of the screen, as an optional parameter an y-axis offset can be set
-* So if you only want to scale the div to 70 pixels from the bottom you pass "70"
-
-* @example
-*
-*
-*
-*
-*
-**/
-
-angular.module("umbraco.directives")
- .directive('autoScale', function ($window) {
- return function (scope, el, attrs) {
-
- var totalOffset = 0;
- var offsety = parseInt(attrs.autoScale, 10);
- var window = angular.element($window);
- if (offsety !== undefined){
- totalOffset += offsety;
- }
-
- setTimeout(function () {
- el.height(window.height() - (el.offset().top + totalOffset));
- }, 500);
-
- window.bind("resize", function () {
- el.height(window.height() - (el.offset().top + totalOffset));
- });
-
- };
- });
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/detectfold.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/detectfold.directive.js
deleted file mode 100644
index ac2b86582e..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/detectfold.directive.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:detectFold
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-* @description This is used for the editor buttons to ensure they are displayed correctly if the horizontal overflow of the editor
-* exceeds the height of the window
-**/
-
-angular.module("umbraco.directives.html")
- .directive('detectFold', function ($timeout, $log, windowResizeListener) {
- return {
- require: "^?umbTabs",
- restrict: 'A',
- link: function (scope, el, attrs, tabsCtrl) {
-
- var firstRun = false;
- var parent = $(".umb-panel-body");
- var winHeight = $(window).height();
- var calculate = function () {
- if (el && el.is(":visible") && !el.hasClass("umb-bottom-bar")) {
-
- //now that the element is visible, set the flag in a couple of seconds,
- // this will ensure that loading time of a current tab get's completed and that
- // we eventually stop watching to save on CPU time
- $timeout(function() {
- firstRun = true;
- }, 4000);
-
- //var parent = el.parent();
- var hasOverflow = parent.innerHeight() < parent[0].scrollHeight;
- //var belowFold = (el.offset().top + el.height()) > winHeight;
- if (hasOverflow) {
- el.addClass("umb-bottom-bar");
-
- //I wish we didn't have to put this logic here but unfortunately we
- // do. This needs to calculate the left offest to place the bottom bar
- // depending on if the left column splitter has been moved by the user
- // (based on the nav-resize directive)
- var wrapper = $("#mainwrapper");
- var contentPanel = $("#leftcolumn").next();
- var contentPanelLeftPx = contentPanel.css("left");
-
- el.css({ left: contentPanelLeftPx });
- }
- }
- return firstRun;
- };
-
- var resizeCallback = function(size) {
- winHeight = size.height;
- el.removeClass("umb-bottom-bar");
- calculate();
- };
-
- windowResizeListener.register(resizeCallback);
-
- //Only execute the watcher if this tab is the active (first) tab on load, otherwise there's no reason to execute
- // the watcher since it will be recalculated when the tab changes!
- if (el.closest(".umb-tab-pane").index() === 0) {
- //run a watcher to ensure that the calculation occurs until it's firstRun but ensure
- // the calculations are throttled to save a bit of CPU
- var listener = scope.$watch(_.throttle(calculate, 1000), function (newVal, oldVal) {
- if (newVal !== oldVal) {
- listener();
- }
- });
- }
-
- //listen for tab changes
- if (tabsCtrl != null) {
- tabsCtrl.onTabShown(function (args) {
- calculate();
- });
- }
-
- //ensure to unregister
- scope.$on('$destroy', function() {
- windowResizeListener.unregister(resizeCallback);
- });
- }
- };
- });
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbItemSorter.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbItemSorter.directive.js
deleted file mode 100644
index 30a01e43c1..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbItemSorter.directive.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbItemSorter
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-* @function
-* @element ANY
-* @restrict E
-* @description A re-usable directive for sorting items
-**/
-
-function umbItemSorter(angularHelper) {
- return {
- scope: {
- model: "="
- },
- restrict: "E", // restrict to an element
- replace: true, // replace the html element with the template
- templateUrl: 'views/directives/_obsolete/umb-item-sorter.html',
- link: function(scope, element, attrs, ctrl) {
- var defaultModel = {
- okButton: "Ok",
- successMsg: "Sorting successful",
- complete: false
- };
- //assign user vals to default
- angular.extend(defaultModel, scope.model);
- //re-assign merged to user
- scope.model = defaultModel;
-
- scope.performSort = function() {
- scope.$emit("umbItemSorter.sorting", {
- sortedItems: scope.model.itemsToSort
- });
- };
-
- scope.handleCancel = function () {
- scope.$emit("umbItemSorter.cancel");
- };
-
- scope.handleOk = function() {
- scope.$emit("umbItemSorter.ok");
- };
-
- //defines the options for the jquery sortable
- scope.sortableOptions = {
- axis: 'y',
- cursor: "move",
- placeholder: "ui-sortable-placeholder",
- update: function (ev, ui) {
- //highlight the item when the position is changed
- $(ui.item).effect("highlight", { color: "#049cdb" }, 500);
- },
- stop: function (ev, ui) {
- //the ui-sortable directive already ensures that our list is re-sorted, so now we just
- // need to update the sortOrder to the index of each item
- angularHelper.safeApply(scope, function () {
- angular.forEach(scope.itemsToSort, function (val, index) {
- val.sortOrder = index + 1;
- });
-
- });
- }
- };
- }
- };
-}
-
-angular.module('umbraco.directives').directive("umbItemSorter", umbItemSorter);
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbcontentname.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbcontentname.directive.js
deleted file mode 100644
index fd7145ff80..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbcontentname.directive.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbContentName
-* @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
-* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form.
-**/
-
-angular.module("umbraco.directives")
- .directive('umbContentName', function ($timeout, localizationService) {
- return {
- require: "ngModel",
- restrict: 'E',
- replace: true,
- templateUrl: 'views/directives/_obsolete/umb-content-name.html',
-
- scope: {
- placeholder: '@placeholder',
- model: '=ngModel',
- ngDisabled: '='
- },
- link: function(scope, element, attrs, ngModel) {
-
- var inputElement = element.find("input");
- if(scope.placeholder && scope.placeholder[0] === "@"){
- localizationService.localize(scope.placeholder.substring(1))
- .then(function(value){
- scope.placeholder = value;
- });
- }
-
- var mX, mY, distance;
-
- function calculateDistance(elem, mouseX, mouseY) {
-
- var cx = Math.max(Math.min(mouseX, elem.offset().left + elem.width()), elem.offset().left);
- var cy = Math.max(Math.min(mouseY, elem.offset().top + elem.height()), elem.offset().top);
- return Math.sqrt((mouseX - cx) * (mouseX - cx) + (mouseY - cy) * (mouseY - cy));
- }
-
- var mouseMoveDebounce = _.throttle(function (e) {
- mX = e.pageX;
- mY = e.pageY;
- // not focused and not over element
- if (!inputElement.is(":focus") && !inputElement.hasClass("ng-invalid")) {
- // on page
- if (mX >= inputElement.offset().left) {
- distance = calculateDistance(inputElement, mX, mY);
- if (distance <= 155) {
-
- distance = 1 - (100 / 150 * distance / 100);
- inputElement.css("border", "1px solid rgba(175,175,175, " + distance + ")");
- inputElement.css("background-color", "rgba(255,255,255, " + distance + ")");
- }
- }
-
- }
-
- }, 15);
-
- $(document).bind("mousemove", mouseMoveDebounce);
-
- $timeout(function(){
- if(!scope.model){
- scope.goEdit();
- }
- }, 100, false);
-
- scope.goEdit = function(){
- scope.editMode = true;
-
- $timeout(function () {
- inputElement.focus();
- }, 100, false);
- };
-
- scope.exitEdit = function(){
- if(scope.model && scope.model !== ""){
- scope.editMode = false;
- }
- };
-
- //unbind doc event!
- scope.$on('$destroy', function () {
- $(document).unbind("mousemove", mouseMoveDebounce);
- });
- }
- };
- });
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/common/directives/_obsolete/umblogin.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umblogin.directive.js
deleted file mode 100644
index 775c20181c..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umblogin.directive.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbLogin
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-* @function
-* @element ANY
-* @restrict E
-**/
-
-function loginDirective() {
- return {
- restrict: "E", // restrict to an element
- replace: true, // replace the html element with the template
- templateUrl: 'views/directives/_obsolete/umb-login.html'
- };
-}
-
-angular.module('umbraco.directives').directive("umbLogin", loginDirective);
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umboptionsmenu.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umboptionsmenu.directive.js
deleted file mode 100644
index d51fe73448..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umboptionsmenu.directive.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbOptionsMenu
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-* @function
-* @element ANY
-* @restrict E
-**/
-
-angular.module("umbraco.directives")
-.directive('umbOptionsMenu', function ($injector, treeService, navigationService, umbModelMapper, appState) {
- return {
- scope: {
- currentSection: "@",
- currentNode: "="
- },
- restrict: 'E',
- replace: true,
- templateUrl: 'views/directives/_obsolete/umb-optionsmenu.html',
- link: function (scope, element, attrs, ctrl) {
-
- //adds a handler to the context menu item click, we need to handle this differently
- //depending on what the menu item is supposed to do.
- scope.executeMenuItem = function (action) {
- navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
- };
-
- //callback method to go and get the options async
- scope.getOptions = function () {
-
- if (!scope.currentNode) {
- return;
- }
-
- //when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
- appState.setMenuState("currentNode", scope.currentNode);
-
- if (!scope.actions) {
- treeService.getMenu({ treeNode: scope.currentNode })
- .then(function (data) {
- scope.actions = data.menuItems;
- });
- }
- };
-
- }
- };
-});
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbphotofolder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbphotofolder.directive.js
deleted file mode 100644
index c6c628741f..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbphotofolder.directive.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbPhotoFolder
-* @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
-**/
-
-angular.module("umbraco.directives.html")
- .directive('umbPhotoFolder', function($compile, $log, $timeout, $filter, umbPhotoFolderHelper) {
-
- return {
- restrict: 'E',
- replace: true,
- require: '?ngModel',
- terminate: true,
- templateUrl: 'views/directives/_obsolete/umb-photo-folder.html',
- link: function(scope, element, attrs, ngModel) {
-
- var lastWatch = null;
-
- ngModel.$render = function() {
- if (ngModel.$modelValue) {
-
- $timeout(function() {
- var photos = ngModel.$modelValue;
-
- scope.clickHandler = scope.$eval(element.attr('on-click'));
-
-
- var imagesOnly = element.attr('images-only') === "true";
-
-
- var margin = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
- var startingIndex = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
- var minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;
- var minHeight = element.attr('min-height') ? parseInt(element.attr('min-height'), 10) : 100;
- var maxHeight = element.attr('max-height') ? parseInt(element.attr('max-height'), 10) : 300;
- var idealImgPerRow = element.attr('ideal-items-per-row') ? parseInt(element.attr('ideal-items-per-row'), 10) : 5;
- var fixedRowWidth = Math.max(element.width(), minWidth);
-
- scope.containerStyle = { width: fixedRowWidth + "px" };
- scope.rows = umbPhotoFolderHelper.buildGrid(photos, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
-
- if (attrs.filterBy) {
-
- //we track the watches that we create, we don't want to create multiple, so clear it
- // if it already exists before creating another.
- if (lastWatch) {
- lastWatch();
- }
-
- //TODO: Need to debounce this so it doesn't filter too often!
- lastWatch = scope.$watch(attrs.filterBy, function (newVal, oldVal) {
- if (newVal && newVal !== oldVal) {
- var p = $filter('filter')(photos, newVal, false);
- scope.baseline = 0;
- var m = umbPhotoFolderHelper.buildGrid(p, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
- scope.rows = m;
- }
- });
- }
-
- }, 500); //end timeout
- } //end if modelValue
-
- }; //end $render
- }
- };
- });
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbsort.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbsort.directive.js
deleted file mode 100644
index aab837f916..0000000000
--- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbsort.directive.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
-* @ngdoc directive
-* @name umbraco.directives.directive:umbSort
-* @deprecated
-* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
-*
-* @element div
-* @function
-*
-* @description
-* Resize div's automatically to fit to the bottom of the screen, as an optional parameter an y-axis offset can be set
-* So if you only want to scale the div to 70 pixels from the bottom you pass "70"
-*
-* @example
-*
-*
-*
-*
-*
-**/
-
-angular.module("umbraco.directives")
- .value('umbSortContextInternal',{})
- .directive('umbSort', function($log,umbSortContextInternal) {
- return {
- require: '?ngModel',
- link: function(scope, element, attrs, ngModel) {
- var adjustment;
-
- var cfg = scope.$eval(element.attr('umb-sort')) || {};
-
- scope.model = ngModel;
-
- scope.opts = cfg;
- scope.opts.containerSelector= cfg.containerSelector || ".umb-" + cfg.group + "-container",
- scope.opts.nested= cfg.nested || true,
- scope.opts.drop= cfg.drop || true,
- scope.opts.drag= cfg.drag || true,
- scope.opts.clone = cfg.clone || "