Просмотр исходного кода

Delete jsChildrenDirective not needed anymore

Gaël Métais 10 лет назад
Родитель
Сommit
15653ef961
3 измененных файлов с 0 добавлено и 46 удалено
  1. 0 1
      front/src/js/app.js
  2. 0 44
      front/src/js/directives/jsChildrenDirective.js
  3. 0 1
      front/src/main.html

+ 0 - 1
front/src/js/app.js

@@ -13,7 +13,6 @@ var yltApp = angular.module('YellowLabTools', [
     'apiService',
     'menuService',
     'gradeDirective',
-    'jsChildrenDirective',
     'offendersDirectives'
 ]);
 

+ 0 - 44
front/src/js/directives/jsChildrenDirective.js

@@ -1,44 +0,0 @@
-var jsChildrenDirective = angular.module('jsChildrenDirective', []);
-
-jsChildrenDirective.directive('jsChildren', function() {
- 
-    return {
-        restrict: 'E',
-        scope: {
-            node: '=node'
-        },
-        template:   '<div class="children"></div>',
-        replace: true,
-        link: function(scope, element, attrs) {
-            
-            function recursiveHtmlBuilder(node) {
-                var html = '';
-                
-                if (node.children) {
-                    node.children.forEach(function(child) {
-                        
-                        var childArgs = '';
-                        if (child.data.callDetails && child.data.callDetails.arguments && child.data.callDetails.arguments.length > 0) {
-                            childArgs = child.data.callDetails.arguments.join(' : ');
-                            if (childArgs.length > 100) {
-                                childArgs = childArgs.substr(0, 98) + '...';
-                            }
-                        }
-
-                        html += '<div class="child"><span>' + child.data.type + '<div class="childArgs">' + childArgs + '</div></span>' + recursiveHtmlBuilder(child) + '</div>';
-                    });
-                }
-
-                return html;
-            }
-
-            element.append(recursiveHtmlBuilder(scope.node));
-
-            // Bind a very special behavior:
-            // We want to display something in the next table-cell, at the same hight.
-            element.find('span').on('mouseenter', function() {
-                
-            });
-        }
-    };
-});

+ 0 - 1
front/src/main.html

@@ -36,7 +36,6 @@
     <script src="/js/services/apiService.js"></script>
     <script src="/js/services/menuService.js"></script>
     <script src="/js/directives/gradeDirective.js"></script>
-    <script src="/js/directives/jsChildrenDirective.js"></script>
     <script src="/js/directives/offendersDirectives.js"></script>
     <!-- endbuild -->
 <head>