diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentVariationTable.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentVariationTable.cs index ee0a4d7c8a..efd0f33e99 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentVariationTable.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentVariationTable.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - Create.Table(); + Create.Table().Do(); // fixme - data migration? } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index 064a34e14b..e25c995da2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -53,7 +53,9 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat controller: function ($scope, $element) { - var vm = this; + var vm = this; + + var isInitialized = false; var registeredCallbacks = { treeNodeExpanded: [], @@ -269,9 +271,17 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat return treeService.getTree(args) .then(function (data) { + //set the data once we have it $scope.tree = data; + //call the callback, this allows for hosting controllers to bind to events and use the exposed API + if (!isInitialized) { + isInitialized = true; + $scope.onInit(); + } + + enableDeleteAnimations(); $scope.loading = false; @@ -421,9 +431,6 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat lastSection = newVal; } }); - - //call the callback, this allows for hosting controllers to bind to events and use the exposed API - $scope.onInit(); loadTree(); }