mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1743 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c759503063
commit
f4953b1b92
15 changed files with 110 additions and 79 deletions
|
|
@ -25,6 +25,11 @@
|
||||||
$output = $oWidget->proc($args);
|
$output = $oWidget->proc($args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($args->style) {
|
||||||
|
$args->style = preg_replace("/height([^;]*);/i","",$args->style);
|
||||||
|
$output = sprintf("<div style=\"%s\">%s</div>", $args->style, $output);
|
||||||
|
}
|
||||||
|
|
||||||
if(__DEBUG__==3) $GLOBALS['__widget_excute_elapsed__'] += getMicroTime() - $start;
|
if(__DEBUG__==3) $GLOBALS['__widget_excute_elapsed__'] += getMicroTime() - $start;
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,6 @@ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var orig_width = 0;
|
|
||||||
var orig_height = 0;
|
|
||||||
var node = opener.editorPrevNode;
|
|
||||||
if(node) {
|
|
||||||
orig_width = parseInt(xWidth(node),10)-6;
|
|
||||||
orig_height = parseInt(xHeight(node),10)-6;
|
|
||||||
|
|
||||||
widget_code = widget_code.replace(/width([^p]+)px/ig,'width:'+orig_width+'px');
|
|
||||||
widget_code = widget_code.replace(/height([^p]+)px/ig,'height:'+orig_height+'px');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 부모창에 에디터가 있으면 에디터에 추가
|
// 부모창에 에디터가 있으면 에디터에 추가
|
||||||
if(opener.editorGetIFrame) {
|
if(opener.editorGetIFrame) {
|
||||||
var iframe_obj = opener.editorGetIFrame(module_srl);
|
var iframe_obj = opener.editorGetIFrame(module_srl);
|
||||||
|
|
@ -42,7 +31,7 @@ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) {
|
||||||
opener.editorFocus(module_srl);
|
opener.editorFocus(module_srl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 위젯 코드 생성시 스킨을 고르면 컬러셋의 정보를 표시 */
|
/* 위젯 코드 생성시 스킨을 고르면 컬러셋의 정보를 표시 */
|
||||||
|
|
@ -116,10 +105,14 @@ function doFillWidgetVars() {
|
||||||
break;
|
break;
|
||||||
case "checkbox" :
|
case "checkbox" :
|
||||||
var val = selected_node.getAttribute(name);
|
var val = selected_node.getAttribute(name);
|
||||||
|
if(fo_obj[name].length) {
|
||||||
for(var i=0;i<fo_obj[name].length;i++) {
|
for(var i=0;i<fo_obj[name].length;i++) {
|
||||||
var v = fo_obj[name][i].value;
|
var v = fo_obj[name][i].value;
|
||||||
if(val.indexOf(v)!=-1) fo_obj[name][i].checked="true";
|
if(val.indexOf(v)!=-1) fo_obj[name][i].checked="true";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(fo_obj[name].value == val) fo_obj[name].checked ="true";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "select" :
|
case "select" :
|
||||||
case "select-one" :
|
case "select-one" :
|
||||||
|
|
@ -135,6 +128,8 @@ function doFillWidgetVars() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fo_obj.widget_width.value = xWidth(selected_node)+4;
|
||||||
|
|
||||||
// 컬러셋 설정
|
// 컬러셋 설정
|
||||||
if(skin && xGetElementById("widget_colorset").options.length<1 && colorset) {
|
if(skin && xGetElementById("widget_colorset").options.length<1 && colorset) {
|
||||||
doDisplaySkinColorset(xGetElementById("widget_skin"), colorset);
|
doDisplaySkinColorset(xGetElementById("widget_skin"), colorset);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
<div class="widget_title">{$widget_info->title} ver {$widget_info->version}</div>
|
<div class="widget_title">{$widget_info->title} ver {$widget_info->version}</div>
|
||||||
|
|
||||||
|
<div style="border:1px solid #EEEEEE;margin-bottom:5px;">
|
||||||
|
|
||||||
<div class="widget_description">{$lang->about_widget_code_in_page}</div>
|
<div class="widget_description">{$lang->about_widget_code_in_page}</div>
|
||||||
|
|
||||||
<div class="widget_header">{$lang->description}</div>
|
<div class="widget_header">{$lang->description}</div>
|
||||||
|
|
@ -64,11 +66,45 @@
|
||||||
<div class="widget_var_description">{$var->description}</div>
|
<div class="widget_var_description">{$var->description}</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="border:1px solid #EEEEEE;margin-bottom:5px; ">
|
||||||
|
<div class="widget_header">가로 크기 고정</div>
|
||||||
|
<div class="widget_body">
|
||||||
|
<input type="checkbox" value="Y" name="widget_fix_width" /> 선택하시면 가로크기가 고정됩니다.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="widget_header">가로 크기</div>
|
||||||
|
<div class="widget_body">
|
||||||
|
<input type="text" value="400" name="widget_width" size="3" />px
|
||||||
|
가로 크기를 선택해주세요.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="widget_header">위치</div>
|
||||||
|
<div class="widget_body">
|
||||||
|
<select name="widget_position">
|
||||||
|
<option value="">줄차지</option>
|
||||||
|
<option value="left">왼쪽</option>
|
||||||
|
<option value="right">오른쪽</option>
|
||||||
|
</select>
|
||||||
|
한 줄에 여러개의 위젯을 나열하고 싶을때에는 위치를 선택해주세요.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="widget_header">여백</div>
|
||||||
|
<div class="widget_body">
|
||||||
|
위 <input type="text" name="widget_margin_top" value="0" size="2" />
|
||||||
|
오른쪽 <input type="text" name="widget_margin_right" value="0" size="2" />
|
||||||
|
아래 <input type="text" name="widget_margin_bottom" value="0" size="2" />
|
||||||
|
왼쪽 <input type="text" name="widget_margin_left" value="0" size="2" />
|
||||||
|
<br />
|
||||||
|
한 줄에 여러개의 위젯을 나열하고 싶을때에는 위치를 선택해주세요.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widget_button_area">
|
<div class="widget_button_area">
|
||||||
<input type="submit" value="{$lang->cmd_insert}" class="widget_button" />
|
<input type="submit" value="{$lang->cmd_insert}" class="widget_button" />
|
||||||
<input type="button" onclick="self.close()" value="{$lang->cmd_close}" class="widget_button" />
|
<input type="button" onclick="self.close()" value="{$lang->cmd_close}" class="widget_button" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@
|
||||||
$vars = Context::getRequestVars();
|
$vars = Context::getRequestVars();
|
||||||
$widget = $vars->selected_widget;
|
$widget = $vars->selected_widget;
|
||||||
|
|
||||||
|
$blank_img_path = "./common/tpl/images/blank.gif";
|
||||||
|
|
||||||
unset($vars->module);
|
unset($vars->module);
|
||||||
unset($vars->act);
|
unset($vars->act);
|
||||||
unset($vars->selected_widget);
|
unset($vars->selected_widget);
|
||||||
|
|
@ -33,8 +35,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$blank_img_path = "./common/tpl/images/blank.gif";
|
if($vars->widget_fix_width == 'Y') {
|
||||||
$widget_code = sprintf('<img src="%s" class="zbxe_widget_output" widget="%s" %s style="width:100px;height:100px;"/>', $blank_img_path, $widget, implode(' ',$attribute));
|
$style = "";
|
||||||
|
|
||||||
|
$vars->widget_width = $vars->widget_width - $vars->widget_margin_left - $vars->widget_margin_right;
|
||||||
|
$style .= sprintf("%s:%spx;", "width", trim($vars->widget_width));
|
||||||
|
$style .= sprintf("margin:%dpx %dpx %dpx %dpx;", $vars->widget_margin_top, $vars->widget_margin_right,$vars->widget_margin_bottom,$vars->widget_margin_left);
|
||||||
|
if($vars->widget_position) $style .= sprintf("%s:%s;", "float", trim($vars->widget_position));
|
||||||
|
$widget_code = sprintf('<img src="%s" class="zbxe_widget_output" widget="%s" %s style="%s" />', $blank_img_path, $widget, implode(' ',$attribute), $style);
|
||||||
|
} else {
|
||||||
|
$widget_code = sprintf('<img width="100" height="100" src="%s" class="zbxe_widget_output" widget="%s" %s />', $blank_img_path, $widget, implode(' ',$attribute));
|
||||||
|
}
|
||||||
|
debugPrint($widget_code);
|
||||||
|
|
||||||
// 코드 출력
|
// 코드 출력
|
||||||
$this->add('widget_code', $widget_code);
|
$this->add('widget_code', $widget_code);
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@
|
||||||
$widget_info->title = $title;
|
$widget_info->title = $title;
|
||||||
$widget_info->archive_list = $output->data;
|
$widget_info->archive_list = $output->data;
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
|
||||||
$widget_info->width = trim($matches[3][0]);
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,6 @@
|
||||||
foreach($output->data as $key => $val) $widget_info->calendar[$val->month] = $val->count;
|
foreach($output->data as $key => $val) $widget_info->calendar[$val->month] = $val->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
|
||||||
$widget_info->width = trim($matches[3][0]);
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@
|
||||||
else Context::set('yesterday_counter', $val);
|
else Context::set('yesterday_counter', $val);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 변수 설정
|
|
||||||
Context::set('style', $args->style);
|
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||||
Context::set('colorset', $args->colorset);
|
Context::set('colorset', $args->colorset);
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,6 @@
|
||||||
* 결과를 만든후 print가 아니라 return 해주어야 한다
|
* 결과를 만든후 print가 아니라 return 해주어야 한다
|
||||||
**/
|
**/
|
||||||
function proc($args) {
|
function proc($args) {
|
||||||
// 변수 설정
|
|
||||||
Context::set('style', $args->style);
|
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||||
Context::set('colorset', $args->colorset);
|
Context::set('colorset', $args->colorset);
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@
|
||||||
$widget_info->title = $title;
|
$widget_info->title = $title;
|
||||||
$widget_info->comment_list = $output->data;
|
$widget_info->comment_list = $output->data;
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
|
||||||
$widget_info->width = trim($matches[3][0]);
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@
|
||||||
$widget_info->title = $title;
|
$widget_info->title = $title;
|
||||||
$widget_info->document_list = $output->data;
|
$widget_info->document_list = $output->data;
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
|
||||||
$widget_info->width = trim($matches[3][0]);
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<div class="newest_document_default_{$colorset}" style="width:100%">
|
<div class="newest_document_default_{$colorset}">
|
||||||
<div class="newest_document_default_box">
|
<div class="newest_document_default_box">
|
||||||
<div class="title_box">
|
<div class="title_box">
|
||||||
<div class="title">{$widget_info->title}</div>
|
<div class="title">{$widget_info->title}</div>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<description xml:lang="ko">플래쉬로 된 시계를 출력합니다.</description>
|
<description xml:lang="ko">플래쉬로 된 시계를 출력합니다.</description>
|
||||||
</author>
|
</author>
|
||||||
<extra_vars>
|
<extra_vars>
|
||||||
<var id="width">
|
<var id="clock_width">
|
||||||
<name xml:lang="ko">가로길이</name>
|
<name xml:lang="ko">가로길이</name>
|
||||||
<type>text</type>
|
<type>text</type>
|
||||||
<description xml:lang="ko">가로길이를 지정하실 수 있습니다. (기본 200)</description>
|
<description xml:lang="ko">가로길이를 지정하실 수 있습니다. (기본 200)</description>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
displayMultimedia("{$widget_info->src}", {$widget_info->width}, {$widget_info->width});
|
displayMultimedia("{$widget_info->src}", {$widget_info->clock_width}, {$widget_info->clock_width});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,9 @@
|
||||||
$day = $args->day;
|
$day = $args->day;
|
||||||
if($day != "false") $day = "true";
|
if($day != "false") $day = "true";
|
||||||
|
|
||||||
$width = $args->width;
|
$clock_width = $args->clock_width;
|
||||||
if(!$width) $width = 200;
|
if(!$clock_width) $clock_width = 200;
|
||||||
$widget_info->width = $width;
|
$widget_info->clock_width = $clock_width;
|
||||||
|
|
||||||
$widget_info->src = sprintf("%s%s/%s/clock.swf?theme=%s&day=%s", Context::getRequestUri(), $tpl_path, $colorset, $theme, $day);
|
$widget_info->src = sprintf("%s%s/%s/clock.swf?theme=%s&day=%s", Context::getRequestUri(), $tpl_path, $colorset, $theme, $day);
|
||||||
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@
|
||||||
$widget_info->title = $title;
|
$widget_info->title = $title;
|
||||||
$widget_info->tag_list = $output->data;
|
$widget_info->tag_list = $output->data;
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
|
||||||
$widget_info->width = trim($matches[3][0]);
|
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue