1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:06:02 +00:00

search dialog: display active query if searching already

This commit is contained in:
Andrew Dolgov
2019-05-20 07:59:53 +03:00
parent 09f520eda2
commit 905f038610
2 changed files with 24 additions and 2 deletions

View File

@@ -552,6 +552,11 @@ define(["dojo/_base/declare"], function (declare) {
execute: function () {
if (this.validate()) {
Feeds._search_query = this.attr('value');
// disallow empty queries
if (!Feeds._search_query.query)
Feeds._search_query = false;
this.hide();
Feeds.reloadCurrent();
}
@@ -559,6 +564,23 @@ define(["dojo/_base/declare"], function (declare) {
href: query
});
const tmph = dojo.connect(dialog, 'onLoad', function () {
dojo.disconnect(tmph);
console.log('S_onload');
if (Feeds._search_query) {
if (Feeds._search_query.query)
dijit.byId('search_query')
.attr('value', Feeds._search_query.query);
if (Feeds._search_query.search_language)
dijit.byId('search_language')
.attr('value', Feeds._search_query.search_language);
}
});
dialog.show();
},
updateRandom: function() {