위젯 생성 스크립트 수정

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2083 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-30 07:50:31 +00:00
parent 641e4c5c4b
commit 4b107d24a6
10 changed files with 130 additions and 31 deletions

View file

@ -133,14 +133,18 @@ function doFillWidgetVars() {
}
/*
var marginLeft = 0;
if(selected_node.style.marginLeft) marginLeft = parseInt(selected_node.style.marginLeft.replace(/px$/,''),10);
var marginRight = 0;
if(selected_node.style.marginRight) marginRight = parseInt(selected_node.style.marginRight.replace(/px$/,''),10);
var border = 0;
if(selected_node.style.border) border= parseInt(selected_node.style.boarder.replace(/px$/,''),10);
*/
fo_obj.widget_width.value = xWidth(selected_node) + marginLeft + marginRight - 6;
var width_type = "px";
if(selected_node.getAttribute("widget_width_type")=="%") width_type = "%";
else fo_obj.widget_width.value = xWidth(selected_node);
// 컬러셋 설정
if(skin && xGetElementById("widget_colorset").options.length<1 && colorset) {
@ -150,3 +154,12 @@ function doFillWidgetVars() {
// widget sequence 설정
fo_obj.widget_sequence.value = widget_sequence;
}
function checkFixType(obj) {
var val = obj.options[obj.selectedIndex].value;
if(val != "px") {
var fo_obj = xGetElementById("fo_widget");
var width = fo_obj.widget_width.value;
if(width>100) fo_obj.widget_width.value = 100;
}
}