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 || "
  • "; - scope.opts.mode = cfg.mode || "list"; - - scope.opts.itemSelectorFull = $.trim(scope.opts.itemPath + " " + scope.opts.itemSelector); - - /* - scope.opts.isValidTarget = function(item, container) { - if(container.el.is(".umb-" + scope.opts.group + "-container")){ - return true; - } - return false; - }; - */ - - element.addClass("umb-sort"); - element.addClass("umb-" + cfg.group + "-container"); - - scope.opts.onDrag = function (item, position) { - if(scope.opts.mode === "list"){ - item.css({ - left: position.left - adjustment.left, - top: position.top - adjustment.top - }); - } - }; - - - scope.opts.onDrop = function (item, targetContainer, _super) { - - if(scope.opts.mode === "list"){ - //list mode - var clonedItem = $(scope.opts.clone).css({height: 0}); - item.after(clonedItem); - clonedItem.animate({'height': item.height()}); - - item.animate(clonedItem.position(), function () { - clonedItem.detach(); - _super(item); - }); - } - - var children = $(scope.opts.itemSelectorFull, targetContainer.el); - var targetIndex = children.index(item); - var targetScope = $(targetContainer.el[0]).scope(); - - - if(targetScope === umbSortContextInternal.sourceScope){ - if(umbSortContextInternal.sourceScope.opts.onSortHandler){ - var _largs = { - oldIndex: umbSortContextInternal.sourceIndex, - newIndex: targetIndex, - scope: umbSortContextInternal.sourceScope - }; - - umbSortContextInternal.sourceScope.opts.onSortHandler.call(this, item, _largs); - } - }else{ - - - if(targetScope.opts.onDropHandler){ - var args = { - sourceScope: umbSortContextInternal.sourceScope, - sourceIndex: umbSortContextInternal.sourceIndex, - sourceContainer: umbSortContextInternal.sourceContainer, - - targetScope: targetScope, - targetIndex: targetIndex, - targetContainer: targetContainer - }; - - targetScope.opts.onDropHandler.call(this, item, args); - } - - if(umbSortContextInternal.sourceScope.opts.onReleaseHandler){ - var _args = { - sourceScope: umbSortContextInternal.sourceScope, - sourceIndex: umbSortContextInternal.sourceIndex, - sourceContainer: umbSortContextInternal.sourceContainer, - - targetScope: targetScope, - targetIndex: targetIndex, - targetContainer: targetContainer - }; - - umbSortContextInternal.sourceScope.opts.onReleaseHandler.call(this, item, _args); - } - } - }; - - scope.changeIndex = function(from, to){ - scope.$apply(function(){ - var i = ngModel.$modelValue.splice(from, 1)[0]; - ngModel.$modelValue.splice(to, 0, i); - }); - }; - - scope.move = function(args){ - var from = args.sourceIndex; - var to = args.targetIndex; - - if(args.sourceContainer === args.targetContainer){ - scope.changeIndex(from, to); - }else{ - scope.$apply(function(){ - var i = args.sourceScope.model.$modelValue.splice(from, 1)[0]; - args.targetScope.model.$modelvalue.splice(to,0, i); - }); - } - }; - - scope.opts.onDragStart = function (item, container, _super) { - var children = $(scope.opts.itemSelectorFull, container.el); - var offset = item.offset(); - - umbSortContextInternal.sourceIndex = children.index(item); - umbSortContextInternal.sourceScope = $(container.el[0]).scope(); - umbSortContextInternal.sourceContainer = container; - - //current.item = ngModel.$modelValue.splice(current.index, 1)[0]; - - var pointer = container.rootGroup.pointer; - adjustment = { - left: pointer.left - offset.left, - top: pointer.top - offset.top - }; - - _super(item, container); - }; - - element.sortable( scope.opts ); - } - }; - - }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbtabview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbtabview.directive.js deleted file mode 100644 index 5fe813509e..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbtabview.directive.js +++ /dev/null @@ -1,18 +0,0 @@ -/** -* @ngdoc directive -* @name umbraco.directives.directive:umbTabView -* @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") -.directive('umbTabView', function($timeout, $log){ - return { - restrict: 'E', - replace: true, - transclude: 'true', - templateUrl: 'views/directives/_obsolete/umb-tab-view.html' - }; -}); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbuploaddropzone.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbuploaddropzone.directive.js deleted file mode 100644 index 64ca76a6ec..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/_obsolete/umbuploaddropzone.directive.js +++ /dev/null @@ -1,17 +0,0 @@ -/** -* @ngdoc directive -* @name umbraco.directives.directive:umbUploadDropzone -* @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('umbUploadDropzone', function(){ - return { - restrict: 'E', - replace: true, - templateUrl: 'views/directives/_obsolete/umb-upload-dropzone.html' - }; - }); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/util/autoscale.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/util/autoscale.directive.js new file mode 100644 index 0000000000..029a4e420f --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/util/autoscale.directive.js @@ -0,0 +1,49 @@ +/** +* @ngdoc directive +* @name umbraco.directives.directive:autoScale +* @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") + .directive('autoScale', function ($window, $timeout, windowResizeListener) { + return function (scope, el, attrs) { + + var totalOffset = 0; + var offsety = parseInt(attrs.autoScale, 10); + var window = angular.element($window); + if (offsety !== undefined) { + totalOffset += offsety; + } + + $timeout(function () { + setElementSize(); + }); + + function setElementSize() { + el.height(window.height() - (el.offset().top + totalOffset)); + } + + var resizeCallback = function() { + setElementSize(); + }; + + windowResizeListener.register(resizeCallback); + + //ensure to unregister from all events and kill jquery plugins + scope.$on('$destroy', function () { + windowResizeListener.unregister(resizeCallback); + }); + + }; + }); diff --git a/src/Umbraco.Web.UI.Client/src/less/belle.less b/src/Umbraco.Web.UI.Client/src/less/belle.less index b6fbba6949..b2f2f99dd5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/belle.less +++ b/src/Umbraco.Web.UI.Client/src/less/belle.less @@ -75,7 +75,6 @@ @import "listview.less"; @import "gridview.less"; @import "footer.less"; -@import "dragdrop.less"; @import "dashboards.less"; @import "forms/umb-validation-label.less"; diff --git a/src/Umbraco.Web.UI.Client/src/less/dragdrop.less b/src/Umbraco.Web.UI.Client/src/less/dragdrop.less deleted file mode 100644 index 328ab27e5b..0000000000 --- a/src/Umbraco.Web.UI.Client/src/less/dragdrop.less +++ /dev/null @@ -1,37 +0,0 @@ -body.dragging, body.dragging * { - cursor: move !important; -} - -li.dragged { - position: absolute; - opacity: 0.5; - z-index: 2000; -} - -.umb-sort li{ - display: block; - margin: 5px; - padding: 5px; - border: 1px solid @gray-7; - background: @gray-10; -} - -.umb-sort .placeholder { - position: relative; - margin: 0; - padding: 0; - border: none; -} - -.umb-sort .placeholder:before { - position: absolute; - content: ""; - width: 0; - height: 0; - margin-top: -5px; - left: -5px; - top: -4px; - border: 5px solid transparent; - border-left-color: @red; - border-right: none; -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index 4df1bd9b8d..6940987290 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -496,21 +496,6 @@ input[type="checkbox"][readonly] { border-color: @red-l1 !important; } -//disable the glowing border for the umb-content-name -.show-validation .umb-headline-editor-wrapper input:focus:invalid, -.show-validation .umb-headline-editor-wrapper textarea:focus:invalid, -.show-validation .umb-headline-editor-wrapper select:focus:invalid { - border:none; - color:inherit; - border-color:inherit; - @shadow:inherit; - .box-shadow(@shadow); -} - -.ng-invalid > .umb-headline-editor-wrapper h1{ - border-bottom: 1px dashed @red; color: @red; cursor: pointer; -}; - // FORM ACTIONS // ------------ diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index 68a703201a..def6d114ff 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -80,18 +80,6 @@ background-color: @white; } -.umb-headline-editor-wrapper { - position: relative; -} - -.umb-headline-editor-wrapper .help-inline { - right: 0px; - top: 25px; - position: absolute; - font-size: 10px; - color: @red; -} - .umb-panel-header p { margin: 0px 20px; } @@ -100,36 +88,6 @@ opacity: 0.6; } -.umb-headline-editor-wrapper input { - background: none; - border: none; - margin: -6px 0 0 0; - padding: 0 0 2px 0; - border-radius: 0; - line-height: normal; - border: 1px solid transparent; - color: @black; - letter-spacing: -0.01em; -} - -.umb-headline-editor-wrapper input.ng-invalid { - color: @red; -} - -.umb-headline-editor-wrapper input.ng-invalid::-moz-placeholder, -.umb-headline-editor-wrapper input.ng-invalid:-ms-input-placeholder, -.umb-headline-editor-wrapper input.ng-invalid::-webkit-input-placeholder { - color: @red; - line-height: 22px; -} - -/* -.umb-panel-header i { - font-size: 13px; - vertical-align: middle; -} -*/ - .umb-panel-header-meta { height: 50px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 9b21a1667c..d6cf651c48 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -657,28 +657,8 @@ ul.color-picker li { line-height: 120px } -.umb-upload-drop-zone{ - margin-bottom:5px; -} - -.umb-upload-drop-zone .info, .umb-upload-button-big{ - display: block; - padding: 20px; - opacity: 1; - border: 1px dashed @gray-8; - background: none; - text-align: center; - font-size: 14px; - color: @gray-8; -} - .umb-upload-button-big:hover{color: @gray-8;} -.umb-upload-drop-zone .info i.icon, .umb-upload-button-big i.icon{ - font-size: 55px; - line-height: 70px -} - .umb-upload-button-big {display: block} .umb-upload-button-big input { left: 0; @@ -688,123 +668,6 @@ ul.color-picker li { } - -// -// Photo folder styling -// -------------------------------------------------- - -.umb-photo-folder .picrow{ - overflow-y: hidden; - position: relative; -} - - - -.umb-photo-folder .picrow div, .umb-photo-preview{ - margin: 0px; - padding: 0px; - border: none; - display: inline-block; - vertical-align: top; - position: relative; -} - - - -.umb-photo-folder .picrow div a:first-child { - width:100%; - height:100%; -} - -.umb-photo-folder .picrow div.umb-photo { - width:100%; - height:100%; - background-color: @gray-10; -} - -.umb-photo-folder a:hover{text-decoration: none} -.umb-photo-folder .umb-non-thumbnail{ - text-align: center; - vertical-align: middle; - font-size: 12px; - background: @gray-10; - color: @black; - text-decoration: none; -} - -.umb-photo-folder .selector-overlay{ - display: none; -} - -//this is a temp hack, to provide selectors in the dialog: -.umb-photo-folder .pic:hover .selector-overlay { - position: absolute; - bottom: 0px; - left: 0px; - right: 0px; - padding: 5px; - background: @black; - z-index: 100; - display: block; - text-align: center; - color: @white; - opacity: 0.4; - text-decoration:none; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.umb-photo-folder .umb-non-thumbnail i{ - color: @gray-8; - font-size: 50px; - line-height: 60px; - display: block; - margin: auto; - /*vertically aligns */ - position: relative; - top: 50%; - transform: translateY(-50%); -} - -.umb-photo-folder .umb-non-thumbnail span{ - position: absolute; - display: block; - margin: auto; - width: 100%; - top: 20px; -} - -.umb-photo-folder .selected{ - position: relative; -} - -.umb-photo-folder .selected:before{ - content: "\e165"; - font-family: Icomoon; - - position: absolute; - bottom: 10px; - right: 10px; - - font-size: 24px; - color: @black; - opacity: 0.5; - background: @white; - - line-height: 36px; - text-align: center; - -moz-border-radius: 15px; - border-radius: 15px; - - height: 32px; - width: 32px; - overflow: hidden; - display: block; - z-index: 100; -} - - // // File upload // -------------------------------------------------- diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-content-name.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-content-name.html deleted file mode 100644 index 46ad6e5eff..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-content-name.html +++ /dev/null @@ -1,19 +0,0 @@ - -
    - - - - Required - {{contentNameForm.name.errorMsg}} - -
    -
    \ No newline at end of file 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 @@ -
    -
    - -
    - - -
    -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-item-sorter.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-item-sorter.html deleted file mode 100644 index 569a678dfb..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-item-sorter.html +++ /dev/null @@ -1,38 +0,0 @@ -
    - -
    -
    -

    Sort children of {{viewModel.name}}

    - - - - - - - - - - - - - - - -
    NameLast UpdateIndex
    {{item.column1}}{{item.column2}}{{item.column3}}
    - -
    -
    - - -
    -
    -
    -
    - {{model.successMsg}} -
    - -
    - -
    -
    -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-login.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-login.html deleted file mode 100644 index 3bf8332ad3..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-login.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
    -

    Happy {{today}}!, log in below

    -
    - -
    -
    - -
    - -
    -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-optionsmenu.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-optionsmenu.html deleted file mode 100644 index f834dfb93b..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-optionsmenu.html +++ /dev/null @@ -1,22 +0,0 @@ -
    - - - - Actions - - - - - -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-photo-folder.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-photo-folder.html deleted file mode 100644 index 67e0ecbf66..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-photo-folder.html +++ /dev/null @@ -1,28 +0,0 @@ -
    - -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-tab-view.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-tab-view.html deleted file mode 100644 index 93b520cb79..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-tab-view.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
    - -
    -
    diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-upload-dropzone.html b/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-upload-dropzone.html deleted file mode 100644 index 20a8f9d741..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/directives/_obsolete/umb-upload-dropzone.html +++ /dev/null @@ -1,8 +0,0 @@ -
    -
    - -

    - Drop your files here... -

    -
    -
    \ No newline at end of file