var BoardUtil=Class.create(); Object.extend(BoardUtil, { onPageSizeChange: function(e, callback) { var obj=Event.element(e); BoardService.setPageSize(DWRUtil.getValue(obj), function(data) { if (callback) { callback(); } else { location.reload(); } }); } , unescapeQuote: function(str) { str=str.replace(/'/g,"'"); str=str.replace(/"/g,'"'); return str; } , onResetButtonClick: function(formID) { var re=/\/bbs\//; var uri=location.pathname; if (re.test(uri)) { var cand=BoardUtil.getUrl('list'); try{ var f=$('searchForm'); var act; f.action=cand; f.seq.value=''; f.divClass.value=$F('hiddenDivClass'); f.method='post'; f.submit(); }catch(e){ } /* [2010.04.09] °Ô½ÃÆÇ ÅÇÀ» ¼±ÅÃÇÏ¿© »ó¼¼º¸±â ÈÄ ¸ñ·Ï ¹öưÀ» Ŭ¸¯ÇßÀ» °æ¿ì URL¿¡ ÅÇ ¹øÈ£°¡ ºÙ¾î µ¿ÀÛÀÌ»óÀÌ ¹ß»ýÇÏ¿© À§¿Í °°ÀÌ ¼öÁ¤ try { var tmp=''; if (tmp=$F('hiddenDivClass')) { cand+='/'+tmp; } } catch(e) { } location.href=cand; */ } else { var el=$A(Form.getInputs(formID, 'hidden')); //return alert(formID); //return alert(location.pathname); var path=location.pathname+'?dummy=1'; var myre=/(bbsCode)|(prop)|(templateId)/; el.each(function(o, i) { // alert(o.name); // if (o.name !='bbsCode' || o.name !='prop' || o.name !='templateId') { // o.value=''; // } else { // alert(o.name+' : '+o.value); // } if (myre.test(o.name)) { path+='&'+o.name+'='+o.value; } }); location.href=path; //$(formID).submit(); } } , getUrl: function(method, seq) { var url=location.pathname; if (!seq) { url=url.replace(/bbs\/[a-z]+\/([0-9]+).*/, 'bbs/'+method+'/$1'); } else { url=url.replace(/SNNOTI\/[A-Z]+/, ''); url=url.replace(/bbs\/[a-z]+\//, 'bbs/'+method+'/'); url=url.replace(/(\/bbs\/list\/\d+)\/\d/, '$1'); url=url.replace(/code[0-9]+.*$/,'')+'/code'+seq; } url=url.replace(/\/{2,}/,'/'); return url; } , bindFlash: function(callback) { var loc=location.pathname; var depth=loc.replace(/.*\/(\d)(\d)(\d+)\/bbs\/.*/,'$1 $2 $3').split(" ");; callback(depth[0], depth[1], depth[2]); } }); function deleteProxy() { var f=$('searchForm'); f.action=location.pathname.replace(/\/list\/(\d+)\/.*$/, '/delete/$1'); f.submit(); }