From: Andrew Dolgov Date: Sat, 17 May 2008 16:25:41 +0000 (+0100) Subject: fix create filter dialog when called from main UI, fix exception_error() parameter... X-Git-Tag: 1.2.23-final~79 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=438f2ce922470a1421362ae2718480713de21011;p=tt-rss.git fix create filter dialog when called from main UI, fix exception_error() parameter position errors --- diff --git a/feedlist.js b/feedlist.js index a7017f9c..56660aa3 100644 --- a/feedlist.js +++ b/feedlist.js @@ -29,7 +29,7 @@ function viewNextFeedPage() { undefined, _feed_cur_page+1); } catch (e) { - exception_error(e, "viewFeedGoPage"); + exception_error("viewFeedGoPage", e); } } diff --git a/functions.js b/functions.js index 0a31e796..22d1ebb9 100644 --- a/functions.js +++ b/functions.js @@ -1193,7 +1193,7 @@ function infobox_submit_callback2(transport) { try { // called from prefs, reload tab - if (active_tab) { + if (typeof active_tab != 'undefined' && active_tab) { selectTab(active_tab, false); } } catch (e) { } @@ -1249,25 +1249,33 @@ function infobox_callback2(transport) { function createFilter() { - var form = document.forms['filter_add_form']; - var reg_exp = form.reg_exp.value; - - if (reg_exp == "") { - alert(__("Can't add filter: nothing to match on.")); - return false; - } - - var query = Form.serialize("filter_add_form"); - - // we can be called from some other tab in Prefs - if (active_tab) active_tab = "filterConfig"; + try { - new Ajax.Request("backend.php?" + query, { - onComplete: function (transport) { - infobox_submit_callback2(transport); - } }); + var form = document.forms['filter_add_form']; + var reg_exp = form.reg_exp.value; + + if (reg_exp == "") { + alert(__("Can't add filter: nothing to match on.")); + return false; + } - return true; + var query = Form.serialize("filter_add_form"); + + // we can be called from some other tab in Prefs + if (typeof active_tab != 'undefined' && active_tab) { + active_tab = "filterConfig"; + } + + new Ajax.Request("backend.php?" + query, { + onComplete: function (transport) { + infobox_submit_callback2(transport); + } }); + + return true; + + } catch (e) { + exception_error("createFilter", e); + } } function toggleSubmitNotEmpty(e, submit_id) { @@ -1459,7 +1467,7 @@ function filterDlgCheckAction(sender) { } } catch (e) { - exception_error(e, "filterDlgCheckAction"); + exception_error("filterDlgCheckAction", e); } } @@ -1636,7 +1644,7 @@ function focus_element(id) { var e = document.getElementById(id); if (e) e.focus(); } catch (e) { - exception_error(e, "focus_element"); + exception_error("focus_element", e); } return false; } diff --git a/tt-rss.js b/tt-rss.js index 6ed29b5a..bcb8a99c 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -785,7 +785,7 @@ function toggle_feedlist() { // queue: { position: 'end', scope: 'FLFADEQ', limit: 1 }}); } } catch (e) { - exception_error(e, "toggle_feedlist"); + exception_error("toggle_feedlist", e); } } */ @@ -848,7 +848,7 @@ function collapse_feedlist() { setCookie("ttrss_vf_fclps", "1"); } } catch (e) { - exception_error(e, "toggle_feedlist"); + exception_error("toggle_feedlist", e); } } @@ -877,7 +877,7 @@ function adjustArticleScore(id, score) { } } catch (e) { - exception_error(e, "adjustArticleScore"); + exception_error("adjustArticleScore", e); } } diff --git a/viewfeed.js b/viewfeed.js index 3bb121e2..a01c8a4a 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -788,7 +788,7 @@ function moveToPost(mode) { } */ } catch (e) { - exception_error(e, "moveToPost"); + exception_error("moveToPost", e); } } @@ -820,7 +820,7 @@ function toggleSelected(id) { row.className = nc; } } catch (e) { - exception_error(e, "toggleSelected"); + exception_error("toggleSelected", e); } } @@ -831,7 +831,7 @@ function toggleUnread_afh(effect) { elem.style.backgroundColor = ""; } catch (e) { - exception_error(e, "toggleUnread_afh"); + exception_error("toggleUnread_afh", e); } } @@ -1315,7 +1315,7 @@ function editTagsInsert() { found_tags.selectedIndex = 0; } catch (e) { - exception_error(e, "editTagsInsert"); + exception_error("editTagsInsert", e); } } @@ -1349,7 +1349,7 @@ function cdmArticleIsBelowViewport(id) { } } catch (e) { - exception_error(e, "cdmArticleIsVisible"); + exception_error("cdmArticleIsVisible", e); } } @@ -1369,7 +1369,7 @@ function cdmArticleIsAboveViewport(id) { } } catch (e) { - exception_error(e, "cdmArticleIsVisible"); + exception_error("cdmArticleIsVisible", e); } } @@ -1383,7 +1383,7 @@ function cdmScrollToArticleId(id) { ctr.scrollTop = e.offsetTop; } catch (e) { - exception_error(e, "cdmScrollToArticleId"); + exception_error("cdmScrollToArticleId", e); } } @@ -1413,7 +1413,7 @@ function cdmArticleIsActuallyVisible(id) { return false; } catch (e) { - exception_error(e, "cdmArticleIsVisible"); + exception_error("cdmArticleIsVisible", e); } } @@ -1491,7 +1491,7 @@ function cdmWatchdog() { _cdm_wd_timeout = window.setTimeout("cdmWatchdog()", 4000); } catch (e) { - exception_error(e, "cdmWatchdog"); + exception_error("cdmWatchdog", e); } }