diff options
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 96 |
1 files changed, 31 insertions, 65 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index e6e88f441..a5cd05a46 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -15,22 +15,6 @@ class Feeds extends Handler_Protected { $feed_id, $is_cat, $search, $error, $feed_last_updated) { - $catchup_sel_link = "Headlines.catchupSelection()"; - - $archive_sel_link = "Headlines.archiveSelection()"; - $delete_sel_link = "Headlines.deleteSelection()"; - - $sel_all_link = "Headlines.select('all')"; - $sel_unread_link = "Headlines.select('unread')"; - $sel_none_link = "Headlines.select('none')"; - $sel_inv_link = "Headlines.select('invert')"; - - $tog_unread_link = "Headlines.selectionToggleUnread()"; - $tog_marked_link = "Headlines.selectionToggleMarked()"; - $tog_published_link = "Headlines.selectionTogglePublished()"; - - $set_score_link = "Article.selectionSetScore()"; - if ($is_cat) $cat_q = "&is_cat=$is_cat"; if ($search) { @@ -39,23 +23,20 @@ class Feeds extends Handler_Protected { $search_q = ""; } - $reply = "<span class=\"holder\">"; + $reply = ""; $rss_link = htmlspecialchars(get_self_url_prefix() . "/public.php?op=rss&id=$feed_id$cat_q$search_q"); - // right part - $error_class = $error ? "error" : ""; - $reply .= "<span class='r'> - <a href=\"#\" + $reply .= "<span class='left'>"; + + $reply .= "<a href=\"#\" title=\"".__("Show as feed")."\" onclick=\"App.displayDlg('".__("Show as feed")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\"> - <img class=\"noborder\" src=\"images/pub_set.png\"></a>"; - + <img src=\"images/pub_set.png\"></a>"; -# $reply .= "<span>"; $reply .= "<span id='feed_title' class='$error_class'>"; if ($feed_site_url) { @@ -75,52 +56,37 @@ class Feeds extends Handler_Protected { $reply .= strip_tags($feed_title); } - $reply .= "</span>"; - - $reply .= "</span>"; - -# $reply .= "</span>"; - - // left part + $reply .= "</span></span>"; - $reply .= "<span class=\"main\">"; + $reply .= "<span class=\"right\">"; $reply .= "<span id='selected_prompt'></span>"; - - /*$reply .= "<span class=\"sel_links\"> - <a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>, - <a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>, - <a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>, - <a href=\"#\" onclick=\"$sel_none_link\">".__('None')."</a></li>"; - - $reply .= "</span> "; */ - + $reply .= " "; $reply .= "<select dojoType=\"dijit.form.Select\" onchange=\"Headlines.onActionChanged(this)\">"; $reply .= "<option value=\"0\" disabled='1'>".__('Select...')."</option>"; - $reply .= "<option value=\"$sel_all_link\">".__('All')."</option>"; - $reply .= "<option value=\"$sel_unread_link\">".__('Unread')."</option>"; - $reply .= "<option value=\"$sel_inv_link\">".__('Invert')."</option>"; - $reply .= "<option value=\"$sel_none_link\">".__('None')."</option>"; + $reply .= "<option value=\"Headlines.select('all')\">".__('All')."</option>"; + $reply .= "<option value=\"Headlines.select('unread')\">".__('Unread')."</option>"; + $reply .= "<option value=\"Headlines.select('invert')\">".__('Invert')."</option>"; + $reply .= "<option value=\"Headlines.select('none')\">".__('None')."</option>"; $reply .= "<option value=\"0\" disabled=\"1\">".__('Selection toggle:')."</option>"; - $reply .= "<option value=\"$tog_unread_link\">".__('Unread')."</option> - <option value=\"$tog_marked_link\">".__('Starred')."</option> - <option value=\"$tog_published_link\">".__('Published')."</option>"; + $reply .= "<option value=\"Headlines.selectionToggleUnread()\">".__('Unread')."</option> + <option value=\"Headlines.selectionToggleMarked()\">".__('Starred')."</option> + <option value=\"Headlines.selectionTogglePublished()\">".__('Published')."</option>"; $reply .= "<option value=\"0\" disabled=\"1\">".__('Selection:')."</option>"; - $reply .= "<option value=\"$catchup_sel_link\">".__('Mark as read')."</option>"; - $reply .= "<option value=\"$set_score_link\">".__('Set score')."</option>"; + $reply .= "<option value=\"Headlines.catchupSelection()\">".__('Mark as read')."</option>"; + $reply .= "<option value=\"Article.selectionSetScore()\">".__('Set score')."</option>"; - if ($feed_id != "0") { - $reply .= "<option value=\"$archive_sel_link\">".__('Archive')."</option>"; + if ($feed_id == 0 && !$is_cat) { + $reply .= "<option value=\"Headlines.archiveSelection()\">".__('Move back')."</option>"; + $reply .= "<option value=\"Headlines.deleteSelection()\">".__('Delete')."</option>"; } else { - $reply .= "<option value=\"$archive_sel_link\">".__('Move back')."</option>"; - $reply .= "<option value=\"$delete_sel_link\">".__('Delete')."</option>"; - + $reply .= "<option value=\"Headlines.archiveSelection()\">".__('Archive')."</option>"; } if (PluginHost::getInstance()->get_plugin("mail")) { @@ -148,7 +114,7 @@ class Feeds extends Handler_Protected { $reply .= $p->hook_headline_toolbar_button($feed_id, $is_cat); } - $reply .= "</span></span>"; + $reply .= "</span>"; return $reply; } @@ -401,7 +367,7 @@ class Feeds extends Handler_Protected { } } - $reply['content'] .= "<div class='hl hlMenuAttach $class' data-orig-feed-id='$feed_id' data-article-id='$id' id='RROW-$id' $mouseover_attrs>"; + $reply['content'] .= "<div class='hl $class' data-orig-feed-id='$feed_id' data-article-id='$id' id='RROW-$id' $mouseover_attrs>"; $reply['content'] .= "<div class='left'>"; @@ -415,7 +381,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= "</div>"; $reply['content'] .= "<div onclick='return Headlines.click(event, $id)' - class=\"title\"><span class='hl-content $hlc_suffix'>"; + class=\"title\"><span data-article-id=\"$id\" class='hl-content hlMenuAttach $hlc_suffix'>"; $reply['content'] .= "<a class=\"title $hlc_suffix\" href=\"" . htmlspecialchars($line["link"]) . "\" onclick=\"\">" . @@ -502,7 +468,7 @@ class Feeds extends Handler_Protected { id=\"RROW-$id\" data-content=\"$content_encoded\" data-article-id='$id' data-orig-feed-id='$feed_id' $mouseover_attrs>"; $tmp_content .= "<div class=\"header\">"; - $tmp_content .= "<div style=\"vertical-align : middle\">"; + $tmp_content .= "<div class=\"buttons\">"; $tmp_content .= "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" onclick=\"Headlines.onRowChecked(this)\" @@ -562,7 +528,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "<span class='updated' title='$date_entered_fmt'>$updated_fmt</span>"; - $tmp_content .= "<div style=\"vertical-align : middle\">"; + $tmp_content .= "<div class='right'>"; $tmp_content .= "$score_pic"; if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) { @@ -631,7 +597,7 @@ class Feeds extends Handler_Protected { $tags_str = Article::format_tags_string($tags, $id); - $tmp_content .= "<span class='left'>"; + $tmp_content .= "<div class='left'>"; $tmp_content .= "<img src='images/tag.png' alt='Tags' title='Tags'> <span id=\"ATSTR-$id\">$tags_str</span> @@ -659,8 +625,8 @@ class Feeds extends Handler_Protected { if ($entry_comments) $tmp_content .= " ($entry_comments)"; - $tmp_content .= "</span>"; - $tmp_content .= "<div>"; + $tmp_content .= "</div>"; + $tmp_content .= "<div class='right'>"; foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_BUTTON) as $p) { $tmp_content .= $p->hook_article_button($line); @@ -1019,7 +985,7 @@ class Feeds extends Handler_Protected { __('This feed requires authentication.')."</div>"; print "<div class=\"dlgButtons\"> - <button dojoType=\"dijit.form.Button\" class=\"btn-primary\" type=\"submit\" onclick=\"return dijit.byId('feedAddDlg').execute()\">".__('Subscribe')."</button>"; + <button dojoType=\"dijit.form.Button\" class=\"alt-primary\" type=\"submit\" onclick=\"return dijit.byId('feedAddDlg').execute()\">".__('Subscribe')."</button>"; if (!(defined('_DISABLE_FEED_BROWSER') && _DISABLE_FEED_BROWSER)) { print "<button dojoType=\"dijit.form.Button\" onclick=\"return CommonDialogs.feedBrowser()\">".__('More feeds')."</button>"; @@ -1115,7 +1081,7 @@ class Feeds extends Handler_Protected { </div>"; } - print "<button dojoType=\"dijit.form.Button\" type=\"submit\" class=\"btn-primary\" onclick=\"dijit.byId('searchDlg').execute()\">".__('Search')."</button> + print "<button dojoType=\"dijit.form.Button\" type=\"submit\" class=\"alt-primary\" onclick=\"dijit.byId('searchDlg').execute()\">".__('Search')."</button> <button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').hide()\">".__('Cancel')."</button> </div>"; |