var gTitle=oNode.getAttribute('title').replace(/"/g,"\""),gHidden=oNode.getAttribute('orghide'),gFontSize=oNode.getAttribute('orgfontsize'),gWidth=oNode.getAttribute('orgwidth'),gType=oNode.getAttribute('orgtype');
gTitle = gTitle==null ? '' : gTitle;
$G('orgname').value = gTitle;
//if( oNode.tagName == 'INPUT' ) {}
if(oNode.getAttribute('orghide')=='1'){
$G('orghide').checked = true;
}
$G('orgname').value = gTitle;
$G('orgtype').value = gType;
$G('orgwidth').value = gWidth;
$G('orgfontsize').value = gFontSize;
}
}
dialog.oncancel = function () {
if( UE.plugins[thePlugins].editdom ) {
delete UE.plugins[thePlugins].editdom;
}
};
dialog.onok = function (){
if ( $G('orgname').value == '' ) {
alert('控件名称不能为空');
return false;
}
var gTitle=$G('orgname').value.replace(/\"/g,"""),gFontSize=$G('orgfontsize').value,gWidth=$G('orgwidth').value,gType=$G('orgtype').value;
if( !oNode ) {
try {
/*
if ( $G('orgtype').value.indexOf('sys_list')>0 ) {
oNode = document.createElement("select");
var objOption = new Option('{macros}', '');
oNode.options[oNode.options.length] = objOption;
} else {
//input
}*/
oNode = createElement('input','leipiNewField');
oNode.setAttribute('type','text');
oNode.setAttribute('value','{macros}');
oNode.setAttribute('title',gTitle);
oNode.setAttribute('name','leipiNewField');
oNode.setAttribute('leipiPlugins',thePlugins);
oNode.setAttribute('orgtype',gType);
if( $G('orghide').checked ) {
oNode.setAttribute('orghide', '1' ) ;
} else {
oNode.setAttribute('orghide', '0' ) ;
}
if( gFontSize != '' ) {
oNode.style.fontSize = gFontSize + 'px';
oNode.setAttribute('orgfontsize',gFontSize );
}
if( gWidth != '' ) {
oNode.style.width = gWidth + 'px';
oNode.setAttribute('orgwidth',gWidth );
}
editor.execCommand('insertHtml',oNode.outerHTML);
return true;
} catch ( e ) {
try {
editor.execCommand('error');
} catch ( e ) {
alert('控件异常,请到 [雷劈网] 反馈或寻求帮助!');
}
return false;
}
} else {
var norgname = oNode.getAttribute('name').replace(/\"/g,""");
var oNewNode = null;
domUtils.remove(oNode,false); //删除当前控件,再创建一个新的
/*
if ( $G('orgtype').value.indexOf('sys_list') > 0 ) {