Fixes: U4-3404 Pressing preview should save the changes and then open preview window

This commit is contained in:
Shannon
2014-04-29 15:09:01 +10:00
parent 4b97eb2a9a
commit e23d7d1af3

View File

@@ -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 */