Yangman - changed event strings to constants
[dlux.git] / modules / yangman-resources / src / main / resources / yangman / controllers / yangman.controller.js
index 7c4a37273cda67e5d1b56bc7ccd28c8fba982a62..907b6e3393a16ec4b27f380a9c073c13f3ebc274 100644 (file)
@@ -119,8 +119,8 @@ define([
          * Initialization
          */
         function init(){
-            $scope.$on('YANGMAN_EXECUTING_REQUEST_PROGRESS_START', startExecutingRequestProgress);
-            $scope.$on('YANGMAN_EXECUTING_REQUEST_PROGRESS_STOP', stopExecutingRequestProgress);
+            $scope.$on(constants.YANGMAN_EXECUTING_REQUEST_PROGRESS_START, startExecutingRequestProgress);
+            $scope.$on(constants.YANGMAN_EXECUTING_REQUEST_PROGRESS_STOP, stopExecutingRequestProgress);
 
             YangmanDesignService.hideMainMenu();
             YangmanDesignService.setDraggableLeftPanel();
@@ -211,8 +211,8 @@ define([
          * Genereal method for clearing code mirror - sent and received data too
          */
         function clearCM(){
-            $scope.rootBroadcast('YANGMAN_SET_CODEMIRROR_DATA_RECEIVED', { data: JSON.stringify({}) });
-            $scope.rootBroadcast('YANGMAN_SET_CODEMIRROR_DATA_SENT', { data: JSON.stringify({}) });
+            $scope.rootBroadcast(constants.YANGMAN_SET_CODEMIRROR_DATA_RECEIVED, { data: JSON.stringify({}) });
+            $scope.rootBroadcast(constants.YANGMAN_SET_CODEMIRROR_DATA_SENT, { data: JSON.stringify({}) });
         }
 
 
@@ -246,7 +246,7 @@ define([
 
             if ( $scope.node ) {
                 $scope.node.clear();
-                $scope.$broadcast('YANGMAN_DISABLE_ADDING_LIST_ELEMENT');
+                $scope.$broadcast(constants.YANGMAN_DISABLE_ADDING_LIST_ELEMENT);
             }
         }
 
@@ -269,7 +269,7 @@ define([
             if ( expand ) {
                 $scope.node = null;
                 setLeftPanel(leftPanel);
-                $scope.$broadcast('YANGMAN_MODULE_D_INIT');
+                $scope.$broadcast(constants.YANGMAN_MODULE_D_INIT);
             } else {
 
                 if ( $scope.node ) {
@@ -300,7 +300,7 @@ define([
                 PathUtilsService.clearPath($scope.selectedSubApi.pathArray);
             }
 
-            $scope.$broadcast('SET_SEL_OPERATIONS', subApi ? $scope.selectedSubApi.operations : [], setUrl);
+            $scope.$broadcast(constants.SET_SEL_OPERATIONS, subApi ? $scope.selectedSubApi.operations : [], setUrl);
         }
 
         /**