Merge pull request #2844 from umbraco/temp8-directive-cleanup

Temp8 directive cleanup
This commit is contained in:
Warren Buckley
2018-08-10 13:50:13 +01:00
committed by GitHub
26 changed files with 49 additions and 1074 deletions

View File

@@ -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.

View File

@@ -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
* <example module="umbraco.directives">
* <file name="index.html">
* <div auto-scale="70" class="input-block-level"></div>
* </file>
* </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));
});
};
});

View File

@@ -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);
});
}
};
});

View File

@@ -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);

View File

@@ -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);
});
}
};
});

View File

@@ -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);
});
}
};
});

View File

@@ -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);

View File

@@ -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;
});
}
};
}
};
});

View File

@@ -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
}
};
});

View File

@@ -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
* <example module="umbraco.directives">
* <file name="index.html">
* <div umb-sort="70" class="input-block-level"></div>
* </file>
* </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 || "<li/>";
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 );
}
};
});

View File

@@ -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'
};
});

View File

@@ -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'
};
});

View File

@@ -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
* <example module="umbraco.directives">
* <file name="index.html">
* <div auto-scale="70" class="input-block-level"></div>
* </file>
* </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);
});
};
});

View File

@@ -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";

View File

@@ -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;
}

View File

@@ -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
// ------------

View File

@@ -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;
}

View File

@@ -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
// --------------------------------------------------

View File

@@ -1,19 +0,0 @@
<ng-form name="contentNameForm">
<div class="umb-headline-editor-wrapper" ng-class="{'ng-invalid': contentNameForm.name.$invalid}">
<input type="text"
ng-disabled="ngDisabled"
name="name"
localize="placeholder"
class="umb-headline"
select-on-focus
placeholder="{{placeholder}}"
ng-model="model"
required
val-server-field="Name"/>
<span class="help-inline" val-msg-for="name" val-toggle-msg="required">Required</span>
<span class="help-inline" val-msg-for="name" val-toggle-msg="valServerField">{{contentNameForm.name.errorMsg}}</span>
</div>
</ng-form>

View File

@@ -1,14 +0,0 @@
<div class="umb-panel-header">
<div class="row-fluid">
<div ng-transclude></div>
<ul ng-show="showTabs" class="nav nav-tabs umb-nav-tabs span12 -padding-left">
<li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in visibleTabs" val-tab>
<a href="#tab{{tab.id}}" data-toggle="tab">{{ tab.label }}</a>
</li>
</ul>
</div>
</div>

View File

@@ -1,38 +0,0 @@
<div class="umb-dialog" style="width: 500px" ng-switch on="model.complete">
<form name="sortForm" ng-submit="performSort()" ng-switch-when="false">
<div class="umb-dialog-body" auto-scale="90">
<p class="umb-abstract">Sort children of {{viewModel.name}}</p>
<table class="table umb-table">
<thead>
<tr>
<td>Name</td>
<td>Last Update</td>
<td>Index</td>
</thead>
<tbody ui-sortable="sortableOptions" ng-model="model.itemsToSort">
<tr ng-repeat="item in model.itemsToSort">
<td>{{item.column1}}</td>
<td>{{item.column2}}</td>
<td>{{item.column3}}</td>
</tr>
</tbody>
</table>
</div>
<div class="btn-toolbar umb-btn-toolbar">
<button type="button" class="btn" ng-click="handleCancel()">Cancel</button>
<button type="submit" class="btn btn-primary">Sort</button>
</div>
</form>
<div ng-switch-when="true">
<div class="alert alert-success">
{{model.successMsg}}
</div>
<div class="btn-toolbar umb-btn-toolbar">
<button class="btn" ng-click="handleOk()">{{model.okButton}}</button>
</div>
</div>
</div>

View File

@@ -1,12 +0,0 @@
<div id="login" ng-show="!authenticated" ng-animate="'slide'" ng-cloak>
<div class="form">
<h1>Happy {{today}}!, log in below</h1>
<div class="control-group">
<input type="text" ng-model="login" class="input-xlarge" placeholder="Enter your username" />
</div>
<div class="control-group">
<input type="password" ng-model="password" class="input-xlarge" placeholder="Enter your password" />
</div>
<input type="button" ng-click="signin()" class="btn" value="Login" />
</div>
</div>

View File

@@ -1,22 +0,0 @@
<div class="btn-group">
<!-- options button -->
<a class="btn" href="#" ng-click="getOptions()" prevent-default data-toggle="dropdown">
<localize key="general_actions">Actions</localize>
<span class="caret"></span>
</a>
<!-- actions -->
<ul class="dropdown-menu umb-actions" role="menu" aria-labelledby="dLabel">
<li class="action" ng-class="{sep:action.seperator}" ng-repeat="action in actions">
<!-- How does this reference executeMenuItem() i really don't think that this is very clear -->
<a prevent-default
ng-click="executeMenuItem(action)">
<i class="icon icon-{{action.cssclass}}"></i>
<span class="menu-label">{{action.name}}</span>
</a>
</li>
</ul>
</div>

View File

@@ -1,28 +0,0 @@
<div class="umb-photo-folder" ng-style="containerStyle">
<div class="picrow" ng-repeat="row in rows">
<div class="pic"
ng-class="img.cssclass"
ng-style="img.style" ng-repeat="img in row.images">
<a href="#media/media/edit/{{img.id}}"
ng-click="clickHandler(img, $event, false)"
title="{{img.name}}">
<div ng-style="img.style" class="umb-non-thumbnail" ng-if="!img.thumbnail">
<i class="icon large {{img.icon}}"></i>
<span>{{img.name}}</span>
</div>
<div ng-if="img.thumbnail" class="umb-photo" ng-style="img.thumbStyle" alt="{{img.name}}">
</div>
</a>
<a href ng-click="clickHandler(img, $event, true)" class="selector-overlay">
<localize key="buttons_select" ng-if="img.isFolder">Select</localize>
<span ng-if="!img.isFolder">{{img.name}}</span>
</a>
</div>
</div>
</div>

View File

@@ -1,5 +0,0 @@
<div class="umb-panel-body umb-scrollable row-fluid">
<div class="tab-content form-horizontal" ng-transclude>
</div>
</div>

View File

@@ -1,8 +0,0 @@
<div class="umb-upload-drop-zone">
<div class="info">
<i class="icon icon-parachute-drop"></i>
<p>
<localize key="media_dropFilesHere">Drop your files here...</localize>
</p>
</div>
</div>