nitweb: fix linearization responses
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 25 Aug 2016 05:54:30 +0000 (01:54 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 31 Aug 2016 13:19:20 +0000 (09:19 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/views/classdef.html
share/nitweb/views/propdef.html
src/web/api_model.nit

index f44478f..04dfa46 100644 (file)
@@ -1,4 +1,4 @@
-<ul class='nav nav-tabs' role='tablist'>
+<ul class='nav nav-tabs' ng-init='entityCtrl.loadEntityLinearization()'>
        <li role='presentation' class='warning'>
                <a ng-href='{{mentity.mclass.web_url}}'>
                        <span class='glyphicon glyphicon-chevron-left'/> Go to class
index 014e820..825a782 100644 (file)
@@ -1,4 +1,4 @@
-<ul class='nav nav-tabs'>
+<ul class='nav nav-tabs' ng-init='entityCtrl.loadEntityLinearization()'>
        <li role='presentation' class='warning'>
                <a href='{{mentity.mproperty.web_url}}'>
                        <span class='glyphicon glyphicon-chevron-left'/> Go to property
index 4c9fb8e..b6ac745 100644 (file)
@@ -162,7 +162,9 @@ class APIEntityLinearization
                        res.api_error(404, "No linearization for mentity `{mentity.full_name}`")
                        return
                end
-               res.json new JsonArray.from(lin)
+               var mentities = new JsonArray
+               for e in lin do mentities.add e.full_json
+               res.json mentities
        end
 end