From c7e80fc532283c8ec3f79d200c71d65cc08bebfd Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 16 Jan 2018 13:40:57 +0100 Subject: [PATCH] remove all client side code related to registering tours in the service. It should be done through .json files. --- .../src/common/services/tour.service.js | 78 ------------------- 1 file changed, 78 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js index 315405cf44..a1cb579433 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js @@ -30,80 +30,6 @@ }); } - /** - * @ngdoc method - * @name umbraco.services.tourService#registerTour - * @methodOf umbraco.services.tourService - * - * @description - * Registers a tour in the service - * @param {Object} tour The tour you want to register in the service - * @param {String} tour.name The tour name - * @param {String} tour.alias The tour alias - * @param {Array} tour.steps Array of tour steps - * @param {String} tour.step.title Step title - * @param {DomElement} tour.step.content Step content (pass in any HTML markup) - * @param {DomElement} tour.step.element Highlight a DOM-element - * @param {Boolean} tour.step.elementPreventClick Adds invisible layer on top of highligted element to prevent all clicks and interaction with it - * @param {Number} tour.step.backdropOpacity Sets the backdrop opacity (default 0.4) - */ - function registerTour(newTour) { - validateTour(newTour); - validateTourRegistration(newTour); - tours.push(newTour); - eventsService.emit("appState.tour.updatedTours", tours); - } - - /** - * @ngdoc method - * @name umbraco.services.tourService#registerTours - * @methodOf umbraco.services.tourService - * - * @description - * Registers an array of tours in the service - * @param {Array} tours The tours to register in the service - */ - function registerTours(newTours) { - angular.forEach(newTours, function(newTour){ - validateTour(newTour); - validateTourRegistration(newTour); - tours.push(newTour); - }); - eventsService.emit("appState.tour.updatedTours", tours); - } - - /** - * @ngdoc method - * @name umbraco.services.tourService#unregisterTour - * @methodOf umbraco.services.tourService - * - * @description - * Unregisters a tour in the service - * @param {String} tourAlias The tour alias of the tour you want to unregister - */ - function unregisterTour(tourAlias) { - tours = tours.filter(function( obj ) { - return obj.alias !== tourAlias; - }); - eventsService.emit("appState.tour.updatedTours", tours); - } - - /** - * @ngdoc method - * @name umbraco.services.tourService#unregisterTourGroup - * @methodOf umbraco.services.tourService - * - * @description - * Unregisters a tour in the service - * @param {String} tourGroupName The name of the tour group you want to unregister - */ - function unregisterTourGroup(tourGroup) { - tours = tours.filter(function( obj ) { - return obj.group !== tourGroup; - }); - eventsService.emit("appState.tour.updatedTours", tours); - } - /** * Method to return all of the tours as a new instance */ @@ -334,10 +260,6 @@ var service = { registerAllTours: registerAllTours, - registerTour: registerTour, - registerTours: registerTours, - unregisterTour: unregisterTour, - unregisterTourGroup: unregisterTourGroup, startTour: startTour, endTour: endTour, disableTour: disableTour,