From 6c12c80902bbf696f501f028c924605edfc1d122 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 25 Dec 2005 14:43:31 +0100 Subject: [PATCH] fix row selection on editFeed() --- functions.js | 20 ++++++++++++++++++++ prefs.js | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/functions.js b/functions.js index 60fd9da6..e408fb8d 100644 --- a/functions.js +++ b/functions.js @@ -536,6 +536,26 @@ function selectTableRow(r, do_select) { } } +function selectTableRowById(elem_id, check_id, do_select) { + + try { + + var row = document.getElementById(elem_id); + + if (row) { + selectTableRow(row, do_select); + } + + var check = document.getElementById(check_id); + + if (check) { + check.checked = do_select; + } + } catch (e) { + exception_error("selectTableRowById", e); + } +} + function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select, classcheck) { diff --git a/prefs.js b/prefs.js index 695b1abb..89ad81d3 100644 --- a/prefs.js +++ b/prefs.js @@ -401,7 +401,10 @@ function editFeed(feed) { xmlhttp.send(null); */ selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-', 'FRCHK-', false); - selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-'+feed, 'FRCHK-'+feed, true); +// selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-'+feed, 'FRCHK-'+feed, +// true, false); + + selectTableRowById('FEEDR-'+feed, 'FRCHK-'+feed, true); xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=editfeed&id=" + param_escape(active_feed), true); -- 2.39.5