diff --git a/css/legacy/forms.css b/css/legacy/forms.css index 5fe43eb464..b60b360c0f 100644 --- a/css/legacy/forms.css +++ b/css/legacy/forms.css @@ -1,14 +1,14 @@ /* FORMS */ -div.form-section-break { +div.form-section-head { margin: 15px 0px 3px 0px; } -div.form-section-break h3 { +div.form-section-head h3 { line-height: 20px; } -div.form-section-break hr { +div.form-section-head hr { margin: 9px 0px; } @@ -160,6 +160,10 @@ div.time_field select{ color: #888; } +.help ol { + padding-left: 19px; +} + .field_description_top { margin-bottom: 3px; } diff --git a/js/legacy/webpage/loaders.js b/js/legacy/webpage/loaders.js index a91e0b5a0e..3a7cf6b771 100644 --- a/js/legacy/webpage/loaders.js +++ b/js/legacy/webpage/loaders.js @@ -265,35 +265,11 @@ pscript.update_page_history = function(page_name, no_history) { nav_obj.open_notify('Page', page_name, arg, no_history); } -// -// Load Script -// -function loadscript(src, call_back) { - set_loading(); - var script = $a('head','script'); - script.type = 'text/javascript'; - script.src = src; - script.onload = function() { - if(call_back)call_back(); hide_loading(); - } - // IE 6 & 7 - script.onreadystatechange = function() { - if (this.readyState == 'complete' || this.readyState == 'loaded') { - hide_loading(); - call_back(); - } - } -} - // Load DocBrowser // ------------------------------------------------------------------------------- var doc_browser_page; -function loaddocbrowser(dt, label, fields) { - //wn.require('lib/js/wn/pages/doclistview.js'); - //wn.pages.doclistview.show(dt); - //return; - +function loaddocbrowser(dt, label, fields) { wn.require('lib/js/legacy/webpage/docbrowser.js'); dt = get_label_doctype(dt); if(!doc_browser_page) diff --git a/js/legacy/widgets/form/fields.js b/js/legacy/widgets/form/fields.js index dfac6a9eb5..0948dd78f0 100644 --- a/js/legacy/widgets/form/fields.js +++ b/js/legacy/widgets/form/fields.js @@ -134,9 +134,6 @@ Field.prototype.get_status = function() { if(this.not_in_form) { return 'Write'; } - - var fn = this.df.fieldname?this.df.fieldname:this.df.label; - this.df = get_field(this.doctype, fn, this.docname); if(!this.df.permlevel) this.df.permlevel = 0; @@ -990,7 +987,7 @@ SelectField.prototype.make_input = function() { this.set_as_single = function() { var i = this.input; i.multiple = false; - i.style.height = null; // default + i.style.height = null; if(i.lab)$dh(i.lab) } diff --git a/js/legacy/widgets/form/form.js b/js/legacy/widgets/form/form.js index 48f6d19fd6..d74056a6dc 100644 --- a/js/legacy/widgets/form/form.js +++ b/js/legacy/widgets/form/form.js @@ -77,7 +77,6 @@ _f.Frm = function(doctype, parent) { var me = this; this.is_editable = {}; this.opendocs = {}; - this.cur_section = {}; this.sections = []; this.sections_by_label = {}; this.section_count; @@ -184,23 +183,6 @@ _f.Frm.prototype.setup_std_layout = function() { // create fields this.setup_fields_std(); - - // description - if(this.meta.description) - this.add_description(); -} - -// ====================================================================================== - -_f.Frm.prototype.add_description = function() { - if(!wn.md2html) { - wn.require('lib/js/lib/showdown.js'); - wn.md2html = new Showdown.converter(); - } - - this.description_wrapper = $a(this.page_layout.footer.help_area, 'div', - 'well', {marginTop:'11px'}, - wn.md2html.makeHtml('#### Help\n\n' + this.meta.description)); } _f.Frm.prototype.setup_print = function() { @@ -267,10 +249,6 @@ _f.Frm.prototype.email_doc = function() { _f.Frm.prototype.rename_notify = function(dt, old, name) { if(this.doctype != dt) return; - // sections - this.cur_section[name] = this.cur_section[old]; - delete this.cur_section[old]; - // editable this.is_editable[name] = this.is_editable[old]; delete this.is_editable[old]; @@ -298,19 +276,6 @@ _f.Frm.prototype.set_heading = function() { } -// PAGING -// ====================================================================================== - -_f.Frm.prototype.set_section = function(sec_id) { - if(!this.sections[sec_id] || !this.sections[sec_id].expand) - return; // Simple type - - if(this.sections[this.cur_section[this.docname]]) - this.sections[this.cur_section[this.docname]].collapse(); - this.sections[sec_id].expand(); - this.cur_section[this.docname] = sec_id; -} - // SETUP // ====================================================================================== @@ -337,7 +302,7 @@ _f.Frm.prototype.setup_footer = function() { var f = this.page_layout.footer; // save buttom - f.save_area = $a(this.page_layout.footer,'div','',{display:'none'}); + f.save_area = $a(this.page_layout.footer,'div','',{display:'none', marginTop:'11px'}); f.help_area = $a(this.page_layout.footer,'div'); var b = $btn(f.save_area, 'Save', @@ -371,23 +336,23 @@ _f.Frm.prototype.setup_fields_std = function() { var sec; for(var i=0;i