[form] added icon in section break
This commit is contained in:
parent
b74738e002
commit
8b0834ad2f
5 changed files with 28 additions and 16 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"creation": "2013-02-22 01:27:33",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:20",
|
||||
"modified": "2013-07-03 10:03:56",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
|
@ -94,6 +94,16 @@
|
|||
"search_index": 0,
|
||||
"width": "50px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Text",
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Text",
|
||||
"print_width": "300px",
|
||||
"width": "300px"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"doctype": "DocField",
|
||||
|
|
@ -241,16 +251,6 @@
|
|||
"search_index": 0,
|
||||
"width": "50px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Text",
|
||||
"label": "Description",
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Text",
|
||||
"print_width": "300px",
|
||||
"width": "300px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "oldfieldname",
|
||||
|
|
|
|||
|
|
@ -23,6 +23,13 @@
|
|||
// -------------
|
||||
// Menu Display
|
||||
// -------------
|
||||
|
||||
$(cur_frm.wrapper).on("grid-row-render", function(e, grid_row) {
|
||||
if(grid_row.doc && grid_row.doc.fieldtype=="Section Break") {
|
||||
$(grid_row.row).css({"font-weight": "bold"});
|
||||
}
|
||||
})
|
||||
|
||||
cur_frm.cscript.allow_attach = function(doc, cdt, cdn) {
|
||||
if(doc.allow_attach) {
|
||||
unhide_field('max_attachments');
|
||||
|
|
|
|||
|
|
@ -273,6 +273,8 @@ wn.ui.form.GridRow = Class.extend({
|
|||
$col.css({"text-align": "right"})
|
||||
}
|
||||
});
|
||||
|
||||
$(this.frm.wrapper).trigger("grid-row-render", [this]);
|
||||
},
|
||||
toggle_view: function(show, callback) {
|
||||
this.doc = locals[this.doc.doctype][this.doc.name];
|
||||
|
|
|
|||
|
|
@ -78,8 +78,11 @@ wn.ui.form.Layout = Class.extend({
|
|||
if(df) {
|
||||
if(df.label) {
|
||||
this.labelled_section_count++;
|
||||
$('<h3 class="col col-lg-12">' + this.labelled_section_count
|
||||
+ ". " + df.label + "</h3>")
|
||||
$('<h3 class="col col-lg-12">'
|
||||
+ (df.options ? (' <i class="text-muted '+df.options+'"></i> ') : "")
|
||||
+ this.labelled_section_count + ". "
|
||||
+ df.label
|
||||
+ "</h3>")
|
||||
.css({"font-weight": "bold", "margin-bottom": "15px"})
|
||||
.appendTo(this.section);
|
||||
if(this.frm.sections.length > 1)
|
||||
|
|
@ -188,9 +191,9 @@ wn.ui.form.Layout = Class.extend({
|
|||
clear_dashboard: function() {
|
||||
this.dashboard.empty();
|
||||
},
|
||||
add_doctype_badge: function(label, doctype, fieldname) {
|
||||
add_doctype_badge: function(doctype, fieldname) {
|
||||
if(wn.model.can_read(doctype)) {
|
||||
this.add_badge(label, function() {
|
||||
this.add_badge(wn._(doctype), function() {
|
||||
wn.route_options = {};
|
||||
wn.route_options[fieldname] = cur_frm.doc.name;
|
||||
wn.set_route("List", doctype);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ wn.views.CommunicationList = Class.extend({
|
|||
.empty()
|
||||
.css({"margin":"10px 0px"});
|
||||
|
||||
this.wrapper = $("<div><h4>"+wn._("Communication History")+"</h4>\
|
||||
this.wrapper = $("<div>\
|
||||
<div style='margin-bottom: 8px;'>\
|
||||
<button class='btn btn-default' \
|
||||
onclick='cur_frm.communication_view.add_reply()'>\
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue