summaryrefslogtreecommitdiff
path: root/classes/dlg.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-06-14 21:04:14 +0400
committerAndrew Dolgov <[email protected]>2012-06-14 21:04:14 +0400
commitddb575c744e2740611fd51d11492a5bdc6265caf (patch)
tree6a8e584231789186347aa8af5b98d43f7f3a8b14 /classes/dlg.php
parentf0755b7c7e5268edcb5924ed12589a4c52c0673b (diff)
add select all/none functionality to several edit dialogs
Diffstat (limited to 'classes/dlg.php')
-rw-r--r--classes/dlg.php53
1 files changed, 47 insertions, 6 deletions
diff --git a/classes/dlg.php b/classes/dlg.php
index d39f691cb..345e0c3ef 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -80,12 +80,25 @@ class Dlg extends Protected_Handler {
function editPrefProfiles() {
print "<div dojoType=\"dijit.Toolbar\">";
+ print "<div dojoType=\"dijit.form.DropDownButton\">".
+ "<span>" . __('Select')."</span>";
+ print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
+ print "<div onclick=\"selectTableRows('prefFeedProfileList', 'all')\"
+ dojoType=\"dijit.MenuItem\">".__('All')."</div>";
+ print "<div onclick=\"selectTableRows('prefFeedProfileList', 'none')\"
+ dojoType=\"dijit.MenuItem\">".__('None')."</div>";
+ print "</div></div>";
+
+ print "<div style=\"float : right\">";
+
print "<input name=\"newprofile\" dojoType=\"dijit.form.ValidationTextBox\"
required=\"1\">
<button dojoType=\"dijit.form.Button\"
onclick=\"dijit.byId('profileEditDlg').addProfile()\">".
__('Create profile')."</button></div>";
+ print "</div>";
+
$result = db_query($this->link, "SELECT title,id FROM ttrss_settings_profiles
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
@@ -96,9 +109,10 @@ class Dlg extends Protected_Handler {
print "<table width=\"100%\" class=\"prefFeedProfileList\"
cellspacing=\"0\" id=\"prefFeedProfileList\">";
- print "<tr class=\"\" id=\"FCATR-0\">"; #odd
+ print "<tr class=\"placeholder\" id=\"FCATR-0\">"; #odd
print "<td width='5%' align='center'><input
+ id='FCATC-0'
onclick='toggleSelectRow2(this);'
dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\"></td>";
@@ -123,12 +137,13 @@ class Dlg extends Protected_Handler {
$profile_id = $line["id"];
$this_row_id = "id=\"FCATR-$profile_id\"";
- print "<tr class=\"\" $this_row_id>";
+ print "<tr class=\"placeholder\" $this_row_id>";
$edit_title = htmlspecialchars($line["title"]);
print "<td width='5%' align='center'><input
onclick='toggleSelectRow2(this);'
+ id='FCATC-$profile_id'
dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\"></td>";
@@ -577,6 +592,17 @@ class Dlg extends Protected_Handler {
print __("These feeds have not been updated with new content for 3 months (oldest first):");
+ print "<div dojoType=\"dijit.Toolbar\">";
+ print "<div dojoType=\"dijit.form.DropDownButton\">".
+ "<span>" . __('Select')."</span>";
+ print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
+ print "<div onclick=\"selectTableRows('prefInactiveFeedList', 'all')\"
+ dojoType=\"dijit.MenuItem\">".__('All')."</div>";
+ print "<div onclick=\"selectTableRows('prefInactiveFeedList', 'none')\"
+ dojoType=\"dijit.MenuItem\">".__('None')."</div>";
+ print "</div></div>";
+ print "</div>"; #toolbar
+
print "<div class=\"inactiveFeedHolder\">";
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefInactiveFeedList\">";
@@ -589,13 +615,15 @@ class Dlg extends Protected_Handler {
$feed_id = $line["id"];
$this_row_id = "id=\"FUPDD-$feed_id\"";
- print "<tr class=\"\" $this_row_id>";
+ # class needed for selectTableRows()
+ print "<tr class=\"placeholder\" $this_row_id>";
$edit_title = htmlspecialchars($line["title"]);
+ # id needed for selectTableRows()
print "<td width='5%' align='center'><input
onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\"
- type=\"checkbox\"></td>";
+ type=\"checkbox\" id=\"FUPDC-$feed_id\"></td>";
print "<td>";
print "<a class=\"visibleLink\" href=\"#\" ".
@@ -633,6 +661,17 @@ class Dlg extends Protected_Handler {
$result = db_query($this->link, "SELECT id,title,feed_url,last_error,site_url
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
+ print "<div dojoType=\"dijit.Toolbar\">";
+ print "<div dojoType=\"dijit.form.DropDownButton\">".
+ "<span>" . __('Select')."</span>";
+ print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
+ print "<div onclick=\"selectTableRows('prefErrorFeedList', 'all')\"
+ dojoType=\"dijit.MenuItem\">".__('All')."</div>";
+ print "<div onclick=\"selectTableRows('prefErrorFeedList', 'none')\"
+ dojoType=\"dijit.MenuItem\">".__('None')."</div>";
+ print "</div></div>";
+ print "</div>"; #toolbar
+
print "<div class=\"inactiveFeedHolder\">";
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
@@ -645,13 +684,15 @@ class Dlg extends Protected_Handler {
$feed_id = $line["id"];
$this_row_id = "id=\"FUPDD-$feed_id\"";
- print "<tr class=\"\" $this_row_id>";
+ # class needed for selectTableRows()
+ print "<tr class=\"placeholder\" $this_row_id>";
$edit_title = htmlspecialchars($line["title"]);
+ # id needed for selectTableRows()
print "<td width='5%' align='center'><input
onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\"
- type=\"checkbox\"></td>";
+ type=\"checkbox\" id=\"FUPDC-$feed_id\"></td>";
print "<td>";
print "<a class=\"visibleLink\" href=\"#\" ".