]> git.wh0rd.org - tt-rss.git/commitdiff
unify main and headlines toolbar
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 27 Jan 2014 18:03:42 +0000 (22:03 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 27 Jan 2014 18:03:42 +0000 (22:03 +0400)
classes/feeds.php
css/cdm.css
css/tt-rss.css
index.php
js/viewfeed.js

index 536f1b7939a1649be449c057c41b06660703f05c..c0f5bcf9356b4ea898da533e80028c2c0ac658a9 100644 (file)
@@ -43,6 +43,8 @@ class Feeds extends Handler_Protected {
                        $search_q = "";
                }
 
+               $reply .= "<span class=\"holder\">";
+
                $rss_link = htmlspecialchars(get_self_url_prefix() .
                        "/public.php?op=rss&id=$feed_id$cat_q$search_q");
 
@@ -50,10 +52,18 @@ class Feeds extends Handler_Protected {
 
                $error_class = $error ? "error" : "";
 
-               $reply .= "<span class='r'>";
-               $reply .= "<span id='selected_prompt'></span>";
+               $reply .= "<span class='r'>
+                       <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>";
+
                if ($feed_site_url) {
                        $last_updated = T_sprintf("Last updated: %s",
                                $feed_last_updated);
@@ -72,18 +82,15 @@ class Feeds extends Handler_Protected {
                }
 
                $reply .= "</span>";
+               $reply .= "<span id='selected_prompt'></span>";
 
-               $reply .= "
-                       <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>";
+#              $reply .= "</span>";
 
                // left part
 
-               $reply .= __('Select:')."
+               $reply .= "<span class=\"main\">";
+
+               $reply .= "
                        <a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>,
                        <a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>,
                        <a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>,
@@ -132,14 +139,14 @@ class Feeds extends Handler_Protected {
 
                $reply .= "</select>";
 
-               //$reply .= "</div>";
-
                //$reply .= "</h2";
 
                foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) {
                         echo $p->hook_headline_toolbar_button($feed_id, $is_cat);
                }
 
+               $reply .= "</span></span>";
+
                return $reply;
        }
 
index 5b004fccfa49a72a23ee9949f48cfdc0b498c294..ef3ef52d616216a6e07bebb346136fb632de2368 100644 (file)
@@ -247,7 +247,7 @@ div.cdmHeader span.author {
 div#floatingTitle {
        position : absolute;
        z-index : 5;
-       top : 25px;
+       top : 0px;
        right : 0px;
        left : 0px;
        border-color : #ccc;
index 96e9fb00dd72b20c06db71ed0e05f6d30b450b6f..ee921716a1123e4dac6ae1e797b5d3eaf1c2d5cf 100644 (file)
@@ -203,14 +203,6 @@ a:hover {
        color : #909090;
 }
 
-/* #headlines-frame div.hl:nth-child(even) {
-       background : #fafafa;
-} */
-
-#headlines-frame.normal {
-
-}
-
 .hl {
        border-width : 0px 0px 1px 0px;
        border-style : solid;
@@ -321,39 +313,44 @@ div.prefHelp {
        color : #555;
 }
 
-div#headlines-toolbar {
-       border-width : 0px;
-       font-size : 12px;
+#main-toolbar > * {
+       white-space : nowrap;
+       display : table-cell;
+       color : #999;
        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 {
-       font-size : 11px;
-       position : relative;
-       top : -2px;
+#main-toolbar #headlines-toolbar {
+       padding-right : 4px;
+       width : 100%;
+}
+
+#main-toolbar #headlines-toolbar span.holder {
+       display : table;
+       width : 100%;
 }
 
-div#headlines-toolbar span.r {
-       float: right;
-   position: relative;
-       padding : 0 4px 0px 4px;
+#main-toolbar #headlines-toolbar span.holder > * {
+       display : table-cell;
+}
+
+#main-toolbar #headlines-toolbar .main {
        text-align : right;
-}      
+}
+
+#headlines-toolbar span.r img {
+       margin-right : 4px;
+       position : relative;
+       top : 3px;
+}
 
 #headlines-toolbar span.r .error a {
        color : red;
 }
 
-div#headlines-toolbar span.r a {
-       color : #555;
+#main-toolbar #selected_prompt {
+       font-style : italic;
+       text-align : center;
 }
 
 span.contentPreview {
@@ -524,14 +521,6 @@ form {
        padding : 0px;
 }
 
-#main_toolbar_form {
-       margin : 0px;
-       padding : 0px;
-       display : table-cell;
-       white-space : nowrap;
-       width : 100%;
-}
-
 div.loadingPrompt {
        padding : 1em;
        text-align : center;
@@ -551,12 +540,6 @@ div.whiteBox {
        margin: 0;
 } */
 
-#toolbar div.actionChooser {
-       display : table-cell;
-       text-align : right;
-       padding-right : 3px;
-}
-
 div.autocomplete {
        position : absolute;
        width : 250px;
index d0369e808fa73e4b9719bbab7d6dafd949c35d22..303eacda0a454de3b6504555edafcbfe10734046 100644 (file)
--- a/index.php
+++ b/index.php
 <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
        <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'>
 
                <button dojoType="dijit.form.Button" id="collapse_feeds_btn"
 
        <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="headlines-frame" dojoType="dijit.layout.ContentPane"
index 3295182fc90af7fdb03b30bae1d216a8172655f4..8a07965fcc0c1d5882037d53343f7615dfd3306b 100644 (file)
@@ -87,8 +87,12 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
                                dijit.byId("headlines-frame").attr('content',
                                        reply['headlines']['content']);
 
-                               dijit.byId("headlines-toolbar").attr('content',
-                                       reply['headlines']['toolbar']);
+                               //dijit.byId("headlines-toolbar").attr('content',
+                               //      reply['headlines']['toolbar']);
+
+                               dojo.html.set($("headlines-toolbar"),
+                                               reply['headlines']['toolbar'],
+                                               {parseContent: true});
 
                                $$("#headlines-frame > div[id*=RROW]").each(function(row) {
                                        if (loaded_article_ids.indexOf(row.id) != -1) {