summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-21 13:35:16 +0300
committerAndrew Dolgov <[email protected]>2010-11-21 13:35:16 +0300
commit973fe3c6faf777e72cade843c5cc3cf5227f2a0e (patch)
tree611eb95a45b8b831cd1176f56acb702499b0a2e3 /tt-rss.js
parent83331f6e1d2a16852ae800c5d0171d0577ee0d1f (diff)
rework search dialog
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js32
1 files changed, 22 insertions, 10 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 08abbbe3c..4386fe2ee 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -231,8 +231,26 @@ function timeout() {
}
function search() {
- closeInfoBox();
- viewCurrentFeed();
+ var query = "backend.php?op=dlg&id=search&param=" +
+ param_escape(getActiveFeedId() + ":" + activeFeedIsCat());
+
+ if (dijit.byId("searchDlg"))
+ dijit.byId("searchDlg").destroyRecursive();
+
+ dialog = new dijit.Dialog({
+ id: "searchDlg",
+ title: __("Search"),
+ style: "width: 600px",
+ execute: function() {
+ if (this.validate()) {
+ _search_query = dojo.objectToQuery(this.attr('value'));
+ this.hide();
+ viewCurrentFeed();
+ }
+ },
+ href: query});
+
+ dialog.show();
}
function updateTitle() {
@@ -365,10 +383,7 @@ function quickMenuGo(opid) {
}
if (opid == "qmcSearch") {
- displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat(),
- function() {
- document.forms['search_form'].query.focus();
- });
+ search();
return;
}
@@ -704,10 +719,7 @@ function hotkey_handler(e) {
}
if (keycode == 191 || keychar == '/') { // /
- displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat(),
- function() {
- document.forms['search_form'].query.focus();
- });
+ search();
return false;
}