Commit 91c917f7 authored by Jérome Perrin's avatar Jérome Perrin

GUI: sort documents by date

parent c83144c9
...@@ -64,9 +64,13 @@ ...@@ -64,9 +64,13 @@
doc = document_list[i]; doc = document_list[i];
parameter_list[i] = { parameter_list[i] = {
link: doc[0], link: doc[0],
title: doc[1] + " (" + doc[2] + ")" title: doc[1] + " (" + doc[2] + ")",
date: new Date(doc[2])
}; };
} }
parameter_list.sort(function (a, b) {
return b.date - a.date;
});
// gadget.props.element.querySelector('a').href = document_list[0]; // gadget.props.element.querySelector('a').href = document_list[0];
......
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