]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix create filter dialog when called from main UI, fix exception_error() parameter...
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 17 May 2008 16:25:41 +0000 (17:25 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 17 May 2008 16:25:41 +0000 (17:25 +0100)
feedlist.js
functions.js
tt-rss.js
viewfeed.js

index a7017f9cad479be81455e50889372135d7faf3d8..56660aa33ccbe7b07d49c63b4b317f1042f1aaf3 100644 (file)
@@ -29,7 +29,7 @@ function viewNextFeedPage() {
                        undefined, _feed_cur_page+1);
 
        } catch (e) {
-               exception_error(e, "viewFeedGoPage");
+               exception_error("viewFeedGoPage", e);
        }
 }
 
index 0a31e796996a94054adcbba0c9eb67928474e320..22d1ebb9ad2826fe4983fa39783c94b35d847e20 100644 (file)
@@ -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;
 }
index 6ed29b5a115b0fc572a3fe8fffd182bcc55660c2..bcb8a99c29a116255251c34307046b5d7917cf23 100644 (file)
--- 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);
        }
 }      
 
index 3bb121e25d553a18b8b7d5a3076563bfc330d25a..a01c8a4a86f28e7fba96ac3a0f342124312b1f2d 100644 (file)
@@ -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);
        }
 
 }