diff --git a/frappe/__version__.py b/frappe/__version__.py index ecdb1cef9e..9905939ff6 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1 +1 @@ -__version__ = "4.4.0" +__version__ = "4.4.1" diff --git a/frappe/hooks.py b/frappe/hooks.py index deddf426e8..b47d84830f 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -3,7 +3,7 @@ app_title = "Frappe Framework" app_publisher = "Web Notes Technologies Pvt. Ltd." app_description = "Full Stack Web Application Framework in Python" app_icon = "assets/frappe/images/frappe.svg" -app_version = "4.4.0" +app_version = "4.4.1" app_color = "#3498db" app_email = "support@frappe.io" diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css index 93265bb994..e2618ac378 100644 --- a/frappe/public/css/desk.css +++ b/frappe/public/css/desk.css @@ -75,7 +75,7 @@ div#freeze { overflow: hidden; } -.page-container .container { +.limit-container-width .container { max-width: 970px; } diff --git a/frappe/public/js/frappe/ui/appframe.js b/frappe/public/js/frappe/ui/appframe.js index 1f53dae77b..f4a4315d67 100644 --- a/frappe/public/js/frappe/ui/appframe.js +++ b/frappe/public/js/frappe/ui/appframe.js @@ -312,7 +312,7 @@ frappe.ui.make_app_page = function(opts) { "title: [optional] set this title" ] */ - $wrapper = $(opts.parent) + var $wrapper = $(opts.parent) $('
\
\
\ @@ -360,5 +360,6 @@ frappe.ui.make_app_page = function(opts) { opts.parent.appframe.set_document_title = opts.set_document_title; if(opts.title) opts.parent.appframe.set_title(opts.title); if(opts.icon) opts.parent.appframe.get_main_icon(opts.icon); + if(opts.full_width) $wrapper.find(".app-page").addClass("full-width"); } diff --git a/frappe/public/js/frappe/views/container.js b/frappe/public/js/frappe/views/container.js index 363692a7e3..ca85030dbe 100644 --- a/frappe/public/js/frappe/views/container.js +++ b/frappe/public/js/frappe/views/container.js @@ -13,6 +13,8 @@ frappe.views.Container = Class.extend({ this.page = null; // current page this.pagewidth = $('#body_div').width(); this.pagemargin = 50; + + $(document).on("page-change", this.set_full_width); }, add_page: function(label, onshow, onhide) { var page = $('
') @@ -71,5 +73,11 @@ frappe.views.Container = Class.extend({ $(this.page).trigger('show'); scroll(0,0); return this.page; + }, + set_full_width: function() { + // limit max-width to 970px for most pages + $("body").toggleClass("limit-container-width", !$(frappe.container.page).find(".app-page.full-width").length); } }); + + diff --git a/frappe/public/js/frappe/views/grid_report.js b/frappe/public/js/frappe/views/grid_report.js index c97e2e55d1..5a55629dd2 100644 --- a/frappe/public/js/frappe/views/grid_report.js +++ b/frappe/public/js/frappe/views/grid_report.js @@ -103,6 +103,7 @@ frappe.views.GridReport = Class.extend({ var me = this; $.extend(this, opts); + $(this.page).find(".app-page").addClass("full-width"); this.wrapper = $('
').appendTo(this.parent); this.appframe.parent.find(".appframe").css({"padding-top": "0px"}); @@ -125,6 +126,7 @@ frappe.views.GridReport = Class.extend({ // reapply filters on show frappe.cur_grid_report = me; me.get_data_and_refresh(); + frappe.container.set_full_width(); }); }, diff --git a/frappe/public/js/frappe/views/query_report.js b/frappe/public/js/frappe/views/query_report.js index b7a0da4978..53d670a143 100644 --- a/frappe/public/js/frappe/views/query_report.js +++ b/frappe/public/js/frappe/views/query_report.js @@ -12,7 +12,8 @@ frappe.standard_pages["query-report"] = function() { frappe.ui.make_app_page({ parent: wrapper, title: __('Query Report'), - single_column: true + single_column: true, + full_width: true }); frappe.query_report = new frappe.views.QueryReport({ diff --git a/frappe/public/js/frappe/views/reportview.js b/frappe/public/js/frappe/views/reportview.js index e261f9db22..3e34258249 100644 --- a/frappe/public/js/frappe/views/reportview.js +++ b/frappe/public/js/frappe/views/reportview.js @@ -41,7 +41,7 @@ frappe.views.ReportViewPage = Class.extend({ var me = this; this.page = frappe.container.add_page(this.page_name); frappe.ui.make_app_page({parent:this.page, - single_column:true}); + single_column:true, full_width: true}); frappe.container.change_to(this.page_name); $(this.page).on('show', function(){ diff --git a/frappe/templates/print_formats/standard_macros.html b/frappe/templates/print_formats/standard_macros.html index da644fe655..007a89d182 100644 --- a/frappe/templates/print_formats/standard_macros.html +++ b/frappe/templates/print_formats/standard_macros.html @@ -105,7 +105,7 @@

{{ doc.select_print_heading or (doc.print_heading if doc.print_heading != None else _(doc.doctype)) }}

{{ doc.sub_heading if doc.sub_heading != None - else "#{}".format(doc[doc.meta.title_field or "name"]) }}

+ else ("#" + doc[doc.meta.title_field or "name"]) }}
{%- if doc.meta.is_submittable and doc.docstatus==0-%}
diff --git a/setup.py b/setup.py index a99b55fc12..f11949aa89 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.4.0" +version = "4.4.1" with open("requirements.txt", "r") as f: install_requires = f.readlines()