[Home] [Help]
PACKAGE BODY: APPS.ICX_PLUG_UTILITIES
Source
1 package body icx_plug_utilities as
2 /* $Header: ICXPGUB.pls 120.1 2005/10/07 13:45:50 gjimenez noship $ */
3
4 function bgcolor return varchar2 is
5
6 l_color varchar2(30);
7
8 begin
9
10 /* icx_page_color_scheme has been obsoleted since 11.5.0
11 begin
12 select BACKGROUND_COLOR
13 into l_color
14 from ICX_PAGE_COLOR_SCHEME
15 where USER_ID = icx_sec.g_user_id;
16 exception
17 when others then
18 l_color := '##CCCCCC';
19 end;
20 */
21
22 l_color := '#CCCCCC';
23
24 return l_color;
25
26 end;
27
28 function plugbgcolor return varchar2 is
29
30 l_color varchar2(30);
31
32 begin
33
34 /* icx_page_color_scheme has been obsoleted since 11.5.0
35 begin
36 select BACKGROUND_COLOR
37 into l_color
38 from ICX_PAGE_COLOR_SCHEME
39 where USER_ID = icx_sec.g_user_id;
40 exception
41 when others then
42 l_color := '##FFFFFF';
43 end;
44 */
45
46 l_color := '#FFFFFF';
47
48 return l_color;
49
50 end;
51
52 function plugheadingcolor return varchar2 is
53
54 l_color varchar2(30);
55
56 begin
57
58 begin
59 select HEADING_COLOR
60 into l_color
61 from ICX_PAGE_COLOR_SCHEME
62 where USER_ID = icx_sec.g_user_id;
63 exception
64 when others then
65 l_color := '#99CCFF';
66 end;
67
68 return l_color;
69
70 end;
71
72 function headingcolor return varchar2 is
73
74 l_color varchar2(30);
75
76 begin
77
78 begin
79 select HEADING_COLOR
80 into l_color
81 from ICX_PAGE_COLOR_SCHEME
82 where USER_ID = icx_sec.g_user_id;
83 exception
84 when others then
85 l_color := '#99CCFF';
86 end;
87
88 -- l_color := '#99CCFF';
89
90 return l_color;
91
92 end;
93
94 function plugbannercolor return varchar2 is
95
96 l_color varchar2(30);
97
98 begin
99
100 begin
101 select BANNER_COLOR
102 into l_color
103 from ICX_PAGE_COLOR_SCHEME
104 where USER_ID = icx_sec.g_user_id;
105 exception
106 when others then
107 l_color := '#99CCFF';
108 end;
109
110 return l_color;
111
112 end;
113
114 function plugcolorscheme return varchar2 is
115
116 l_color varchar2(30);
117
118 begin
119
120 begin
121 select COLOR_SCHEME
122 into l_color
123 from ICX_PAGE_COLOR_SCHEME
124 where USER_ID = icx_sec.g_user_id;
125 exception
126 when others then
127 l_color := 'BL';
128 end;
129
130 return l_color;
131
132 end;
133
134
135 function bannercolor return varchar2 is
136
137 l_color varchar2(30);
138
139 begin
140
141 begin
142 select BANNER_COLOR
143 into l_color
144 from ICX_PAGE_COLOR_SCHEME
145 where USER_ID = icx_sec.g_user_id;
146 exception
147 when others then
148 l_color := '#99CCFF';
149 end;
150
151 -- l_color := '#99CCFF';
152
153 return l_color;
154
155 end;
156
157 function toolbarcolor return varchar2 is
158
159 l_color varchar2(30);
160
161 begin
162
163 begin
164 select TOOLBAR_COLOR
165 into l_color
166 from ICX_PAGE_COLOR_SCHEME
167 where USER_ID = icx_sec.g_user_id;
168 exception
169 when others then
170 l_color := '#0000CC';
171 end;
172
173 -- l_color := '#0000cc';
174
175 return l_color;
176
177 end;
178
179 function colorscheme return varchar2 is
180
181 l_color varchar2(30);
182
183 begin
184
185 begin
186 select COLOR_SCHEME
187 into l_color
188 from ICX_PAGE_COLOR_SCHEME
189 where USER_ID = icx_sec.g_user_id;
190 exception
191 when others then
192 l_color := 'BL';
193 end;
194
195 -- l_color := 'BL';
196
197 return l_color;
198
199 end;
200
201 function getPLSQLagent return varchar2 is
202
203 dad_url varchar2(2000);
204 index1 number;
205 index2 number;
206 index3 number;
207 l_agent varchar2(80);
208
209 begin
210
211 dad_url := FND_WEB_CONFIG.PLSQL_AGENT;
212
213 if (dad_url is null) then
214 return NULL;
215 end if;
216
217 dad_url := FND_WEB_CONFIG.TRAIL_SLASH(dad_url);
218 index1 := INSTRB(dad_url, '//', 1) + 2;
219 index2 := INSTRB(dad_url, '/', index1);
220 index3 := LENGTHB(dad_url)+1;
221
222 l_agent := substrb(dad_url,index2,index3-index2);
223
224 if (substr(icx_sec.g_mode_code,1,3) = '115' or
225 icx_sec.g_mode_code = 'SLAVE')
226 then
227 l_agent := ltrim(l_agent,'/');
228 end if;
229
230
231 return l_agent;
232
233 end;
234
235
236 function getReportPLSQLagent return varchar2 is
237
238 l_agent varchar2(80);
239 l_profile varchar2(80);
240 l_agent_start number;
241 l_agent_end number;
242 begin
243 l_profile := fnd_profile.value('APPS_WEB_AGENT');
244 l_agent_start := instr(l_profile,'/',8);
245 l_agent_end := instr(l_profile,'/',8,3);
246 if l_agent_end <> 0 then
247 l_agent := substr(l_profile,l_agent_start, l_agent_end);
248 else
249 l_agent := substr(l_profile,l_agent_start)||'/';
250 end if;
251
252 return l_agent;
253
254 end;
255
256
257 function getReportURL return varchar2 is
258
259 l_agent varchar2(80);
260 l_profile varchar2(80);
261 l_agent_end number;
262 begin
263 l_profile := fnd_profile.value('APPS_WEB_AGENT');
264 l_agent_end := instr(l_profile,'/',8);
265 l_agent := substr(l_profile,1, l_agent_end);
266
267 return l_agent;
268
269 end;
270
271 function getPlugTitle(p_plug_id in varchar2) return varchar2 is
272
273 l_plug_title varchar2(240);
274 l_menu_id number;
275 l_entry_sequence number;
276
277 begin
278
279 select DISPLAY_NAME,MENU_ID,ENTRY_SEQUENCE
280 into l_plug_title,l_menu_id,l_entry_sequence
281 from ICX_PAGE_PLUGS
282 where PLUG_ID = p_plug_id;
283
284 if l_plug_title is null
285 then
286 select nvl(PROMPT,DESCRIPTION)
287 into l_plug_title
288 from FND_MENU_ENTRIES_VL
289 where MENU_ID = l_menu_id
290 and ENTRY_SEQUENCE = l_entry_sequence;
291 end if;
292
293 return l_plug_title;
294
295 end;
296
297 procedure gotoMainMenu is
298
299 l_host_instance varchar2(80);
300 l_agent varchar2(80);
301 l_menu varchar2(240);
302
303 begin
304
305 if ( substr(icx_sec.g_mode_code,1,3) = '115' or
306 icx_sec.g_mode_code = 'SLAVE')
307 then
308 l_menu := owa_util.get_cgi_env('SCRIPT_NAME')||'/oraclemypage.home';
309 else
310 l_host_instance := FND_WEB_CONFIG.DATABASE_ID;
311
312 l_agent := icx_plug_utilities.getPLSQLagent;
313
314 l_menu := '/OA_JAVA_SERV/oracle.apps.icx.myPage.MainMenu?dbHost='||l_host_instance||'&'||'agent='||l_agent;
315 end if;
316
317 owa_util.redirect_url(l_menu);
318 end;
319
320 function MainMenulink return varchar2 is
321
322 l_link varchar2(30);
323
324 begin
325
326 l_link := 'Javascript:MainMenu()';
327
328 return l_link;
329
330 end;
331
332 procedure banner(p_text in varchar2 default NULL,
333 p_edit_URL in varchar2 default NULL,
334 p_icon in varchar2 default NULL,
335 p_text2 in varchar2 default NULL,
336 p_text3 in varchar2 default NULL,
337 p_text4 in varchar2 default NULL) is
338
339 l_Customize varchar2(80);
340 l_color varchar2(30);
341 l_text_color varchar2(30);
342 l_text_face varchar2(30);
343 l_color_scheme varchar2(30);
344
345 begin
346
347 l_Customize := icx_util.getPrompt(601,'ICX_OBIS_NAVIGATE',178,'ICX_CUSTOMIZE');
348 if ( substr(icx_sec.g_mode_code,1,3) = '115' or
349 icx_sec.g_mode_code = 'SLAVE')
350 then
351 l_color := '#6699CC'; --'#000066';
352 l_text_color := '#ffffff';
353 l_text_face := 'Arial';
354 else
355 l_color := icx_plug_utilities.bannercolor;
356 l_text_color := '#000000';
357 l_text_face := 'Arial';
358 end if;
359 l_color_scheme := icx_plug_utilities.colorscheme;
360
361 htp.p('<table border=0 cellspacing=0 cellpadding=0 width=100%><TR>');
362 htp.p('<td bgcolor="'||l_color||'" width=5%>');
363 if p_icon is null
364 then
365 htp.p('&'||'nbsp;');
366 else
367 htp.p('<img src=/OA_MEDIA/' || p_icon || '>');
368 end if;
369 htp.p('</td>');
370
371 htp.p('<td bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="'||l_text_color||'" face="'||l_text_face||'" size=2><b>'||p_text||' </td>');
372
373 if p_text2 is not null
374 then
375 htp.p('<td bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="'||l_text_color||'" face="'||l_text_face||'" size=2><b>'||p_text2||'</td>');
376 end if;
377
378 if p_text3 is not null
379 then
380 htp.p('<td bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="'||l_text_color||'" face="'||l_text_face||'Arial" size=2><b>'||p_text3||'</td>');
381 end if;
382
383 if p_text4 is not null
384 then
385 htp.p('<td bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="'||l_text_color||'" face="'||l_text_face||'Arial" size=2><b>'||p_text4||'</td>');
386 end if;
387
388 if p_edit_URL is null
389 then
390 htp.p('<td bgcolor="'||l_color||'" width="100%"><BR></td>');
391 else
392 htp.p('<td bgcolor="'||l_color||'" align="right" width="100%" NOWRAP><font face="Arial" size=-2>'||
393 htf.anchor(curl => p_edit_URL,
394 ctext => l_Customize,
395 cattributes => 'TARGET="_top" onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(l_Customize)||''';return true"')||'</td>');
396 end if;
397 if substr(icx_sec.g_mode_code,1,3) <> '115'
398 then
399 htp.p('<td align="left"><img src=/OA_MEDIA/FND'||l_color_scheme||'SUB.gif height=18 width=8></td>');
400 end if;
401 htp.p('</tr></table>');
402
403 end;
404
405 procedure plugbanner(p_text in varchar2 default NULL,
406 p_edit_URL in varchar2 default NULL,
407 p_icon in varchar2 default NULL,
408 p_text2 in varchar2 default NULL,
409 p_text3 in varchar2 default NULL,
410 p_text4 in varchar2 default NULL) is
411
412 l_Customize varchar2(80);
413 l_color varchar2(30);
414
415 begin
416
417 l_Customize := icx_util.getPrompt(601,'ICX_OBIS_NAVIGATE',178,'ICX_CUSTOMIZE');
418 if ( substr(icx_sec.g_mode_code,1,3) = '115' OR
419 icx_sec.g_mode_code = 'SLAVE')
420 then
421 l_color := '#6699CC'; --'#000066';
422 else
423 l_color := icx_plug_utilities.bannercolor;
424 end if;
425
426 htp.p('<table border=0 cellspacing=0 cellpadding=0 width=100%><TR>');
427 if p_icon is null
428 then
429 htp.p('<td bgcolor="'||l_color||'">'||'&'||'nbsp;</td>');
430 else
431 htp.p('<td bgcolor="'||l_color||'"><img src=/OA_MEDIA/'||p_icon||'></td>');
432 htp.p('<td bgcolor="'||l_color||'"><img src=/OA_MEDIA/FNDINVDT.gif height=18 width=9></td>');
433 end if;
434
435 htp.p('<td bordercolor="#6699CC" bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="#ffffff" face="Arial" size=1><b> '|| p_text || '</b></td>');
436
437 if p_text2 is not null
438 then
439 htp.p('<td bordercolor="#6699CC" bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="#ffffff" face="Arial" size=1><b>'||p_text2||'</td>');
440 end if;
441
442 if p_text3 is not null
443 then
444 htp.p('<td bordercolor="#6699CC" bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="#ffffff" face="Arial" size=1><b>'||p_text3||'</td>');
445 end if;
446
447 if p_text4 is not null
448 then
449 htp.p('<td bordercolor="#bgcolor="'||l_color||'" width=100% align="left" NOWRAP><font color="#ffffff" face="Arial" size=1><b>'||p_text4||'</td>');
450 end if;
451
452 if p_edit_URL is null
453 then
454 htp.p('<td bordercolor="#6699CC" bgcolor="'||l_color||'" width="101%"><BR></td>');
455 else
456
457 htp.p('<td bordercolor="#6699CC" bgcolor="'||l_color||'" NOWRAP>'||
458 htf.anchor(curl => p_edit_URL,
459 ctext => '<font color="#ffffff" face="Arial" size=1>' ||
460 l_Customize || '</FONT>',
461 cattributes => 'TARGET="_top" onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(l_Customize)||''';return true"')||'</td>');
462
463 end if;
464
465 --htp.p('<td align="left"><img src=/OA_MEDIA/FND' || plugcolorscheme ||
466 -- 'SUB.gif height=18 width=8></td>');
467
468 htp.p('</tr></table>');
469
470 end;
471
472 procedure sessionjavascript(p_javascript_tags in boolean default TRUE,
473 p_function in boolean default TRUE) is
474
475 begin
476
477 if p_javascript_tags then
478 htp.p('<SCRIPT LANGUAGE="JavaScript">');
479 end if;
480
481 if p_function
482 then
483 if icx_sec.g_function_type = 'WWK'
484 then
485 htp.p('function windowunload() {
486 parent.opener.parent.main.document.functionwindowfocus.X.value = "FALSE";
487 };');
488 htp.p('parent.opener.parent.main.document.functionwindowfocus.X.value = "TRUE";');
489 htp.p('window.onfocus = self.focus;');
490 htp.p('window.onunload = new Function("windowunload()");');
491 else
492 htp.p('');
493 end if;
494 end if;
495
496 if p_javascript_tags then
497 htp.p('</SCRIPT>');
498 end if;
499
500 end;
501
502 -- Cabo Toolbar
503 procedure cabotoolbar (p_text in varchar2 default NULL,
504 p_language_code in varchar2 default null,
505 p_disp_find in varchar2 default null,
506 p_disp_mainmenu in varchar2 default 'Y',
507 p_disp_wizard in varchar2 default 'N',
508 p_disp_help in varchar2 default 'N',
509 p_disp_export in varchar2 default null,
510 p_disp_exit in varchar2 default 'N',
511 p_disp_menu in varchar2 default 'Y') is
512
513 l_language_code varchar2(30);
514 l_title varchar2(80);
515 l_prompts icx_util.g_prompts_table;
516 l_href varchar2(2000);
517 l_host_instance varchar2(80);
518 l_agent varchar2(80);
519
520 begin
521
522 if p_language_code is null
523 then
524 l_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
525 else
526 l_language_code := p_language_code;
527 end if;
528
529 icx_util.getprompts(601, 'ICX_OBIS_TOOLBAR', l_title, l_prompts);
530
531 if p_disp_menu = 'N'
532 then
533 sessionjavascript(p_function => FALSE);
534 else
535 sessionjavascript(p_function => TRUE);
536 end if;
537
538 htp.p('<!--Outer table containing toolbar and logo cells-->
539 <table width=100% Cellpadding=0 Cellspacing=0 border=0>
540 <tr>
541 <td align=left>
542 <TABLE cellpadding="0" cellspacing="0" border="0">
543 <TR>
544 <TD rowspan="3"><IMG src="/OA_HTML/webtools/images/toolbar_left.gif"></TD>
545 <TD bgcolor="#FFFFFF" height="1"><IMG src="/OA_HTML/webtools/images/pixel_color6.gif"></TD>
546 <TD rowspan="3"><IMG src="/OA_HTML/webtools/images/toolbar_right.gif"></TD>
547 </TR>
548 <TR bgcolor="#CCCCCC"><TD><TABLE cellpadding="0" cellspacing="0" border="0">');
549
550 if (p_disp_menu = 'Y') then
551 if icx_sec.g_function_type = 'WWK' then
552 l_href := 'javascript:window.close();';
553 else
554
555 --l_href := 'javascript:top.location.href = ''OracleMyPage.DrawTabContent'||''';';
556
557 l_href := 'javascript:top.location.href = ''OracleNavigate.Responsibility?P='||icx_sec.g_responsibility_id||''';';
558 end if;
559
560 -- toolbar_icon_menu_active.gif and toolbar_icon_menu.gif
561 htp.p('<TD nowrap height="30" align="middle">
562 <A href="'||l_href||'" target="_top" onmouseover="document.menu.src=''/OA_MEDIA/FNDMENU.gif''; return true" onmouseout="document.menu.src=''/OA_MEDIA/FNDMENU.gif''; return true">
563 <IMG name="menu" src="/OA_MEDIA/FNDMENU.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(7))||'"></A></TD>');
564 end if;
565
566 if (p_disp_mainmenu = 'Y') then
567 l_host_instance := FND_WEB_CONFIG.DATABASE_ID;
568 l_agent := icx_plug_utilities.getPLSQLagent;
569
570 if icx_sec.g_function_type = 'WWK' then
571 l_href := 'javascript:parent.opener.location.href = '''||owa_util.get_cgi_env('SCRIPT_NAME')||'/oraclemypage.home'';window.close();';
572 else
573 l_href := 'javascript:top.location.href = '''||owa_util.get_cgi_env('SCRIPT_NAME')||'/oraclemypage.home'';';
574 end if;
575
576 htp.p('<TD nowrap height="30" align="middle">
577 <A href="'||l_href||'" target="_top" onmouseover="document.home.src=''/OA_MEDIA/FNDHOME.gif''; return true" onmouseout="document.home.src=''/OA_MEDIA/FNDHOME.gif''; return true">
578 <IMG name="home" src="/OA_MEDIA/FNDHOME.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(3))||'"></A></TD>');
579 end if;
580
581 if p_text is not null
582 then
583 -- separator
584 htp.p('<TD nowrap height="30" align="middle"> <IMG src="/OA_HTML/webtools/images/toolbar_divider.gif" align="absmiddle"> </TD>');
585
586 -- p_text
587 htp.p('<TD height="30" nowrap align="middle"><FONT style="Arial, Helvetica, Geneva, sans-serif" color="#336699" size="+2"><B><I>'||'&'||'nbsp;'||p_text||'&'||'nbsp;</I></B></FONT></TD>');
588
589 -- separator
590 htp.p('<TD nowrap height="30" align="middle"> <IMG src="/OA_HTML/webtools/images/toolbar_divider.gif" align="absmiddle"> </TD>');
591 end if;
592
593 if (p_disp_exit = 'Y') then
594
595 htp.p('<TD nowrap height="30" align="middle">
596 <A href="icx_admin_sig.Startover" target="_top" onmouseover="document.exit.src=''/OA_MEDIA/FNDEXIT.gif''; return true" onmouseout="document.exit.src=''/OA_MEDIA/FNDEXIT.gif''; return true">
597 <IMG name="exit" src="/OA_MEDIA/FNDEXIT.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(4))||'"></A></TD>');
598 end if;
599
600 if (p_disp_help = 'Y') then
601
602 htp.p('<TD nowrap height="30" align="middle">
603 <A href="javascript:help_window()" target="_top" onmouseover="document.help.src=''/OA_MEDIA/FNDIHELP.gif''; return true" onmouseout="document.help.src=''/OA_MEDIA/FNDIHELP.gif''; return true">
604 <IMG name="help" src="/OA_MEDIA/FNDIHELP.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(5))||'"></A></TD>');
605 end if;
606
607 if (p_disp_wizard = 'Y' or p_disp_export is not null or p_disp_find is not null)
608 then
609 htp.p('<TD class="toolbar" nowrap height="30" align="middle"> <IMG src="/OA_HTML/webtools/images/toolbar_divider.gif" align="absmiddle"> </TD>');
610 end if;
611
612 if (p_disp_wizard = 'Y') then
613
614 htp.p('<TD nowrap height="30" align="middle">
615 <A href="javascript:doWizard()" target="_top" onmouseover="document.wizard.src=''/OA_MEDIA/FNDWIZ.gif''; return true" onmouseout="document.wizard.src=''/OA_MEDIA/FNDWIZ.gif''; return true">
616 <IMG name="wizard" src="/OA_MEDIA/FNDWIZ.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(1))||'"></A></TD>');
617 end if;
618
619 if (p_disp_export is not null) then
620
621 htp.p('<TD nowrap height="30" align="middle">');
622 htp.p('<FORM ACTION="OracleON.csv" METHOD="POST" NAME="exportON">');
623 htp.formHidden('S',icx_call.encrypt2(p_disp_export));
624 htp.p('</FORM>');
625 htp.p('<A href="javascript:document.exportON.submit()" target="_top" onmouseover="document.export.src=''/OA_MEDIA/FNDEXP.gif''; return true" onmouseout="document.export.src=''/OA_MEDIA/FNDEXP.gif''; return true">
626 <IMG name="export" src="/OA_MEDIA/FNDEXP.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(6))||'"></A></TD>');
627 end if;
628
629 if (p_disp_find is not null) then
630
631 htp.p('<TD nowrap height="30" align="middle">
632 <A href="'||p_disp_find||'" target="_top" onmouseover="document.find.src=''/OA_MEDIA/FNDFIND.gif''; return true" onmouseout="document.find.src=''/OA_MEDIA/FNDFIND.gif''; return true">
633 <IMG name="find" src="/OA_MEDIA/FNDFIND.gif" align=absmiddle border=0 alt="'||icx_util.replace_alt_quotes(l_prompts(2))||'"></A></TD>');
634 end if;
635
636 htp.p('</TABLE></TD></TR>
637 <TR>
638 <TD bgcolor="#666666" height="1"><IMG src="/OA_HTML/webtools/images/pixel_gray2.gif"></TD>
639 </TR>
640 </TABLE>
641 </TD>
642 <TD rowspan=5 width=100% align=right><IMG src=/OA_MEDIA/FNDLOGOS.gif></TD>
643 </TR>
644 </TABLE>');
645
646 end;
647
648 -- p_disp_mainmenu is home
649 procedure toolbar (p_text in varchar2 default NULL,
650 p_language_code in varchar2 default null,
651 p_disp_find in varchar2 default null,
652 p_disp_mainmenu in varchar2 default 'Y',
653 p_disp_wizard in varchar2 default 'N',
654 p_disp_help in varchar2 default 'N',
655 p_disp_export in varchar2 default null,
656 p_disp_exit in varchar2 default 'N',
657 p_disp_menu in varchar2 default 'Y') is
658
659 url varchar2(240) := null;
660 l_session_mode varchar2(30);
661 l_session_id pls_integer;
662 c_title varchar2(80);
663 c_prompts icx_util.g_prompts_table;
664 l_text varchar2(240);
665 v_language_code varchar2(30);
666 l_toolbar_color varchar2(30);
667 l_heading_color varchar2(30);
668 l_color_scheme varchar2(30);
669 l_host_instance varchar2(80);
670 l_agent varchar2(80);
671 l_menu varchar2(240);
672 l_menu_id number;
673
674 begin
675
676 if ( substr(icx_sec.g_mode_code,1,3) = '115' OR
677 icx_sec.g_mode_code = 'SLAVE')
678 then
679
680 begin
681 select menu_id
682 into l_menu_id
683 from icx_sessions
684 where session_id = icx_sec.g_session_id;
685 exception
686 when no_data_found then
687 l_menu_id := null;
688 end;
689
690 /* If menu id is null then the function is not called from the Navigate plug.
691 Instead the function is being called directly from the Home Page.
692 In such case we should not display the "return to main menu" icon because
693 there is no main menu to return to. Only the return to Home icon should
694 be displayed. */
695
696 if (l_menu_id is null) then
697 icx_plug_utilities.cabotoolbar(p_text => p_text,
698 p_language_code => p_language_code,
699 p_disp_find => p_disp_find,
700 p_disp_mainmenu => p_disp_mainmenu,
701 p_disp_wizard => p_disp_wizard,
702 p_disp_help => p_disp_help,
703 p_disp_export => p_disp_export,
704 p_disp_exit => p_disp_exit,
705 p_disp_menu => 'N');
706 else
707 icx_plug_utilities.cabotoolbar(p_text => p_text,
708 p_language_code => p_language_code,
709 p_disp_find => p_disp_find,
710 p_disp_mainmenu => p_disp_mainmenu,
711 p_disp_wizard => p_disp_wizard,
712 p_disp_help => p_disp_help,
713 p_disp_export => p_disp_export,
714 p_disp_exit => p_disp_exit,
715 p_disp_menu => p_disp_menu);
716 end if;
717 else
718 if p_text is null then
719 l_text := '<BR>';
720 else
721 l_text := p_text;
722 end if;
723
724 if p_language_code is null then
725 v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
726 else
727 v_language_code := p_language_code;
728 end if;
729
730 l_session_id := icx_sec.getID(icx_sec.PV_SESSION_ID);
731 l_session_mode := icx_sec.getID(icx_sec.PV_SESSION_MODE);
732 if l_session_mode is null
733 then
734 l_session_mode := 'OBIS';
735 end if;
736
737 l_toolbar_color := icx_plug_utilities.toolbarcolor;
738 l_heading_color := icx_plug_utilities.headingcolor;
739 l_color_scheme := icx_plug_utilities.colorscheme;
740
741 l_host_instance := FND_WEB_CONFIG.DATABASE_ID;
742
743 l_agent := icx_plug_utilities.getPLSQLagent;
744
745 l_menu := '/OA_JAVA_SERV/oracle.apps.icx.myPage.MainMenu?dbHost='||l_host_instance||'&'||'agent='||l_agent;
746
747 htp.p('<!- ToolBar ->');
748
749 if p_disp_menu = 'N'
750 then
751 sessionjavascript(p_function => FALSE);
752 else
753 sessionjavascript(p_function => TRUE);
754 end if;
755
756 htp.p('<table border=0 cellspacing=0 cellpadding=0 width=101%>');
757
758 htp.p('<table border=0 cellspacing=0 cellpadding=0 width=101%>');
759 htp.p('<tr><td rowspan=4><img src="/OA_MEDIA/FND'||l_color_scheme||'BLT.gif" width=35 height=46></td>');
760 htp.p('<td bgcolor="'||l_toolbar_color||'" rowspan=4><img src="/OA_MEDIA/FNDLOGOS.gif"></td>');
761 htp.p('<td rowspan=4 bgcolor="'||l_toolbar_color||'"><font size=+3>'||'&'||'nbsp;</td>');
762 htp.p('<td bgcolor="'||l_toolbar_color||'" nowrap><font face="Arial"><font size=+2 color='||l_heading_color||'><B>'||l_text||'</B></td>');
763
764 icx_util.getprompts(601, 'ICX_OBIS_TOOLBAR', c_title, c_prompts);
765
766 htp.p('<td rowspan=4 width=10000 bgcolor="'||l_toolbar_color||'" align=right>');
767 /*
768 ** inner table for icons
769 */
770 htp.p('<table border=0 cellspacing=0 cellpadding=0>');
771 htp.tableRowOpen(calign => 'CENTER');
772
773 if (p_disp_wizard = 'Y') then
774 htp.tableData(htf.anchor('javascript:doWizard()',
775 htf.img('/OA_MEDIA/FNDWIZ.gif',
776 'CENTER',
777 icx_util.replace_alt_quotes(c_prompts(1)),'',
778 'BORDER=0 width=30 height=30'),'',
779 'onMouseOver="window.status=''' ||
780 icx_util.replace_onMouseOver_quotes(c_prompts(1))||
781 ''';return true"'));
782 end if;
783
784 if (p_disp_export is not null) then
785 htp.p('<TD WIDTH=10></TD>');
786 htp.p('<FORM ACTION="OracleON.csv" METHOD="POST" NAME="exportON">');
787 htp.formHidden('S',icx_call.encrypt2(p_disp_export));
788 htp.p('</FORM>');
789 htp.tableData(htf.anchor('javascript:document.exportON.submit()',
790 htf.img('/OA_MEDIA/FNDEXP.gif',
791 'CENTER',
792 icx_util.replace_alt_quotes(c_prompts(6)),'',
793 'BORDER=0 width=30 height=30'),'',
794 'onMouseOver="window.status=''' ||
795 icx_util.replace_onMouseOver_quotes(c_prompts(6))||
796 ''';return true"'));
797 end if;
798
799 if (p_disp_find is not null) then
800 htp.p('<TD WIDTH=10></TD>');
801 htp.tableData(htf.anchor(p_disp_find,
802 htf.img('/OA_MEDIA/FNDFIND.gif',
803 'CENTER',
804 icx_util.replace_alt_quotes(c_prompts(2)),'',
805 'BORDER=0 width=30 height=30'),'',
806 'onMouseOver="window.status=''' ||
807 icx_util.replace_onMouseOver_quotes(c_prompts(2))||
808 ''';return true"'));
809 end if;
810
811 htp.p('<TD WIDTH=50></TD>');
812
813 if (p_disp_menu = 'Y' and l_session_mode <> 'SLAVE') then
814 if icx_sec.g_function_type = 'WWK' then
815 l_menu := 'javascript:window.close();';
816 else
817 l_menu := 'javascript:top.location.href = ''OracleNavigate.Responsibility?P='||icx_sec.g_responsibility_id||''';';
818 end if;
819 htp.tableData(htf.anchor(l_menu,
820 htf.img('/OA_MEDIA/FNDMENU.gif',
821 'CENTER',
822 icx_util.replace_alt_quotes(c_prompts(7)),'',
823 'BORDER=0 width=30 height=30'),'',
824 'onMouseOver="window.status=''' ||
825 icx_util.replace_onMouseOver_quotes(c_prompts(7))
826 ||''';return true" TARGET="_top"'));
827 end if;
828
829 if (p_disp_mainmenu = 'Y' and l_session_mode <> 'SLAVE') then
830 if icx_sec.g_function_type = 'WWK' then
831 l_menu := 'javascript:parent.opener.location.href = ''/OA_JAVA_SERV/oracle.apps.icx.myPage.MainMenu?dbHost='||l_host_instance||'&'||'agent='||l_agent||''';window.close();';
832 else
833 l_menu := 'javascript:top.location.href = ''/OA_JAVA_SERV/oracle.apps.icx.myPage.MainMenu?dbHost='||l_host_instance||'&'||'agent='||l_agent||''';';
834 end if;
835 htp.tableData(htf.anchor(l_menu,
836 htf.img('/OA_MEDIA/FNDHOME.gif',
837 'CENTER',
838 icx_util.replace_alt_quotes(c_prompts(3)),'',
839 'BORDER=0 width=30 height=30'),'',
840 'onMouseOver="window.status=''' ||
841 icx_util.replace_onMouseOver_quotes(c_prompts(3))
842 ||''';return true" TARGET="_top"'));
843 end if;
844
845
846 if (p_disp_exit = 'Y' and l_session_mode <> 'SLAVE') then
847 htp.p('<TD WIDTH=10></TD>');
848 htp.tableData(htf.anchor('icx_admin_sig.Startover',
849 htf.img('/OA_MEDIA/FNDEXIT.gif',
850 'CENTER',
851 icx_util.replace_alt_quotes(c_prompts(4)),'','
852 BORDER=0 width=30 height=30'),'','
853 onMouseOver="window.status=''' ||
854 icx_util.replace_onMouseOver_quotes(c_prompts(4)) ||
855 ''';return true"'));
856 end if;
857
858 if (p_disp_help = 'Y') then
859 htp.p('<TD WIDTH=10></TD>');
860 htp.tableData(htf.anchor('javascript:help_window()',
861 htf.img('/OA_MEDIA/FNDHELP.gif',
862 'CENTER',
863 icx_util.replace_alt_quotes(c_prompts(5)),'',
864 'BORDER=0 width=30 height=30'),'',
865 'onMouseOver="window.status=''' ||
866 icx_util.replace_onMouseOver_quotes(c_prompts(5))||
867 ''';return true"'));
868 end if;
869
870 htp.tableRowClose;
871 htp.tableClose;
872 htp.p('</TD>');
873 /**
874 ** close outer row and table
875 */
876
877 htp.p('<td rowspan=4><img src="/OA_MEDIA/FND'||l_color_scheme||'BRT.gif" width=35 height=46></td>');
878 if p_text is null
879 then
880 htp.p('<tr><td bgcolor="'||l_toolbar_color||'" height=1><img src="/OA_MEDIA/FNDINVDT.gif" width=1 height=1></td></tr>');
881 htp.p('<tr><td bgcolor="'||l_toolbar_color||'" height=2><img src="/OA_MEDIA/FNDINVDT.gif" width=1 height=2></td></tr>');
882 htp.p('<tr><td bgcolor="'||l_toolbar_color||'" height=4><img src="/OA_MEDIA/FNDINVDT.gif" width=1 height=4></td></tr>');
883 else
884 htp.p('<tr><td bgcolor="'||l_heading_color||'" height=1><img src="/OA_MEDIA/FNDINVDT.gif" width=1 height=1></td></tr>');
885 htp.p('<tr><td bgcolor=#000000 height=2><img src="/OA_MEDIA/FNDBLKDT.gif" width=1 height=2></td></tr>');
886 htp.p('<tr><td bgcolor="'||l_toolbar_color||'" height=4><img src="/OA_MEDIA/FND'||l_color_scheme||'BDT.gif" width=1 height=4></td></tr>');
887 end if;
888 htp.p('</table><p>');
889 end if; -- 115
890
891 end toolbar;
892
893 procedure buttonLeft(p_text in varchar2,
894 p_url in varchar2,
895 p_icon in varchar2 default NULL) is
896
897 l_media varchar2(80);
898 l_onMouseOver varchar2(240);
899
900 begin
901
902 l_media := '/OA_MEDIA/';
903 l_onMouseOver := 'onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(p_text)||''';return true"';
904
905 htp.p('<TABLE border=0 cellpadding=0 cellspacing=0 align=right>
906 <TR><TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRL.gif" height=22 width=15 border=0></A></TD>
907 <TD height=1 bgcolor=#FFFFFF colspan=2><IMG src="'||l_media||'FNDINVDT.gif" height=1 width=1></TD>
908 <TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFSR.gif" height=22 width=11 border=0></A></TD></TR>');
909
910 if p_icon is not null
911 then
912 htp.p('<TR><TD height=20 bgcolor=#cccccc><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||p_icon||'" border=0></A></TD>');
913 htp.p('<TD height=20 align=center valign=center bgcolor=#cccccc nowrap><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>');
914 else
915 htp.p('<TD height=20 align=center valign=center bgcolor=#cccccc nowrap colspan=2><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>');
916 end if;
917
918 htp.p('<TR><TD height=1 bgcolor=000000 colspan=2><IMG src="'||l_media||'FNDINVDT.gif" width=1 height=1></TD></TR>
919 </TABLE>');
920
921 end;
922
923 procedure buttonRight(p_text in varchar2,
924 p_url in varchar2,
925 p_icon in varchar2 default NULL) is
926
927 l_media varchar2(80);
928 l_onMouseOver varchar2(240);
929
930 begin
931
932 l_media := '/OA_MEDIA/';
933 l_onMouseOver := 'onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(p_text)||''';return true"';
934
935 htp.p('<TABLE border=0 cellpadding=0 cellspacing=0 align=left>
936 <TR><TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFSL.gif" height=22 width=11 border=0></A></TD>
937 <TD height=1 bgcolor=#FFFFFF colspan=2><IMG src="'||l_media||'FNDINVDT.gif" height=1 width=1></TD>
938 <TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRR.gif" height=22 width=15 border=0></A></TD></TR>');
939
940 if p_icon is not null
941 then
942 htp.p('<TR><TD height=20 bgcolor=#cccccc><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||p_icon||'" border=0></A></TD>');
943 htp.p('<TD height=20 align=center valign=center bgcolor=#cccccc nowrap><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>');
944 else
945 htp.p('<TD height=20 align=center valign=center bgcolor=#cccccc nowrap colspan=2><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>');
946 end if;
947
948 htp.p('<TR><TD height=1 bgcolor=000000 colspan=2><IMG src="'||l_media||'FNDINVDT.gif" width=1 height=1></TD></TR>
949 </TABLE>');
950
951 end;
952
953 procedure buttonBoth(p_text in varchar2,
954 p_url in varchar2,
955 p_icon in varchar2 default NULL) is
956
957 l_media varchar2(80);
958 l_onMouseOver varchar2(240);
959
960 begin
961
962 l_media := '/OA_MEDIA/';
963 l_onMouseOver := 'onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(p_text)||''';return true"';
964
965 htp.p('<TABLE border=0 cellpadding=0 cellspacing=0 align=left>');
966 if p_icon is not null
967 then
968
969 htp.p('<TR><TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRL.gif" height=22 width=15 border=0 ></A></TD>
970 <TD height=1 bgcolor=#FFFFFF colspan=2><IMG src="'||l_media||'FNDINVDT.gif" height=1 width=1></TD>
971 <TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRR.gif" height=22 width=15 border=0></A></TD></TR>
972 <TR><TD height=20 bgcolor=#cccccc><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||p_icon||'" border=0></A></TD>
973 <TD height=20 align=center valign=center bgcolor=#cccccc nowrap><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>
974 <TR><TD height=1 bgcolor=000000 colspan=2><IMG src="'||l_media||'FNDINVDT.gif" width=1 height=1></TD></TR>');
975
976 else
977
978 htp.p('<TR><TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRL.gif" height=22 width=15 border=0></A></TD>
979 <TD height=1 bgcolor=#FFFFFF><IMG src="'||l_media||'FNDINVDT.gif" height=1 width=1></TD>
980 <TD height=22 rowspan=3><A href="'||p_url||'" '||l_onMouseOver||'><IMG src="'||l_media||'FNDJLFRR.gif" height=22 width=15 border=0></A></TD></TR>
981 <TD height=20 align=center valign=center bgcolor=#cccccc nowrap><A href="'||p_url||'" style="text-decoration:none" '||l_onMouseOver||'><FONT size=2 face="Arial,Helvetica,Geneva" color=000000>'||p_text||'</FONT></A></TD></TR>
982 <TR><TD height=1 bgcolor=000000><IMG src="'||l_media||'FNDINVDT.gif" width=1 height=1></TD></TR>');
983
984 end if;
985 htp.p('</TABLE>');
986
987 end;
988
989 end icx_plug_utilities;