From 42d47ddbfeb0f4313d152842ec5de15cbd50301c Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Fri, 30 Aug 2019 02:41:06 +0200 Subject: [PATCH] ++ --- .../App_Plugins/brothers.uNesting/uNesting.css | 4 ++-- .../App_Plugins/brothers.uNesting/uNesting.html | 4 ++-- .../App_Plugins/brothers.uNesting/uNesting.js | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.css b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.css index 1d0dd61..06ccd58 100644 --- a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.css +++ b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.css @@ -49,10 +49,10 @@ opacity: 0.4; } -.unesting-item.is-hidden .unesting-item-header-content-text +/*.unesting-item.is-hidden .unesting-item-header-content-text { display: none; -} +}*/ .unesting-item.is-active > .unesting-item-header:after, .unesting-item.is-active > .unesting-item-header:before diff --git a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.html b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.html index 57a5a1f..47ab9ba 100644 --- a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.html +++ b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.html @@ -14,7 +14,7 @@
-
+
@@ -65,7 +65,7 @@ - +
diff --git a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.js b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.js index aed9462..589cf30 100644 --- a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.js +++ b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.js @@ -38,14 +38,12 @@ angular.module("umbraco").controller("brothers.uNesting.PropertyEditorController { angular.extend(this, $controller('Umbraco.PropertyEditors.NestedContent.PropertyEditorController', { $scope: $scope })); - $scope.clickHide = function ($event, node) + $scope.clickHide = function ($event, node, $index) { - $($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.preventDefault(); $event.stopPropagation(); + $($event.target).closest('.unesting-item').find('.umb-property[unesting-property="uNestingHide"] .umb-toggle').trigger('click'); + $scope.model.value[$index]['uNestingHide'] = !$scope.model.value[$index]['uNestingHide']; }; $scope.canHide = function (item)