mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8495 201d5d3c-b55e-5fd7-737f-ddc643e51545
2 lines
No EOL
1.3 KiB
JavaScript
2 lines
No EOL
1.3 KiB
JavaScript
function doPoll(fo_obj){var checkcount=new Array(),item=new Array();for(var i=0;i<fo_obj.length;i++){var obj=fo_obj[i];if(obj.nodeName!='INPUT')continue;var name=obj.name;if(name.indexOf('checkcount')>-1){var t=name.split('_'),poll_srl_index=parseInt(t[1],10);checkcount[poll_srl_index]=obj.value;item[poll_srl_index]=new Array()}else if(name.indexOf('item_')>-1){var t=name.split('_'),poll_srl=parseInt(t[1],10),poll_srl_index=parseInt(t[2],10);if(obj.checked==true)item[poll_srl_index][item[poll_srl_index].length]=obj.value}};var poll_srl_indexes="";for(var poll_srl_index in checkcount){if(!checkcount.hasOwnProperty(poll_srl_index))continue;var count=checkcount[poll_srl_index],items=item[poll_srl_index];if(items.length<1||count<items.length){alert(poll_alert_lang);return false};poll_srl_indexes+=items.join(',')+','};fo_obj.poll_srl_indexes.value=poll_srl_indexes;procFilter(fo_obj,poll);return false};jQuery(function($){$('._poll_result').click(function(){var cls=$(this).attr('class'),srl,skin;try{srl=cls.match(/\b_srl_(\d+)\b/)[1];skin=cls.match(/\b_skin_(.+?)\b/)[1]}catch(e){};if(!srl)return false;if(!skin)skin='default'
|
|
function on_complete(ret){var $poll=$('#poll_'+srl),width;width=$poll.width();$poll.html(ret.tpl);$poll.width(width)};exec_xml('poll','procPollViewResult',{poll_srl:srl,skin:skin},on_complete,['error','message','tpl']);return false})}) |