#452 설문조사 에디터 컴포넌트로 설문조사 추가시 스킨을 선택할 수 있도록 변경. simple설문조사 스킨 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4111 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-04-16 09:33:49 +00:00
parent f4cde76683
commit 9650a4a22b
16 changed files with 303 additions and 79 deletions

View file

@ -1,8 +1,19 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
.pollButton { clear:both; margin:.5em 0 0 0; height:20px; }
.pollButton label { vertical-align:middle; color:#888888; }
.display_date { cursor:pointer; width:80px; float:left; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; height:1em; padding:3px; font-family:tahoma; }
.adminTable { margin-bottom:0 !important; }
.pollButton { clear:both; overflow:hidden; border:1px solid #E3E3E2; border-top:none; background-color:#FAF8F4; padding:4px; }
.pollButton .fl { padding:5px 0 0 10px; color:#AAAAAA; }
.pollButton .fl label { vertical-align:middle; color:#888888; }
.pollButton .fr { padding:5px 10px 0 0; color:#AAAAAA; }
.pollButton .fr a { color:#444444; text-decoration:none; font-weight:bold;}
.pollButton .fr a.delPoll { color:red; font-weight:normal;}
li { list-style:none; margin-right:5px; float:left; color:#666666}
li a { text-decoration:none; color:#666666;}
#popFooter .fl { margin-left:10px; }
#popFooter .fr { margin-right:10px; }

View file

@ -3,6 +3,18 @@
<!--%import("filter/insert_poll.xml")-->
<!--%import("../lang")-->
<!-- calendar -->
<!--%import("../../../../../common/js/calendar.js",optimized=false)-->
<!--@if($lang_type == 'ko')-->
<!--%import("../../../../../common/js/calendar-ko.js",optimized=false)-->
<!--@else-->
<!--%import("../../../../../common/js/calendar-en.js",optimized=false)-->
<!--@end-->
<!--%import("../../../../../common/js/calendar-setup.js",optimized=false)-->
<!--%import("../../../../../common/css/calendar-system.css",optimized=false)-->
<script type="text/javascript">
var msg_poll_cannot_modify = "{$lang->msg_poll_cannot_modify}";
</script>
@ -16,6 +28,7 @@
<input type="hidden" name="method" value="insertPoll" />
<input type="hidden" name="poll_srl" value="" />
<input type="hidden" name="editor_sequence" value="{$editor_sequence}" />
<input type="hidden" name="stop_date" id="stop_date" value="{date("Ymd",time()+60*60*24*30)}" />
<div id="popBody">
@ -25,30 +38,20 @@
<tr>
<th scope="row">{$lang->poll_stop_date}</th>
<td>
<ul class="buttonLeft nospace">
<li>
<select name="stop_year">
<!--@for($i=date("Y");$i<date("Y")+10;$i++)-->
<option value="{$i}">{$i}</option>
<!--@end-->
</select>
</li>
<li>
<select name="stop_month">
<!--@for($i=1;$i<=12;$i++)-->
<option value="{$i}" <!--@if($i==date("m", time()+60*60*24*30))-->selected="selected"<!--@end-->>{$i}</option>
<!--@end-->
</select>
</li>
<li>
<select name="stop_day">
<!--@for($i=1;$i<=31;$i++)-->
<option value="{$i}" <!--@if($i==date("d", time()+60*60*24*30))-->selected="selected"<!--@end-->>{$i}</option>
<!--@end-->
</select>
</li>
<li><a href="#" onclick="doPollAdd(); return false;">{$lang->cmd_add_poll}</a></li>
</ul>
<div class="display_date" id="display_date">{date("Y-m-d",time()+60*60*24*30)}</div>
<script type="text/javascript">
Calendar.setup( { firstDay : 0, inputField : "stop_date", ifFormat : "%Y%m%d", displayArea : "display_date", daFormat : "%Y-%m-%d"});
</script>
</td>
</tr>
<tr>
<th scope="row">{$lang->skin}</th>
<td>
<select name="skin">
<!--@foreach($skin_list as $skin=>$skin_info)-->
<option value="{$skin}">{$skin_info->title} (skin by {$skin_info->maker->name})</option>
<!--@end-->
</select>
</td>
</tr>
</table>
@ -76,25 +79,29 @@
</table>
<div class="pollButton clear">
<ul class="fl">
<li><a href="#" onclick="doPollAddItem(this); return false;">{$lang->cmd_add_item}</a></li>
</ul>
<ul class="fr">
<li><a href="#" onclick="doPollDelete(this); return false;">{$lang->cmd_del_poll}</a></li>
</ul>
<ul class="fr">
<li><label>{$lang->poll_chk_count}</label></li>
<li><input type="text" name="checkcount_tidx" value="1" size="1" class="inputTypeText" /></li>
</ul>
<div class="fl">
<label>{$lang->poll_chk_count}</label>
<input type="text" name="checkcount_tidx" value="1" size="1" class="inputTypeText" />
</div>
<div class="fr">
<a href="#" onclick="doPollDelete(this); return false;" class="delPoll">{$lang->cmd_del_poll}</a> |
<a href="#" onclick="doPollAddItem(this); return false;">{$lang->cmd_add_item}</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div id="popFooter" class="tCenter">
<span class="button"><input type="submit" value="{$lang->cmd_submit}" /></span>
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
<a href="#" onclick="winopen('./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;" class="button"><span>{$lang->about_component}</span></a>
<div id="popFooter" class="tCenter clear">
<div class="fl">
<a href="#" onclick="doPollAdd(); return false;" class="button"><span>{$lang->cmd_add_poll}</span></a>
</div>
<div class="fr">
<span class="button"><input type="submit" value="{$lang->cmd_submit}" /></span>
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
<a href="#" onclick="winopen('./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;" class="button"><span>{$lang->about_component}</span></a>
</div>
</div>

View file

@ -33,10 +33,13 @@ function setPoll() {
function completeInsertPoll(ret_obj) {
if(typeof(opener)=="undefined") return null;
var fo_obj = xGetElementById('fo_component');
var skin = fo_obj.skin.options[fo_obj.skin.selectedIndex].value;
var poll_srl = ret_obj["poll_srl"];
if(!poll_srl) return null;
var text = "<img src=\"./common/tpl/images/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" style=\"width:400px;height:300px;border:2px dotted #4371B9;background:url(./modules/editor/components/poll_maker/tpl/poll_maker_component.gif) no-repeat center;\" />";
var text = "<img src=\"./common/tpl/images/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" skin=\""+skin+"\" style=\"width:400px;height:300px;border:2px dotted #4371B9;background:url(./modules/editor/components/poll_maker/tpl/poll_maker_component.gif) no-repeat center;\" />";
alert(ret_obj['message']);
@ -79,7 +82,7 @@ function doPollAdd() {
* 항목 삭제
**/
function doPollDelete(obj) {
var pobj = obj.parentNode.parentNode.parentNode.parentNode;
var pobj = obj.parentNode.parentNode.parentNode;
var tmp_arr = pobj.id.split('_');
var index = tmp_arr[1];
if(index==1) return;
@ -103,7 +106,7 @@ function doPollDelete(obj) {
* 항목 추가
**/
function doPollAddItem(obj) {
var tbl = xPrevSib(obj.parentNode.parentNode.parentNode);
var tbl = xPrevSib(obj.parentNode.parentNode);
var tbody = tbl.lastChild;
var tmp = tbody.firstChild;
var source = null;