Fixes the new Id/Guid property on members, ensures all tabs are expanded by default and removes that init logic from JS since we don't want it there.
This commit is contained in:
@@ -22,14 +22,6 @@
|
||||
},
|
||||
link: function(scope) {
|
||||
|
||||
function onInit() {
|
||||
angular.forEach(scope.content.tabs, function (group) {
|
||||
group.open = true;
|
||||
});
|
||||
}
|
||||
|
||||
onInit();
|
||||
|
||||
},
|
||||
scope: {
|
||||
content: "="
|
||||
|
||||
@@ -5,14 +5,6 @@
|
||||
|
||||
var vm = this;
|
||||
|
||||
function onInit() {
|
||||
angular.forEach($scope.content.tabs, function(group){
|
||||
group.open = true;
|
||||
});
|
||||
}
|
||||
|
||||
onInit();
|
||||
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Editors.Media.Apps.ContentController", MediaAppContentController);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="form-horizontal" ng-controller="Umbraco.Editors.Media.Apps.ContentController as vm">
|
||||
<div class="umb-expansion-panel" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs | filter: { hide : '!' + true }">
|
||||
<div class="umb-expansion-panel" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs | filter: { hide : '!' + true } track by group.label">
|
||||
|
||||
<div class="umb-expansion-panel__header" ng-click="group.open = !group.open">
|
||||
<div>{{ group.label }}</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<umb-editor-container class="form-horizontal">
|
||||
|
||||
<div class="umb-expansion-panel" ng-repeat="group in content.tabs">
|
||||
<div class="umb-expansion-panel" ng-repeat="group in content.tabs track by group.label">
|
||||
|
||||
<div class="umb-expansion-panel__header" ng-click="group.open = !group.open">
|
||||
<div>{{ group.label }}</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="umb-editor umb-readonlyvalue umb-idwithguidvalue" ng-controller="Umbraco.PropertyEditors.IdWithGuidValueController">
|
||||
<div class="umb-property-editor umb-readonlyvalue" ng-controller="Umbraco.PropertyEditors.IdWithGuidValueController">
|
||||
<div>{{ displayid }}</div>
|
||||
<small>{{ displayguid }}</small>
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,12 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The expanded state of the tab
|
||||
/// </summary>
|
||||
[DataMember(Name = "open")]
|
||||
public bool Expanded { get; set; } = true;
|
||||
|
||||
[DataMember(Name = "properties")]
|
||||
public IEnumerable<T> Properties { get; set; }
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
new ContentPropertyDisplay
|
||||
{
|
||||
Alias = string.Format("{0}id", Constants.PropertyEditors.InternalGenericPropertiesPrefix),
|
||||
Alias = $"{Constants.PropertyEditors.InternalGenericPropertiesPrefix}id",
|
||||
Label = _localizedTextService.Localize("general/id"),
|
||||
Value = new List<string> {member.Id.ToString(), member.Key.ToString()},
|
||||
View = "idwithguid"
|
||||
|
||||
Reference in New Issue
Block a user