[form] style fixes
This commit is contained in:
parent
46fa2080e0
commit
de0012e1f6
5 changed files with 15 additions and 15 deletions
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
.disp-area {
|
||||
background-color: #eee;
|
||||
padding: 3px;
|
||||
padding: 6px;
|
||||
margin-bottom: 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.disp-area-no-val {
|
||||
min-height: 17px;
|
||||
height: 30px;
|
||||
}
|
||||
|
|
@ -45,13 +45,14 @@ Field.prototype.make_body = function() {
|
|||
this.$wrapper = $('<div class="control-group">\
|
||||
<label class="control-label"></label>\
|
||||
<div class="controls">\
|
||||
<div class="control-input"></div>\
|
||||
<div class="control-value"></div>\
|
||||
</div>\
|
||||
</div>').appendTo(this.parent);
|
||||
this.wrapper = this.$wrapper.get(0);
|
||||
|
||||
this.label_area = this.label_span = this.$wrapper.find(".control-label").get(0);
|
||||
this.input_area = this.$wrapper.find(".controls").get(0);
|
||||
this.input_area = this.$wrapper.find(".control-input").get(0);
|
||||
this.disp_area = this.$wrapper.find(".control-value").get(0);
|
||||
|
||||
// set description
|
||||
|
|
@ -449,7 +450,7 @@ LinkField.prototype.make_input = function() {
|
|||
this.input = this.txt;
|
||||
} else {
|
||||
me.input = me.input_area;
|
||||
me.input_group = $('<div class="input-group link-field col-span-12">').appendTo(me.input_area);
|
||||
me.input_group = $('<div class="input-group link-field">').appendTo(me.input_area);
|
||||
|
||||
me.txt = $('<input type="text" style="margin-right: 0px;">')
|
||||
.appendTo(me.input_group).get(0);
|
||||
|
|
|
|||
|
|
@ -145,6 +145,3 @@ _f.CodeField.prototype.set_disp = function(val) {
|
|||
+val+'</textarea>';
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -149,12 +149,7 @@ wn.ui.form.GridRow = Class.extend({
|
|||
},
|
||||
set_button_events: function() {
|
||||
var me = this;
|
||||
|
||||
if(this.grid.display_status!="Write") {
|
||||
this.wrapper.find(".btn-danger, .grid-insert-row").toggle(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.wrapper.find(".btn-danger").click(function() {
|
||||
me.wrapper.fadeOut(function() {
|
||||
wn.model.clear_doc(me.doc.doctype, me.doc.name);
|
||||
|
|
@ -252,6 +247,11 @@ wn.ui.form.GridRow = Class.extend({
|
|||
cnt++;
|
||||
}
|
||||
});
|
||||
|
||||
if(this.grid.display_status!="Write") {
|
||||
this.wrapper.find(".btn-danger, .grid-insert-row").toggle(false);
|
||||
return;
|
||||
}
|
||||
},
|
||||
set_data: function() {
|
||||
this.wrapper.data({
|
||||
|
|
|
|||
|
|
@ -43,9 +43,11 @@ wn.ui.form.Layout = Class.extend({
|
|||
},
|
||||
make_column: function(df) {
|
||||
this.column = $('<div class="form-column">\
|
||||
<form class="form-horizontal" action="javascript:false;">\
|
||||
<form class="form-horizontal">\
|
||||
</form>\
|
||||
</div>').appendTo(this.section).find("form");
|
||||
</div>').appendTo(this.section)
|
||||
.find("form")
|
||||
.on("submit", function() { return false; });
|
||||
|
||||
// distribute all columns equally
|
||||
var colspan = cint(12 / this.section.find(".form-column").length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue