/* */ function ws_GetRow(pDir){ pg20_CleanMessage(); var get = new htmldb_Get('drop',$x('pFlowId').value,'APPLICATION_PROCESS=Column_Pull',0); if(pDir == 'prev'){ if(!isEmpty('ajax_prev')){get.add('CURRENT_WORKSHEET_ROW',$x('ajax_prev').value);} }else{ if(!isEmpty('ajax_next')){get.add('CURRENT_WORKSHEET_ROW',$x('ajax_next').value);} } gReturn = get.get(); get = null; $x('rowcount').innerHTML = $x('ajax_rowcount').value; ws_TextArea(); wsCheckNav(); } function wsCheckNav(){ $x('rowcount').innerHTML = $x('ajax_rowcount').value; if(isEmpty('ajax_prev')){$x_Hide('prev_button');}else{$x_Show('prev_button');} if(isEmpty('ajax_next')){$x_Hide('next_button');}else{$x_Show('next_button');} } function wsPageInit(){wsCheckNav();} function initResizeColumns(pThis){ var lTable = $x(pThis); var lTable_TH = lTable.getElementsByTagName('TH'); for(var i=0;i=5||Math.abs(lDragY-gDragY)>=5){ gDragX = lDragX; gDragY = lDragY; check_Move() } apex.DD.check_pos_move(); supressSelect(); toolTip_disable(); return false; } function supressSelect(){ try {if(!ie){window.getSelection().removeAllRanges()}else{document.selection.empty()} }catch(e){return} } var gD = false; function check_Move(){ var lD = drag_Drop(targ); if(lD){$x_Style(lD,'border','1px solid #369'); gD = lD; }else{ $x_Style(gD,'border','1px solid #FFF'); gD = false; } } function check_pos(){ this._Drop = _Drop; this._Clean = _Clean; this._Action = _Action; this._Return = _Return; try { var lTest = drag_Drop(targ); if(lTest){this._Action(lTest.id,targ.id,targ.className);} else{this._Clean()} return; } catch (e) { return; } function _Drop(){ this._Clean(); return lEl; } function _Clean(){ $x_Remove('oldholder'); $x('tempdrag').innerHTML=''; $x_Show(apex.DD.gDragger); $x_Style(gD,'border','1px solid #FFF'); } function _Action(pParent,pChild,pClass){ if(pParent != '1'){ var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=NewParent',0); }else{ var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=SetShared',0); } get.add('TEMPORARY_FOLDER',pParent); get.add('TEMPORARY_ITEM',pChild); if(html_SubString(pClass,'folder')){ get.add('TEMPORARY_ACTION','FOLDER'); }else if (html_SubString(pClass,'webpage')){ get.add('TEMPORARY_ACTION','WEBPAGE'); }else{ get.add('TEMPORARY_ACTION','WORKSHEET'); } get.GetAsync(this._Return); } function _Return(){ if(p.readyState == 1){ ajax_Loading(p.readyState); }else if(p.readyState == 2){ }else if(p.readyState == 3){ }else if(p.readyState == 4){ var lRet = eval('('+p.responseText+')'); if(lRet.action == 'set_shared' && lRet.result == true){ apex.DD.gDragger.getElementsByTagName('DIV')[0].style.backgroundImage = 'url('+lRet.img+')'; parent._Clean(); }else if (lRet.action == 'reparent_item' && lRet.result == true){ if(lRet.message){lTest.getElementsByTagName('A')[0].innerHTML = lRet.message;} $x_Remove(apex.DD.gDragger); parent._Clean(); } ajax_Loading(p.readyState); }else{return false;} } } function ajax_Loading(pState){ if(pState == 1){ $x_Class('htmldbBodyMargin','wait'); }else{ $x_Class('htmldbBodyMargin','htmldbBodyMargin'); } } function drag_Drop(pThis){ //var lReturn=false,lReturn2=false; var l = findPos(pThis) var lX = l[0]; var lY = l[1]; for (var i=0;i