Amazingly improve NestedContent non-support of some editors
This commit is contained in:
@@ -3,6 +3,22 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nested-content--not-supported
|
||||
{
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.nested-content-overlay
|
||||
{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.nested-content__item
|
||||
{
|
||||
position: relative;
|
||||
|
||||
@@ -265,6 +265,17 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
});
|
||||
}
|
||||
|
||||
var notSupported = [
|
||||
"Umbraco.CheckBoxList",
|
||||
"Umbraco.DropDownMultiple",
|
||||
"Umbraco.MacroContainer",
|
||||
"Umbraco.RadioButtonList",
|
||||
"Umbraco.MultipleTextstring",
|
||||
"Umbraco.Tags",
|
||||
"Umbraco.UploadField",
|
||||
"Umbraco.ImageCropper"
|
||||
];
|
||||
|
||||
// Initialize
|
||||
var scaffoldsLoaded = 0;
|
||||
$scope.scaffolds = [];
|
||||
@@ -276,7 +287,15 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
});
|
||||
scaffold.tabs = [];
|
||||
if (tab) {
|
||||
scaffold.tabs.push(tab);
|
||||
scaffold.tabs.push(tab);
|
||||
|
||||
angular.forEach(tab.properties,
|
||||
function(property) {
|
||||
if (_.find(notSupported, function (x) { return x === property.editor; })) {
|
||||
property.notSupported = true;
|
||||
property.notSupportedMessage = "Property " + property.label + " uses editor " + property.editor + " which is not supported by NestedContent.";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Store the scaffold object
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<div class="umb-pane">
|
||||
<div ng-repeat="property in tab.properties" style="position: relative;">
|
||||
|
||||
<umb-property
|
||||
property="property"
|
||||
ng-repeat="property in tab.properties">
|
||||
<umb-editor model="property"></umb-editor>
|
||||
<umb-property property="property" ng-class="{'nested-content--not-supported': property.notSupported}">
|
||||
<umb-editor model="property"></umb-editor>
|
||||
</umb-property>
|
||||
|
||||
<div ng-if="property.notSupported" class="nested-content-overlay"></div>
|
||||
|
||||
<p ng-if="property.notSupported">{{property.notSupportedMessage}}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user