]> git.wh0rd.org Git - tt-rss.git/commitdiff
code cleanup; initial button usage
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 12 Jan 2010 11:44:41 +0000 (14:44 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 12 Jan 2010 11:44:41 +0000 (14:44 +0300)
functions.js
modules/help.php
modules/popup-dialog.php
modules/pref-feeds.php
prefs.php
tt-rss.js
tt-rss.php

index 8335f7e6eefbe13eef77f2625b9274e4c5f58fce..1e167c94f806eff23388e8c29ea66925b0508ef5 100644 (file)
@@ -2068,20 +2068,11 @@ function updateFeedBrowser() {
                                var c = $("browseFeedList");
                                var r = transport.responseXML.getElementsByTagName("content")[0];
                                var nr = transport.responseXML.getElementsByTagName("num-results")[0];
-                               var sb = $("feed_browser_subscribe");
 
                                if (c && r) {
                                        c.innerHTML = r.firstChild.nodeValue;
                                }
        
-                               if (nr && sb) {
-                                       if (nr.getAttribute("value") > 0) {
-                                               sb.disabled = false;
-                                       } else {
-                                               sb.disabled = true;
-                                       }
-                               }
-
                        } });
 
        } catch (e) {
index 64ec087bb4dd536e7eb758f51edf42c1e025a25f..716a756dcabb1e1a214e400428be028f19064977 100644 (file)
@@ -17,9 +17,8 @@
                        print "<p>".__("Help topic not found.")."</p>";
                }
                print "<div align='center'>
-                       <input type='submit' class='button'                     
-                       onclick=\"javascript:window.close()\" 
-                       value=\"".__('Close this window')."\"></div>";
+                       <button onclick=\"javascript:window.close()\">".
+                       __('Close this window')."</button></div>";
 
                if (!$_REQUEST["noheaders"]) { 
                        print "</body></html>";
index 00efdcb74f9b1577fa3397d742c243526bed672f..12c912ea40f93af18db6195671470018c33a9f67 100644 (file)
 
                        print __("URL:") . " ";
 
-                       print "<input size=\"40\" onblur=\"javascript:enableHotkeys()\" 
+                       print "<input size=\"40\"
                                        onkeypress=\"return filterCR(event, subscribeToFeed)\"
-                                       onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
-                                       onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
-                                       onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
+                                       name=\"feed_url\"></td></tr>";
 
                        print "<br/>";
 
 
                        print "</div>";
 
-
-/*                     print "<tr><td colspan='2'><div class='insensitive'>";
-
-                       print __("Some feeds require authentication. If you subscribe to such
-                               feed, you will have to enter your login and password in Feed Editor");
-
-                       print "</div></td></tr>"; */
-
-/*                     print "<div id='fadd_login_prompt'><br/>
-                               <a href='javascript:appearBlockElement(\"fadd_login_container\", 
-                               \"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */
-
                        print "<div id='fadd_login_container' style='display:none'>
        
                                        <div class=\"dlgSec\">".__("Authentication")."</div>
                                        <div class=\"dlgSecCont\">".
 
                                        __('Login:') . " <input name='auth_login' size=\"20\" 
-                                                       onfocus=\"javascript:disableHotkeys()\" 
-                                                       onfocus=\"javascript:disableHotkeys()\" 
                                                        onkeypress=\"return filterCR(event, subscribeToFeed)\"> ".
                                        __('Password:') . "<input type='password'
                                                        name='auth_pass' size=\"20\" 
-                                                       onfocus=\"javascript:disableHotkeys()\" 
-                                                       onfocus=\"javascript:disableHotkeys()\" 
                                                        onkeypress=\"return filterCR(event, subscribeToFeed)\">
                                </div></div>";
 
                        print "</form>";
 
                        print "<div class=\"dlgButtons\">
-                               <input class=\"button\"
-                                       id=\"fadd_submit_btn\" disabled=\"true\"
-                                       type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\">
-                               <input class=\"button\"                                 
-                                       type=\"submit\" onclick=\"return browseFeeds()\" value=\"".__('More feeds')."\">
-
-                               <input class=\"button\"
-                                       type=\"submit\" onclick=\"return closeInfoBox()\" 
-                                       value=\"".__('Cancel')."\"></div>";
+                               <button class=\"button\" id=\"fadd_submit_btn\"
+                                       onclick=\"return subscribeToFeed()\">".__('Subscribe')."</button>
+                               <button onclick=\"return browseFeeds()\">".__('More feeds')."</button>
+                               <button onclick=\"return closeInfoBox()\">".__('Cancel')."</button></div>";
                        
                        return;
                }
index 190d8905528bee176c9f5059f2a33b44962397a8..f02ae6c4c23093c44c6b119047733ee62d720ddd 100644 (file)
                        $owner_uid = $_SESSION["uid"];
 
                        print "<ul class='browseFeedList' id='browseFeedList'>";
-                       $subscribe_btn_disabled = print_feed_browser($link, $search, 25) == 0 ? "disabled" : "";
+                       print_feed_browser($link, $search, 25);
                        print "</ul>";
 
                        print "<div align='center'>
-                               <input type=\"submit\" class=\"button\" id=\"feed_browser_subscribe\"
-                               $subscribe_btn_disabled
-                               onclick=\"feedBrowserSubscribe()\" value=\"".__('Subscribe')."\">
-                               <input type='submit' class='button'                     
-                               onclick=\"closeInfoBox()\" value=\"".__('Cancel')."\"></div>";
+                               <button onclick=\"feedBrowserSubscribe()\">".__('Subscribe')."</button>
+                               <button onclick=\"closeInfoBox()\" >".__('Cancel')."</button></div>";
 
                        print "</div>";
                        return;
index d8118c4c1805a8a70eea5ad70f38b872d75bb310..129e1cf863fe4548bd10544fc4878e90d50f44ef 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 
 <div id="errorBoxShadow" style="display : none">
        <div id="errorBox">
-               <div id="xebTitle">Fatal Exception</div><div id="xebContent">&nbsp;</div>
-               <div id="xebBtn" align='center'><input type="submit" 
-                       onclick="closeErrorBox()" value="Close this window"/></div>
+       <div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent">&nbsp;</div>
+               <div id="xebBtn" align='center'>
+                       <button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
+               </div>
        </div>
 </div>
 
index 04671c04893b1e343e28201401fc8f5a31370e08..72ee01cced98a3b8e37d67f516620626f717bea1 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -919,7 +919,7 @@ function clearFeedArticles(feed_id) {
 
 function collapse_feedlist() {
        try {
-               debug("toggle_feedlist");
+               debug("collapse_feedlist");
                
                var theme = getInitParam("theme");
                if (theme != "" && theme != "compact" && theme != "graycube" &&
@@ -981,7 +981,7 @@ function collapse_feedlist() {
 
                }
        } catch (e) {
-               exception_error("toggle_feedlist", e);
+               exception_error("collapse_feedlist", e);
        }
 }
 
index 88ab1212846b972901dff0d1d282fd962f9df06d..6e40333ca5c07b2a1749ad8461075a839e94693b 100644 (file)
 
 <div id="errorBoxShadow" style="display : none">
        <div id="errorBox">
-               <div id="xebTitle">Fatal Exception</div><div id="xebContent">&nbsp;</div>
-               <div id="xebBtn" align='center'><input type="submit" 
-                       onclick="closeErrorBox()" value="Close this window"/></div>
+       <div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent">&nbsp;</div>
+               <div id="xebBtn" align='center'>
+                       <button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
+               </div>
        </div>
 </div>
 
                        id="collapse_feeds_btn" onclick="collapse_feedlist()" class="button"
                        title="<?php echo __('Collapse feedlist') ?>" style="display : none"/>
 
-               <input type="submit" value="<?php echo __("Toggle Feedlist") ?>" 
-                       id="toggle_feeds_btn" class="button"
-                       onclick="toggle_feedlist()" style="display : none"/>
-
                &nbsp;
 
                <select name="view_mode" title="<?php echo __('Show articles') ?>" 
 
                &nbsp;
 
-               <input class="button" type="submit" name="update"
-                       onclick="return viewCurrentFeed('ForceUpdate')" 
-                       value="<?php echo __('Update') ?>"/>
+               <button onclick="return viewCurrentFeed('ForceUpdate')">
+                       <?php echo __('Update') ?></button>
 
-               <input class="button" type="submit" name="update"
-                       onclick="return catchupCurrentFeed()" 
-                       value="<?php echo __('Mark as read') ?>"/>
+               <button onclick="return catchupCurrentFeed()">
+                       <?php echo __('Mark as read') ?></button>
 
                </form>