Merge pull request #7671 from surajshetty3416/ui-ux-changes
feat: Make modal header clickable
This commit is contained in:
commit
b0d0aff00c
3 changed files with 7 additions and 2 deletions
|
|
@ -62,6 +62,7 @@ frappe.ui.Dialog = class Dialog extends frappe.ui.FieldGroup {
|
|||
}
|
||||
|
||||
if (this.minimizable) {
|
||||
this.header.find('.modal-title').click(() => this.toggle_minimize());
|
||||
this.get_minimize_btn().removeClass('hide').on('click', () => this.toggle_minimize());
|
||||
}
|
||||
|
||||
|
|
@ -193,6 +194,7 @@ frappe.ui.Dialog = class Dialog extends frappe.ui.FieldGroup {
|
|||
this.get_minimize_btn().find('i').toggleClass('octicon-chevron-down').toggleClass('octicon-chevron-up');
|
||||
this.is_minimized = !this.is_minimized;
|
||||
this.on_minimize_toggle && this.on_minimize_toggle(this.is_minimized);
|
||||
this.header.find('.modal-title').toggleClass('cursor-pointer');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -639,10 +639,10 @@ Object.assign(frappe.utils, {
|
|||
if (callNow) func.apply(context, args);
|
||||
};
|
||||
},
|
||||
get_form_link: function(doctype, name, html = false) {
|
||||
get_form_link: function(doctype, name, html = false, display_text = null) {
|
||||
const route = ['#Form', doctype, name].join('/');
|
||||
if (html) {
|
||||
return `<a href="${route}">${name}</a>`;
|
||||
return `<a href="${route}">${display_text || name}</a>`;
|
||||
}
|
||||
return route;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -182,6 +182,9 @@ def get_first_day(dt, d_years=0, d_months=0):
|
|||
|
||||
return datetime.date(year, month + 1, 1)
|
||||
|
||||
def get_first_day_of_week(dt):
|
||||
return dt - datetime.timedelta(days=dt.weekday())
|
||||
|
||||
def get_last_day(dt):
|
||||
"""
|
||||
Returns last day of the month using:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue