diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js index 7033a03943..e5ccccf7d2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js @@ -17,6 +17,7 @@ replace: true, templateUrl: 'views/components/editor/umb-editor-sub-views.html', scope: { + onSelectVariant: "&", subViews: "=", model: "=" }, diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js index 302378b8c0..6a9182c9e4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js @@ -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; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html index e95ed71f29..ab08ac6b1b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html @@ -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}" > diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html index 9cd245b0d5..ce261cc171 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html @@ -29,7 +29,7 @@
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.html b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.html index d391f2cd95..ed13c604c2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.html @@ -2,7 +2,8 @@ + content="vm.content" + onSelectVariant="vm.onSelectVariant(variant)"> - +