Fixes: U4-5212 Preview button only greyed and not disabled while previewing. (was save button)
This commit is contained in:
@@ -262,14 +262,20 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, appS
|
||||
};
|
||||
|
||||
$scope.preview = function (content) {
|
||||
// Chromes popup blocker will kick in if a window is opened
|
||||
// outwith the initial scoped request. This trick will fix that.
|
||||
var previewWindow = $window.open("/umbraco/views/content/umbpreview.html", "umbpreview");
|
||||
$scope.save().then(function (data) {
|
||||
// Build the correct path so both /#/ and #/ work.
|
||||
var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/dialogs/preview.aspx?id=' + data.id;
|
||||
previewWindow.location.href = redirect;
|
||||
});
|
||||
|
||||
if (!$scope.busy) {
|
||||
$scope.save().then(function (data) {
|
||||
|
||||
// Chromes popup blocker will kick in if a window is opened
|
||||
// outwith the initial scoped request. This trick will fix that.
|
||||
var previewWindow = $window.open("/umbraco/views/content/umbpreview.html", "umbpreview");
|
||||
|
||||
|
||||
// Build the correct path so both /#/ and #/ work.
|
||||
var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/dialogs/preview.aspx?id=' + data.id;
|
||||
previewWindow.location.href = redirect;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/** this method is called for all action buttons and then we proxy based on the btn definition */
|
||||
|
||||
Reference in New Issue
Block a user