unify main and headlines toolbar

master
Andrew Dolgov 11 years ago
parent a3c6695a85
commit 1bffd1068f

@ -43,6 +43,8 @@ class Feeds extends Handler_Protected {
$search_q = ""; $search_q = "";
} }
$reply .= "<span class=\"holder\">";
$rss_link = htmlspecialchars(get_self_url_prefix() . $rss_link = htmlspecialchars(get_self_url_prefix() .
"/public.php?op=rss&id=$feed_id$cat_q$search_q"); "/public.php?op=rss&id=$feed_id$cat_q$search_q");
@ -50,10 +52,18 @@ class Feeds extends Handler_Protected {
$error_class = $error ? "error" : ""; $error_class = $error ? "error" : "";
$reply .= "<span class='r'>"; $reply .= "<span class='r'>
$reply .= "<span id='selected_prompt'></span>"; <a href=\"#\"
title=\"".__("View as RSS feed")."\"
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<img class=\"noborder\" src=\"images/pub_set.png\"></a>";
# $reply .= "<span>";
$reply .= "<span id='feed_title' class='$error_class'>"; $reply .= "<span id='feed_title' class='$error_class'>";
$reply .= "</span>";
if ($feed_site_url) { if ($feed_site_url) {
$last_updated = T_sprintf("Last updated: %s", $last_updated = T_sprintf("Last updated: %s",
$feed_last_updated); $feed_last_updated);
@ -72,18 +82,15 @@ class Feeds extends Handler_Protected {
} }
$reply .= "</span>"; $reply .= "</span>";
$reply .= "<span id='selected_prompt'></span>";
$reply .= " # $reply .= "</span>";
<a href=\"#\"
title=\"".__("View as RSS feed")."\"
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.png\"></a>";
$reply .= "</span>";
// left part // left part
$reply .= __('Select:')." $reply .= "<span class=\"main\">";
$reply .= "
<a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>, <a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>,
<a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>, <a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>,
<a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>, <a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>,
@ -132,14 +139,14 @@ class Feeds extends Handler_Protected {
$reply .= "</select>"; $reply .= "</select>";
//$reply .= "</div>";
//$reply .= "</h2"; //$reply .= "</h2";
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) {
echo $p->hook_headline_toolbar_button($feed_id, $is_cat); echo $p->hook_headline_toolbar_button($feed_id, $is_cat);
} }
$reply .= "</span></span>";
return $reply; return $reply;
} }

@ -247,7 +247,7 @@ div.cdmHeader span.author {
div#floatingTitle { div#floatingTitle {
position : absolute; position : absolute;
z-index : 5; z-index : 5;
top : 25px; top : 0px;
right : 0px; right : 0px;
left : 0px; left : 0px;
border-color : #ccc; border-color : #ccc;

@ -203,14 +203,6 @@ a:hover {
color : #909090; color : #909090;
} }
/* #headlines-frame div.hl:nth-child(even) {
background : #fafafa;
} */
#headlines-frame.normal {
}
.hl { .hl {
border-width : 0px 0px 1px 0px; border-width : 0px 0px 1px 0px;
border-style : solid; border-style : solid;
@ -321,39 +313,44 @@ div.prefHelp {
color : #555; color : #555;
} }
div#headlines-toolbar { #main-toolbar > * {
border-width : 0px; white-space : nowrap;
font-size : 12px; display : table-cell;
color : #999;
font-family : "Segoe UI", Tahoma, sans-serif; font-family : "Segoe UI", Tahoma, sans-serif;
color : #555;
padding : 0px;
margin : 0px;
overflow : hidden;
height : 25px;
line-height : 25px;
padding-left : 4px;
background : white;
} }
div#headlines-toolbar .dijitSelect { #main-toolbar #headlines-toolbar {
font-size : 11px; padding-right : 4px;
position : relative; width : 100%;
top : -2px; }
#main-toolbar #headlines-toolbar span.holder {
display : table;
width : 100%;
} }
div#headlines-toolbar span.r { #main-toolbar #headlines-toolbar span.holder > * {
float: right; display : table-cell;
position: relative; }
padding : 0 4px 0px 4px;
#main-toolbar #headlines-toolbar .main {
text-align : right; text-align : right;
} }
#headlines-toolbar span.r img {
margin-right : 4px;
position : relative;
top : 3px;
}
#headlines-toolbar span.r .error a { #headlines-toolbar span.r .error a {
color : red; color : red;
} }
div#headlines-toolbar span.r a { #main-toolbar #selected_prompt {
color : #555; font-style : italic;
text-align : center;
} }
span.contentPreview { span.contentPreview {
@ -524,14 +521,6 @@ form {
padding : 0px; padding : 0px;
} }
#main_toolbar_form {
margin : 0px;
padding : 0px;
display : table-cell;
white-space : nowrap;
width : 100%;
}
div.loadingPrompt { div.loadingPrompt {
padding : 1em; padding : 1em;
text-align : center; text-align : center;
@ -551,12 +540,6 @@ div.whiteBox {
margin: 0; margin: 0;
} */ } */
#toolbar div.actionChooser {
display : table-cell;
text-align : right;
padding-right : 3px;
}
div.autocomplete { div.autocomplete {
position : absolute; position : absolute;
width : 250px; width : 250px;

@ -153,6 +153,10 @@
<div id="toolbar" dojoType="dijit.layout.ContentPane" region="top"> <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
<div id="main-toolbar" dojoType="dijit.Toolbar"> <div id="main-toolbar" dojoType="dijit.Toolbar">
<form id="headlines-toolbar" action="" onsubmit='return false'>
</form>
<form id="main_toolbar_form" action="" onsubmit='return false'> <form id="main_toolbar_form" action="" onsubmit='return false'>
<button dojoType="dijit.form.Button" id="collapse_feeds_btn" <button dojoType="dijit.form.Button" id="collapse_feeds_btn"
@ -257,9 +261,6 @@
<div id="headlines-wrap-inner" dojoType="dijit.layout.BorderContainer" region="center"> <div id="headlines-wrap-inner" dojoType="dijit.layout.BorderContainer" region="center">
<div id="headlines-toolbar" dojoType="dijit.layout.ContentPane" region="top">
</div>
<div id="floatingTitle" style="display : none"></div> <div id="floatingTitle" style="display : none"></div>
<div id="headlines-frame" dojoType="dijit.layout.ContentPane" <div id="headlines-frame" dojoType="dijit.layout.ContentPane"

@ -87,8 +87,12 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
dijit.byId("headlines-frame").attr('content', dijit.byId("headlines-frame").attr('content',
reply['headlines']['content']); reply['headlines']['content']);
dijit.byId("headlines-toolbar").attr('content', //dijit.byId("headlines-toolbar").attr('content',
reply['headlines']['toolbar']); // reply['headlines']['toolbar']);
dojo.html.set($("headlines-toolbar"),
reply['headlines']['toolbar'],
{parseContent: true});
$$("#headlines-frame > div[id*=RROW]").each(function(row) { $$("#headlines-frame > div[id*=RROW]").each(function(row) {
if (loaded_article_ids.indexOf(row.id) != -1) { if (loaded_article_ids.indexOf(row.id) != -1) {

Loading…
Cancel
Save