a bit of dependency injection clean up so we can figure out where the dialogService is used.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @description A helper service for most editors, some methods are specific to content/media/member model types but most are used by
|
||||
* all editors to share logic and reduce the amount of replicated code among editors.
|
||||
**/
|
||||
function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, navigationService, localizationService, serverValidationManager, dialogService, formHelper, appState) {
|
||||
function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, navigationService, localizationService, serverValidationManager, formHelper) {
|
||||
|
||||
function isValidIdentifier(id) {
|
||||
|
||||
|
||||
@@ -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, $timeout, notificationsService, dialogService) {
|
||||
function formHelper(angularHelper, serverValidationManager, notificationsService, dialogService) {
|
||||
return {
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*
|
||||
* @requires $rootScope
|
||||
* @requires $routeParams
|
||||
* @requires $log
|
||||
* @requires $location
|
||||
* @requires dialogService
|
||||
* @requires treeService
|
||||
@@ -15,7 +14,7 @@
|
||||
* Section navigation and search, and maintain their state for the entire application lifetime
|
||||
*
|
||||
*/
|
||||
function navigationService($rootScope, $route, $routeParams, $log, $location, $q, $timeout, $injector, urlHelper, eventsService, dialogService, umbModelMapper, treeService, notificationsService, historyService, appState, angularHelper) {
|
||||
function navigationService($rootScope, $routeParams, $location, $q, $timeout, $injector, eventsService, dialogService, umbModelMapper, treeService, appState) {
|
||||
|
||||
//the promise that will be resolved when the navigation is ready
|
||||
var navReadyPromise = $q.defer();
|
||||
|
||||
@@ -695,8 +695,8 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
||||
currentTarget.anchor = anchorVal.substring(1);
|
||||
}
|
||||
|
||||
//locallink detection, we do this here, to avoid poluting the dialogservice
|
||||
//so the dialog service can just expect to get a node-like structure
|
||||
//locallink detection, we do this here, to avoid poluting the editorService
|
||||
//so the editor service can just expect to get a node-like structure
|
||||
if (currentTarget.url.indexOf("localLink:") > 0) {
|
||||
// if the current link has an anchor, it needs to be considered when getting the udi/id
|
||||
// if an anchor exists, reduce the substring max by its length plus two to offset the removed prefix and trailing curly brace
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @name umbraco.services.umbRequestHelper
|
||||
* @description A helper object used for sending requests to the server
|
||||
**/
|
||||
function umbRequestHelper($http, $q, umbDataFormatter, angularHelper, dialogService, notificationsService, eventsService, formHelper) {
|
||||
function umbRequestHelper($http, $q, notificationsService, eventsService, formHelper) {
|
||||
|
||||
return {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
angular.module('umbraco.services')
|
||||
.factory('userService', function ($rootScope, eventsService, $q, $location, $log, requestRetryQueue, authResource, dialogService, $timeout, angularHelper, $http) {
|
||||
.factory('userService', function ($rootScope, eventsService, $q, $location, requestRetryQueue, authResource, dialogService, $timeout, angularHelper) {
|
||||
|
||||
var currentUser = null;
|
||||
var lastUserId = null;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* @param {navigationService} navigationService A reference to the navigationService
|
||||
*/
|
||||
function NavigationController($scope, $rootScope, $location, $log, $q, $routeParams, $timeout, treeService, appState, navigationService, keyboardService, dialogService, historyService, eventsService, sectionResource, angularHelper, languageResource, contentResource) {
|
||||
function NavigationController($scope, $rootScope, $location, $log, $q, $routeParams, $timeout, treeService, appState, navigationService, keyboardService, historyService, eventsService, angularHelper, languageResource, contentResource) {
|
||||
|
||||
//this is used to trigger the tree to start loading once everything is ready
|
||||
var treeInitPromise = $q.defer();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.services'])
|
||||
|
||||
.controller("previewController", function ($scope, $http, $window, $timeout, $location, dialogService) {
|
||||
.controller("previewController", function ($scope, $window, $location) {
|
||||
|
||||
//gets a real query string value
|
||||
function getParameterByName(name, url) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
function mediaPickerController($scope, dialogService, entityResource, $log, iconHelper, editorService) {
|
||||
function mediaPickerController($scope, entityResource, iconHelper, editorService) {
|
||||
|
||||
function trim(str, chr) {
|
||||
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
angular.module('umbraco')
|
||||
.controller("Umbraco.PrevalueEditors.TreePickerController",
|
||||
|
||||
function ($scope, dialogService, entityResource, $log, iconHelper, editorService) {
|
||||
function ($scope, entityResource, iconHelper, editorService) {
|
||||
$scope.renderModel = [];
|
||||
$scope.ids = [];
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
angular.module('umbraco')
|
||||
.controller("Umbraco.PrevalueEditors.TreeSourceController",
|
||||
|
||||
function($scope, dialogService, entityResource, $log, iconHelper, editorService){
|
||||
function($scope, entityResource, iconHelper, editorService){
|
||||
|
||||
if (!$scope.model) {
|
||||
$scope.model = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.Grid.TextStringController",
|
||||
function ($scope, $rootScope, $timeout, dialogService) {
|
||||
function () {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,8 @@ angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.GridController",
|
||||
function (
|
||||
$scope,
|
||||
$http,
|
||||
assetsService,
|
||||
localizationService,
|
||||
$rootScope,
|
||||
dialogService,
|
||||
gridService,
|
||||
mediaResource,
|
||||
imageHelper,
|
||||
$timeout,
|
||||
umbRequestHelper,
|
||||
angularHelper,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.GridPrevalueEditorController",
|
||||
function ($scope, $http, assetsService, $rootScope, dialogService, mediaResource, gridService, imageHelper, $timeout) {
|
||||
function ($scope, gridService) {
|
||||
|
||||
var emptyModel = {
|
||||
styles:[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
angular.module('umbraco')
|
||||
.controller("Umbraco.PropertyEditors.MacroContainerController",
|
||||
|
||||
function($scope, dialogService, entityResource, macroService){
|
||||
function($scope, macroService){
|
||||
|
||||
$scope.renderModel = [];
|
||||
$scope.allowOpenButton = true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController",
|
||||
function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService, $location, localizationService, editorService) {
|
||||
function ($scope, entityResource, mediaHelper, $timeout, userService, localizationService, editorService) {
|
||||
|
||||
//check the pre-values for multi-picker
|
||||
var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function memberGroupController($rootScope, $scope, dialogService, mediaResource, imageHelper, $log) {
|
||||
function memberGroupController($scope) {
|
||||
|
||||
//set the available to the keys of the dictionary who's value is true
|
||||
$scope.getAvailable = function () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//this controller simply tells the dialogs service to open a memberPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
function memberPickerController($scope, dialogService, entityResource, $log, iconHelper, angularHelper, editorService){
|
||||
function memberPickerController($scope, entityResource, iconHelper, angularHelper, editorService){
|
||||
|
||||
function trim(str, chr) {
|
||||
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.RelatedLinksController",
|
||||
function ($rootScope, $scope, dialogService, iconHelper, editorService) {
|
||||
function ($scope, iconHelper, editorService) {
|
||||
|
||||
if (!$scope.model.value) {
|
||||
$scope.model.value = [];
|
||||
|
||||
Reference in New Issue
Block a user