Merge branch 'rebrand-ui' of https://github.com/frappe/frappe into rebrand-ui

This commit is contained in:
Suraj Shetty 2021-01-27 12:50:42 +05:30
commit 385d6bd9c6
3 changed files with 6 additions and 5 deletions

View file

@ -364,7 +364,7 @@ frappe.ui.form.Form = class FrappeForm {
this.grids.forEach(grid_obj => {
grid_obj.grid.visible_columns = null
// reset page number to 1
grid_obj.grid.grid_pagination.go_to_page(1);
grid_obj.grid.grid_pagination.go_to_page(1, true);
});
frappe.ui.form.close_grid_form();
this.docname = docname;

View file

@ -95,7 +95,7 @@ export default class GridPagination {
}
}
go_to_page(index) {
go_to_page(index, from_refresh) {
if (!index) {
index = this.page_index;
} else {
@ -108,7 +108,9 @@ export default class GridPagination {
}
this.update_page_numbers();
this.grid.scroll_to_top();
if (!from_refresh) {
this.grid.scroll_to_top();
}
}
go_to_last_page_to_add_row() {

View file

@ -40,6 +40,7 @@ class WebPage(WebsiteGenerator):
def get_context(self, context):
context.main_section = get_html_content_based_on_type(self, 'main_section', self.content_type)
context.source_content_type = self.content_type
context.title = self.title
if self.context_script:
_locals = dict(context = frappe._dict())
@ -55,12 +56,10 @@ class WebPage(WebsiteGenerator):
if self.enable_comments:
context.comment_list = get_comment_list(self.doctype, self.name)
context.update({
"style": self.css or "",
"script": self.javascript or "",
"header": self.header,
"title": self.title,
"text_align": self.text_align,
})