From e23d7d1af35e3d72307ba3eddeea9a004ae6c772 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 29 Apr 2014 15:09:01 +1000 Subject: [PATCH] Fixes: U4-3404 Pressing preview should save the changes and then open preview window --- .../src/views/content/content.edit.controller.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index c9ca0020a4..23f3a4049f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -262,14 +262,9 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, appS }; $scope.preview = function(content){ - if(!content.id){ - $scope.save().then(function(data){ - $window.open('dialogs/preview.aspx?id='+data.id,'umbpreview'); - }); - } - else { - $window.open('dialogs/preview.aspx?id='+content.id,'umbpreview'); - } + $scope.save().then(function (data) { + $window.open('dialogs/preview.aspx?id=' + data.id, 'umbpreview'); + }); }; /** this method is called for all action buttons and then we proxy based on the btn definition */