위젯 설정에서 filebox를 이용할 수 있도록 하고 위젯의 text/textarea에 다국어 입력이 가능하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6507 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-06-10 03:24:44 +00:00
parent c7891c8dc0
commit a2bcbd0380
3 changed files with 18 additions and 2 deletions

View file

@ -541,6 +541,7 @@
$ext = strtolower(substr(strrchr($vars->addfile['name'],'.'),1));
$vars->ext = $ext;
if($vars->filter) $filter = explode(',',$vars->filter);
else $filter = array('jpg','jpeg','gif','png');
if(!in_array($ext,$filter)) return new Object(-1, 'msg_error_occured');
$vars->member_srl = $logged_info->member_srl;

View file

@ -1,4 +1,6 @@
<!--%load_js_plugin("ui.colorpicker")-->
<!--%load_js_plugin("filebox")-->
<!--%import("./js/widget.js")-->
<p class="summary">{nl2br($_caption)}</p>
<table cellspacing="0" class="rowTable">
<tr>
@ -64,13 +66,15 @@
</th>
<td>
<!--@if($var->type == "text")-->
<input type="text" name="{$id}" value="" class="inputTypeText fullWidth" />
<input type="text" name="{$id}" value="" class="inputTypeText fullWidth" id="lang_{$id}"/>
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','lang_'.$id)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
<!--@elseif($var->type == "color")-->
<input type="text" name="{$id}" value="" class="inputTypeText color-indicator" />
<!--@elseif($var->type == "textarea")-->
<textarea name="{$id}" class="inputTypeTextArea fullWidth"></textarea>
<textarea name="{$id}" class="inputTypeTextArea fullWidth" id="lang_{$id}"></textarea>
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','lang_'.$id)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
<!--@elseif($var->type == "select")-->
<select name="{$id}">
@ -172,6 +176,16 @@
doAddWindowLoadEventLoader( function() { getModuleSrl('{$id}'); });
}
</script>
<!--@elseif($var->type == "filebox")-->
<div id="filebox_preview_{$id}" style="width:100px;height:100px;display:none" ></div>
<input type="hidden" name="{$id}" value="" />
<span class="button black"><button type="button" onclick="XE.filebox.open(jQuery('[name={$id}]', '#fo_widget').get(0), '{$var->filter}')">{$lang->cmd_select}</button></span>
<span id="filebox_cancel_{$id}" class="button red" style="display:none" ><button type="button" onclick="XE.filebox.cancel('{$id}')">{$lang->cmd_delete}</button></span>
<script type="text/javascript">//<![CDATA[
XE.filebox.init('{$id}');
//]]></script>
<!--@elseif($var->type == "menu")-->
<select name="{$id}" class="w300 fl">
<option value="">-</option>

View file

@ -223,6 +223,7 @@
$id = $var->attrs->id?$var->attrs->id:$var->attrs->name;
$name = $var->name->body?$var->name->body:$var->title->body;
$type = $var->attrs->type?$var->attrs->type:$var->type->body;
if($type =='filebox') $buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter);
$buff .= sprintf('$widget_info->extra_var->%s->group = "%s";', $id, $group->title->body);
$buff .= sprintf('$widget_info->extra_var->%s->name = "%s";', $id, $name);