Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Don't remove the last tab in version v7.8 #89

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,16 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT

function loadNode() {
contentResource.getScaffold(-20, $scope.model.dialogData.docTypeAlias).then(function (data) {
// Remove the last tab
data.tabs.pop();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this will do inside the existing loop.. whatcha think?

if (!data.tabs[t].active) { continue; }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markglibres what loop are you talking about

@meregan what exactly does not work for you ? Because i see a report of the fix working here : https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor/doc-type-grid-editor-feedback/90527-dtge-dialog-editor-empty-in-umbraco-781

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dawoe the loop after it pops the last tab. i just noticed that umbraco api returns active=false for the properties tab on older versions, and no info tab on the latest release.

// get current umbraco version
var versionArray = Umbraco.Sys.ServerVariables.application.version.split(".");

if (parseInt(versionArray[0]) === 7 && parseInt(versionArray[1]) < 8) {
// Remove the last tab, in version lower than v7.8 this is the generic properties tab
data.tabs.pop();
}



// Merge current value
if ($scope.model.dialogData.value) {
Expand Down