Skip to content

Commit cd3d065

Browse files
committed
UI Bug Fix: Category color may get stuck in search menus.
1 parent ccc3d78 commit cd3d065

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

htdocs/js/pages/Base.class.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,9 +1781,10 @@ Page.Base = class Base extends Page {
17811781
}
17821782

17831783
getCategoriesForMenu() {
1784-
// get decorated categories for drop-down menu
1784+
// get colored categories for drop-down menu
17851785
return app.categories.map( function(cat) {
1786-
return { ...cat, class: cat.color ? `clr_${cat.color}` : `` };
1786+
var clr = cat.color || 'plain';
1787+
return { ...cat, class: `clr_${cat.color}` };
17871788
} );
17881789
}
17891790

htdocs/js/pages/Events.class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Page.Events = class Events extends Page.PageUtils {
9696
content: this.getFormMenuSingle({
9797
id: 'fe_el_category',
9898
title: 'Select Category',
99-
options: [['', 'Any Category']].concat( this.getCategoriesForMenu() ),
99+
options: [ {id:'', title:'Any Category', class:'clr_plain'} ].concat( this.getCategoriesForMenu() ),
100100
value: args.category || '',
101101
default_icon: 'folder-open-outline',
102102
'data-shrinkwrap': 1

htdocs/js/pages/Search.class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Page.Search = class Search extends Page.PageUtils {
112112
id: 'fe_s_category',
113113
title: 'Select Category',
114114
placeholder: 'All Categories',
115-
options: [['', 'Any Category']].concat( this.getCategoriesForMenu() ),
115+
options: [ {id:'', title:'Any Category', class:'clr_plain'} ].concat( this.getCategoriesForMenu() ),
116116
value: args.category || '',
117117
default_icon: 'folder-open-outline',
118118
'data-shrinkwrap': 1

htdocs/js/pages/admin/Categories.class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Page.Categories = class Categories extends Page.PageUtils {
219219
notes: "",
220220
// max_jobs: 0,
221221
enabled: true,
222-
color: '',
222+
color: 'plain',
223223
limits: [],
224224
actions: []
225225
};

0 commit comments

Comments
 (0)