[fixes] print format builder, print settings, letter head
This commit is contained in:
parent
b4cf9f7706
commit
a3667a5540
6 changed files with 8 additions and 16 deletions
|
|
@ -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."));
|
||||
}
|
||||
}
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue