Commit 4c53cf66 authored by Tristan Cavelier's avatar Tristan Cavelier

RELATIONERROR only handle allDocs error

(indentation in next commit)
parent 05ed7201
......@@ -242,7 +242,8 @@
return RSVP.Queue()
.push(function () {
var plane = gadget.element.querySelector("a"),
ul = gadget.element.querySelector(".search_ul");
ul = gadget.element.querySelector(".search_ul"),
translation_promise;
plane.href = '';
// uid is known
......@@ -308,8 +309,12 @@
return RSVP.delay(200);
})
.push(function () {
return RSVP.all([
gadget.jio_allDocs({
translation_promise = gadget.getTranslationList([
'Create New',
'Explore the Search Result List'
]);
return gadget.jio_allDocs({
query: Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: [
......@@ -325,13 +330,12 @@
limit: [0, 10],
select_list: [gadget.state.catalog_index, "uid"],
sort_on: JSON.parse(gadget.state.sort_list_json)
}),
gadget.getTranslationList([
'Create New',
'Explore the Search Result List'
])
]);
})
})
.push(function (result) {
return new RSVP.Queue()
.push(function () {
return RSVP.all([result, translation_promise]);
})
.push(function (result_list) {
var i,
row,
......@@ -394,10 +398,17 @@
ul.removeChild(ul.firstChild);
}
ul.appendChild(fragment_element);
})
.push(undefined, function () {
return gadget.notifyInvalid("Invalid search criteria");
});
}, function (error) {
if (error && error.hash &&
error.hash.expected &&
error.hash.expected.length === 1 &&
error.hash.expected[0] === "'QUOTE'") {
return gadget.notifyInvalid("Invalid search criteria");
}
throw error;
});
});
});
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.21286.46840.25002</string> </value>
<value> <string>976.29948.48865.1092</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1560265812.69</float>
<float>1560785130.18</float>
<string>UTC</string>
</tuple>
</state>
......
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