Merge pull request #706 from anandpdoshi/anand-appframe-form
Show labels in appframe form
This commit is contained in:
commit
4d6fd109bc
3 changed files with 23 additions and 4 deletions
|
|
@ -117,7 +117,7 @@ h2.titlebar-left-item {
|
|||
}
|
||||
|
||||
.appframe-form {
|
||||
padding: 5px 0px;
|
||||
padding: 2px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.appframe-form input, .appframe-form select, .appframe-form label {
|
||||
|
|
@ -132,9 +132,9 @@ h2.titlebar-left-item {
|
|||
|
||||
.appframe-form .form-control {
|
||||
height: 28px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
.iconbar {
|
||||
display: inline-block;
|
||||
padding: 9px 0px;
|
||||
|
|
@ -181,3 +181,19 @@ h2.titlebar-left-item {
|
|||
.workflow-button-area {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.appframe-control-label {
|
||||
font-size: 75% !important;
|
||||
margin: 0px auto !important;
|
||||
padding: 0px 4px !important;
|
||||
}
|
||||
|
||||
.appframe-only-label {
|
||||
margin-top: 21px !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.appframe-form .checkbox {
|
||||
margin-top: 15px !important;
|
||||
margin-bottom: -7px !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ frappe.ui.AppFrame = Class.extend({
|
|||
// appframe::form
|
||||
add_label: function(label) {
|
||||
this.show_form();
|
||||
return $("<label class='col-md-1'>"+label+" </label>")
|
||||
return $("<label class='col-md-1 appframe-only-label'>"+label+" </label>")
|
||||
.appendTo(this.parent.find(".appframe-form .container"));
|
||||
},
|
||||
add_select: function(label, options) {
|
||||
|
|
@ -302,6 +302,9 @@ frappe.ui.AppFrame = Class.extend({
|
|||
if(df.fieldtype==="Check") {
|
||||
$(f.wrapper).find(":first-child")
|
||||
.removeClass("col-md-offset-4 col-md-8");
|
||||
} else {
|
||||
$(f.wrapper)
|
||||
.prepend('<label class="appframe-control-label">' + __(df.label) + '</label>');
|
||||
}
|
||||
|
||||
if(df["default"])
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ frappe.views.GridReport = Class.extend({
|
|||
var me = this;
|
||||
|
||||
// plot wrapper
|
||||
this.plot_area = $('<div class="plot" style="margin-bottom: 15px; display: none; \
|
||||
this.plot_area = $('<div class="plot" style="margin-top: 15px; margin-bottom: 15px; display: none; \
|
||||
height: 300px; width: 100%;"></div>').appendTo(this.wrapper);
|
||||
|
||||
this.appframe.add_primary_action(__("Export"), function() { return me.export(); }, "icon-download");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue