Commit 3eaac267 authored by Jérome Perrin's avatar Jérome Perrin

GUI: fix display of result

parent 846b51fd
...@@ -42,13 +42,12 @@ ...@@ -42,13 +42,12 @@
throw error; throw error;
}) })
.push(function (sim_json) { .push(function (sim_json) {
var document_list = JSON.parse(sim_json), var result = JSON.parse(sim_json).result,
result_list = [], result_list = [],
document_list = [],
i; i;
if (document.result) { if (result) {
if (document.result.result_list) { document_list = result.result_list;
document_list = document.result.result_list;
}
} }
for (i = 0; i < document_list.length; i += 1) { for (i = 0; i < document_list.length; i += 1) {
result_list.push(RSVP.all([ result_list.push(RSVP.all([
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
}); });
}) })
.push(function (sim_json) { .push(function (sim_json) {
var document_list = JSON.parse(sim_json); var document_list = JSON.parse(sim_json).result.result_list;
return document_list[options.result].score + " " + return document_list[options.result].score + " " +
document_list[options.result].key; document_list[options.result].key;
}); });
...@@ -409,6 +409,7 @@ ...@@ -409,6 +409,7 @@
for (action_id in portal_types.Output) { for (action_id in portal_types.Output) {
if (portal_types.Output.hasOwnProperty(action_id)) { if (portal_types.Output.hasOwnProperty(action_id)) {
action_info = portal_types.Output[action_id]; action_info = portal_types.Output[action_id];
// XXX condition not needed
if ((action_info.condition === undefined) || if ((action_info.condition === undefined) ||
(action_info.condition(this))) { (action_info.condition(this))) {
action = action_id; action = action_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment