tinymce fixes

This commit is contained in:
Rushabh Mehta 2013-01-14 18:47:01 +05:30
parent aae09ce82c
commit 29b8093ec4

View File

@ -1,24 +1,17 @@
$.extend(cur_frm.cscript, { $.extend(cur_frm.cscript, {
layout: function(doc) { layout: function(doc) {
if(!doc.layout) doc.layout = 'Two column with header' if(!doc.__islocal) {
hide_field(['head_section', 'side_section', 'javascript', 'css']); if(doc.insert_code) {
if(doc.layout=='Two column with header') { if(!doc.javascript) {
unhide_field(['head_section', 'side_section']); cur_frm.set_value("javascript",
} 'wn.pages["'+doc.name+'"].onload = function(wrapper) { }');
if(doc.layout=='Two column') { }
unhide_field('side_section');
}
if(doc.insert_code) {
if(!doc.javascript) {
doc.javascript = 'wn.pages["'+doc.name+'"].onload = function(wrapper) { }';
} }
unhide_field('javascript'); if(doc.insert_style) {
} if(!doc.css) {
if(doc.insert_style) { cur_frm.set_value("css", '#page-'+doc.name+' { }');
if(!doc.css) { }
doc.css = '#page-'+doc.name+' { }';
} }
unhide_field('css');
} }
}, },
refresh: function(doc) { refresh: function(doc) {