]> git.wh0rd.org Git - tt-rss.git/commitdiff
rework feed dialog layouts
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 6 Aug 2008 07:51:28 +0000 (08:51 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 6 Aug 2008 07:51:28 +0000 (08:51 +0100)
backend.php
functions.js
modules/popup-dialog.php
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-labels.php
tt-rss.css

index cc5fd46c665b05dbeabb991b8060a39dfab866d2..350511f28e3f114e91d42828f2c7cea33b84751e 100644 (file)
                90 => __("3 months old"));
 
        $update_intervals = array(
-               0   => __("Use default"),
+               0   => __("Default interval"),
                -1  => __("Disable updates"),
                15  => __("Each 15 minutes"),
                30  => __("Each 30 minutes"),
                10080 => __("Weekly"));
 
        $update_methods = array(
-               0   => __("Use default"),
+               0   => __("Default"),
                1   => __("Magpie"),
                2   => __("SimplePie"));
 
index ffc0168bcde1901694b379f1d978044f2bf2038e..17aaa238f24f8bcff62ac345909cc1646e005605 100644 (file)
@@ -1171,9 +1171,9 @@ function appearBlockElement_afh(effect) {
 
 function checkboxToggleElement(elem, id) {
        if (elem.checked) {
-               Effect.SlideDown(id, {duration : 0.5});
+               Effect.Appear(id, {duration : 0.5});
        } else {
-               Effect.SlideUp(id, {duration : 0.5});
+               Effect.Fade(id, {duration : 0.5});
        }
 }
 
index baead1c37aa479dc5618aba49b624d952dfbc70c..bdfc62b9f3dca47f4f4231f6a3697214f422bb1a 100644 (file)
 
                if ($id == "quickAddFeed") {
 
-                       print "<div id=\"infoBoxTitle\">".__('Subscribe to feed')."</div>";
+                       print "<div id=\"infoBoxTitle\">".__('Subscribe to Feed')."</div>";
                        print "<div class=\"infoBoxContents\">";
 
                        print "<form id='feed_add_form' onsubmit='return false'>";
 
                        print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
-                       /* print "<input type=\"hidden\" name=\"quiet\" value=\"1\">"; */
                        print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; 
                        print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">"; 
 
-                       print "<table width='100%'>
-                       <tr><td width='20%'>".__('Feed URL:')."</td><td>
-                               <input class=\"iedit\" onblur=\"javascript:enableHotkeys()\" 
+                       print "<div class=\"dlgSec\">".__("Feed")."</div>";
+                       print "<div class=\"dlgSecCont\">";
+
+                       print __("URL:") . " ";
+
+                       print "<input size=\"40\" onblur=\"javascript:enableHotkeys()\" 
                                        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>";
-               
+
+                       print "<br/>";
+
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                               print "<tr><td>".__('Category:')."</td><td>";
+                               print __('Place in category:') . " ";
                                print_feed_cat_select($link, "cat_id");                 
-                               print "</td></tr>";
                        }
 
+                       print "</div>";
+
+
 /*                     print "<tr><td colspan='2'><div class='insensitive'>";
 
                        print __("Some feeds require authentication. If you subscribe to such
 
                        print "</div></td></tr>"; */
 
-                       print "</table>";
-
 /*                     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'>
-                               <table width='100%'>
-                                       <tr><td width='20%'>".__('Login:')."</td><td><input name='auth_login' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr>
-                                       <tr><td>".__('Password:')."</td><td><input type='password'
-                                               name='auth_pass' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr>
-                               </table>
-                               </div>";
+       
+                                       <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 "<div style=\"clear : both\">                             
+                               <input type=\"checkbox\" id=\"fadd_login_check\" 
+                                               onclick='checkboxToggleElement(this, \"fadd_login_container\")'>
+                                       <label for=\"fadd_login_check\">".
+                                       __('This feed requires authentication.')."</div>";
 
                        print "</form>";
 
-                       print "<div style='float : right'>
+                       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 closeInfoBox()\" 
-                                       value=\"".__('Cancel')."\"></div>
-                                       
-                               <div>
-                                       <input type=\"checkbox\" id=\"fadd_login_check\" 
-                                               onclick='checkboxToggleElement(this, \"fadd_login_container\")'>
-                                       <label for=\"fadd_login_check\">".
-                                       __('This feed requires authentication.')."</div>";
-
+                                       value=\"".__('Cancel')."\"></div>";
+                       
                        return;
                }
 
                }
 
                if ($id == "quickAddLabel") {
-                       print "<div id=\"infoBoxTitle\">".__('Create label')."</div>";
+                       print "<div id=\"infoBoxTitle\">".__('Create Label')."</div>";
                        print "<div class=\"infoBoxContents\">";
 
                        print "<form id=\"label_edit_form\" onsubmit='return false'>";
 
                        $active_feed_id = db_escape_string($_GET["param"]);
 
-                       print "<div id=\"infoBoxTitle\">".__('Create filter')."</div>";
+                       print "<div id=\"infoBoxTitle\">".__('Create Filter')."</div>";
                        print "<div class=\"infoBoxContents\">";
 
                        print "<form id=\"filter_add_form\" onsubmit='return false'>";
 
                        print "</div>";
 
-                       print "<div class=\"dlgSec\">".__("Perform action")."</div>";
+                       print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
 
                        print "<div class=\"dlgSecCont\">";
 
                        print "<div class=\"dlgSec\">".__("Options")."</div>";
                        print "<div class=\"dlgSecCont\">";
 
+                       print "<div style=\"line-height : 100%\">";
+
                        print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\">
                                        <label for=\"enabled\">".__('Enabled')."</label><br/>";
 
                                <label for=\"inverse\">".__('Inverse match')."</label>";
 
                        print "</div>";
+                       print "</div>";
 
                        print "</form>";
 
index 8041b8cc1a84b4c9539aef356a5923edcebef3ce..bb3670c25ae63a2e35f28c5e100b93a07a73ecb6 100644 (file)
                                $feed_icon = "";
                        }
 
-                       print "<div id=\"infoBoxTitle\">".__('Feed editor')."</div>";
+                       print "<div id=\"infoBoxTitle\">".__('Feed Editor')."</div>";
 
                        print "<div class=\"infoBoxContents\">";
 
                        print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
                        print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
 
-                       print "<table width='100%'>";
+                       print "<div class=\"dlgSec\">".__("Feed")."</div>";
+                       print "<div class=\"dlgSecCont\">";
 
-                       print "<tr><td>".__('Title:')."</td>";
-                       print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
-                               name=\"title\" value=\"$title\"></td></tr>";
+                       /* Title */
+
+                       print "<input style=\"font-size : 16px\" size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
+                                           name=\"title\" value=\"$title\">";
+
+                       /* Feed URL */
 
                        $feed_url = db_fetch_result($result, 0, "feed_url");
                        $feed_url = htmlspecialchars(db_fetch_result($result,
                                0, "feed_url"));
-                               
-                       print "<tr><td>".__('Feed URL:')."</td>";
-                       print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
-                               name=\"feed_url\" value=\"$feed_url\"></td></tr>";
+
+                       print "<br/>";
+
+                       print __('URL:') . " ";
+                       print "<input size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
+                               name=\"feed_url\" value=\"$feed_url\">";
+
+                       /* Category */
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
 
                                $cat_id = db_fetch_result($result, 0, "cat_id");
 
-                               print "<tr><td>".__('Category:')."</td>";
-                               print "<td>";
+                               print "<br/>";
+
+                               print __('Place in category:') . " ";
 
                                $parent_feed = db_fetch_result($result, 0, "parent_feed");
 
                                        $disabled = "";
                                }
 
-                               print_feed_cat_select($link, "cat_id", $cat_id, "class=\"iedit\" $disabled");
-
-                               print "</td>";
-                               print "</td></tr>";
-       
+                               print_feed_cat_select($link, "cat_id", $cat_id, $disabled);
                        }
 
-                       $update_interval = db_fetch_result($result, 0, "update_interval");
-
-                       print "<tr><td>".__('Update Interval:')."</td>";
+                       /* Link to */
 
-                       print "<td>";
+                       print "<br/>";
 
-                       print_select_hash("update_interval", $update_interval, $update_intervals,
-                               "class=\"iedit\"");
-
-                       print "</td>";
-
-                       print "<tr><td>".__('Link to:')."</td><td>";
+                       print __('Link to feed:') . " ";
 
                        $tmp_result = db_query($link, "SELECT COUNT(id) AS count
                                FROM ttrss_feeds WHERE parent_feed = '$feed_id'");
                                $disabled = "";
                        }
 
-                       print "<select class=\"iedit\" $disabled name=\"parent_feed\">";
+                       print "<select $disabled name=\"parent_feed\">";
                        
                        print "<option value=\"0\">".__('Not linked')."</option>";
 
                                }
 
                        print "</select>";
-                       print "</td></tr>";
 
-                       $purge_interval = db_fetch_result($result, 0, "purge_interval");
 
-                       print "<tr><td>".__('Article purging:')."</td>";
+                       print "</div>";
 
-                       print "<td>";
+                       print "<div class=\"dlgSec\">".__("Updating")."</div>";
+                       print "<div class=\"dlgSecCont\">";
 
-                       print_select_hash("purge_interval", $purge_interval, $purge_intervals, 
-                               "class=\"iedit\"");
-                       
-                       print "</td>";
+                       /* Update Interval */
 
-                       if (ALLOW_SELECT_UPDATE_METHOD) {
+                       $update_interval = db_fetch_result($result, 0, "update_interval");
+
+                       print_select_hash("update_interval", $update_interval, $update_intervals);
+
+                       /* Update method */
 
+                       if (ALLOW_SELECT_UPDATE_METHOD) {
                                $update_method = db_fetch_result($result, 0, "update_method");
-       
-                               print "<tr><td>".__('Update using:')."</td>";
-       
-                               print "<td>";
-       
-                               print_select_hash("update_method", $update_method, $update_methods, 
-                                       "class=\"iedit\"");
-                               
-                               print "</td>";
+
+                               print " " . __('using') . " ";
+                               print_select_hash("update_method", $update_method, $update_methods);                    
                        }
 
+                       /* Purge intl */
+
+                       print "<br/>";
+
+                       $purge_interval = db_fetch_result($result, 0, "purge_interval");
+
+                       print __('Article purging:') . " ";
+
+                       print_select_hash("purge_interval", $purge_interval, $purge_intervals);
+
+                       print "</div>";
+                       print "<div class=\"dlgSec\">".__("Authentication")."</div>";
+                       print "<div class=\"dlgSecCont\">";
+
                        $auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
 
-                       print "<tr><td>".__('Login:')."</td>";
-                       print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
-                               name=\"auth_login\" value=\"$auth_login\"></td></tr>";
+                       print __('Login:') . " ";
+                       print "<input size=\"20\" onkeypress=\"return filterCR(event, feedEditSave)\"
+                               name=\"auth_login\" value=\"$auth_login\">";
+
+                       print " " . __("Password:") . " ";
 
                        $auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
 
-                       print "<tr><td>".__('Password:')."</td>";
-                       print "<td><input class=\"iedit\" type=\"password\" name=\"auth_pass\" 
+                       print "<input size=\"20\" type=\"password\" name=\"auth_pass\" 
                                onkeypress=\"return filterCR(event, feedEditSave)\"
-                               value=\"$auth_pass\"></td></tr>";
+                               value=\"$auth_pass\">";
 
-                       $private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
+                       print "</div>";
+                       print "<div class=\"dlgSec\">".__("Options")."</div>";
+                       print "<div class=\"dlgSecCont\">";
 
-                       if ($private) {
-                               $checked = "checked";
-                       } else {
-                               $checked = "";
-                       }
+                       print "<div style=\"line-height : 100%\">";
 
-                       print "<tr><td valign='top'>".__('Options:')."</td>";
-                       print "<td><input type=\"checkbox\" name=\"private\" id=\"private\" 
-                               $checked><label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
+                       print "<input type=\"checkbox\" name=\"private\" id=\"private\" 
+                               $checked>&nbsp;<label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
 
                        $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
 
                                $checked = "";
                        }
 
-                       print "<br><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
-                               $checked><label for=\"rtl_content\">".__('Right-to-left content')."</label>";
+                       print "<br/><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
+                               $checked>&nbsp;<label for=\"rtl_content\">".__('Right-to-left content')."</label>";
 
                        $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden"));
 
                                $checked = "";
                        }
 
-                       print "<br><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
-                               $checked><label for=\"hidden\">".__('Hide from my feed list')."</label>";
+                       print "<br/><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
+                               $checked>&nbsp;<label for=\"hidden\">".__('Hide from my feed list')."</label>";
 
                        $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
 
                                $checked = "";
                        }
 
-                       print "<br><input type=\"checkbox\" id=\"include_in_digest\" 
+                       print "<br/><input type=\"checkbox\" id=\"include_in_digest\" 
                                name=\"include_in_digest\"
-                               $checked><label for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
+                               $checked>&nbsp;<label for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
 
                        $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
 
                                $label_class = "class='insensitive'";
                        }
 
-                       print "<br><input type=\"checkbox\" id=\"cache_images\" 
+                       print "<br/><input type=\"checkbox\" id=\"cache_images\" 
                                name=\"cache_images\" $disabled
-                               $checked><label $label_class for=\"cache_images\">".
+                               $checked>&nbsp;<label $label_class for=\"cache_images\">".
                                __('Cache images locally')."</label>";
 
-                       print "</td></tr>";
 
-                       print "</table>";
+                       print "</div>";
+                       print "</div>";
 
                        print "</form>";
 
-                       print "<div align='right'>
+                       print "<div class='dlgButtons'>
                                <input type=\"submit\" class=\"button\" 
                                onclick=\"return feedEditSave()\" value=\"".__('Save')."\">
                                <input type='submit' class='button'                     
index 49fed08b5a65fa7e1965c7ca449ca2728081e526..927cddcd7c143349c76682164e21dce497bf764b 100644 (file)
@@ -19,7 +19,7 @@
                        $enabled = sql_bool_to_bool(db_fetch_result($result, 0, "enabled"));
                        $inverse = sql_bool_to_bool(db_fetch_result($result, 0, "inverse"));
 
-                       print "<div id=\"infoBoxTitle\">".__('Filter editor')."</div>";
+                       print "<div id=\"infoBoxTitle\">".__('Filter Editor')."</div>";
                        print "<div class=\"infoBoxContents\">";
 
                        print "<form id=\"filter_edit_form\" onsubmit='return false'>";
 
                        print "</div>";
 
-                       print "<div class=\"dlgSec\">".__("Perform action")."</div>";
+                       print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
 
                        print "<div class=\"dlgSecCont\">";
 
                        print "<div class=\"dlgSec\">".__("Options")."</div>";
                        print "<div class=\"dlgSecCont\">";
 
+                       print "<div style=\"line-height : 100%\">";
+
                        if ($enabled) {
                                $checked = "checked";
                        } else {
                                <label for=\"inverse\">".__('Inverse match')."</label>";
 
                        print "</div>";
+                       print "</div>";
 
                        print "<div class=\"dlgButtons\">";
 
index 9eeb54174ff2820193436d39ff2a4695bd6d63fb..9daff269ad0ee7778b94b5533a74d55086a1ec1b 100644 (file)
@@ -24,7 +24,7 @@
                        $sql_exp = htmlspecialchars($line["sql_exp"]);
                        $description = htmlspecialchars($line["description"]);
 
-                       print "<div id=\"infoBoxTitle\">Label editor</div>";
+                       print "<div id=\"infoBoxTitle\">Label Editor</div>";
                        print "<div class=\"infoBoxContents\">";
 
                        print "<form id=\"label_edit_form\" onsubmit='return false'>";
index 322d3b6788cc44e8a6d46a77db277b0afa4bf767..bda7bdeb0395b3fa4a5354550fe818ebf9ca7b45 100644 (file)
@@ -538,8 +538,10 @@ div.helpResponse {
        border-style : solid;
        border-color : #99d67a;
        background-color : #99d67a;
-       padding : 2px;
+       padding : 4px 2px 4px 10px;
        color : white;
+       font-weight : bold;
+       font-size : 12px;
 }
 
 /* shadow stuff from http://www.sixapart.com/pronet/articles/ydsf_-_robust_c.html */
@@ -587,11 +589,12 @@ html>body #infoBox {
        background-image : url("images/shadow.png");
        background-position : bottom right;
        left : 25%;
-       top : 30%;
+       top : 100px;
        width : 50%;
        z-index : 3;
        position : absolute;
        display : none;
+       min-width : 600px;
 } 
 
 div.infoBoxContents {
@@ -2018,6 +2021,7 @@ div.dlgSecCont {
        float : left;
        font-size : 12px;
        font-weight : medium;
+       line-height : 200%;
 }
 
 div.dlgButtons {