mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
issue 211, fixed a bug related make poll editor component
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9451 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
513077ffee
commit
a6a56fae1c
2 changed files with 8 additions and 6 deletions
BIN
common/img/blank.gif
Normal file
BIN
common/img/blank.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
|
|
@ -15,14 +15,16 @@ function completeInsertPoll(ret_obj) {
|
||||||
var poll_srl = ret_obj["poll_srl"];
|
var poll_srl = ret_obj["poll_srl"];
|
||||||
if(!poll_srl) return null;
|
if(!poll_srl) return null;
|
||||||
|
|
||||||
var text = "<img src=\"../../../../common/img/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;\" />";
|
var text = "<img src=\"../../../../common/img/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" skin=\""+skin+"\" style=\"display:block;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']);
|
alert(ret_obj['message']);
|
||||||
|
|
||||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
opener.editorReplaceHTML(iframe_obj, text);
|
|
||||||
|
|
||||||
opener.focus();
|
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||||
|
|
||||||
|
opener.editorReplaceHTML(iframe_obj, text);
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
window.close();
|
window.close();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -47,7 +49,7 @@ jQuery(function($){
|
||||||
$('button._add_item').click(function(){
|
$('button._add_item').click(function(){
|
||||||
var $tr_src, $tr_new, $th, idx;
|
var $tr_src, $tr_new, $th, idx;
|
||||||
|
|
||||||
$tr_src = $(this).prev('table').find('>tbody>tr:last');
|
$tr_src = $(this).prev().children('table').find('>tbody>tr:last');
|
||||||
$tr_new = $tr_src.clone();
|
$tr_new = $tr_src.clone();
|
||||||
|
|
||||||
match = $tr_src.find('td>input').attr('name').match(/item_(\d+)_(\d+)$/);
|
match = $tr_src.find('td>input').attr('name').match(/item_(\d+)_(\d+)$/);
|
||||||
|
|
@ -67,7 +69,7 @@ jQuery(function($){
|
||||||
$('button._del_item').click(function(){
|
$('button._del_item').click(function(){
|
||||||
var $tr, match;
|
var $tr, match;
|
||||||
|
|
||||||
$tr = $(this).prevAll('table:first').find('>tbody>tr:last');
|
$tr = $(this).prevAll('div').children('table').find('>tbody>tr:last');
|
||||||
match = $tr.find('td>input').attr('name').match(/item_(\d+)_(\d+)/);
|
match = $tr.find('td>input').attr('name').match(/item_(\d+)_(\d+)/);
|
||||||
if(!match || match[2] == 2) return;
|
if(!match || match[2] == 2) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue