]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix unneeded submit of create filter form
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 20 May 2006 12:09:33 +0000 (13:09 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 20 May 2006 12:09:33 +0000 (13:09 +0100)
backend.php
functions.js
prefs.js

index 24b7382049064a6165f3b63137f18525f3f5018f..f51e9c1a73d47ffbac678070f7499f5116ef886d 100644 (file)
 
                        print "<div align='center'>
                                <input type=\"submit\" class=\"button\" 
-                               onclick=\"feedEditSave()\" value=\"Save\">
+                               onclick=\"return feedEditSave()\" value=\"Save\">
                                <input type='submit' class='button'                     
-                               onclick=\"feedEditCancel()\" value=\"Cancel\"></div>";
+                               onclick=\"return feedEditCancel()\" value=\"Cancel\"></div>";
                        return;
                }
 
                                        id=\"fadd_submit_btn\" disabled=\"true\"
                                        type=\"submit\" onclick=\"javascript:qafAdd()\" value=\"Subscribe\">
                                <input class=\"button\"
-                                       type=\"submit\" onclick=\"javascript:closeInfoBox()\" 
+                                       type=\"submit\" onclick=\"javascript:feedEditCancel()\" 
                                        value=\"Cancel\"></td></tr></table>";
+
                }
 
                if ($id == "quickDelFeed") {
 
                        print "<input type=\"hidden\" name=\"op\" value=\"pref-filters\">";
                        print "<input type=\"hidden\" name=\"quiet\" value=\"1\">";
-                       print "<input type=\"hidden\" name=\"subop\" value=\"add\">";
+                       print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; 
 
 //                     print "<div class=\"notice\"><b>Note:</b> filter will only apply to new articles.</div>";
                        
                        }
        
                        print "</select>";
-       
-                       print "</td></tr><tr><td colspan=\"2\" align=\"right\">";
-       
+
+                       print "</td></tr></table>";
+
+                       print "</form>";
+
+                       print "<div align='right'>";
+
                        print "<input type=\"submit\" 
                                id=\"infobox_submit\"
-                               class=\"button\" onclick=\"javascript:qaddFilter()\" 
+                               class=\"button\" onclick=\"qaddFilter()\" 
                                disabled=\"true\" value=\"Create\"> ";
 
                        print "<input class=\"button\"
-                               type=\"submit\" onclick=\"javascript:closeInfoBox()\" 
+                               type=\"submit\" onclick=\"closeInfoBox()\" 
                                value=\"Cancel\">";
 
-                       print "</td></tr></table>";
+                       print "</div>";
 
-                       print "</form>";
+//                     print "</td></tr></table>"; 
 
                }
 
index 627eb287a5d449e3138ebfdbc8eadc8dfd173ba4..683d80077641807871850558f4fd0b9c949f64d3 100644 (file)
@@ -969,6 +969,7 @@ function closeInfoBox() {
        }
 
        enableHotkeys();
+
 }
 
 
@@ -1032,6 +1033,7 @@ function qaddFilter() {
        xmlhttp.onreadystatechange=infobox_submit_callback;
        xmlhttp.send(null);
 
+       return true;
 }
 
 function toggleSubmitNotEmpty(e, submit_id) {
index e8c36bc7cc107414b3882458f2799d7bcccb56b5..50809d8703a36cc334e5747bafb6a194e908e7f8 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -661,6 +661,7 @@ function feedEditCancel() {
        selectPrefRows('feed', false); // cleanup feed selection
 
        active_feed = false;
+
 }
 
 function feedCatEditCancel() {
@@ -704,6 +705,8 @@ function feedEditSave() {
                xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                xmlhttp.send(query);
 
+               return false;
+
        } catch (e) {
                exception_error("feedEditSave", e);
        }