work in progress, making it possible to open the default variant to edit a property.
This commit is contained in:
+1
@@ -17,6 +17,7 @@
|
||||
replace: true,
|
||||
templateUrl: 'views/components/editor/umb-editor-sub-views.html',
|
||||
scope: {
|
||||
onSelectVariant: "&",
|
||||
subViews: "=",
|
||||
model: "="
|
||||
},
|
||||
|
||||
+6
-2
@@ -9,7 +9,8 @@ angular.module("umbraco.directives")
|
||||
scope: {
|
||||
property: "=",
|
||||
showInherit: "<",
|
||||
inheritsFrom: "<"
|
||||
inheritsFrom: "<",
|
||||
onSelectVariant: "&?"
|
||||
},
|
||||
transclude: true,
|
||||
restrict: 'E',
|
||||
@@ -27,7 +28,10 @@ angular.module("umbraco.directives")
|
||||
var self = this;
|
||||
|
||||
//set the API properties/methods
|
||||
|
||||
|
||||
self.openDefaultVariant = function() {
|
||||
console.log("Hello")
|
||||
};
|
||||
self.property = $scope.property;
|
||||
self.setPropertyError = function (errorMsg) {
|
||||
$scope.property.propertyErrorMessage = errorMsg;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
ng-repeat="property in group.properties track by property.alias"
|
||||
property="property"
|
||||
show-inherit="content.variants.length > 1 && !property.culture && !activeVariant.language.isDefault"
|
||||
inherits-from="defaultVariant.language.name"
|
||||
on-select-variant="onSelectVariant(variant)"
|
||||
inherits-from="defaultVariant"
|
||||
ng-class="{'--disabled': content.variants.length > 1 && !activeVariant.language.isDefault && !property.culture && !property.unlockInvariantValue}"
|
||||
>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<umb-editor-container ng-if="vm.editor.content.apps.length > 0">
|
||||
<div class="umb-editor-sub-views">
|
||||
<div ng-repeat="app in vm.editor.content.apps track by app.alias">
|
||||
<umb-editor-sub-view model="app" content="vm.content" />
|
||||
<umb-editor-sub-view model="app" content="vm.content" on-select-variant="vm.selectVariant(variant)"/>
|
||||
</div>
|
||||
</div>
|
||||
</umb-editor-container>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
<umb-tabbed-content
|
||||
ng-if="!vm.loading"
|
||||
content="vm.content">
|
||||
content="vm.content"
|
||||
onSelectVariant="vm.onSelectVariant(variant)">
|
||||
</umb-tabbed-content>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user