start hide/show functionality
This commit is contained in:
@@ -312,7 +312,8 @@
|
||||
|
||||
.unesting-media-item
|
||||
{
|
||||
border-radius: 3px;
|
||||
background: #f6f4f4;
|
||||
border-radius: 4px;
|
||||
margin-right: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -326,13 +327,13 @@
|
||||
.unesting-media-item-image
|
||||
{
|
||||
background: #f6f4f4;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #f6f6f7;
|
||||
}
|
||||
|
||||
.unesting-media-item-text
|
||||
{
|
||||
padding: 0 10px;
|
||||
padding: 0 15px;
|
||||
max-width: 100px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@@ -352,7 +353,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
@@ -384,7 +385,7 @@
|
||||
|
||||
.umb-property[unesting-property="uNestingHide"]
|
||||
{
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div class="unesting-items" ng-hide="nodes.length === 0" ng-class="{ 'is-hidden': nodes.length === 0 }" ui-sortable="sortableOptions" ng-model="nodes">
|
||||
|
||||
<div class="unesting-item" ng-repeat="node in nodes" ng-class="{ 'is-active' : $parent.realCurrentNode.key === node.key, 'umb-nested-content__item--single' : $parent.singleMode }">
|
||||
<div class="unesting-item" ng-repeat="node in nodes" ng-class="{ 'is-active' : $parent.realCurrentNode.key === node.key, 'umb-nested-content__item--single' : $parent.singleMode, 'is-hidden': isHidden($index) }">
|
||||
|
||||
<div class="unesting-item-header" ng-click="$parent.editNode($index)" ng-hide="$parent.singleMode">
|
||||
|
||||
|
||||
@@ -40,17 +40,24 @@ angular.module("umbraco").controller("brothers.uNesting.PropertyEditorController
|
||||
|
||||
$scope.clickHide = function ($event, node)
|
||||
{
|
||||
//syncCurrentNode();
|
||||
console.info(node);
|
||||
$($event.target).closest('.unesting-item').find('.umb-property[unesting-property="uNestingHide"] .umb-toggle').trigger('click');
|
||||
if ($scope.realCurrentNode)
|
||||
{
|
||||
$scope.$broadcast("ncSyncVal", { key: $scope.realCurrentNode.key });
|
||||
}
|
||||
$event.stopPropagation();
|
||||
//clipboardService.copy("elementType", node.contentTypeAlias, node);
|
||||
//$event.stopPropagation();
|
||||
};
|
||||
|
||||
$scope.canHide = function (item)
|
||||
{
|
||||
return typeof item['uNestingHide'] !== 'undefined';
|
||||
};
|
||||
|
||||
$scope.isHidden = function (index)
|
||||
{
|
||||
var item = $scope.model.value[index];
|
||||
return item['uNestingHide'] === '1';
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -112,8 +119,8 @@ angular.module('umbraco.directives').directive('unMedia', function ($http, $comp
|
||||
limit: '@'
|
||||
},
|
||||
template: '' +
|
||||
'<div class= "unesting-media" ng- class="{\'has-title\': !!item.title}">' +
|
||||
'<div class="unesting-media-item" ng-repeat="item in media">' +
|
||||
'<div class="unesting-media">' +
|
||||
'<div class="unesting-media-item" ng-repeat="item in media" ng-class="{\'has-title\': !!item.title}">' +
|
||||
'<img src="{{item.src}}" title="{{item.title}}" class="unesting-media-item-image" />' +
|
||||
'<span class="unesting-media-item-text" ng-if="item.title">{{item.title | unHtml }}</span>' +
|
||||
'</div>' +
|
||||
|
||||
@@ -395,6 +395,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App_Plugins\brothers.uNesting\uNesting.editor.html" />
|
||||
<Content Include="App_Plugins\brothers.uNesting\uNesting.css" />
|
||||
<Content Include="App_Plugins\brothers.uNesting\uNesting.docTypePicker.html" />
|
||||
<Content Include="App_Plugins\brothers.uNesting\uNesting.html" />
|
||||
|
||||
Reference in New Issue
Block a user