mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 13:19:56 +09:00
삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
8326004cb2
2773 changed files with 91485 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
<filter name="insert_poll" module="poll" act="procInsert" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response callback_func="completeInsertPoll">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="poll_srl" />
|
||||
</response>
|
||||
</filter>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
8
modules/editor/components/poll_maker/tpl/popup.css
Normal file
8
modules/editor/components/poll_maker/tpl/popup.css
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
@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; }
|
||||
|
||||
li { list-style:none; margin-right:5px; float:left; color:#666666}
|
||||
li a { text-decoration:none; color:#666666;}
|
||||
101
modules/editor/components/poll_maker/tpl/popup.html
Normal file
101
modules/editor/components/poll_maker/tpl/popup.html
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("filter/insert_poll.xml")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var msg_poll_cannot_modify = "{$lang->msg_poll_cannot_modify}";
|
||||
</script>
|
||||
|
||||
<div id="popHeadder">
|
||||
<h1>{$component_info->title} ver. {$component_info->version}</h1>
|
||||
</div>
|
||||
|
||||
<form action="./" method="post" id="fo_component" onSubmit="procFilter(this, insert_poll); return false;">
|
||||
<input type="hidden" name="component" value="{$component_info->component_name}" />
|
||||
<input type="hidden" name="method" value="insertPoll" />
|
||||
<input type="hidden" name="poll_srl" value="" />
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
|
||||
<div id="popBody">
|
||||
|
||||
<table cellspacing="0" class="tableType5">
|
||||
<col width="100" />
|
||||
<col />
|
||||
<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;"><span>{$lang->cmd_add_poll}</span></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="poll_source" class="clear" style="display:none">
|
||||
|
||||
<table cellspacing="0" class="tableType5 gap1 clear">
|
||||
<col width="100" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row">{$lang->poll_title}</th>
|
||||
<td><input type="text" name="title_tidx" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$lang->poll_item} 1</th>
|
||||
<td><input type="text" name="item_tidx_1" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$lang->poll_item} 2</th>
|
||||
<td><input type="text" name="item_tidx_2" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
</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>
|
||||
|
||||
</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&act=dispEditorComponentInfo&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>
|
||||
|
||||
|
||||
</form>
|
||||
140
modules/editor/components/poll_maker/tpl/popup.js
Normal file
140
modules/editor/components/poll_maker/tpl/popup.js
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 block이 있는지 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
var poll_index = 1;
|
||||
function setPoll() {
|
||||
var node = opener.editorPrevNode;
|
||||
if(node && node.getAttribute('editor_component')=='poll_maker') {
|
||||
alert(msg_poll_cannot_modify);
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = xCreateElement("div");
|
||||
var source = xGetElementById("poll_source");
|
||||
|
||||
var html = xInnerHtml(source);
|
||||
html = html.replace(/tidx/g, poll_index);
|
||||
xInnerHtml(obj, html);
|
||||
|
||||
obj.id = "poll_"+poll_index;
|
||||
obj.className = "poll_box";
|
||||
obj.style.display = "block";
|
||||
|
||||
source.parentNode.insertBefore(obj, source);
|
||||
|
||||
setFixedPopupSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* 부모창의 위지윅에디터에 데이터를 삽입
|
||||
**/
|
||||
function completeInsertPoll(ret_obj) {
|
||||
if(typeof(opener)=="undefined") return null;
|
||||
|
||||
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;\" />";
|
||||
|
||||
alert(ret_obj['message']);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
|
||||
opener.focus();
|
||||
window.close();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
xAddEventListener(window, "load", setPoll);
|
||||
|
||||
/**
|
||||
* 새 설문 추가
|
||||
**/
|
||||
function doPollAdd() {
|
||||
var obj = xCreateElement("div");
|
||||
var source = xGetElementById("poll_source");
|
||||
if(poll_index+1>8) return null;
|
||||
poll_index++;
|
||||
|
||||
var html = xInnerHtml(source);
|
||||
html = html.replace(/tidx/g, poll_index);
|
||||
xInnerHtml(obj, html);
|
||||
|
||||
obj.id = "poll_"+poll_index;
|
||||
obj.className = "poll_box";
|
||||
obj.style.display = "block";
|
||||
|
||||
source.parentNode.insertBefore(obj, source);
|
||||
|
||||
setFixedPopupSize();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 항목 삭제
|
||||
**/
|
||||
function doPollDelete(obj) {
|
||||
var pobj = obj.parentNode.parentNode.parentNode.parentNode;
|
||||
var tmp_arr = pobj.id.split('_');
|
||||
var index = tmp_arr[1];
|
||||
if(index==1) return;
|
||||
|
||||
pobj.parentNode.removeChild(pobj);
|
||||
|
||||
var obj_list = xGetElementsByClassName('poll_box');
|
||||
for(var i=0;i<obj_list.length;i++) {
|
||||
var nobj = obj_list[i];
|
||||
if(nobj.id == 'poll_source') continue;
|
||||
var tmp_arr = nobj.id.split('_');
|
||||
var index = tmp_arr[1];
|
||||
nobj.id = 'poll_'+(i+1);
|
||||
}
|
||||
poll_index = i-1;
|
||||
|
||||
setFixedPopupSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* 새 항목 추가
|
||||
**/
|
||||
function doPollAddItem(obj) {
|
||||
var tbl = xPrevSib(obj.parentNode.parentNode.parentNode);
|
||||
var tbody = tbl.lastChild;
|
||||
var tmp = tbody.firstChild;
|
||||
var source = null;
|
||||
while(tmp.nextSibling) {
|
||||
tmp = tmp.nextSibling;
|
||||
if(tmp.nodeName == "TR") source = tmp;
|
||||
}
|
||||
|
||||
var new_obj = source.cloneNode(true);
|
||||
new_obj.className = source.className;
|
||||
source.parentNode.appendChild(new_obj);
|
||||
|
||||
var html = xInnerHtml(new_obj);
|
||||
var idx_match = html.match(/ ([0-9]+)</i);
|
||||
var idx = parseInt(idx_match[1],10);
|
||||
|
||||
var tmp = new_obj.firstChild;
|
||||
while(tmp) {
|
||||
if(tmp.nodeName == "TH") {
|
||||
var html = xInnerHtml(tmp);
|
||||
html = html.replace(/ ([0-9]+)/, ' '+(idx+1));
|
||||
xInnerHtml(tmp, html);
|
||||
} else if(tmp.nodeName == "TD") {
|
||||
var html = xInnerHtml(tmp);
|
||||
html = html.replace(/item_([0-9]+)_([0-9]+)/, 'item_$1_'+(idx+1));
|
||||
xInnerHtml(tmp, html);
|
||||
}
|
||||
tmp = tmp.nextSibling;
|
||||
}
|
||||
|
||||
setFixedPopupSize();
|
||||
|
||||
return null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue