[fixes] print format builder, print settings, letter head

This commit is contained in:
Rushabh Mehta 2015-03-25 17:32:44 +05:30
parent b4cf9f7706
commit a3667a5540
6 changed files with 8 additions and 16 deletions

View file

@ -1,11 +0,0 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(doc.__islocal) {
cur_frm.set_intro(__("Step 1: Set the name and save."));
} else if(!cur_frm.doc.content) {
cur_frm.set_intro(__("Step 2: Set Letterhead content."));
}
}

View file

@ -33,7 +33,7 @@
"permlevel": 0
},
{
"default": "",
"default": "Modern",
"fieldname": "print_style",
"fieldtype": "Select",
"in_list_view": 1,
@ -76,7 +76,7 @@
],
"icon": "icon-cog",
"issingle": 1,
"modified": "2015-02-05 05:11:42.779115",
"modified": "2015-03-25 07:10:38.893958",
"modified_by": "Administrator",
"module": "Print",
"name": "Print Settings",

View file

@ -317,7 +317,7 @@ frappe.PrintFormatBuilder = Class.extend({
},
setup_field_filter: function() {
var me = this;
this.page.sidebar.find(".filter-fields").on("keypress", function() {
this.page.sidebar.find(".filter-fields").on("keyup", function() {
var text = $(this).val();
me.page.sidebar.find(".field-label").each(function() {
var show = !text || $(this).text().toLowerCase().indexOf(text.toLowerCase())!==-1;

View file

@ -7,7 +7,7 @@
{% if(!in_list(["Section Break", "Column Break", "Fold"], f.fieldtype)) { %}
<div class="print-format-builder-field-placeholder text-ellipsis"
data-fieldname="{%= f.fieldname %}">
<span class="btn btn-xs
<span class="btn btn-xs field-label
{%= (f.fieldtype==="Custom HTML") ? "btn-info" : "btn-default" %}"
style="cursor: grab; display: inline-block">
{%= f.label %}

View file

@ -46,6 +46,9 @@ frappe.ui.form.Control = Class.extend({
// returns "Read", "Write" or "None"
// as strings based on permissions
get_status: function(explain) {
if(!this.doctype && !this.docname) {
return "Write";
}
var status = frappe.perm.get_field_display_status(this.df,
frappe.model.get_doc(this.doctype, this.docname), this.perm || (this.frm && this.frm.perm), explain);

View file

@ -39,7 +39,7 @@ frappe.breadcrumbs = {
}
if(breadcrumbs.module && breadcrumbs.module != "Desk") {
if(in_list(["Core", "Email", "Custom", "Workflow"], breadcrumbs.module))
if(in_list(["Core", "Email", "Custom", "Workflow", "Print"], breadcrumbs.module))
breadcrumbs.module = "Setup";
if(frappe.user.modules.indexOf(breadcrumbs.module)!==-1) {