summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-11 18:59:21 +0300
committerAndrew Dolgov <[email protected]>2010-11-11 18:59:21 +0300
commita998dbef95bb6ac94a0f4b401e94e4c932c855a0 (patch)
tree24593ab69bcdbc72838ed79ce824331c26d0764c /modules
parentb0d32d324ceedd5134861dee9af2e3f251ed0b6a (diff)
misc code cleanup, allow ctrl-key selection in prefs
Diffstat (limited to 'modules')
-rw-r--r--modules/popup-dialog.php8
-rw-r--r--modules/pref-feeds.php40
-rw-r--r--modules/pref-filters.php16
-rw-r--r--modules/pref-labels.php6
-rw-r--r--modules/pref-users.php16
5 files changed, 43 insertions, 43 deletions
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 520c9f954..364dfe7b0 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -80,8 +80,8 @@
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
print __('Select:')."
- <a href=\"javascript:selectPrefRows('fcat', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('fcat', false)\">".__('None')."</a>";
+ <a href=\"#\" onclick=\"selectPrefRows('fcat', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('fcat', false)\">".__('None')."</a>";
print "<div class=\"prefFeedCatHolder\">";
@@ -93,7 +93,7 @@
print "<tr class=\"odd\" id=\"FCATR-0\">";
print "<td width='5%' align='center'><input
- onclick='toggleSelectPrefRow(this, \"fcat\");'
+ onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"FCCHK-0\"></td>";
if (!$_SESSION["profile"]) {
@@ -121,7 +121,7 @@
$edit_title = htmlspecialchars($line["title"]);
print "<td width='5%' align='center'><input
- onclick='toggleSelectPrefRow(this, \"fcat\");'
+ onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
if ($_SESSION["profile"] == $line["id"]) {
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index d83a1a25b..e557903ea 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -981,7 +981,7 @@
<input id=\"fadd_cat\"
onkeypress=\"return filterCR(event, addFeedCat)\"
size=\"40\">
- <button onclick=\"javascript:addFeedCat()\">".
+ <button onclick=\"addFeedCat()\">".
__('Create category')."</button></div>";
$result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
@@ -993,8 +993,8 @@
if (db_num_rows($result) != 0) {
print __('Select:')."
- <a href=\"javascript:selectPrefRows('fcat', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('fcat', false)\">".__('None')."</a>";
+ <a href=\"#\" onclick=\"selectPrefRows('fcat', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('fcat', false)\">".__('None')."</a>";
print "<div class=\"prefFeedCatHolder\">";
@@ -1017,7 +1017,7 @@
$edit_title = htmlspecialchars($line["title"]);
print "<td width='5%' align='center'><input
- onclick='toggleSelectPrefRow(this, \"fcat\");'
+ onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
print "<td><span id=\"FCATT-$cat_id\">" .
@@ -1078,10 +1078,10 @@
print "<div style='float : right'>
<input id=\"feed_search\" size=\"20\" type=\"search\"
- onfocus=\"javascript:disableHotkeys();\"
- onblur=\"javascript:enableHotkeys();\"
- onchange=\"javascript:updateFeedList()\" value=\"$feed_search\">
- <button onclick=\"javascript:updateFeedList()\">".
+ onfocus=\"disableHotkeys();\"
+ onblur=\"enableHotkeys();\"
+ onchange=\"updateFeedList()\" value=\"$feed_search\">
+ <button onclick=\"updateFeedList()\">".
__('Search')."</button>
</div>";
@@ -1093,11 +1093,11 @@
if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "<button onclick=\"javascript:editFeedCats()\">".
+ print "<button onclick=\"editFeedCats()\">".
__('Edit categories')."</button> ";
}
- print "<button onclick=\"javascript:removeSelectedFeeds()\">"
+ print "<button onclick=\"removeSelectedFeeds()\">"
.__('Unsubscribe')."</button> ";
if (defined('_ENABLE_FEED_DEBUGGING')) {
@@ -1199,8 +1199,8 @@
$show_last_article_checked><label
for='show_last_article_times'>".__('Show last article times')."</label></div>".
__('Select:')."
- <a href=\"javascript:selectPrefRows('feed', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('feed', false)\">".__('None')."</a>
+ <a href=\"#\" onclick=\"selectPrefRows('feed', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('feed', false)\">".__('None')."</a>
</td</tr>";
if (!get_pref($link, 'ENABLE_FEED_CATS')) {
@@ -1209,13 +1209,13 @@
print "<td width='3%'>&nbsp;</td>";
- print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
+ print "<td width='60%'><a href=\"#\" onclick=\"updateFeedList('title')\">".__('Title')."</a></td>";
if ($show_last_article_info) {
- print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_article')\">".__('Last&nbsp;Article')."</a></td>";
+ print "<td width='20%' align='right'><a href=\"#\" onclick=\"updateFeedList('last_article')\">".__('Last&nbsp;Article')."</a></td>";
}
- print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
+ print "<td width='20%' align='right'><a href=\"#\" onclick=\"updateFeedList('last_updated')\">".__('Updated')."</a></td>";
}
$lnum = 0;
@@ -1260,15 +1260,15 @@
print "<td width='3%'>&nbsp;</td>";
- print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
+ print "<td width='60%'><a href=\"#\" onclick=\"updateFeedList('title')\">".__('Title')."</a></td>";
if ($show_last_article_info) {
print "<td width='20%' align='right'>
- <a href=\"javascript:updateFeedList('last_article')\">".__('Last&nbsp;Article')."</a></td>";
+ <a href=\"#\" onclick=\"updateFeedList('last_article')\">".__('Last&nbsp;Article')."</a></td>";
}
print "<td width='20%' align='right'>
- <a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
+ <a href=\"#\" onclick=\"updateFeedList('last_updated')\">".__('Updated')."</a></td>";
$cur_cat_id = $cat_id;
}
@@ -1286,10 +1286,10 @@
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
}
- print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");'
+ print "<td class='feedSelect'><input onclick='toggleSelecRow(this);'
type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
- $onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'";
+ $onclick = "onclick='editFeed($feed_id, event)' title='".__('Click to edit')."'";
print "<td $onclick class='feedIcon'>$feed_icon</td>";
diff --git a/modules/pref-filters.php b/modules/pref-filters.php
index 26efebd50..5df8a8cea 100644
--- a/modules/pref-filters.php
+++ b/modules/pref-filters.php
@@ -377,8 +377,8 @@
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
".__('Select:')."
- <a href=\"javascript:selectPrefRows('filter', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('filter', false)\">".__('None')."</a>
+ <a href=\"#\" onclick=\"selectPrefRows('filter', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('filter', false)\">".__('None')."</a>
</td</tr>";
$lnum = 0;
@@ -405,10 +405,10 @@
print "<tr class=\"title\">
<td align='center' width=\"5%\">&nbsp;</td>
- <td width=\"20%\"><a href=\"javascript:updateFilterList('reg_exp')\">".__('Match')."</a></td>
- <td width=\"\"><a href=\"javascript:updateFilterList('feed_title')\">".__('Feed')."</a></td>
- <td width=\"20%\"><a href=\"javascript:updateFilterList('filter_type')\">".__('Field')."</a></td>
- <td width=\"20%\"><a href=\"javascript:updateFilterList('action_param')\">".__('Params')."</a></td>";
+ <td width=\"20%\"><a href=\"#\" onclick=\"updateFilterList('reg_exp')\">".__('Match')."</a></td>
+ <td width=\"\"><a href=\"#\" onclick=\"updateFilterList('feed_title')\">".__('Feed')."</a></td>
+ <td width=\"20%\"><a href=\"#\" onclick=\"updateFilterList('filter_type')\">".__('Field')."</a></td>
+ <td width=\"20%\"><a href=\"#\" onclick=\"updateFilterList('action_param')\">".__('Params')."</a></td>";
$lnum = 0;
}
@@ -436,7 +436,7 @@
$line["feed_title"] = htmlspecialchars($line["feed_title"]);
- print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"filter\");'
+ print "<td align='center'><input onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"FICHK-".$line["id"]."\"></td>";
$filter_params = array(
@@ -486,7 +486,7 @@
$line["action_param"] . "</span>";
}
- $onclick = "onclick='editFilter($filter_id)' title='".__('Click to edit')."'";
+ $onclick = "onclick='editFilter($filter_id, event)' title='".__('Click to edit')."'";
$inverse_label = "";
diff --git a/modules/pref-labels.php b/modules/pref-labels.php
index 884a25d1a..d7a300843 100644
--- a/modules/pref-labels.php
+++ b/modules/pref-labels.php
@@ -208,8 +208,8 @@
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
".__('Select:')."
- <a href=\"javascript:selectPrefRows('label', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('label', false)\">".__('None')."</a>
+ <a href=\"#\" onclick=\"selectPrefRows('label', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('label', false)\">".__('None')."</a>
</td</tr>";
/* print "<tr class=\"title\">
@@ -238,7 +238,7 @@
if (!$bg_color) $bg_color = "";
print "<td width='5%' align='center'><input
- onclick='toggleSelectPrefRow(this, \"label\");'
+ onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
$id = $line['id'];
diff --git a/modules/pref-users.php b/modules/pref-users.php
index a4531c45f..dcca9a936 100644
--- a/modules/pref-users.php
+++ b/modules/pref-users.php
@@ -417,16 +417,16 @@
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
".__('Select:')."
- <a href=\"javascript:selectPrefRows('user', true)\">".__('All')."</a>,
- <a href=\"javascript:selectPrefRows('user', false)\">".__('None')."</a>
+ <a href=\"#\" onclick=\"selectPrefRows('user', true)\">".__('All')."</a>,
+ <a href=\"#\" onclick=\"selectPrefRows('user', false)\">".__('None')."</a>
</td</tr>";
print "<tr class=\"title\">
<td align='center' width=\"5%\">&nbsp;</td>
- <td width=''><a href=\"javascript:updateUsersList('login')\">".__('Login')."</a></td>
- <td width='20%'><a href=\"javascript:updateUsersList('access_level')\">".__('Access Level')."</a></td>
- <td width='20%'><a href=\"javascript:updateUsersList('created')\">".__('Registered')."</a></td>
- <td width='20%'><a href=\"javascript:updateUsersList('last_login')\">".__('Last login')."</a></td></tr>";
+ <td width=''><a href=\"#\" onclick=\"updateUsersList('login')\">".__('Login')."</a></td>
+ <td width='20%'><a href=\"#\" onclick=\"updateUsersList('access_level')\">".__('Access Level')."</a></td>
+ <td width='20%'><a href=\"#\" onclick=\"updateUsersList('created')\">".__('Registered')."</a></td>
+ <td width='20%'><a href=\"#\" onclick=\"updateUsersList('last_login')\">".__('Last login')."</a></td></tr>";
$lnum = 0;
@@ -451,10 +451,10 @@
$line["created"] = make_local_datetime($link, $line["created"], false);
$line["last_login"] = make_local_datetime($link, $line["last_login"], false);
- print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");'
+ print "<td align='center'><input onclick='toggleSelectRow(this);'
type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
- $onclick = "onclick='editUser($uid)' title='".__('Click to edit')."'";
+ $onclick = "onclick='editUser($uid, event)' title='".__('Click to edit')."'";
print "<td $onclick>" . $line["login"] . "</td>";