collapse actions summary list in filter tree if 'toggle rule display' is disabled, remove label-specific icon display, simplify markup
This commit is contained in:
@@ -286,20 +286,6 @@ class Pref_Filters extends Handler_Protected {
|
||||
}
|
||||
}
|
||||
|
||||
if ($line['action_id'] == self::ACTION_LABEL) {
|
||||
$label_sth = $this->pdo->prepare("SELECT fg_color, bg_color
|
||||
FROM ttrss_labels2 WHERE caption = ? AND
|
||||
owner_uid = ?");
|
||||
$label_sth->execute([$line['action_param'], $_SESSION['uid']]);
|
||||
|
||||
if ($label_row = $label_sth->fetch()) {
|
||||
//$fg_color = $label_row["fg_color"];
|
||||
$bg_color = $label_row["bg_color"];
|
||||
|
||||
$name[1] = "<i class=\"material-icons\" style='color : $bg_color; margin-right : 4px'>label</i>" . $name[1];
|
||||
}
|
||||
}
|
||||
|
||||
$filter = array();
|
||||
$filter['id'] = 'FILTER:' . $line['id'];
|
||||
$filter['bare_id'] = $line['id'];
|
||||
@@ -759,13 +745,13 @@ class Pref_Filters extends Handler_Protected {
|
||||
continue;
|
||||
}
|
||||
|
||||
array_push($actions_summary, self::_get_action_name($action));
|
||||
array_push($actions_summary, "<li>" . self::_get_action_name($action) . "</li>");
|
||||
}
|
||||
|
||||
// inject a fake action description using cumulative filter score
|
||||
if ($cumulative_score != 0) {
|
||||
array_unshift($actions_summary,
|
||||
self::_get_action_name(["action_id" => self::ACTION_SCORE, "action_param" => $cumulative_score]));
|
||||
"<li>" . self::_get_action_name(["action_id" => self::ACTION_SCORE, "action_param" => $cumulative_score]) . "</li>");
|
||||
}
|
||||
|
||||
if (count($actions_summary) > self::MAX_ACTIONS_TO_DISPLAY) {
|
||||
@@ -773,10 +759,10 @@ class Pref_Filters extends Handler_Protected {
|
||||
$actions_summary = array_slice($actions_summary, 0, self::MAX_ACTIONS_TO_DISPLAY);
|
||||
|
||||
array_push($actions_summary,
|
||||
"<em class='text-muted'>" . sprintf(_ngettext("(+%d action)", "(+%d actions)", $actions_not_shown), $actions_not_shown)) . "</em>";
|
||||
"<li class='text-muted'><em>" . sprintf(_ngettext("(+%d action)", "(+%d actions)", $actions_not_shown), $actions_not_shown)) . "</em></li>";
|
||||
}
|
||||
|
||||
return [implode(", ", $title_summary), implode("<br/>", $actions_summary)];
|
||||
return [implode(", ", $title_summary), implode("", $actions_summary)];
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
@@ -28,8 +28,8 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
||||
const rules = this.model.store.getValue(args.item, 'rules');
|
||||
|
||||
if (param) {
|
||||
param = dojo.doc.createElement('span');
|
||||
param.className = (enabled != false) ? 'labelParam' : 'labelParam filterDisabled';
|
||||
param = dojo.doc.createElement('ul');
|
||||
param.className = (enabled != false) ? 'actions_summary' : 'actions_summary filterDisabled';
|
||||
param.innerHTML = args.item.param[0];
|
||||
domConstruct.place(param, tnode.rowNode, 'first');
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1753,6 +1760,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
body.ttrss_utility.sanity_failed {
|
||||
background: #900;
|
||||
}
|
||||
@@ -1964,11 +1980,6 @@ body.ttrss_utility.share_popup .content {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1753,6 +1760,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
.flat {
|
||||
/*#feedTree {
|
||||
.dijitTreeContent .dijitInline {
|
||||
@@ -1866,11 +1882,6 @@ body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1753,6 +1760,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
body.ttrss_utility.sanity_failed {
|
||||
background: #900;
|
||||
}
|
||||
@@ -1964,11 +1980,6 @@ body.ttrss_utility.share_popup .content {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1753,6 +1760,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
body.ttrss_utility.sanity_failed {
|
||||
background: #900;
|
||||
}
|
||||
@@ -1964,11 +1980,6 @@ body.ttrss_utility.share_popup .content {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -148,12 +148,6 @@
|
||||
top : -2px;
|
||||
}*/
|
||||
|
||||
.labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dijitTreeRow.filterDisabled {
|
||||
opacity : 0.5;
|
||||
|
||||
|
||||
@@ -268,6 +268,15 @@ body.ttrss_prefs {
|
||||
word-break : break-all;
|
||||
}
|
||||
}
|
||||
|
||||
ul.actions_summary {
|
||||
float : right;
|
||||
margin-right : 16px;
|
||||
margin-top : 0;
|
||||
list-style-type : none;
|
||||
text-align : right;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
body.ttrss_prefs,
|
||||
@@ -315,4 +324,17 @@ body.ttrss_prefs[hide-filter-rules="true"] {
|
||||
ul.filterRules {
|
||||
display : none;
|
||||
}
|
||||
|
||||
ul.actions_summary li {
|
||||
display : inline;
|
||||
}
|
||||
|
||||
ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
|
||||
ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1717,6 +1717,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1754,6 +1761,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
.flat {
|
||||
/*#feedTree {
|
||||
.dijitTreeContent .dijitInline {
|
||||
@@ -1867,11 +1883,6 @@ body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -1717,6 +1717,13 @@ body.ttrss_prefs .phpinfo td.v {
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
body.ttrss_prefs ul.actions_summary {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
margin-top: 0;
|
||||
list-style-type: none;
|
||||
text-align: right;
|
||||
}
|
||||
body.ttrss_prefs #filterNewRuleDlg .dijitValidationTextAreaError,
|
||||
body.ttrss_main #filterNewRuleDlg .dijitValidationTextAreaError {
|
||||
background: #ffc0c0;
|
||||
@@ -1754,6 +1761,15 @@ body.ttrss_utility fieldset > label.checkbox {
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
display: none;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li {
|
||||
display: inline;
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:after {
|
||||
content: ", ";
|
||||
}
|
||||
body.ttrss_prefs[hide-filter-rules="true"] ul.actions_summary li:last-child:after {
|
||||
content: " ";
|
||||
}
|
||||
.flat {
|
||||
/*#feedTree {
|
||||
.dijitTreeContent .dijitInline {
|
||||
@@ -1867,11 +1883,6 @@ body.ttrss_prefs[hide-filter-rules="true"] ul.filterRules {
|
||||
.flat .dijitTree .dijitTreeNode .dijitTreeRow.dijitTreeRowSelected {
|
||||
color: white;
|
||||
}
|
||||
.flat .dijitTree .labelParam {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.flat .dijitTree .dijitTreeRow.filterDisabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user