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"));
$update_intervals = array(
0 => __("Use default"),
0 => __("Default interval"),
-1 => __("Disable updates"),
15 => __("Each 15 minutes"),
30 => __("Each 30 minutes"),
@ -125,7 +125,7 @@
10080 => __("Weekly"));
$update_methods = array(
0 => __("Use default"),
0 => __("Default"),
1 => __("Magpie"),
2 => __("SimplePie"));

View 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});
}
}

View File

@ -58,30 +58,36 @@
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
@ -89,35 +95,42 @@
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;
}
@ -205,7 +218,7 @@
}
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'>";
@ -264,7 +277,7 @@
$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'>";
@ -352,7 +365,7 @@
print "</div>";
print "<div class=\"dlgSec\">".__("Perform action")."</div>";
print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
print "<div class=\"dlgSecCont\">";
@ -378,6 +391,8 @@
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/>";
@ -385,6 +400,7 @@
<label for=\"inverse\">".__('Inverse match')."</label>";
print "</div>";
print "</div>";
print "</form>";

View File

@ -138,7 +138,7 @@
$feed_icon = "";
}
print "<div id=\"infoBoxTitle\">".__('Feed editor')."</div>";
print "<div id=\"infoBoxTitle\">".__('Feed Editor')."</div>";
print "<div class=\"infoBoxContents\">";
@ -148,26 +148,35 @@
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");
@ -177,25 +186,14 @@
$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");
/* Link to */
print "<tr><td>".__('Update Interval:')."</td>";
print "<br/>";
print "<td>";
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'");
@ -210,7 +208,7 @@
$disabled = "";
}
print "<select class=\"iedit\" $disabled name=\"parent_feed\">";
print "<select $disabled name=\"parent_feed\">";
print "<option value=\"0\">".__('Not linked')."</option>";
@ -242,57 +240,64 @@
}
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");
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,
"class=\"iedit\"");
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>";
}
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"));
@ -302,8 +307,8 @@
$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"));
@ -313,8 +318,8 @@
$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"));
@ -324,9 +329,9 @@
$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"));
@ -344,18 +349,18 @@
$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'

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

View 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'>";

View 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 {