mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 13:55:55 +00:00
disable pref toolbars when nothing is selected
This commit is contained in:
167
backend.php
167
backend.php
@@ -1888,10 +1888,8 @@
|
|||||||
class=\"prefFeedList\" id=\"prefFeedList\">";
|
class=\"prefFeedList\" id=\"prefFeedList\">";
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFeedList',
|
<a href=\"javascript:selectPrefRows('feed', true)\">All</a>,
|
||||||
'FEEDR-', 'FRCHK-', true)\">All</a>,
|
<a href=\"javascript:selectPrefRows('feed', false)\">None</a>
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFeedList',
|
|
||||||
'FEEDR-', 'FRCHK-', false)\">None</a>
|
|
||||||
</td</tr>";
|
</td</tr>";
|
||||||
|
|
||||||
if (!get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (!get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
@@ -1958,7 +1956,7 @@
|
|||||||
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
|
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<td class='feedSelect'><input onclick='toggleSelectRow(this);'
|
print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");'
|
||||||
type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
|
type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_ICONS')) {
|
if (get_pref($link, 'ENABLE_FEED_ICONS')) {
|
||||||
@@ -1980,17 +1978,6 @@
|
|||||||
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
||||||
$edit_link . "</a></td>";
|
$edit_link . "</a></td>";
|
||||||
|
|
||||||
/* if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
|
||||||
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
|
||||||
$edit_cat . "</a></td>";
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
|
||||||
$update_intervals[$line["update_interval"]] . "</a></td>";
|
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
|
||||||
$purge_intervals[$line["purge_interval"]] . "</a></td>"; */
|
|
||||||
|
|
||||||
print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" .
|
print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" .
|
||||||
"$last_updated</a></td>";
|
"$last_updated</a></td>";
|
||||||
|
|
||||||
@@ -2001,7 +1988,7 @@
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "<p>";
|
print "<p><span id=\"feedOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "edit") {
|
if ($subop == "edit") {
|
||||||
print "Edit feed:
|
print "Edit feed:
|
||||||
@@ -2013,11 +2000,9 @@
|
|||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<!-- <input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:selectedFeedDetails()\" value=\"Details\"> -->
|
|
||||||
<input type=\"submit\" class=\"button\"
|
|
||||||
onclick=\"javascript:editSelectedFeed()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedFeed()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedFeeds()\" value=\"Unsubscribe\">";
|
onclick=\"javascript:removeSelectedFeeds()\" value=\"Unsubscribe\">";
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
@@ -2028,7 +2013,7 @@
|
|||||||
WHERE owner_uid = ".$_SESSION["uid"]."
|
WHERE owner_uid = ".$_SESSION["uid"]."
|
||||||
ORDER BY title");
|
ORDER BY title");
|
||||||
|
|
||||||
print "<select id=\"sfeed_set_fcat\">";
|
print "<select id=\"sfeed_set_fcat\" disabled=\"true\">";
|
||||||
print "<option id=\"0\">Uncategorized</option>";
|
print "<option id=\"0\">Uncategorized</option>";
|
||||||
|
|
||||||
if (db_num_rows($result) != 0) {
|
if (db_num_rows($result) != 0) {
|
||||||
@@ -2043,12 +2028,12 @@
|
|||||||
|
|
||||||
print "</select>";
|
print "</select>";
|
||||||
|
|
||||||
print " <input type=\"submit\" class=\"button\"
|
print " <input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:categorizeSelectedFeeds()\" value=\"Recategorize\">";
|
onclick=\"javascript:categorizeSelectedFeeds()\" value=\"Recategorize\">";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "
|
print "</span>
|
||||||
All feeds: <input type=\"submit\"
|
All feeds: <input type=\"submit\"
|
||||||
class=\"button\" onclick=\"gotoExportOpml()\"
|
class=\"button\" onclick=\"gotoExportOpml()\"
|
||||||
value=\"Export OPML\">";
|
value=\"Export OPML\">";
|
||||||
@@ -2068,9 +2053,10 @@
|
|||||||
print "<div class=\"prefGenericAddBox\">
|
print "<div class=\"prefGenericAddBox\">
|
||||||
<input id=\"fadd_cat\"
|
<input id=\"fadd_cat\"
|
||||||
onchange=\"javascript:addFeedCat()\"
|
onchange=\"javascript:addFeedCat()\"
|
||||||
|
onkeyup=\"toggleSubmitNotEmpty(this, 'catadd_submit_btn')\"
|
||||||
size=\"40\">
|
size=\"40\">
|
||||||
<input
|
<input
|
||||||
type=\"submit\" class=\"button\"
|
type=\"submit\" class=\"button\" disabled=\"true\" id=\"catadd_submit_btn\"
|
||||||
onclick=\"javascript:addFeedCat()\" value=\"Create category\"></div>";
|
onclick=\"javascript:addFeedCat()\" value=\"Create category\"></div>";
|
||||||
|
|
||||||
$result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
|
$result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
|
||||||
@@ -2084,10 +2070,8 @@
|
|||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFeedCatList',
|
<a href=\"javascript:selectPrefRows('fcat', true)\">All</a>,
|
||||||
'FCATR-', 'FCCHK-', true)\">All</a>,
|
<a href=\"javascript:selectPrefRows('fcat', false)\">None</a>
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFeedCatList',
|
|
||||||
'FCATR-', 'FCCHK-', false)\">None</a>
|
|
||||||
</td</tr>";
|
</td</tr>";
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
@@ -2117,8 +2101,8 @@
|
|||||||
|
|
||||||
if (!$edit_cat_id || $subop != "editCat") {
|
if (!$edit_cat_id || $subop != "editCat") {
|
||||||
|
|
||||||
print "<td align='center'><input onclick='toggleSelectRow(this);'
|
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"fcat\");'
|
||||||
type=\"checkbox\" id=\"FCCHK-".$line["id"]."\"></td>";
|
type=\"checkbox\" id=\"FCCHK-".$line["id"]."\"></td>";
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editFeedCat($cat_id);\">" .
|
print "<td><a href=\"javascript:editFeedCat($cat_id);\">" .
|
||||||
$edit_title . "</a></td>";
|
$edit_title . "</a></td>";
|
||||||
@@ -2145,21 +2129,21 @@
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "<p>";
|
print "<p id=\"catOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "editCat") {
|
if ($subop == "editCat") {
|
||||||
print "Edit category:
|
print "Edit category:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:feedCatEditCancel()\" value=\"Cancel\">
|
onclick=\"javascript:feedCatEditCancel()\" value=\"Cancel\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:feedCatEditSave()\" value=\"Save\">";
|
onclick=\"javascript:feedCatEditSave()\" value=\"Save\">";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:editSelectedFeedCat()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedFeedCat()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedFeedCats()\" value=\"Remove\">";
|
onclick=\"javascript:removeSelectedFeedCats()\" value=\"Remove\">";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2332,10 +2316,8 @@
|
|||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFilterList',
|
<a href=\"javascript:selectPrefRows('filter', true)\">All</a>,
|
||||||
'FILRR-', 'FICHK-', true)\">All</a>,
|
<a href=\"javascript:selectPrefRows('filter', false)\">None</a>
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefFilterList',
|
|
||||||
'FILRR-', 'FICHK-', false)\">None</a>
|
|
||||||
</td</tr>";
|
</td</tr>";
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
@@ -2369,7 +2351,7 @@
|
|||||||
|
|
||||||
if (!$edit_filter_id || $subop != "edit") {
|
if (!$edit_filter_id || $subop != "edit") {
|
||||||
|
|
||||||
print "<td align='center'><input onclick='toggleSelectRow(this);'
|
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"filter\");'
|
||||||
type=\"checkbox\" id=\"FICHK-".$line["id"]."\"></td>";
|
type=\"checkbox\" id=\"FICHK-".$line["id"]."\"></td>";
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
|
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
|
||||||
@@ -2462,7 +2444,7 @@
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "<p>";
|
print "<p id=\"filterOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "edit") {
|
if ($subop == "edit") {
|
||||||
print "Edit filter:
|
print "Edit filter:
|
||||||
@@ -2475,9 +2457,9 @@
|
|||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:editSelectedFilter()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedFilter()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedFilters()\" value=\"Remove\">";
|
onclick=\"javascript:removeSelectedFilters()\" value=\"Remove\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2620,10 +2602,8 @@
|
|||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefLabelList',
|
<a href=\"javascript:selectPrefRows('label', true)\">All</a>,
|
||||||
'LILRR-', 'LICHK-', true)\">All</a>,
|
<a href=\"javascript:selectPrefRows('label', false)\">None</a>
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefLabelList',
|
|
||||||
'LILRR-', 'LICHK-', false)\">None</a>
|
|
||||||
</td</tr>";
|
</td</tr>";
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
@@ -2658,7 +2638,7 @@
|
|||||||
|
|
||||||
if (!$line["description"]) $line["description"] = "[No caption]";
|
if (!$line["description"]) $line["description"] = "[No caption]";
|
||||||
|
|
||||||
print "<td align='center'><input onclick='toggleSelectRow(this);'
|
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"label\");'
|
||||||
type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
|
type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editLabel($label_id);\">" .
|
print "<td><a href=\"javascript:editLabel($label_id);\">" .
|
||||||
@@ -2685,8 +2665,7 @@
|
|||||||
"\"></td>";
|
"\"></td>";
|
||||||
|
|
||||||
print "<td><input id=\"iedit_descr\" value=\"".$line["description"].
|
print "<td><input id=\"iedit_descr\" value=\"".$line["description"].
|
||||||
"\"></td>";
|
"\"></td>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2701,7 +2680,7 @@
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "<p>";
|
print "<p id=\"labelOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "edit") {
|
if ($subop == "edit") {
|
||||||
print "Edit label:
|
print "Edit label:
|
||||||
@@ -2712,13 +2691,12 @@
|
|||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:labelEditCancel()\" value=\"Cancel\">";
|
onclick=\"javascript:labelEditCancel()\" value=\"Cancel\">";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:editSelectedLabel()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedLabel()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedLabels()\" value=\"Remove\">";
|
onclick=\"javascript:removeSelectedLabels()\" value=\"Remove\">";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3394,28 +3372,37 @@
|
|||||||
$tmp_user_pwd = make_password(8);
|
$tmp_user_pwd = make_password(8);
|
||||||
$pwd_hash = 'SHA1:' . sha1($tmp_user_pwd);
|
$pwd_hash = 'SHA1:' . sha1($tmp_user_pwd);
|
||||||
|
|
||||||
db_query($link, "INSERT INTO ttrss_users
|
|
||||||
(login,pwd_hash,access_level,last_login)
|
|
||||||
VALUES ('$login', '$pwd_hash', 0, NOW())");
|
|
||||||
|
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id FROM ttrss_users WHERE
|
$result = db_query($link, "SELECT id FROM ttrss_users WHERE
|
||||||
login = '$login' AND pwd_hash = '$pwd_hash'");
|
login = '$login'");
|
||||||
|
|
||||||
if (db_num_rows($result) == 1) {
|
if (db_num_rows($result) == 0) {
|
||||||
|
|
||||||
$new_uid = db_fetch_result($result, 0, "id");
|
|
||||||
|
|
||||||
print "<div class=\"notice\">Added user <b>".$_GET["login"].
|
|
||||||
"</b> with password <b>$tmp_user_pwd</b>.</div>";
|
|
||||||
|
|
||||||
initialize_user($link, $new_uid);
|
|
||||||
|
|
||||||
|
db_query($link, "INSERT INTO ttrss_users
|
||||||
|
(login,pwd_hash,access_level,last_login)
|
||||||
|
VALUES ('$login', '$pwd_hash', 0, NOW())");
|
||||||
|
|
||||||
|
|
||||||
|
$result = db_query($link, "SELECT id FROM ttrss_users WHERE
|
||||||
|
login = '$login' AND pwd_hash = '$pwd_hash'");
|
||||||
|
|
||||||
|
if (db_num_rows($result) == 1) {
|
||||||
|
|
||||||
|
$new_uid = db_fetch_result($result, 0, "id");
|
||||||
|
|
||||||
|
print "<div class=\"notice\">Added user <b>".$_GET["login"].
|
||||||
|
"</b> with password <b>$tmp_user_pwd</b>.</div>";
|
||||||
|
|
||||||
|
initialize_user($link, $new_uid);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
print "<div class=\"warning\">Could not create user <b>".
|
||||||
|
$_GET["login"]."</b></div>";
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
print "<div class=\"warning\">User <b>".
|
||||||
print "<div class=\"warning\">Error while adding user <b>".
|
$_GET["login"]."</b> already exists.</div>";
|
||||||
$_GET["login"].".</b></div>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($subop == "resetPass") {
|
} else if ($subop == "resetPass") {
|
||||||
@@ -3481,10 +3468,8 @@
|
|||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefUserList',
|
<a href=\"javascript:selectPrefRows('user', true)\">All</a>,
|
||||||
'UMRR-', 'UMCHK-', true)\">All</a>,
|
<a href=\"javascript:selectPrefRows('user', false)\">None</a>
|
||||||
<a href=\"javascript:selectTableRowsByIdPrefix('prefUserList',
|
|
||||||
'UMRR-', 'UMCHK-', false)\">None</a>
|
|
||||||
</td</tr>";
|
</td</tr>";
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
@@ -3519,18 +3504,9 @@
|
|||||||
|
|
||||||
$access_level_names = array(0 => "User", 10 => "Administrator");
|
$access_level_names = array(0 => "User", 10 => "Administrator");
|
||||||
|
|
||||||
/* if ($uid == $_SESSION["uid"]) {
|
if (!$edit_uid || $subop != "edit") {
|
||||||
|
|
||||||
print "<td align='center'><input disabled=\"true\" type=\"checkbox\"
|
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");'
|
||||||
id=\"UMCHK-".$line["id"]."\"></td>";
|
|
||||||
|
|
||||||
print "<td>".$line["login"]."</td>";
|
|
||||||
print "<td>".$line["email"]."</td>";
|
|
||||||
print "<td>".$line["access_level"]."</td>";
|
|
||||||
|
|
||||||
} else */ if (!$edit_uid || $subop != "edit") {
|
|
||||||
|
|
||||||
print "<td align='center'><input onclick='toggleSelectRow(this);'
|
|
||||||
type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
|
type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editUser($uid);\">" .
|
print "<td><a href=\"javascript:editUser($uid);\">" .
|
||||||
@@ -3566,9 +3542,6 @@
|
|||||||
print "<td><input id=\"iedit_email\" value=\"".$line["email"].
|
print "<td><input id=\"iedit_email\" value=\"".$line["email"].
|
||||||
"\"></td>";
|
"\"></td>";
|
||||||
|
|
||||||
// print "<td><input id=\"iedit_ulevel\" value=\"".$line["access_level"].
|
|
||||||
// "\"></td>";
|
|
||||||
|
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print "<select id=\"iedit_ulevel\">";
|
print "<select id=\"iedit_ulevel\">";
|
||||||
foreach (array_keys($access_level_names) as $al) {
|
foreach (array_keys($access_level_names) as $al) {
|
||||||
@@ -3594,7 +3567,7 @@
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "<p>";
|
print "<p id='userOpToolbar'>";
|
||||||
|
|
||||||
if ($subop == "edit") {
|
if ($subop == "edit") {
|
||||||
print "Edit user:
|
print "Edit user:
|
||||||
@@ -3607,13 +3580,13 @@
|
|||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:selectedUserDetails()\" value=\"User details\">
|
onclick=\"javascript:selectedUserDetails()\" value=\"User details\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:editSelectedUser()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedUser()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedUsers()\" value=\"Remove\">
|
onclick=\"javascript:removeSelectedUsers()\" value=\"Remove\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:resetSelectedUserPass()\" value=\"Reset password\">";
|
onclick=\"javascript:resetSelectedUserPass()\" value=\"Reset password\">";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
58
functions.js
58
functions.js
@@ -28,7 +28,6 @@ function xmlhttp_ready(obj) {
|
|||||||
return obj.readyState == 4 || obj.readyState == 0 || !obj.readyState;
|
return obj.readyState == 4 || obj.readyState == 0 || !obj.readyState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function notify_callback() {
|
function notify_callback() {
|
||||||
var container = document.getElementById('notify');
|
var container = document.getElementById('notify');
|
||||||
if (xmlhttp.readyState == 4) {
|
if (xmlhttp.readyState == 4) {
|
||||||
@@ -73,10 +72,31 @@ function delay(gap) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function p_notify(msg) {
|
var notify_hide_timerid = false;
|
||||||
|
var notify_last_doc = false;
|
||||||
|
|
||||||
var n = parent.document.getElementById("notify");
|
function hide_notify() {
|
||||||
var nb = parent.document.getElementById("notify_body");
|
if (notify_last_doc) {
|
||||||
|
var n = notify_last_doc.getElementById("notify");
|
||||||
|
if (navigator.userAgent.match("Firefox")) {
|
||||||
|
if (notify_opacity >= 0) {
|
||||||
|
notify_opacity = notify_opacity - 0.2;
|
||||||
|
n.style.opacity = notify_opacity;
|
||||||
|
notify_hide_timerid = window.setTimeout(hide_notify, 20);
|
||||||
|
} else {
|
||||||
|
n.style.display = "none";
|
||||||
|
n.style.opacity = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
n.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function notify_real(msg, doc) {
|
||||||
|
|
||||||
|
var n = doc.getElementById("notify");
|
||||||
|
var nb = doc.getElementById("notify_body");
|
||||||
|
|
||||||
if (!n || !nb) return;
|
if (!n || !nb) return;
|
||||||
|
|
||||||
@@ -85,25 +105,25 @@ function p_notify(msg) {
|
|||||||
} else {
|
} else {
|
||||||
n.style.display = "block";
|
n.style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
||||||
nb.innerHTML = msg;
|
nb.innerHTML = msg;
|
||||||
|
|
||||||
|
if (notify_hide_timerid) {
|
||||||
|
window.clearTimeout(notify_hide_timerid);
|
||||||
|
}
|
||||||
|
|
||||||
|
notify_last_doc = doc;
|
||||||
|
notify_opacity = 1;
|
||||||
|
|
||||||
|
notify_hide_timerid = window.setTimeout(hide_notify, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function p_notify(msg) {
|
||||||
|
notify_real(msg, parent.document);
|
||||||
}
|
}
|
||||||
|
|
||||||
function notify(msg) {
|
function notify(msg) {
|
||||||
|
notify_real(msg, document);
|
||||||
var n = document.getElementById("notify");
|
|
||||||
var nb = document.getElementById("notify_body");
|
|
||||||
|
|
||||||
if (!n || !nb) return;
|
|
||||||
|
|
||||||
if (msg == "") {
|
|
||||||
n.style.display = "none";
|
|
||||||
} else {
|
|
||||||
n.style.display = "block";
|
|
||||||
}
|
|
||||||
|
|
||||||
nb.innerHTML = msg;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function printLockingError() {
|
function printLockingError() {
|
||||||
|
|||||||
90
prefs.js
90
prefs.js
@@ -182,7 +182,7 @@ function updateFeedList(sort_key) {
|
|||||||
|
|
||||||
// document.getElementById("prefContent").innerHTML = "Loading feeds, please wait...";
|
// document.getElementById("prefContent").innerHTML = "Loading feeds, please wait...";
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
var feed_search = document.getElementById("feed_search");
|
var feed_search = document.getElementById("feed_search");
|
||||||
var search = "";
|
var search = "";
|
||||||
@@ -205,7 +205,7 @@ function updateUsersList() {
|
|||||||
|
|
||||||
// document.getElementById("prefContent").innerHTML = "Loading feeds, please wait...";
|
// document.getElementById("prefContent").innerHTML = "Loading feeds, please wait...";
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-users", true);
|
xmlhttp.open("GET", "backend.php?op=pref-users", true);
|
||||||
xmlhttp.onreadystatechange=userlist_callback;
|
xmlhttp.onreadystatechange=userlist_callback;
|
||||||
@@ -1220,7 +1220,7 @@ function updateFilterList() {
|
|||||||
|
|
||||||
// document.getElementById("prefContent").innerHTML = "Loading filters, please wait...";
|
// document.getElementById("prefContent").innerHTML = "Loading filters, please wait...";
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-filters", true);
|
xmlhttp.open("GET", "backend.php?op=pref-filters", true);
|
||||||
xmlhttp.onreadystatechange=filterlist_callback;
|
xmlhttp.onreadystatechange=filterlist_callback;
|
||||||
@@ -1235,7 +1235,7 @@ function updateLabelList() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
// document.getElementById("prefContent").innerHTML = "Loading labels, please wait...";
|
// document.getElementById("prefContent").innerHTML = "Loading labels, please wait...";
|
||||||
|
|
||||||
@@ -1251,7 +1251,7 @@ function updatePrefsList() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-prefs", true);
|
xmlhttp.open("GET", "backend.php?op=pref-prefs", true);
|
||||||
xmlhttp.onreadystatechange=prefslist_callback;
|
xmlhttp.onreadystatechange=prefslist_callback;
|
||||||
@@ -1417,7 +1417,7 @@ function updateBigFeedBrowser(limit) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p_notify("Loading, please wait...");
|
// p_notify("Loading, please wait...");
|
||||||
|
|
||||||
var query = "backend.php?op=pref-feed-browser";
|
var query = "backend.php?op=pref-feed-browser";
|
||||||
|
|
||||||
@@ -1471,3 +1471,81 @@ function validateNewPassword(form) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectPrefRows(kind, select) {
|
||||||
|
|
||||||
|
if (kind) {
|
||||||
|
var opbarid = false;
|
||||||
|
var nchk = false;
|
||||||
|
var nrow = false;
|
||||||
|
var lname = false;
|
||||||
|
|
||||||
|
if (kind == "feed") {
|
||||||
|
opbarid = "feedOpToolbar";
|
||||||
|
nrow = "FEEDR-";
|
||||||
|
nchk = "FRCHK-";
|
||||||
|
lname = "prefFeedList";
|
||||||
|
} else if (kind == "fcat") {
|
||||||
|
opbarid = "catOpToolbar";
|
||||||
|
nrow = "FCATR-";
|
||||||
|
nchk = "FCHK-";
|
||||||
|
lname = "prefFeedCatList";
|
||||||
|
} else if (kind == "filter") {
|
||||||
|
opbarid = "filterOpToolbar";
|
||||||
|
nrow = "FILRR-";
|
||||||
|
nchk = "FICHK-";
|
||||||
|
lname = "prefFilterList";
|
||||||
|
} else if (kind == "label") {
|
||||||
|
opbarid = "labelOpToolbar";
|
||||||
|
nrow = "LILRR-";
|
||||||
|
nchk = "LCHK-";
|
||||||
|
lname = "prefLabelList";
|
||||||
|
} else if (kind == "user") {
|
||||||
|
opbarid = "userOpToolbar";
|
||||||
|
nrow = "UMRR-";
|
||||||
|
nchk = "UMCHK-";
|
||||||
|
lname = "prefUserList";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opbarid) {
|
||||||
|
selectTableRowsByIdPrefix(lname, nrow, nchk, select);
|
||||||
|
disableContainerChildren(opbarid, !select);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toggleSelectPrefRow(sender, kind) {
|
||||||
|
|
||||||
|
toggleSelectRow(sender);
|
||||||
|
|
||||||
|
if (kind) {
|
||||||
|
var opbarid = false;
|
||||||
|
var nsel = -1;
|
||||||
|
|
||||||
|
if (kind == "feed") {
|
||||||
|
opbarid = "feedOpToolbar";
|
||||||
|
nsel = getSelectedFeeds();
|
||||||
|
} else if (kind == "fcat") {
|
||||||
|
opbarid = "catOpToolbar";
|
||||||
|
nsel = getSelectedFeedCats();
|
||||||
|
} else if (kind == "filter") {
|
||||||
|
opbarid = "filterOpToolbar";
|
||||||
|
nsel = getSelectedFilters();
|
||||||
|
} else if (kind == "label") {
|
||||||
|
opbarid = "labelOpToolbar";
|
||||||
|
nsel = getSelectedLabels();
|
||||||
|
} else if (kind == "user") {
|
||||||
|
opbarid = "userOpToolbar";
|
||||||
|
nsel = getSelectedUsers();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opbarid && nsel != -1) {
|
||||||
|
disableContainerChildren(opbarid, nsel == false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
30
tt-rss.css
30
tt-rss.css
@@ -299,13 +299,16 @@ td.notifyBox {
|
|||||||
background : #fff7d5;
|
background : #fff7d5;
|
||||||
border : 1px solid #d7c47a;
|
border : 1px solid #d7c47a;
|
||||||
padding : 3px;
|
padding : 3px;
|
||||||
top : 2px;
|
top : 25px;
|
||||||
right : 2px;
|
right : 150px;
|
||||||
float : right;
|
min-width : 300px;
|
||||||
position : absolute;
|
position : absolute;
|
||||||
-moz-border-radius : 3px;
|
-moz-border-radius : 3px;
|
||||||
font-size : x-small;
|
font-size : x-small;
|
||||||
font-weight : bold;
|
font-weight : bold;
|
||||||
|
text-align : center;
|
||||||
|
float : right;
|
||||||
|
padding : 3px 20px 3px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dispSwitch {
|
#dispSwitch {
|
||||||
@@ -522,23 +525,26 @@ div.helpResponse {
|
|||||||
|
|
||||||
#infoBoxTitle {
|
#infoBoxTitle {
|
||||||
border-width : 1px 1px 1px 1px;
|
border-width : 1px 1px 1px 1px;
|
||||||
border-style : solid;
|
border-style : solid;
|
||||||
border-color : #88b0f0;
|
border-color : #88b0f0;
|
||||||
background-color : #88b0f0;
|
background-color : #88b0f0;
|
||||||
padding : 2px;
|
padding : 2px;
|
||||||
color : white;
|
color : white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#infoBox {
|
#infoBox {
|
||||||
border-width : 1px 1px 1px 1px;
|
border-width : 1px 1px 1px 1px;
|
||||||
border-style : solid;
|
border-style : solid;
|
||||||
border-color : #88b0f0;
|
border-color : #88b0f0;
|
||||||
font-size : small;
|
font-size : small;
|
||||||
position : relative;
|
position : relative;
|
||||||
bottom : 2px;
|
bottom : 2px;
|
||||||
right : 2px;
|
right : 2px;
|
||||||
background-color : #ecf4ff;
|
padding-bottom : 5px;
|
||||||
padding-bottom : 5px;
|
background-image : url("images/prefs-content.png");
|
||||||
|
background-position : top left;
|
||||||
|
background-repeat : repeat-x;
|
||||||
|
background-color : white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#infoBoxShadow {
|
#infoBoxShadow {
|
||||||
|
|||||||
Reference in New Issue
Block a user