mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -22,17 +22,6 @@ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) {
|
|||
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) {
|
||||
var iframe_obj = opener.editorGetIFrame(module_srl);
|
||||
|
|
@ -42,7 +31,7 @@ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) {
|
|||
opener.editorFocus(module_srl);
|
||||
}
|
||||
}
|
||||
//window.close();
|
||||
window.close();
|
||||
}
|
||||
|
||||
/* 위젯 코드 생성시 스킨을 고르면 컬러셋의 정보를 표시 */
|
||||
|
|
@ -116,9 +105,13 @@ function doFillWidgetVars() {
|
|||
break;
|
||||
case "checkbox" :
|
||||
var val = selected_node.getAttribute(name);
|
||||
for(var i=0;i<fo_obj[name].length;i++) {
|
||||
var v = fo_obj[name][i].value;
|
||||
if(val.indexOf(v)!=-1) fo_obj[name][i].checked="true";
|
||||
if(fo_obj[name].length) {
|
||||
for(var i=0;i<fo_obj[name].length;i++) {
|
||||
var v = fo_obj[name][i].value;
|
||||
if(val.indexOf(v)!=-1) fo_obj[name][i].checked="true";
|
||||
}
|
||||
} else {
|
||||
if(fo_obj[name].value == val) fo_obj[name].checked ="true";
|
||||
}
|
||||
break;
|
||||
case "select" :
|
||||
|
|
@ -135,6 +128,8 @@ function doFillWidgetVars() {
|
|||
|
||||
}
|
||||
|
||||
fo_obj.widget_width.value = xWidth(selected_node)+4;
|
||||
|
||||
// 컬러셋 설정
|
||||
if(skin && xGetElementById("widget_colorset").options.length<1 && colorset) {
|
||||
doDisplaySkinColorset(xGetElementById("widget_skin"), colorset);
|
||||
|
|
|
|||
|
|
@ -10,65 +10,101 @@
|
|||
|
||||
<div class="widget_title">{$widget_info->title} ver {$widget_info->version}</div>
|
||||
|
||||
<div class="widget_description">{$lang->about_widget_code_in_page}</div>
|
||||
<div style="border:1px solid #EEEEEE;margin-bottom:5px;">
|
||||
|
||||
<div class="widget_header">{$lang->description}</div>
|
||||
<div class="widget_body">{nl2br($widget_info->author->description)}</div>
|
||||
<div class="widget_description">{$lang->about_widget_code_in_page}</div>
|
||||
|
||||
<div class="widget_header">{$lang->skin}</div>
|
||||
<div class="widget_body">
|
||||
<select name="skin" onchange="doDisplaySkinColorset(this,'');return false;" id="widget_skin">
|
||||
<option value=""> </option>
|
||||
<!--@foreach($skin_list as $key => $val)-->
|
||||
<option value="{$key}">{$val->title} ({$key})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
<div class="widget_header">{$lang->description}</div>
|
||||
<div class="widget_body">{nl2br($widget_info->author->description)}</div>
|
||||
|
||||
<div id="colorset_area" style="display:none">
|
||||
<div class="widget_header">{$lang->colorset}</div>
|
||||
<div class="widget_header">{$lang->skin}</div>
|
||||
<div class="widget_body">
|
||||
<select name="colorset" id="widget_colorset">
|
||||
<select name="skin" onchange="doDisplaySkinColorset(this,'');return false;" id="widget_skin">
|
||||
<option value=""> </option>
|
||||
<!--@foreach($skin_list as $key => $val)-->
|
||||
<option value="{$key}">{$val->title} ({$key})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@foreach($widget_info->extra_var as $id => $var)-->
|
||||
<div class="widget_header">{$var->name}</div>
|
||||
<div id="colorset_area" style="display:none">
|
||||
<div class="widget_header">{$lang->colorset}</div>
|
||||
<div class="widget_body">
|
||||
<select name="colorset" id="widget_colorset">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="widget_body">
|
||||
<!--@if($var->type == "text")-->
|
||||
<input type="text" name="{$id}" value="" />
|
||||
<!--@foreach($widget_info->extra_var as $id => $var)-->
|
||||
<div class="widget_header">{$var->name}</div>
|
||||
|
||||
<!--@elseif($var->type == "textarea")-->
|
||||
<textarea name="{$id}"></textarea>
|
||||
<div class="widget_body">
|
||||
<!--@if($var->type == "text")-->
|
||||
<input type="text" name="{$id}" value="" />
|
||||
|
||||
<!--@elseif($var->type == "select")-->
|
||||
<select name="{$id}">
|
||||
<!--@foreach($var->options as $key => $val)-->
|
||||
<option value="{$key}">{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<!--@elseif($var->type == "textarea")-->
|
||||
<textarea name="{$id}"></textarea>
|
||||
|
||||
<!--@elseif($var->type == "mid_list")-->
|
||||
<div style="height:150px;overflow:scroll">
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<div class="widget_mid_list">
|
||||
<input type="checkbox" value="{$key}" name="{$id}" id="chk_mid_list_{$key}" />
|
||||
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||
<!--@elseif($var->type == "select")-->
|
||||
<select name="{$id}">
|
||||
<!--@foreach($var->options as $key => $val)-->
|
||||
<option value="{$key}">{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
|
||||
<!--@elseif($var->type == "mid_list")-->
|
||||
<div style="height:150px;overflow:scroll">
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<div class="widget_mid_list">
|
||||
<input type="checkbox" value="{$key}" name="{$id}" id="chk_mid_list_{$key}" />
|
||||
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget_var_description">{$var->description}</div>
|
||||
<!--@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_var_description">{$var->description}</div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="widget_button_area">
|
||||
<input type="submit" value="{$lang->cmd_insert}" class="widget_button" />
|
||||
<input type="button" onclick="self.close()" value="{$lang->cmd_close}" class="widget_button" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
$vars = Context::getRequestVars();
|
||||
$widget = $vars->selected_widget;
|
||||
|
||||
$blank_img_path = "./common/tpl/images/blank.gif";
|
||||
|
||||
unset($vars->module);
|
||||
unset($vars->act);
|
||||
unset($vars->selected_widget);
|
||||
|
|
@ -33,8 +35,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
$blank_img_path = "./common/tpl/images/blank.gif";
|
||||
$widget_code = sprintf('<img src="%s" class="zbxe_widget_output" widget="%s" %s style="width:100px;height:100px;"/>', $blank_img_path, $widget, implode(' ',$attribute));
|
||||
if($vars->widget_fix_width == 'Y') {
|
||||
$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);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@
|
|||
$widget_info->title = $title;
|
||||
$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);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@
|
|||
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);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@
|
|||
else Context::set('yesterday_counter', $val);
|
||||
}
|
||||
|
||||
// 변수 설정
|
||||
Context::set('style', $args->style);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@
|
|||
* 결과를 만든후 print가 아니라 return 해주어야 한다
|
||||
**/
|
||||
function proc($args) {
|
||||
// 변수 설정
|
||||
Context::set('style', $args->style);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
$widget_info->title = $title;
|
||||
$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);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
$widget_info->title = $title;
|
||||
$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);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<!--@end-->
|
||||
|
||||
<div class="newest_document_default_{$colorset}" style="width:100%">
|
||||
<div class="newest_document_default_{$colorset}">
|
||||
<div class="newest_document_default_box">
|
||||
<div class="title_box">
|
||||
<div class="title">{$widget_info->title}</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<description xml:lang="ko">플래쉬로 된 시계를 출력합니다.</description>
|
||||
</author>
|
||||
<extra_vars>
|
||||
<var id="width">
|
||||
<var id="clock_width">
|
||||
<name xml:lang="ko">가로길이</name>
|
||||
<type>text</type>
|
||||
<description xml:lang="ko">가로길이를 지정하실 수 있습니다. (기본 200)</description>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -28,10 +28,9 @@
|
|||
$day = $args->day;
|
||||
if($day != "false") $day = "true";
|
||||
|
||||
$width = $args->width;
|
||||
if(!$width) $width = 200;
|
||||
$widget_info->width = $width;
|
||||
|
||||
$clock_width = $args->clock_width;
|
||||
if(!$clock_width) $clock_width = 200;
|
||||
$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);
|
||||
|
||||
Context::set('widget_info', $widget_info);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
$widget_info->title = $title;
|
||||
$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);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue