Merge pull request #5476 from Zlash65/user-tags
[Minor] User tags fix and refresh list
This commit is contained in:
commit
30e1bb5df7
1 changed files with 9 additions and 5 deletions
|
|
@ -468,15 +468,19 @@ frappe.views.ListSidebar = Class.extend({
|
|||
.on("click", ".stat-link", function() {
|
||||
var fieldname = $(this).attr('data-field');
|
||||
var label = $(this).attr('data-label');
|
||||
if (label == "No Tags") {
|
||||
label = "%,%";
|
||||
}
|
||||
var condition = "like";
|
||||
var existing = me.list_view.filter_area.filter_list.get_filter(fieldname);
|
||||
if(existing) {
|
||||
existing.remove();
|
||||
}
|
||||
me.list_view.filter_area.filter_list.add_filter(me.list_view.doctype, fieldname, 'not like', label);
|
||||
me.list_view.refresh();
|
||||
if (label == "No Tags") {
|
||||
label = "%,%";
|
||||
condition = "not like";
|
||||
}
|
||||
me.list_view.filter_area.filter_list.add_filter(me.list_view.doctype, fieldname, condition, label)
|
||||
.then(function() {
|
||||
me.list_view.refresh();
|
||||
});
|
||||
})
|
||||
.insertBefore(this.sidebar.find(".close-sidebar-button"));
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue