1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 23:15:57 +00:00

rework search dialog

This commit is contained in:
Andrew Dolgov
2010-11-21 13:35:16 +03:00
parent 83331f6e1d
commit 973fe3c6fa
3 changed files with 35 additions and 37 deletions

View File

@@ -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;
}