]> git.wh0rd.org Git - tt-rss.git/commitdiff
dialog layout tweaks
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 7 Aug 2008 03:17:24 +0000 (04:17 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 7 Aug 2008 03:17:24 +0000 (04:17 +0100)
functions.js
modules/popup-dialog.php
modules/pref-feeds.php
modules/pref-filters.php

index 17aaa238f24f8bcff62ac345909cc1646e005605..dd7f51ea6342cd8c1af65f51acf95c89915fc05a 100644 (file)
@@ -1506,18 +1506,18 @@ function filterDlgCheckAction(sender) {
                        return;
                }
 
-               var action_param = form.action_param;
+               var action_param = document.getElementById("filter_dlg_param_box");
 
                if (!action_param) {
-                       debug("filterDlgCheckAction: can't find action param!");
+                       debug("filterDlgCheckAction: can't find action param box!");
                        return;
                }
 
                // if selected action supports parameters, enable params field
                if (action == 4 || action == 6) {
-                       action_param.disabled = false;
+                       Element.show(action_param);
                } else {
-                       action_param.disabled = true;
+                       Element.hide(action_param);
                }
 
        } catch (e) {
index 215c51abe4ec15ebbbb96abd3e4202636d38233b..912ab03a67b771c5f3b8b1d6defc022a6329a09c 100644 (file)
        
                        print "</select>";
 
-                       print " " . __("with params") . " ";
+                       print "<span id=\"filter_dlg_param_box\" style=\"display : none\">";
+                       print " " . __("with parameters:") . " ";
+                       print "<input size=\"20\"
+                                       name=\"action_param\">";
+                       print "</span>";
 
-                       print "<input disabled size=\"20\"
-                               name=\"action_param\">";
+                       print "&nbsp;"; // tiny layout hack
 
                        print "</div>";
 
index 53a3185e80af15061bedd08e4829188ed3608a41..be4016038a61a13ee43c17b7ecdacbdb8cf10de2 100644 (file)
                        print "</form>";
 
                        print "<div class='dlgButtons'>
+                               <div style=\"float : left\">
+                                       <input type='submit' class='button'                     
+                                       onclick='return unsubscribeFeed($feed_id, \"$title\")' value=\"".__('Unsubscribe')."\">
+                               </div>
                                <input type=\"submit\" class=\"button\" 
                                onclick=\"return feedEditSave()\" value=\"".__('Save')."\">
                                <input type='submit' class='button'                     
                                onclick=\"return feedEditCancel()\" value=\"".__('Cancel')."\">
-                               <div style=\"float : left\">
-
-                               <input type='submit' class='button'                     
-                                       onclick='return unsubscribeFeed($feed_id, \"$title\")' value=\"".__('Unsubscribe')."\">
-                                                       
                                </div>";
 
-                       print "</div>";
-
                        return;
                }
 
index 3946be5f381b686ca56d14cf9e01bcb7973f955e..05d2fb6afff4bbde2fa66f32e5ea57f3db4d4336 100644 (file)
        
                        print "</select>";
 
-                       print " " . __("with params") . " ";
+                       $param_hidden = ($action_id == 4 || $action_id == 6) ? "" : "display : none";
 
-                       $param_disabled = ($action_id == 4 || $action_id == 6) ? "" : "disabled";
+                       print "<span id=\"filter_dlg_param_box\" style=\"$param_hidden\">";
+                       print " " . __("with parameters:") . " ";
+                       print "<input size=\"20\"
+                                       name=\"action_param\" value=\"$action_param\">";
+                       print "</span>";
 
-                       print "<input $param_disabled size=\"20\"
-                               name=\"action_param\" value=\"$action_param\">";
+                       print "&nbsp;"; // tiny layout hack
 
                        print "</div>";
 
 
                        print "<div class=\"dlgButtons\">";
 
+                       $reg_exp = htmlspecialchars($reg_exp); // second escaping seems to be needed for javascript
+
+                       print "<div style=\"float : left\">";
+                       print "<input type=\"submit\" 
+                               class=\"button\" onclick='return removeFilter($filter_id, \"$reg_exp\")' 
+                               value=\"".__('Remove')."\"> ";
+                       print "</div>";
+
                        print "<input type=\"submit\" 
                                id=\"infobox_submit\"
                                class=\"button\" onclick=\"return filterEditSave()\" 
                                type=\"submit\" onclick=\"return filterEditCancel()\" 
                                value=\"".__('Cancel')."\">";
 
-                       $reg_exp = htmlspecialchars($reg_exp); // second escaping seems to be needed for javascript
-
-                       print "<div style=\"float : left\">";
-                       print "<input type=\"submit\" 
-                               class=\"button\" onclick='return removeFilter($filter_id, \"$reg_exp\")' 
-                               value=\"".__('Remove')."\"> ";
-                       print "</div>";
-
                        print "</div>";
 
                        return;