use overlayService for ysods
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* A utility class used to streamline how forms are developed, to ensure that validation is check and displayed consistently and to ensure that the correct events
|
||||
* fire when they need to.
|
||||
*/
|
||||
function formHelper(angularHelper, serverValidationManager, notificationsService, dialogService) {
|
||||
function formHelper(angularHelper, serverValidationManager, notificationsService, overlayService) {
|
||||
return {
|
||||
|
||||
/**
|
||||
@@ -119,7 +119,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
serverValidationManager.notifyAndClearAllSubscriptions();
|
||||
}
|
||||
else {
|
||||
dialogService.ysodDialog(err);
|
||||
overlayService.ysod(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
// prevent two open overlays at the same time
|
||||
if(currentOverlay) {
|
||||
return;
|
||||
close();
|
||||
}
|
||||
|
||||
var backdropOptions = {};
|
||||
@@ -44,9 +44,21 @@
|
||||
eventsService.emit("appState.overlay", null);
|
||||
}
|
||||
|
||||
function ysod(error) {
|
||||
const overlay = {
|
||||
view: "views/common/overlays/ysod/ysod.html",
|
||||
error: error,
|
||||
close: function() {
|
||||
close();
|
||||
}
|
||||
};
|
||||
open(overlay);
|
||||
}
|
||||
|
||||
var service = {
|
||||
open: open,
|
||||
close: close
|
||||
close: close,
|
||||
ysod: ysod
|
||||
};
|
||||
|
||||
return service;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
angular.module('umbraco.services')
|
||||
.factory('userService', function ($rootScope, eventsService, $q, $location, requestRetryQueue, authResource, dialogService, $timeout, angularHelper) {
|
||||
.factory('userService', function ($rootScope, eventsService, $q, $location, requestRetryQueue, authResource, $timeout, angularHelper) {
|
||||
|
||||
var currentUser = null;
|
||||
var lastUserId = null;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for deleting content
|
||||
*/
|
||||
function ContentDeleteController($scope, $timeout, contentResource, treeService, navigationService, editorState, $location, dialogService, notificationsService) {
|
||||
function ContentDeleteController($scope, $timeout, contentResource, treeService, navigationService, editorState, $location, overlayService) {
|
||||
|
||||
/**
|
||||
* Used to toggle UI elements during delete operations
|
||||
@@ -62,7 +62,7 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService,
|
||||
|
||||
//check if response is ysod
|
||||
if (err.status && err.status >= 500) {
|
||||
dialogService.ysodDialog(err);
|
||||
overlayService.ysod(err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for the content editor
|
||||
*/
|
||||
function DataTypeEditController($scope, $routeParams, $location, appState, navigationService, treeService, dataTypeResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, formHelper, editorState, dataTypeHelper, eventsService) {
|
||||
function DataTypeEditController($scope, $routeParams, appState, navigationService, dataTypeResource, serverValidationManager, contentEditingHelper, formHelper, editorState, dataTypeHelper, eventsService) {
|
||||
|
||||
//setup scope vars
|
||||
$scope.page = {};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for deleting content
|
||||
*/
|
||||
function MediaDeleteController($scope, mediaResource, treeService, navigationService, editorState, $location, dialogService, notificationsService) {
|
||||
function MediaDeleteController($scope, mediaResource, treeService, navigationService, editorState, $location, overlayService) {
|
||||
|
||||
$scope.performDelete = function() {
|
||||
|
||||
@@ -53,7 +53,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
|
||||
//check if response is ysod
|
||||
if (err.status && err.status >= 500) {
|
||||
dialogService.ysodDialog(err);
|
||||
overlayService.ysod(err);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user