print "<table width='100%'><tr><td>Search:</td><td>";
print "<input name=\"query\" class=\"iedit\"
- onkeypress=\"return filterCR(event)\"
+ onkeypress=\"return filterCR(event, search)\"
onkeyup=\"toggleSubmitNotEmpty(this, 'search_submit_btn')\"
value=\"\">
</td></tr>";
print "<table width='100%'>";
print "<tr><td>Match:</td>
- <td><input onkeypress=\"return filterCR(event)\"
+ <td><input onkeypress=\"return filterCR(event, qaddFilter)\"
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
name=\"reg_exp\" class=\"iedit\">";
print "</td><td>";
if (xmlhttp.readyState == 4) {
closeInfoBox();
- // called from prefs, reload tab
- if (active_tab) {
- selectTab(active_tab, false);
- }
+ try {
+ // called from prefs, reload tab
+ if (active_tab) {
+ selectTab(active_tab, false);
+ }
+ } catch (e) { }
notify(xmlhttp.responseText);
return false;
}
-function filterCR(e)
+function filterCR(e, f)
{
var key;
else
key = e.which; //firefox
- if(key == 13)
- return false;
- else
- return true;
+ if (key == 13) {
+ if (typeof f != 'undefined') {
+ f();
+ return false;
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
}
function getMainContext() {
var user = chooser[chooser.selectedIndex].value;
window.location = "tt-rss.php?swu=" + user;
}
+
+
<?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
<input name="query"
- onKeyPress="return filterCR(event)"
+ onKeyPress="return filterCR(event, viewCurrentFeed)"
onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
<input class="button" type="submit"
onclick="return viewCurrentFeed(0)" value="Search">