rework net-alert to use iconfont, move it to toolbar start
This commit is contained in:
parent
f89ecda9b8
commit
0ea0b606be
|
@ -758,6 +758,9 @@ body.ttrss_main #toolbar-frame #toolbar .dijitDropDownButton .dijitButtonNode,
|
|||
body.ttrss_main #toolbar-frame #toolbar .dijitComboButton .dijitButtonNode {
|
||||
border: 0px;
|
||||
}
|
||||
body.ttrss_main #toolbar-frame #toolbar .net-alert i {
|
||||
color: red;
|
||||
}
|
||||
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
||||
padding-right: 4px;
|
||||
flex-grow: 2;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -891,6 +891,10 @@ body.ttrss_main {
|
|||
border : 0px;
|
||||
}
|
||||
|
||||
.net-alert i {
|
||||
color : red;
|
||||
}
|
||||
|
||||
#toolbar-headlines {
|
||||
padding-right : 4px;
|
||||
flex-grow : 2;
|
||||
|
|
10
index.php
10
index.php
|
@ -161,6 +161,11 @@
|
|||
<div id="toolbar-frame" dojoType="dijit.layout.ContentPane" region="top">
|
||||
<div id="toolbar" dojoType="dijit.Toolbar">
|
||||
|
||||
<div class="net-alert" style="display : none"
|
||||
title="<?php echo __("Communication problem with server.") ?>">
|
||||
<i class="material-icons">error_outline</i>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) {
|
||||
echo $p->hook_main_toolbar_button();
|
||||
|
@ -219,11 +224,6 @@
|
|||
}
|
||||
?>
|
||||
|
||||
<button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
|
||||
title="<?php echo __("Communication problem with server.") ?>">
|
||||
<img src="images/error.png" />
|
||||
</button>
|
||||
|
||||
<div dojoType="dijit.form.DropDownButton">
|
||||
<span><?php echo __('Actions...') ?></span>
|
||||
<div dojoType="dijit.Menu" style="display: none">
|
||||
|
|
|
@ -184,10 +184,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
},
|
||||
handleRpcJson: function(transport) {
|
||||
|
||||
const netalert_dijit = dijit.byId("net-alert");
|
||||
let netalert = false;
|
||||
|
||||
if (netalert_dijit) netalert = netalert_dijit.domNode;
|
||||
const netalert = $$("#toolbar .net-alert")[0];
|
||||
|
||||
try {
|
||||
const reply = JSON.parse(transport.responseText);
|
||||
|
@ -239,16 +236,14 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
return reply;
|
||||
|
||||
} else {
|
||||
if (netalert)
|
||||
netalert.show();
|
||||
else
|
||||
if (netalert) netalert.show();
|
||||
|
||||
Notify.error("Communication problem with server.");
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
if (netalert)
|
||||
netalert.show();
|
||||
else
|
||||
if (netalert) netalert.show();
|
||||
|
||||
Notify.error("Communication problem with server.");
|
||||
|
||||
console.error(e);
|
||||
|
|
|
@ -758,6 +758,9 @@ body.ttrss_main #toolbar-frame #toolbar .dijitDropDownButton .dijitButtonNode,
|
|||
body.ttrss_main #toolbar-frame #toolbar .dijitComboButton .dijitButtonNode {
|
||||
border: 0px;
|
||||
}
|
||||
body.ttrss_main #toolbar-frame #toolbar .net-alert i {
|
||||
color: red;
|
||||
}
|
||||
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
||||
padding-right: 4px;
|
||||
flex-grow: 2;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue