Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\javascript\uncompressed\apex_websheets_3_2.js
try{ if (apex.spreadsheet==null || typeof(apex.spreadsheet)!="object"){apex.spreadsheet = new Object()} function ws_Spreadsheet (pThis){ this.Spreadsheet = $x(pThis) this.numberRows = false; this.numberCells = false; this.currentRow = false; this.classArray = false; this.currentCell = false; this.currentForm = false; this.currentCol = false; this.currentColType = false; /**/ this.Reset = Reset; this.CellInit = CellInit; this.SpreadInit = SpreadInit; this.control = function(pProcess,p_X01){ var lRequest = new apex.ajax.ondemand(pProcess, function(){ /* start the return function */ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ gReturn = p.responseText; $s('apexir_CONTROL_PANEL_DROP',gReturn); $x_Show('apexir_CONTROL_PANEL_DROP'); if(p_X01 == 'SHARING'){ window.g_Shuttlep_v01 = new dhtml_ShuttleObject('apexir_OTHERS_MAY_VIEW_LEFT','apexir_OTHERS_MAY_VIEW_RIGHT'); window.g_Shuttlep_v02 = dhtml_ShuttleObject('apexir_OTHERS_MAY_EDIT_LEFT','apexir_OTHERS_MAY_EDIT_RIGHT'); } }else{return false;} /* end the return function */ } ); lRequest.ajax.addParam('x01',p_X01); lRequest._get(); } this.actions = function(pAction){ var lRequest = new apex.ajax.ondemand('websheet', function(){ /* start the return function */ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ websheet_return(p); }else{return false;} /* end the return function */ } ); websheets_action(lRequest,pAction); } this.cells = {} this.cells.edit = function(pThis,pThat){ gReport.controls.value = that.currentCell.innerHTML; that.currentCell.innerHTML = ''; gReport.controls.lov = true; pThat.onclick='' gReport.controls.lov_dom = pThat; gReport.controls.col_lov(pThis); } return; function SpreadInit(){ var lRows = this.Spreadsheet.rows; this.numberRows = lRows.length; if(!!this.numberRows[0]){ this.numberCells = lRows[0].cells.length; var EditableCol = []; var EditableColN = []; var lDivs = lRows[0].getElementsByTagName('DIV'); for (var i = 0;i<lDivs.length;i++){ if(!isNaN(parseInt(lDivs[i].id.substring(1)))){ EditableCol[EditableCol.length] = lDivs[i].parentNode; EditableColN[EditableColN.length] = lDivs[i].id; lDivs[i].parentNode.style.width = lDivs[i].parentNode.offsetWidth; } } } } function CellInit(pThis){ that = this; this.Reset(); this.currentRow = pThis.parentNode.parentNode; this.currentCell = pThis; this.classArray = pThis.className.split(" "); this.currentCol = this.classArray[0]; this.currentColType = this.classArray[1]; //pThis.style.padding = '0';//pThis.parentNode.offsetWidth; if(this.currentColType == 'textarea' && !isNaN(this.currentCol.substring(1))){ var lValue = pThis.innerHTML; pThis.innerHTML = ''; pThis.onclick='' //pThis.parentNode.style.padding = '0';//pThis.parentNode.offsetWidth; pThis.style.padding = '0';//pThis.parentNode.offsetWidth; var lT = $dom_AddTag(pThis,'TEXTAREA'); lT.style.background = '#fff'; lT.style.position = 'absolute'; lT.style.height = pThis.parentNode.offsetHeight; lT.focus(); if(pThis.offsetWidth<250){lT.style.width = '250px';}else{lT.style.width = pThis.offsetWidth;} lT.style.zIndex = '999'; this.currentForm = lT; this.currentValue = lValue; lT.value=lValue; lT.onkeydown = function(e){cellkey(e,this)} lT.onblur = function(e){cellsave(e,this)} lT.focus(); }else if(this.currentColType == 'text' && !isNaN(this.currentCol.substring(1))){ $x_Style(pThis.parentNode,'visibility','hidden'); var lValue = pThis.innerHTML; pThis.innerHTML = ''; pThis.onclick='' //pThis.parentNode.style.width = pThis.parentNode.offsetWidth; var lT = $dom_AddInput(pThis,'TEXT','','',lValue); lT.style.position = 'relative'; lT.focus(); lT.style.zIndex = '999'; lT.parentNode.style.padding = '0'; lT.style.width='100%'; this.currentForm = lT; this.currentValue = lValue; lT.value=lValue; lT.onkeydown = function(e){cellkey(e,this)} lT.onblur = function(e){cellsave(e,this)} lT.focus(); $x_Style(pThis.parentNode,'visibility','visible'); }else if(this.currentColType == 'selectlist' && !isNaN(this.currentCol.substring(1))){ that.currentValue = pThis.innerHTML; that.cells.edit(that.currentCol,pThis); }else{this.Reset();} } function Reset(){ var lValue = this.currentValue; if(this.currentCell){ this.currentCell.innerHTML = lValue; this.currentCell.style.padding = ''; this.currentCell.onclick = function(){initCell(this)} } this.currentRow = false; this.currentCell = false; this.currentForm = false; this.currentCol = false; } } function initCell(pThis){gReport.websheet.CellInit(pThis);} function cellkey(e,pThis){ var keycode; if(window.event){keycode = window.event.keyCode;} else if (e){keycode = e.which;} else {return false;} if(e.ctrlKey){ switch(keycode){ case 9 :runTab(pThis); break; case 13 :runTab(pThis);/*enter*/ null; break; case 37 :runTab(pThis);/*left*/ null; break; case 38 :runTab(pThis);/*up*/ null; break; case 39 :runTab(pThis);/*down*/ null; break; case 40 :runTab(pThis);/*right*/ null; break; case 17 :runTab(pThis);/*ctrl*/ null; break; default:null; } } } function runTab(pThis){ if(pThis.parentNode.cellIndex < gReport.websheet.numberCells-1){ gReport.websheet.CellInit(pThis.parentNode.nextSibling); }else if(pThis.parentNode.cellIndex == gReport.websheet.numberCells-1){ if(gReport.websheet.currentRow.rowIndex == gReport.websheet.Spreadsheet.rows.length-1){ gReport.websheet.CellInit(gReport.websheet.Spreadsheet.rows[1].cells[1]); }else{ gReport.websheet.CellInit(gReport.websheet.Spreadsheet.rows[gReport.websheet.currentRow.rowIndex+1].cells[1]); } } } function cellsave(e,pThis){ if(gReport.websheet.currentValue != pThis.value){ gReport.websheet.currentValue = $v(pThis); var lRequest = new apex.ajax.ondemand('ws_SaveCell', function(){ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ ajax_Loading(p.readyState); gReport.websheet.Reset(); }else{return false;} } ); lRequest.ajax.add('AJAX_WS_COLUMN',gReport.websheet.currentCol); lRequest.ajax.add('TEMPORARY_ITEM',pThis.value); lRequest.ajax.add('CURRENT_WORKSHEET_ROW',gReport.websheet.currentRow.id.substring(3)); lRequest._get(); }else{ gReport.websheet.Reset(); } return; } function addOption(selectbox,text,value ){ var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); return optn } function ws_GetSelectItem(pThis,pVal){ this.dGet = dGet; var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ws_GetSelectItem',0); this.dGet(); return; function dGet(){ get.add('CURRENT_WORKSHEET_ROW',gReport.websheet.currentRow.id.substring(3)); get.add('AJAX_WS_COLUMN',gReport.websheet.currentCol); get.GetAsync(dShow); } function dShow(){ if(p.readyState == 1){ ajax_Loading(p.readyState); }else if(p.readyState == 2){ }else if(p.readyState == 3){ }else if(p.readyState == 4){ ajax_Loading(p.readyState); var myObject = eval('(' + p.responseText + ')'); for (var i=0;i<myObject.row.length;i++){ var lOpt = addOption(pThis,myObject.row[i].R,myObject.row[i].R); if(myObject.row[i].R == pVal){lOpt.selected=true;} } } } } }catch(e){} function websheets_action(pAjax,pAction){ /* pAjax add values http://apex.oracle.com/pls/otn/f?p=11933:97 pAjax.ajax.addParam('x01',$v('')); pAjax.ajax.addParam('x02',$v('')); pAjax.ajax.addParam('x03',$v('')); pAjax.ajax.addParam('x04',$v('')); pAjax.ajax.addParam('x05',$v('')); pAjax.ajax.addParam('x06',$v('')); pAjax.ajax.addParam('x07',$v('')); pAjax.ajax.addParam('x08',$v('')); pAjax.ajax.addParam('x09',$v('')); pAjax.ajax.addParam('x10',$v('')); */ (!!pAction)?pAjax.ajax.addParam('p_widget_action',pAction):null; switch(pAction){ case 'properties': pAjax.ajax.addParam('x01',$v('apexir_NAME')); pAjax.ajax.addParam('x02',$v('apexir_DESCRIPTION')); ;break; case 'column_add': pAjax.ajax.addParam('x01',$v('apxir_COLUMN_NAME')); pAjax.ajax.addParam('x02',$v('apexir_COLUMN_TYPE')); pAjax.ajax.addParam('x03',$v('apexir_DISPLAY_AS')); pAjax.ajax.addParam('x04',$v('apexir_LOV')); pAjax.ajax.addParam('x05',$v('apexir_REQUIRED')); pAjax.ajax.addParam('x06',$v('apexir_DEFAULT_TYPE')); pAjax.ajax.addParam('x07',$v('apexir_DEFAULT_TEXT')); pAjax.ajax.addParam('x08',$v('apexir_LOV_NAME')); pAjax.ajax.addParam('x09',$v('apexir_LOV_ENTRIES')); break; case 'column_remove': pAjax.ajax.addParam('x01',$v('P2_COLUMN')); ;break; case 'column_properties': pAjax.ajax.addParam('x01',$v('apexir_COLUMN')); pAjax.ajax.addParam('x02',$v('apexir_GROUP_ID')); pAjax.ajax.addParam('x03',$v('apexir_DISPLAY_AS')); pAjax.ajax.addParam('x04',$v('apexir_COLUMN_LABEL')); pAjax.ajax.addParam('x05',$v('apexir_FORMAT_MASK')); pAjax.ajax.addParam('x06',$v('apexir_REQUIRED')); pAjax.ajax.addParam('x07',$v('apexir_HEADING_ALIGNMENT')); pAjax.ajax.addParam('x08',$v('apexir_COLUMN_ALIGNMENT')); pAjax.ajax.addParam('x09',$v('apexir_DEFAULT_TYPE')); pAjax.ajax.addParam('x10',$v('apexir_DEFAULT_TEXT')); ;break; case 'lov': pAjax.ajax.addParam('x01',$v('apexir_LOV_ID')); pAjax.ajax.addParam('x02',$v('apexir_LOV_NAME')); pAjax.ajax.addParam('x03',$v('apexir_LOV_ENTRIES')); ;break; case 'column_groups': pAjax.ajax.addParam('x01',$v('apexir_GROUP_ID')); pAjax.ajax.addParam('x02',$v('apexir_DISPLAY_SEQUENCE')); pAjax.ajax.addParam('x03',$v('apexir_NAME')); pAjax.ajax.addParam('x04',$v('apexir_DESCRIPTION')); ;break; case 'set_column_value': pAjax.ajax.addParam('x01',$v('apexir_COLUMN')); pAjax.ajax.addParam('x02',$v('apexir_NEW_COLUMN_VALUE')); pAjax.ajax.addParam('x03',$v('apexir_ROWS')); ;break; case 'replace_column_value': pAjax.ajax.addParam('x01',$v('apexir_ROWS')); pAjax.ajax.addParam('x02',$v('apexir_COLUMS')); pAjax.ajax.addParam('x03',$v('apexir_REPLACE')); pAjax.ajax.addParam('x04',$v('apexir_REPLACE_WITH')); ;break; case 'fill_column_value': pAjax.ajax.addParam('x01',$v('apexir_COLUMN')); pAjax.ajax.addParam('x02',$v('apexir_FILL_WITH')); ;break; case 'delete_rows': pAjax.ajax.addParam('x01',$v('apexir_ROWS')); ;break; case 'set_geocode': pAjax.ajax.addParam('x01',$v('apexir_SHUTTLE_RIGHT')); ;break; case 'reset_geocode':false;break; case 'copy': pAjax.ajax.addParam('x01',$v('apexir_NEW_WORKSHEET_NAME')); ;break; case 'export': pAjax.ajax.addParam('x01',$v('apexir_EXPORT_FORMAT')); ;break; case 'delete': pAjax.ajax.addParam('x01',$v('apexir_ACTION')); ;break; default:false;break; } /* fire ajax */ pAjax._get(); } function websheet_return(p){ if(p.responseText == 'true'){ /* pull report */ gReport.pull(); }else{ $s('apexir_DIALOG_MESSAGE',p.responseText); $x_Show('apexir_DIALOG_MESSAGE'); } } function pull_lov(pThis){ var lValue = $x(pThis).value; var lThis = $x(pThis).options[$x(pThis).selectedIndex].text; if(lValue!=''){ var lRequest = new apex.ajax.ondemand('GET_LOV', function(){ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ gReturn = p.responseText; $s('apexir_LOV_NAME',lThis); $s('apexir_LOV_ENTRIES',gReturn.substring(0,gReturn.length-1)); }else{return false;} } ); lRequest.ajax.addParam('x01',lValue); lRequest._get(); }else{ $s('apexir_LOV_NAME',''); $s('apexir_LOV_ENTRIES',''); } } function pull_column_data(pThis){ var lRequest = new apex.ajax.ondemand('show_dialog', function(){ /* start the return function */ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ gReturn = p.responseText; $s('apexir_CONTROL_PANEL_DROP',gReturn); $x_Show('apexir_CONTROL_PANEL_DROP'); }else{return false;} /* end the return function */ } ); lRequest.ajax.addParam('x01','COLUMN_PROPERTIES2'); lRequest.ajax.addParam('x02',$v(pThis)); lRequest._get(); } function pull_column_group(pThis){ var lRequest = new apex.ajax.ondemand('show_dialog', function(){ /* start the return function */ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ gReturn = p.responseText; $s('apexir_CONTROL_PANEL_DROP',gReturn); $x_Show('apexir_CONTROL_PANEL_DROP'); }else{return false;} /* end the return function */ } ); lRequest.ajax.addParam('x01','GROUP2'); lRequest.ajax.addParam('x02',$v(pThis)); lRequest._get(); } /* function f_TestOnDemand(pValue){ var lRequest = new apex.ajax.ondemand('GET_LOV', function(){ var l_s = p.readyState; if(l_s == 1||l_s == 2||l_s == 3){ }else if(l_s == 4){ gReturn = p.responseText; $s('ajax_drop',gReturn); }else{return false;} } ); lRequest.ajax.addParam('p_widget_mod',$v('P10_G_WIDGET_MOD')); lRequest.ajax.addParam('p_widget_action',$v('P10_G_WIDGET_ACTION')); lRequest.ajax.addParam('p_widget_action_mod',$v('P10_G_WIDGET_ACTION_MOD')); lRequest.ajax.addParam('x01',$v('P10_X01')); lRequest.ajax.addParam('x02',$v('P10_X02')); lRequest.ajax.addParam('x03',$v('P10_X03')); lRequest.ajax.addParam('x04',$v('P10_X04')); lRequest.ajax.addParam('x05',$v('P10_X05')); lRequest.ajax.addParam('x06',$v('P10_X06')); lRequest.ajax.addParam('x07',$v('P10_X07')); lRequest.ajax.addParam('x08',$v('P10_X08')); lRequest.ajax.addParam('x09',$v('P10_X09')); lRequest.ajax.addParam('x10',$v('P10_X10')); lRequest._get(); } */ //pull_lov('apexir_LOV_ID')
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de