rename main toolbar elements to be more consistent

This commit is contained in:
Andrew Dolgov 2018-12-05 10:03:58 +03:00
parent d967d43319
commit 05200a3840
9 changed files with 160 additions and 190 deletions

View File

@ -15,12 +15,6 @@ body.ttrss_main {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
overflow: hidden; overflow: hidden;
/* #content-insert_splitter.dijitSplitterH {
background : #f0f0f0;
border-color: #ddd;
border-top-width : 1px;
border-style : solid;
} */
} }
body.ttrss_main :focus { body.ttrss_main :focus {
outline: none; outline: none;
@ -382,50 +376,6 @@ body.ttrss_main .insensitive {
body.ttrss_main .small { body.ttrss_main .small {
font-size: 11px; font-size: 11px;
} }
body.ttrss_main #main-toolbar {
background: white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height: 32px;
line-height: 32px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
color: #555555;
font-size: 12px;
}
body.ttrss_main #main-toolbar > * {
align-self: center;
}
body.ttrss_main #main-toolbar .dijitSelect,
body.ttrss_main #main-toolbar .dijitDropDownButton .dijitButtonNode,
body.ttrss_main #main-toolbar .dijitComboButton .dijitButtonNode {
border: 0px;
}
body.ttrss_main #main-toolbar #headlines-toolbar {
padding-right: 4px;
flex-grow: 2;
display: flex;
}
body.ttrss_main #main-toolbar #headlines-toolbar .left {
flex-grow: 2;
}
body.ttrss_main #main-toolbar #headlines-toolbar .left img {
vertical-align: middle;
margin-right: 8px;
position: relative;
top: -2px;
}
body.ttrss_main #main-toolbar #selected_prompt {
font-style: italic;
text-align: right;
margin-right: 4px;
}
@media (max-width: 992px) {
body.ttrss_main #main-toolbar #selected_prompt {
display: none;
}
}
body.ttrss_main span.preview { body.ttrss_main span.preview {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
@ -757,17 +707,60 @@ body.ttrss_main #headlines-frame div.feed-title a {
body.ttrss_main #headlines-frame div.feed-title a:hover { body.ttrss_main #headlines-frame div.feed-title a:hover {
color: #257aa7; color: #257aa7;
} }
body.ttrss_main #headlines-toolbar_splitter, body.ttrss_main #toolbar-frame_splitter {
body.ttrss_main #toolbar_splitter {
display: none; display: none;
} }
body.ttrss_main #toolbar { body.ttrss_main #toolbar-frame {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
border-width: 0px; border-width: 0px;
white-space: nowrap; white-space: nowrap;
font-size: 12px; font-size: 12px;
} }
body.ttrss_main #toolbar-frame #toolbar {
background: white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height: 32px;
line-height: 32px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
color: #555555;
font-size: 12px;
}
body.ttrss_main #toolbar-frame #toolbar > * {
align-self: center;
}
body.ttrss_main #toolbar-frame #toolbar .dijitSelect,
body.ttrss_main #toolbar-frame #toolbar .dijitDropDownButton .dijitButtonNode,
body.ttrss_main #toolbar-frame #toolbar .dijitComboButton .dijitButtonNode {
border: 0px;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
padding-right: 4px;
flex-grow: 2;
display: flex;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines .left {
flex-grow: 2;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines .left img {
vertical-align: middle;
margin-right: 8px;
position: relative;
top: -2px;
}
body.ttrss_main #toolbar-frame #toolbar #selected_prompt {
font-style: italic;
text-align: right;
margin-right: 4px;
}
@media (max-width: 992px) {
body.ttrss_main #toolbar-frame #toolbar #selected_prompt {
display: none;
}
}
body.ttrss_main #header { body.ttrss_main #header {
border-width: 0px; border-width: 0px;
text-align: right; text-align: right;

File diff suppressed because one or more lines are too long

View File

@ -434,67 +434,6 @@ body.ttrss_main {
font-size : 11px; font-size : 11px;
} }
#main-toolbar {
background : white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height : 32px;
line-height : 32px;
display : flex;
flex-direction : row;
flex-wrap : nowrap;
color : @default-text;
font-size : 12px;
> * {
align-self : center;
}
.dijitSelect,
.dijitDropDownButton .dijitButtonNode,
.dijitComboButton .dijitButtonNode {
border : 0px;
}
#main_toolbar_form {
}
#headlines-toolbar {
padding-right : 4px;
flex-grow : 2;
display : flex;
.left {
flex-grow: 2;
img {
vertical-align : middle;
margin-right : 8px;
position : relative;
top : -2px;
}
}
}
#selected_prompt {
font-style : italic;
text-align : right;
margin-right : 4px;
}
.actionChooser {
}
@media (max-width: 992px) {
#selected_prompt {
display : none;
}
}
}
span.preview { span.preview {
color : #999; color : #999;
font-weight : normal; font-weight : normal;
@ -892,23 +831,68 @@ body.ttrss_main {
} }
} }
#headlines-toolbar_splitter, #toolbar_splitter { #toolbar-frame_splitter {
display : none; display : none;
} }
/* #content-insert_splitter.dijitSplitterH { #toolbar-frame {
background : #f0f0f0;
border-color: #ddd;
border-top-width : 1px;
border-style : solid;
} */
#toolbar {
padding : 0px; padding : 0px;
margin : 0px; margin : 0px;
border-width : 0px; border-width : 0px;
white-space: nowrap; white-space: nowrap;
font-size : 12px; font-size : 12px;
#toolbar {
background : white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height : 32px;
line-height : 32px;
display : flex;
flex-direction : row;
flex-wrap : nowrap;
color : @default-text;
font-size : 12px;
> * {
align-self : center;
}
.dijitSelect,
.dijitDropDownButton .dijitButtonNode,
.dijitComboButton .dijitButtonNode {
border : 0px;
}
#toolbar-headlines {
padding-right : 4px;
flex-grow : 2;
display : flex;
.left {
flex-grow: 2;
img {
vertical-align : middle;
margin-right : 8px;
position : relative;
top : -2px;
}
}
}
#selected_prompt {
font-style : italic;
text-align : right;
margin-right : 4px;
}
@media (max-width: 992px) {
#selected_prompt {
display : none;
}
}
}
} }
#header { #header {

View File

@ -161,8 +161,8 @@
<div dojoType="dijit.layout.BorderContainer" region="center" id="header-wrap" gutters="false"> <div dojoType="dijit.layout.BorderContainer" region="center" id="header-wrap" gutters="false">
<div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap"> <div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap">
<div id="toolbar" dojoType="dijit.layout.ContentPane" region="top"> <div id="toolbar-frame" dojoType="dijit.layout.ContentPane" region="top">
<div id="main-toolbar" dojoType="dijit.Toolbar"> <div id="toolbar" dojoType="dijit.Toolbar">
<?php <?php
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) {
@ -170,11 +170,11 @@
} }
?> ?>
<form id="headlines-toolbar" action="" onsubmit='return false'> <form id="toolbar-headlines" action="" onsubmit='return false'>
</form> </form>
<form id="main_toolbar_form" action="" onsubmit='return false'> <form id="toolbar-main" action="" onsubmit='return false'>
<select name="view_mode" title="<?php echo __('Show articles') ?>" <select name="view_mode" title="<?php echo __('Show articles') ?>"
onchange="App.onViewModeChanged()" onchange="App.onViewModeChanged()"
@ -214,7 +214,7 @@
</form> </form>
<div class="actionChooser"> <div class="action-chooser">
<?php <?php
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) {

View File

@ -319,10 +319,10 @@ define(["dojo/_base/declare"], function (declare) {
}, 10 * 1000); }, 10 * 1000);
} }
Form.enable("main_toolbar_form"); Form.enable("toolbar-main");
let query = Object.assign({op: "feeds", method: "view", feed: feed}, let query = Object.assign({op: "feeds", method: "view", feed: feed},
dojo.formToObject("main_toolbar_form")); dojo.formToObject("toolbar-main"));
if (method) query.m = method; if (method) query.m = method;
@ -347,7 +347,7 @@ define(["dojo/_base/declare"], function (declare) {
query.m = "ForceUpdate"; query.m = "ForceUpdate";
} }
Form.enable("main_toolbar_form"); Form.enable("toolbar-main");
if (!delayed) if (!delayed)
if (!this.setExpando(feed, is_cat, if (!this.setExpando(feed, is_cat,

View File

@ -46,7 +46,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
}, },
loadMore: function () { loadMore: function () {
const view_mode = document.forms["main_toolbar_form"].view_mode.value; const view_mode = document.forms["toolbar-main"].view_mode.value;
const unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length; const unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length;
const num_all = $$("#headlines-frame > div[id*=RROW]").length; const num_all = $$("#headlines-frame > div[id*=RROW]").length;
const num_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat()); const num_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat());
@ -270,7 +270,7 @@ define(["dojo/_base/declare"], function (declare) {
if (offset == 0) { if (offset == 0) {
this.loaded_article_ids = []; this.loaded_article_ids = [];
dojo.html.set($("headlines-toolbar"), dojo.html.set($("toolbar-headlines"),
reply['headlines']['toolbar'], reply['headlines']['toolbar'],
{parseContent: true}); {parseContent: true});
@ -389,7 +389,7 @@ define(["dojo/_base/declare"], function (declare) {
Notify.close(); Notify.close();
}, },
reverse: function () { reverse: function () {
const toolbar = document.forms["main_toolbar_form"]; const toolbar = document.forms["toolbar-main"];
const order_by = dijit.getEnclosingWidget(toolbar.order_by); const order_by = dijit.getEnclosingWidget(toolbar.order_by);
let value = order_by.attr('value'); let value = order_by.attr('value');

View File

@ -121,7 +121,7 @@ require(["dojo/_base/kernel",
Cookie.delete("ttrss_test"); Cookie.delete("ttrss_test");
const toolbar = document.forms["main_toolbar_form"]; const toolbar = document.forms["toolbar-main"];
dijit.getEnclosingWidget(toolbar.view_mode).attr('value', dijit.getEnclosingWidget(toolbar.view_mode).attr('value',
App.getInitParam("default_view_mode")); App.getInitParam("default_view_mode"));

View File

@ -15,12 +15,6 @@ body.ttrss_main {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
overflow: hidden; overflow: hidden;
/* #content-insert_splitter.dijitSplitterH {
background : #f0f0f0;
border-color: #ddd;
border-top-width : 1px;
border-style : solid;
} */
} }
body.ttrss_main :focus { body.ttrss_main :focus {
outline: none; outline: none;
@ -382,50 +376,6 @@ body.ttrss_main .insensitive {
body.ttrss_main .small { body.ttrss_main .small {
font-size: 11px; font-size: 11px;
} }
body.ttrss_main #main-toolbar {
background: white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height: 32px;
line-height: 32px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
color: #555555;
font-size: 12px;
}
body.ttrss_main #main-toolbar > * {
align-self: center;
}
body.ttrss_main #main-toolbar .dijitSelect,
body.ttrss_main #main-toolbar .dijitDropDownButton .dijitButtonNode,
body.ttrss_main #main-toolbar .dijitComboButton .dijitButtonNode {
border: 0px;
}
body.ttrss_main #main-toolbar #headlines-toolbar {
padding-right: 4px;
flex-grow: 2;
display: flex;
}
body.ttrss_main #main-toolbar #headlines-toolbar .left {
flex-grow: 2;
}
body.ttrss_main #main-toolbar #headlines-toolbar .left img {
vertical-align: middle;
margin-right: 8px;
position: relative;
top: -2px;
}
body.ttrss_main #main-toolbar #selected_prompt {
font-style: italic;
text-align: right;
margin-right: 4px;
}
@media (max-width: 992px) {
body.ttrss_main #main-toolbar #selected_prompt {
display: none;
}
}
body.ttrss_main span.preview { body.ttrss_main span.preview {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
@ -757,17 +707,60 @@ body.ttrss_main #headlines-frame div.feed-title a {
body.ttrss_main #headlines-frame div.feed-title a:hover { body.ttrss_main #headlines-frame div.feed-title a:hover {
color: #257aa7; color: #257aa7;
} }
body.ttrss_main #headlines-toolbar_splitter, body.ttrss_main #toolbar-frame_splitter {
body.ttrss_main #toolbar_splitter {
display: none; display: none;
} }
body.ttrss_main #toolbar { body.ttrss_main #toolbar-frame {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
border-width: 0px; border-width: 0px;
white-space: nowrap; white-space: nowrap;
font-size: 12px; font-size: 12px;
} }
body.ttrss_main #toolbar-frame #toolbar {
background: white;
border: 0px solid #ddd;
border-bottom-width: 1px;
height: 32px;
line-height: 32px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
color: #555555;
font-size: 12px;
}
body.ttrss_main #toolbar-frame #toolbar > * {
align-self: center;
}
body.ttrss_main #toolbar-frame #toolbar .dijitSelect,
body.ttrss_main #toolbar-frame #toolbar .dijitDropDownButton .dijitButtonNode,
body.ttrss_main #toolbar-frame #toolbar .dijitComboButton .dijitButtonNode {
border: 0px;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
padding-right: 4px;
flex-grow: 2;
display: flex;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines .left {
flex-grow: 2;
}
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines .left img {
vertical-align: middle;
margin-right: 8px;
position: relative;
top: -2px;
}
body.ttrss_main #toolbar-frame #toolbar #selected_prompt {
font-style: italic;
text-align: right;
margin-right: 4px;
}
@media (max-width: 992px) {
body.ttrss_main #toolbar-frame #toolbar #selected_prompt {
display: none;
}
}
body.ttrss_main #header { body.ttrss_main #header {
border-width: 0px; border-width: 0px;
text-align: right; text-align: right;

File diff suppressed because one or more lines are too long