function __BOARDSEARCH (opt) { this.standby(opt,{ v_scheme:[ {if:null,parameterName:null,default:null} ], outlet:[], v_baseUrl:null, v_autoSearch:true, //search 버튼이 없이 각 form 요소에 changed가 발생하면 검색함 }); this.fn_start(); } __BOARDSEARCH.prototype = new __TOMATOOBJECT(); __BOARDSEARCH.prototype.fn_start = function () { if (this.v_autoSearch()===true) { var _this = this; this.outlet( this.v_scheme().map(function (s,i) { _this['if_search_'+i] = _this.getset(s.if); return ['if_search_'+i,'fn_search','change']; }) ); this.setOutlet(); } } __BOARDSEARCH.prototype.fn_search = function () { var url = this.v_scheme().reduce(function (url,s) { // console.log(url); var v = s.if.val(); if (!v) return url; // console.log("url",url); return url+(url?"&":"")+s.parameterName+"="+v; },this.v_baseUrl()); // console.log(url); location.href = url; } function __BOARDSHOWMORE (opt) { this.standby(opt,{ v_page:null, v_totalpage:null, if_window:null, v_gap:200, v_baseUrl:null, v_loadingStatus:false, v_pageParameterName:"page", if_target:null, if_selector:null, outlet:[ ["if_window","fn_check","scroll"] ] }); this.setOutlet(); } __BOARDSHOWMORE.prototype = new __TOMATOOBJECT(); __BOARDSHOWMORE.prototype.fn_start = function () {} __BOARDSHOWMORE.prototype.fn_getmore = function () { // console.log("getMore"); if (this.v_page()>=this.v_totalpage()) return false; if (this.v_loadingStatus()) return false; this.v_page(this.v_page()+1); var _this = this; _this.v_loadingStatus(true); $.get(this.v_baseUrl().replace(this.v_pageParameterName()+'=','')+(this.v_baseUrl().indexOf('?')==-1?"?":"&")+this.v_pageParameterName()+"="+this.v_page(),function (html) { _this.if_target().append( $(html).find(_this.if_selector()).children() ); _this.v_loadingStatus(false); }) } __BOARDSHOWMORE.prototype.fn_check = function (e,t) { // console.log(e,t); var t = this.if_window().scrollTop()+this.if_window().height(); var h = getDocumentHeight(); // console.log(h,t); //Cyrus 자동으로 동작되는 코드 삭제 if (h-t