mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 02:35:54 +00:00
search dialog: display active query if searching already
This commit is contained in:
22
js/Feeds.js
22
js/Feeds.js
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user