summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/Feeds.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index cb3cc3612..459ccc4dd 100644
--- a/js/Feeds.js
+++ b/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() {