[fix] print format

This commit is contained in:
Rushabh Mehta 2015-04-28 17:23:54 +05:30
parent 702187bf2a
commit 8bd2de1deb
4 changed files with 7 additions and 6 deletions

View file

@ -11,7 +11,7 @@ frappe.pages['print-format-builder'].on_page_show = function(wrapper) {
frappe.route_options = null;
frappe.print_format_builder.setup_new_print_format(doctype, name);
} else {
frappe.print_format_builder.print_format = frappe.route_options.print_format.doc;
frappe.print_format_builder.print_format = frappe.route_options.doc;
frappe.route_options = null;
frappe.print_format_builder.refresh();
}
@ -241,7 +241,7 @@ frappe.PrintFormatBuilder = Class.extend({
set_column();
} else if(!in_list(["Section Break", "Column Break", "Fold"], f.fieldtype)
&& !f.print_hide && f.label) {
&& f.label) {
if(!column) set_column();
if(f.fieldtype==="Table") {

View file

@ -1,4 +1,6 @@
<div class="print-format-builder-field"
{% if(field.print_hide) { %}style="background-color: #F7FAFC; color: #8D99A6;"
title="{{ __("Hidden") }}"{% } %}
data-fieldname="{%= field.fieldname %}"
data-label="{%= field.label %}"
data-fieldtype="{%= field.fieldtype %}"

View file

@ -70,7 +70,7 @@ frappe.ui.form.PrintPreview = Class.extend({
var print_format = me.get_print_format();
if(print_format && print_format.name) {
if(print_format.print_format_builder) {
frappe.route_options = print_format;
frappe.route_options = {"doc": print_format, "make_new": false};
frappe.set_route("print-format-builder");
} else {
frappe.set_route("Form", "Print Format", print_format.name);

View file

@ -190,9 +190,8 @@ def clear_cache():
"""Clear all translation assets from :meth:`frappe.cache`"""
cache = frappe.cache()
cache.delete_value("langinfo")
for lang in get_all_languages():
cache.delete_value("lang:" + lang)
cache.delete_value("translation_assets:" + lang)
cache.delete_keys("lang:*")
cache.delete_keys("translation_assets:*")
def get_messages_for_app(app):
"""Returns all messages (list) for a specified `app`"""