]> git.wh0rd.org Git - tt-rss.git/commitdiff
rework entry display for prefs, filters, labels and users
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 17 May 2008 15:36:35 +0000 (16:36 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 17 May 2008 15:36:35 +0000 (16:36 +0100)
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-labels.php
modules/pref-users.php
prefs.js
tt-rss.css

index e52e54c8aa5ca85ae0f9683cd46a90d487ae4bd1..e4f6b60d6cde214cf01ce5ee5d3f403380841b9d 100644 (file)
                                print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");' 
                                type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
 
+                               $onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'";
+
                                if (get_pref($link, 'ENABLE_FEED_ICONS')) {
-                                       print "<td class='feedIcon'>$feed_icon</td>";           
+                                       print "<td $onclick class='feedIcon'>$feed_icon</td>";          
                                }
 
                                if ($hidden) {
                                                $parent_title)</span>";
                                }
 
-                               print "<td><a href=\"javascript:editFeed($feed_id);\">" . 
-                                       "$edit_title $parent_title" . "</a></td>";              
+                               print "<td $onclick>" . "$edit_title $parent_title" . "</td>";
 
                                if ($show_last_article_info) {
-                                       print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" . 
-                                               "$last_article</a></td>";
+                                       print "<td align='right' $onclick>" . 
+                                               "$last_article</td>";
                                }
 
-                               print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" . 
-                                       "$last_updated</a></td>";
+                               print "<td $onclick align='right'>$last_updated</td>";
 
                                print "</tr>";
        
index 7975e1297db8d3e3dc11db8de51ff28a3b9df91f..4fb59d4ae4652d72e0d6f51a3ce3c2bc40010c43 100644 (file)
                                        $line["action_param"] = "<span class=\"insensitive\">" . 
                                                $line["action_param"] . "</span>";
                                }       
+
+                               $onclick = "onclick='editFilter($filter_id)' title='".__('Click to edit')."'";
+
+                               print "<td $onclick>" . $line["reg_exp"] . "</td>";             
        
-                               print "<td><a href=\"javascript:editFilter($filter_id);\">" . 
-                                       $line["reg_exp"] . "</td>";             
-       
-                               print "<td><a href=\"javascript:editFilter($filter_id);\">" . 
-                                       $line["feed_title"] . "</td>";                  
+                               print "<td $onclick>" . $line["feed_title"] . "</td>";                  
 
                                $inverse_label = "";
 
                                        $inverse_label = " <span class='insensitive'>".__('(Inverse)')."</span>";
                                }
        
-                               print "<td><a href=\"javascript:editFilter($filter_id);\">" . 
-                                       $line["filter_type_descr"] . "$inverse_label</td>";             
+                               print "<td $onclick>" . $line["filter_type_descr"] . "$inverse_label</td>";             
                
 /*                             print "<td><a href=\"javascript:editFilter($filter_id);\">" . 
                                        $line["action_description"]."</td>"; */
 
-                               print "<td><a href=\"javascript:editFilter($filter_id);\">" . 
-                               $line["action_param"] . "</td>";
+                               print "<td $onclick>" . $line["action_param"] . "</td>";
 
                                print "</tr>";
        
index ce326bf01f53194807e23ab9350aa086cdbefacb..fda73ecf069e6436be1268de805d63bcbd7abc6d 100644 (file)
                                $line["sql_exp"] = htmlspecialchars($line["sql_exp"]);
                                $line["description"] = htmlspecialchars($line["description"]);
        
-                               if (!$line["description"]) $line["description"] = "[No caption]";
+                               if (!$line["description"]) $line["description"] = __("[No caption]");
+
+                               $onclick = "onclick='editLabel($label_id)' title='".__('Click to edit')."'";
        
                                print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"label\");' 
                                        type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
        
-                               print "<td><a href=\"javascript:editLabel($label_id);\">" . 
-                                       $line["description"] . "</td>";                 
-
-                               print "<td><a href=\"javascript:editLabel($label_id);\">" . 
-                                       $line["sql_exp"] . "</td>";             
+                               print "<td $onclick>" . $line["description"] . "</td>";                 
+                               print "<td $onclick>" . $line["sql_exp"] . "</td>";             
 
                                print "</tr>";
        
index 2e9eff7591e546238f8ece2dc6e41b31d5fbd945..961e314f4dbee84dffdef14e9485ac4f971fb8ff 100644 (file)
                                        strtotime($line["created"]));
                        }                               
 
-//                     if (!$edit_uid || $subop != "edit") {
-
-                               print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");' 
+                       print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");' 
                                type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
 
-                               print "<td><a href=\"javascript:editUser($uid);\">" . 
-                                       $line["login"] . "</td>";               
-
-                               if (!$line["email"]) $line["email"] = "&nbsp;";
-
-                               print "<td><a href=\"javascript:editUser($uid);\">" . 
-                                       $access_level_names[$line["access_level"]] . "</td>";                   
-
-/*                     } else if ($uid != $edit_uid) {
+                       $onclick = "onclick='editUser($uid) title='".__('Click to edit')."''";
 
-                               if (!$line["email"]) $line["email"] = "&nbsp;";
-
-                               print "<td align='center'><input disabled=\"true\" type=\"checkbox\" 
-                                       id=\"UMCHK-".$line["id"]."\"></td>";
-
-                               print "<td>".$line["login"]."</td>";            
-                               print "<td>".$line["email"]."</td>";            
-                               print "<td>".$access_level_names[$line["access_level"]]."</td>";
-
-                       } else {
+                       print "<td $onclick>" . $line["login"] . "</td>";               
 
-                               print "<td align='center'>
-                                       <input disabled=\"true\" type=\"checkbox\" checked></td>";
+                       if (!$line["email"]) $line["email"] = "&nbsp;";
 
-                               print "<td><input id=\"iedit_ulogin\" value=\"".$line["login"].
-                                       "\"></td>";
-
-                               print "<td><input id=\"iedit_email\" value=\"".$line["email"].
-                                       "\"></td>";
-
-                               print "<td>";
-                               print "<select id=\"iedit_ulevel\">";
-                               foreach (array_keys($access_level_names) as $al) {
-                                       if ($al == $line["access_level"]) {
-                                               $selected = "selected";
-                                       } else {
-                                               $selected = "";
-                                       }                                       
-                                       print "<option $selected id=\"$al\">" . 
-                                               $access_level_names[$al] . "</option>";
-                               }
-                               print "</select>";
-                               print "</td>";
-
-                       } */
-                               
-       
-                       print "<td>".$line["created"]."</td>";          
-                       print "<td>".$line["last_login"]."</td>";               
+                       print "<td $onclick>" . $access_level_names[$line["access_level"]] . "</td>";   
+                       print "<td $onclick>" . $line["created"] . "</td>";             
+                       print "<td $onclick>" . $line["last_login"] . "</td>";          
                
                        print "</tr>";
 
index 6889b7a6b1de7ad7a26b06e07f85ae48261d6edd..ad64f4812cefed5fdc7758607fe53c6996d9289e 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1772,7 +1772,6 @@ function pref_hotkey_handler(e) {
                                                return focus_element(search_boxes[i]);
                                        }
                                }
-
                        }
                }
 
@@ -1805,10 +1804,6 @@ function pref_hotkey_handler(e) {
                                return browseFeeds();
                        }
 
-                       if (keycode == 69) { // e
-                               return editCurrentEntryDispatcher();
-                       }
-
                }
 
                /* Prefix g */
@@ -2139,9 +2134,3 @@ function rescore_all_feeds() {
                        xmlhttp.send(null);
                }
 }
-
-function editCurrentEntryDispatcher() {
-       
-
-
-}
index 57f311ceda97249b8232ac1caa027c6e51ca33b0..4746a2e77748bf452b799e03014a5dc9dd334494 100644 (file)
@@ -446,6 +446,48 @@ table.prefFilterList td.filterEditCat {
        padding-top : 0.5em;
 }
 
+/* oh for the love of... */
+
+table.prefFilterList tr.even,
+table.prefFilterList tr.odd,
+table.prefFilterList tr.evenSelected,
+table.prefFilterList tr.oddSelected,
+table.prefLabelList tr.even,
+table.prefLabelList tr.odd,
+table.prefLabelList tr.evenSelected,
+table.prefLabelList tr.oddSelected,
+table.prefUserList tr.even,
+table.prefUserList tr.odd,
+table.prefUserList tr.evenSelected,
+table.prefUserList tr.oddSelected,
+table.prefFeedList tr.even,
+table.prefFeedList tr.odd,
+table.prefFeedList tr.evenSelected,
+table.prefFeedList tr.oddSelected
+{      
+       cursor : pointer;
+}
+
+table.prefFilterList tr.even:hover td, 
+table.prefFilterList tr.odd:hover td,
+table.prefFilterList tr.evenSelected:hover td, 
+table.prefFilterList tr.oddSelected:hover td 
+table.prefLabelList tr.even:hover td, 
+table.prefLabelList tr.odd:hover td,
+table.prefLabelList tr.evenSelected:hover td, 
+table.prefLabelList tr.oddSelected:hover td,
+table.prefUserList tr.even:hover td, 
+table.prefUserList tr.odd:hover td,
+table.prefUserList tr.evenSelected:hover td, 
+table.prefUserList tr.oddSelected:hover td,
+table.prefFeedList tr.even:hover td, 
+table.prefFeedList tr.odd:hover td,
+table.prefFeedList tr.evenSelected:hover td, 
+table.prefFeedList tr.oddSelected:hover td
+{
+       color : #88b0f0;
+}
+
 table.prefFeedList td.feedIcon {
        text-align : center;
 }