nitweb/angular: introduce namespace directive
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 21 Jun 2016 15:49:41 +0000 (11:49 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 22 Jun 2016 01:26:49 +0000 (21:26 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/directives/entity/namespace.html [new file with mode: 0644]
share/nitweb/javascripts/entities.js

diff --git a/share/nitweb/directives/entity/namespace.html b/share/nitweb/directives/entity/namespace.html
new file mode 100644 (file)
index 0000000..6e39abf
--- /dev/null
@@ -0,0 +1,13 @@
+<span ng-if='mentity.mpackage'>
+       <entity-link mentity='mentity.mpackage' /> ::
+</span>
+<span ng-if='mentity.mmodule'>
+       <entity-link mentity='mentity.mmodule' /> ::
+</span>
+<span ng-if='mentity.intro_mclassdef'>
+       <entity-link mentity='mentity.intro_mclassdef' /> ::
+</span>
+<span ng-if='mentity.mclassdef'>
+       <entity-link mentity='mentity.mclassdef' /> ::
+</span>
+{{mentity.name}}
index 545bf08..16212f8 100644 (file)
                        };
                })
 
+               .directive('entityNamespace', function() {
+                       return {
+                               restrict: 'E',
+                               scope: {
+                                       mentity: '='
+                               },
+                               templateUrl: '/directives/entity/namespace.html'
+                       };
+               })
+
                .directive('entityTag', function() {
                        return {
                                restrict: 'E',