rework feed dialog layouts

This commit is contained in:
Andrew Dolgov 2008-08-06 08:51:28 +01:00
parent 10fa661549
commit ecace165c1
7 changed files with 139 additions and 111 deletions

View file

@ -114,7 +114,7 @@
90 => __("3 months old")); 90 => __("3 months old"));
$update_intervals = array( $update_intervals = array(
0 => __("Use default"), 0 => __("Default interval"),
-1 => __("Disable updates"), -1 => __("Disable updates"),
15 => __("Each 15 minutes"), 15 => __("Each 15 minutes"),
30 => __("Each 30 minutes"), 30 => __("Each 30 minutes"),
@ -125,7 +125,7 @@
10080 => __("Weekly")); 10080 => __("Weekly"));
$update_methods = array( $update_methods = array(
0 => __("Use default"), 0 => __("Default"),
1 => __("Magpie"), 1 => __("Magpie"),
2 => __("SimplePie")); 2 => __("SimplePie"));

View file

@ -1171,9 +1171,9 @@ function appearBlockElement_afh(effect) {
function checkboxToggleElement(elem, id) { function checkboxToggleElement(elem, id) {
if (elem.checked) { if (elem.checked) {
Effect.SlideDown(id, {duration : 0.5}); Effect.Appear(id, {duration : 0.5});
} else { } else {
Effect.SlideUp(id, {duration : 0.5}); Effect.Fade(id, {duration : 0.5});
} }
} }

View file

@ -58,30 +58,36 @@
if ($id == "quickAddFeed") { if ($id == "quickAddFeed") {
print "<div id=\"infoBoxTitle\">".__('Subscribe to feed')."</div>"; print "<div id=\"infoBoxTitle\">".__('Subscribe to Feed')."</div>";
print "<div class=\"infoBoxContents\">"; print "<div class=\"infoBoxContents\">";
print "<form id='feed_add_form' onsubmit='return false'>"; print "<form id='feed_add_form' onsubmit='return false'>";
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">"; 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=\"subop\" value=\"add\">";
print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">"; print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
print "<table width='100%'> print "<div class=\"dlgSec\">".__("Feed")."</div>";
<tr><td width='20%'>".__('Feed URL:')."</td><td> print "<div class=\"dlgSecCont\">";
<input class=\"iedit\" onblur=\"javascript:enableHotkeys()\"
print __("URL:") . " ";
print "<input size=\"40\" onblur=\"javascript:enableHotkeys()\"
onkeypress=\"return filterCR(event, subscribeToFeed)\" onkeypress=\"return filterCR(event, subscribeToFeed)\"
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>"; onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
print "<br/>";
if (get_pref($link, 'ENABLE_FEED_CATS')) { 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_feed_cat_select($link, "cat_id");
print "</td></tr>";
} }
print "</div>";
/* print "<tr><td colspan='2'><div class='insensitive'>"; /* print "<tr><td colspan='2'><div class='insensitive'>";
print __("Some feeds require authentication. If you subscribe to such print __("Some feeds require authentication. If you subscribe to such
@ -89,35 +95,42 @@
print "</div></td></tr>"; */ print "</div></td></tr>"; */
print "</table>";
/* print "<div id='fadd_login_prompt'><br/> /* print "<div id='fadd_login_prompt'><br/>
<a href='javascript:appearBlockElement(\"fadd_login_container\", <a href='javascript:appearBlockElement(\"fadd_login_container\",
\"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */ \"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */
print "<div id='fadd_login_container' style='display:none'> 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> <div class=\"dlgSec\">".__("Authentication")."</div>
<tr><td>".__('Password:')."</td><td><input type='password' <div class=\"dlgSecCont\">".
name='auth_pass' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr>
</table> __('Login:') . " <input name='auth_login' size=\"20\"
</div>"; 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 "</form>";
print "<div style='float : right'> print "<div class=\"dlgButtons\">
<input class=\"button\" <input class=\"button\"
id=\"fadd_submit_btn\" disabled=\"true\" id=\"fadd_submit_btn\" disabled=\"true\"
type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\"> type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\">
<input class=\"button\" <input class=\"button\"
type=\"submit\" onclick=\"return closeInfoBox()\" type=\"submit\" onclick=\"return closeInfoBox()\"
value=\"".__('Cancel')."\"></div> 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>";
return; return;
} }
@ -205,7 +218,7 @@
} }
if ($id == "quickAddLabel") { if ($id == "quickAddLabel") {
print "<div id=\"infoBoxTitle\">".__('Create label')."</div>"; print "<div id=\"infoBoxTitle\">".__('Create Label')."</div>";
print "<div class=\"infoBoxContents\">"; print "<div class=\"infoBoxContents\">";
print "<form id=\"label_edit_form\" onsubmit='return false'>"; print "<form id=\"label_edit_form\" onsubmit='return false'>";
@ -264,7 +277,7 @@
$active_feed_id = db_escape_string($_GET["param"]); $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 "<div class=\"infoBoxContents\">";
print "<form id=\"filter_add_form\" onsubmit='return false'>"; print "<form id=\"filter_add_form\" onsubmit='return false'>";
@ -352,7 +365,7 @@
print "</div>"; print "</div>";
print "<div class=\"dlgSec\">".__("Perform action")."</div>"; print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
print "<div class=\"dlgSecCont\">"; print "<div class=\"dlgSecCont\">";
@ -378,6 +391,8 @@
print "<div class=\"dlgSec\">".__("Options")."</div>"; print "<div class=\"dlgSec\">".__("Options")."</div>";
print "<div class=\"dlgSecCont\">"; print "<div class=\"dlgSecCont\">";
print "<div style=\"line-height : 100%\">";
print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\"> print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\">
<label for=\"enabled\">".__('Enabled')."</label><br/>"; <label for=\"enabled\">".__('Enabled')."</label><br/>";
@ -385,6 +400,7 @@
<label for=\"inverse\">".__('Inverse match')."</label>"; <label for=\"inverse\">".__('Inverse match')."</label>";
print "</div>"; print "</div>";
print "</div>";
print "</form>"; print "</form>";

View file

@ -138,7 +138,7 @@
$feed_icon = ""; $feed_icon = "";
} }
print "<div id=\"infoBoxTitle\">".__('Feed editor')."</div>"; print "<div id=\"infoBoxTitle\">".__('Feed Editor')."</div>";
print "<div class=\"infoBoxContents\">"; print "<div class=\"infoBoxContents\">";
@ -148,26 +148,35 @@
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">"; print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">"; 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>"; /* Title */
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
name=\"title\" value=\"$title\"></td></tr>"; 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 = db_fetch_result($result, 0, "feed_url");
$feed_url = htmlspecialchars(db_fetch_result($result, $feed_url = htmlspecialchars(db_fetch_result($result,
0, "feed_url")); 0, "feed_url"));
print "<tr><td>".__('Feed URL:')."</td>"; print "<br/>";
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
name=\"feed_url\" value=\"$feed_url\"></td></tr>"; 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')) { if (get_pref($link, 'ENABLE_FEED_CATS')) {
$cat_id = db_fetch_result($result, 0, "cat_id"); $cat_id = db_fetch_result($result, 0, "cat_id");
print "<tr><td>".__('Category:')."</td>"; print "<br/>";
print "<td>";
print __('Place in category:') . " ";
$parent_feed = db_fetch_result($result, 0, "parent_feed"); $parent_feed = db_fetch_result($result, 0, "parent_feed");
@ -177,25 +186,14 @@
$disabled = ""; $disabled = "";
} }
print_feed_cat_select($link, "cat_id", $cat_id, "class=\"iedit\" $disabled"); print_feed_cat_select($link, "cat_id", $cat_id, $disabled);
print "</td>";
print "</td></tr>";
} }
$update_interval = db_fetch_result($result, 0, "update_interval"); /* Link to */
print "<tr><td>".__('Update Interval:')."</td>"; print "<br/>";
print "<td>"; print __('Link to feed:') . " ";
print_select_hash("update_interval", $update_interval, $update_intervals,
"class=\"iedit\"");
print "</td>";
print "<tr><td>".__('Link to:')."</td><td>";
$tmp_result = db_query($link, "SELECT COUNT(id) AS count $tmp_result = db_query($link, "SELECT COUNT(id) AS count
FROM ttrss_feeds WHERE parent_feed = '$feed_id'"); FROM ttrss_feeds WHERE parent_feed = '$feed_id'");
@ -210,7 +208,7 @@
$disabled = ""; $disabled = "";
} }
print "<select class=\"iedit\" $disabled name=\"parent_feed\">"; print "<select $disabled name=\"parent_feed\">";
print "<option value=\"0\">".__('Not linked')."</option>"; print "<option value=\"0\">".__('Not linked')."</option>";
@ -242,57 +240,64 @@
} }
print "</select>"; print "</select>";
print "</td></tr>";
print "</div>";
print "<div class=\"dlgSec\">".__("Updating")."</div>";
print "<div class=\"dlgSecCont\">";
/* Update Interval */
$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 " " . __('using') . " ";
print_select_hash("update_method", $update_method, $update_methods);
}
/* Purge intl */
print "<br/>";
$purge_interval = db_fetch_result($result, 0, "purge_interval"); $purge_interval = db_fetch_result($result, 0, "purge_interval");
print "<tr><td>".__('Article purging:')."</td>"; print __('Article purging:') . " ";
print "<td>"; print_select_hash("purge_interval", $purge_interval, $purge_intervals);
print_select_hash("purge_interval", $purge_interval, $purge_intervals, print "</div>";
"class=\"iedit\""); print "<div class=\"dlgSec\">".__("Authentication")."</div>";
print "<div class=\"dlgSecCont\">";
print "</td>";
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>";
}
$auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login")); $auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
print "<tr><td>".__('Login:')."</td>"; print __('Login:') . " ";
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\" print "<input size=\"20\" onkeypress=\"return filterCR(event, feedEditSave)\"
name=\"auth_login\" value=\"$auth_login\"></td></tr>"; name=\"auth_login\" value=\"$auth_login\">";
print " " . __("Password:") . " ";
$auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass")); $auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
print "<tr><td>".__('Password:')."</td>"; print "<input size=\"20\" type=\"password\" name=\"auth_pass\"
print "<td><input class=\"iedit\" type=\"password\" name=\"auth_pass\"
onkeypress=\"return filterCR(event, feedEditSave)\" 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) { print "<div style=\"line-height : 100%\">";
$checked = "checked";
} else {
$checked = "";
}
print "<tr><td valign='top'>".__('Options:')."</td>"; print "<input type=\"checkbox\" name=\"private\" id=\"private\"
print "<td><input type=\"checkbox\" name=\"private\" id=\"private\" $checked>&nbsp;<label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
$checked><label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
$rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content")); $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
@ -302,8 +307,8 @@
$checked = ""; $checked = "";
} }
print "<br><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\" print "<br/><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
$checked><label for=\"rtl_content\">".__('Right-to-left content')."</label>"; $checked>&nbsp;<label for=\"rtl_content\">".__('Right-to-left content')."</label>";
$hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden")); $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden"));
@ -313,8 +318,8 @@
$checked = ""; $checked = "";
} }
print "<br><input type=\"checkbox\" id=\"hidden\" name=\"hidden\" print "<br/><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
$checked><label for=\"hidden\">".__('Hide from my feed list')."</label>"; $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")); $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
@ -324,9 +329,9 @@
$checked = ""; $checked = "";
} }
print "<br><input type=\"checkbox\" id=\"include_in_digest\" print "<br/><input type=\"checkbox\" id=\"include_in_digest\"
name=\"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")); $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
@ -344,18 +349,18 @@
$label_class = "class='insensitive'"; $label_class = "class='insensitive'";
} }
print "<br><input type=\"checkbox\" id=\"cache_images\" print "<br/><input type=\"checkbox\" id=\"cache_images\"
name=\"cache_images\" $disabled name=\"cache_images\" $disabled
$checked><label $label_class for=\"cache_images\">". $checked>&nbsp;<label $label_class for=\"cache_images\">".
__('Cache images locally')."</label>"; __('Cache images locally')."</label>";
print "</td></tr>";
print "</table>"; print "</div>";
print "</div>";
print "</form>"; print "</form>";
print "<div align='right'> print "<div class='dlgButtons'>
<input type=\"submit\" class=\"button\" <input type=\"submit\" class=\"button\"
onclick=\"return feedEditSave()\" value=\"".__('Save')."\"> onclick=\"return feedEditSave()\" value=\"".__('Save')."\">
<input type='submit' class='button' <input type='submit' class='button'

View file

@ -19,7 +19,7 @@
$enabled = sql_bool_to_bool(db_fetch_result($result, 0, "enabled")); $enabled = sql_bool_to_bool(db_fetch_result($result, 0, "enabled"));
$inverse = sql_bool_to_bool(db_fetch_result($result, 0, "inverse")); $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 "<div class=\"infoBoxContents\">";
print "<form id=\"filter_edit_form\" onsubmit='return false'>"; print "<form id=\"filter_edit_form\" onsubmit='return false'>";
@ -125,7 +125,7 @@
print "</div>"; print "</div>";
print "<div class=\"dlgSec\">".__("Perform action")."</div>"; print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
print "<div class=\"dlgSecCont\">"; print "<div class=\"dlgSecCont\">";
@ -154,6 +154,8 @@
print "<div class=\"dlgSec\">".__("Options")."</div>"; print "<div class=\"dlgSec\">".__("Options")."</div>";
print "<div class=\"dlgSecCont\">"; print "<div class=\"dlgSecCont\">";
print "<div style=\"line-height : 100%\">";
if ($enabled) { if ($enabled) {
$checked = "checked"; $checked = "checked";
} else { } else {
@ -173,6 +175,7 @@
<label for=\"inverse\">".__('Inverse match')."</label>"; <label for=\"inverse\">".__('Inverse match')."</label>";
print "</div>"; print "</div>";
print "</div>";
print "<div class=\"dlgButtons\">"; print "<div class=\"dlgButtons\">";

View file

@ -24,7 +24,7 @@
$sql_exp = htmlspecialchars($line["sql_exp"]); $sql_exp = htmlspecialchars($line["sql_exp"]);
$description = htmlspecialchars($line["description"]); $description = htmlspecialchars($line["description"]);
print "<div id=\"infoBoxTitle\">Label editor</div>"; print "<div id=\"infoBoxTitle\">Label Editor</div>";
print "<div class=\"infoBoxContents\">"; print "<div class=\"infoBoxContents\">";
print "<form id=\"label_edit_form\" onsubmit='return false'>"; print "<form id=\"label_edit_form\" onsubmit='return false'>";

View file

@ -538,8 +538,10 @@ div.helpResponse {
border-style : solid; border-style : solid;
border-color : #99d67a; border-color : #99d67a;
background-color : #99d67a; background-color : #99d67a;
padding : 2px; padding : 4px 2px 4px 10px;
color : white; color : white;
font-weight : bold;
font-size : 12px;
} }
/* shadow stuff from http://www.sixapart.com/pronet/articles/ydsf_-_robust_c.html */ /* 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-image : url("images/shadow.png");
background-position : bottom right; background-position : bottom right;
left : 25%; left : 25%;
top : 30%; top : 100px;
width : 50%; width : 50%;
z-index : 3; z-index : 3;
position : absolute; position : absolute;
display : none; display : none;
min-width : 600px;
} }
div.infoBoxContents { div.infoBoxContents {
@ -2018,6 +2021,7 @@ div.dlgSecCont {
float : left; float : left;
font-size : 12px; font-size : 12px;
font-weight : medium; font-weight : medium;
line-height : 200%;
} }
div.dlgButtons { div.dlgButtons {