feat: flags to hide card layout and page form
This commit is contained in:
parent
2706b4ef81
commit
3eebc5ea82
1 changed files with 13 additions and 6 deletions
|
|
@ -153,8 +153,9 @@ frappe.views.BaseList = class BaseList {
|
|||
setup_page() {
|
||||
this.page = this.parent.page;
|
||||
this.$page = $(this.parent);
|
||||
this.page.main.addClass('frappe-card');
|
||||
!this.hide_card_layout && this.page.main.addClass('frappe-card');
|
||||
this.page.page_form.removeClass("row").addClass("flex");
|
||||
this.hide_page_form && this.page.page_form.hide();
|
||||
this.setup_page_head();
|
||||
}
|
||||
|
||||
|
|
@ -500,17 +501,22 @@ class FilterArea {
|
|||
constructor(list_view) {
|
||||
this.list_view = list_view;
|
||||
this.list_view.page.page_form.append(`<div class="standard-filter-section flex"></div>`);
|
||||
this.standard_filters_wrapper = this.list_view.page.page_form.find('.standard-filter-section');
|
||||
this.list_view.$filter_section = $('<div class="filter-section">').appendTo(
|
||||
this.list_view.page.page_form
|
||||
|
||||
const filter_area = this.list_view.hide_page_form
|
||||
? this.list_view.page.custom_actions
|
||||
: this.list_view.page.page_form;
|
||||
|
||||
this.list_view.$filter_section = $('<div class="filter-section flex">').appendTo(
|
||||
filter_area
|
||||
);
|
||||
|
||||
this.$filter_list_wrapper = this.list_view.$filter_section;
|
||||
this.trigger_refresh = true;
|
||||
this.setup();
|
||||
}
|
||||
|
||||
setup() {
|
||||
this.make_standard_filters();
|
||||
if (!this.list_view.hide_page_form) this.make_standard_filters();
|
||||
this.make_filter_list();
|
||||
}
|
||||
|
||||
|
|
@ -652,6 +658,7 @@ class FilterArea {
|
|||
}
|
||||
|
||||
make_standard_filters() {
|
||||
this.standard_filters_wrapper = this.list_view.page.page_form.find('.standard-filter-section');
|
||||
let fields = [
|
||||
{
|
||||
fieldtype: "Data",
|
||||
|
|
@ -756,7 +763,7 @@ class FilterArea {
|
|||
|
||||
make_filter_list() {
|
||||
$(`<div class="filter-selector">
|
||||
<button class="btn btn-default btn-xs filter-button">
|
||||
<button class="btn btn-default btn-sm filter-button">
|
||||
<span class="filter-icon">
|
||||
<svg class="icon icon-sm">
|
||||
<use xlink:href="#icon-filter"></use>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue