mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
페이지에서 위젯 수정하는 부분 개선.
1. 새로 추가된 위젯스타일 사용시 위젯의 내부여백을 둘때 위젯스타일 디자인 자체에 여백이 전용되는 경우가 있어서 매번 서버에서 코드를 갱신하도록 변경. 2. 위젯스타일/ 위젯의 컬러셋등을 수정하는 경우 IE와 비IE 모두 잘 되도록 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5919 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6615d7281a
commit
d807512aca
2 changed files with 30 additions and 8 deletions
|
|
@ -177,7 +177,7 @@ function getWidgetCode(childObj, widget) {
|
|||
var name = childObj.attributes[i].nodeName.toLowerCase();
|
||||
if(name == "contenteditable" || name == "id" || name=="style" || name=="src" || name=="widget" || name == "body" || name == "class" || name == "widget_width" || name == "widget_width_type" || name == "xdpx" || name == "xdpy" || name == "height") continue;
|
||||
var value = childObj.attributes[i].nodeValue;
|
||||
if(!value) continue;
|
||||
if(!value || value == "Array") continue;
|
||||
|
||||
attrs += name+'="'+escape(value)+'" ';
|
||||
}
|
||||
|
|
@ -362,14 +362,22 @@ function doAddWidgetCode(widget_code) {
|
|||
tmp = tmp.substr(pos);
|
||||
var eos = tmp.indexOf("-->");
|
||||
var cssfile = tmp.substr(9,eos-9);
|
||||
if(cssfile.indexOf('.js')>-1) {
|
||||
tmp = tmp.substr(eos);
|
||||
continue;
|
||||
}
|
||||
if(!cssfile) break;
|
||||
tmp = tmp.substr(eos);
|
||||
|
||||
var cssfile = request_uri+'/'+cssfile;
|
||||
var css ='<style type="text/css"> @import url("'+cssfile+'"); </style>';
|
||||
var dummy = xCreateElement("DIV");
|
||||
xInnerHtml(dummy , css);
|
||||
document.body.appendChild(dummy);
|
||||
if(typeof(document.createStyleSheet)=='undefined') {
|
||||
var css ='<link rel="stylesheet" href="'+cssfile+'" type="text/css" charset="UTF-8" />';
|
||||
var dummy = xCreateElement("DIV");
|
||||
xInnerHtml(dummy , css);
|
||||
document.body.appendChild(dummy);
|
||||
} else {
|
||||
document.createStyleSheet(cssfile,0);
|
||||
}
|
||||
}
|
||||
|
||||
// widget 코드에서 javascript 부분을 빼서 eval후 결과값을 대체함
|
||||
|
|
@ -815,10 +823,24 @@ function doApplyWidgetSize(fo_obj) {
|
|||
borderObj = borderObj.nextSibling;
|
||||
}
|
||||
|
||||
selectedWidget = selectedSizeWidget;
|
||||
selectedSizeWidget = null;
|
||||
doFitBorderSize();
|
||||
}
|
||||
|
||||
var widget = selectedWidget.getAttribute("widget");
|
||||
var params = new Array();
|
||||
for(var i=0;i<selectedWidget.attributes.length;i++) {
|
||||
if(!selectedWidget.attributes[i].nodeName || !selectedWidget.attributes[i].nodeValue) continue;
|
||||
var name = selectedWidget.attributes[i].nodeName.toLowerCase();
|
||||
if(name == "contenteditable" || name == "id" || name=="src" || name=="widget" || name == "body" || name == "class" || name == "widget_width" || name == "widget_width_type" || name == "xdpx" || name == "xdpy" || name == "height") continue;
|
||||
var value = selectedWidget.attributes[i].nodeValue;
|
||||
if(!value || value == "Array") continue;
|
||||
params[name] = value;
|
||||
}
|
||||
params["style"] = getStyle(selectedWidget);
|
||||
params["selected_widget"] = widget;
|
||||
params["module_srl"] = xGetElementById("pageFo").module_srl.vlaue;
|
||||
exec_xml('widget','procWidgetGenerateCodeInPage',params,function(ret_obj) { doAddWidgetCode(ret_obj["widget_code"]); },new Array('error','message','widget_code','tpl','css_header'));
|
||||
}
|
||||
doHideWidgetSizeSetup();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ function doFillWidgetVars() {
|
|||
|
||||
|
||||
// 컬러셋 설정
|
||||
if(skin && xGetElementById("widget_colorset").options.length<1 && colorset) {
|
||||
if(skin && xGetElementById("widget_colorset") && xGetElementById("widget_colorset").options.length<1 && colorset) {
|
||||
doDisplaySkinColorset(xGetElementById("widget_skin"), colorset);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue