[Home] [Help]
PACKAGE BODY: APPS.POS_ACK_WINDOW_UTIL
Source
1 PACKAGE BODY POS_ACK_WINDOW_UTIL AS
2 /* $Header: POSWNDUB.pls 115.4 2001/06/05 18:49:50 pkm ship $ */
3
4 /* DialogBox
5 * ---------
6 */
7 PROCEDURE DialogBox (l_rows in varchar2 default null) IS
8 l_script_name VARCHAR2(240);
9 l_msg VARCHAR2(240);
10 l_title VARCHAR2(2000);
11 BEGIN
12
13 l_script_name := owa_util.get_cgi_env('SCRIPT_NAME');
14 pos_ack_search.veera_debug('Rows: From Dialog Box:' || l_rows);
15
16 IF NOT icx_sec.validatesession THEN
17 RETURN;
18 END IF;
19
20 htp.htmlOpen;
21 htp.linkRel('STYLESHEET', '/OA_HTML/US/POSSTYLE.css');
22
23 htp.headOpen;
24
25 htp.p('<script src="/OA_HTML/POSWUTIL.js"></script>');
26 htp.p('<script src="/OA_HTML/POSEVENT.js"></script>');
27
28 l_title := fnd_message.get_string('ICX','ICX_POS_BTN_CANCEL');
29
30 htp.p('<title>' || l_title || '</title>');
31
32
33 js.scriptOpen;
34
35 htp.p('
36 function drawMe(doc, p_string)
37 {
38 var htmlString = "<html>" +
39 "<LINK REL=STYLESHEET HREF=/OA_HTML/US/POSSTYLE.css TYPE=text/css>" +
40 "<body bgcolor=#cccccc><center>" +
41 "<table width=100% height=100%>" +
42 "<tr><td width=20% align=center valign=center>" +
43 "<img src=/OA_MEDIA/FNDIWARN.gif>" +
44 "</td><td valign=center><font class=datablack>" +
45 p_string +
46 "</font></td></tr></table></body></html>" ;
47 doc.write(htmlString);
48 doc.close();
49 }
50
51 function continueWork(p_win)
52 {
53 p_win.close();
54 }
55
56 function discard(p_win)
57 {
58 p_win.close();
59 }
60
61 ');
62
63 js.scriptClose;
64
65 htp.headClose;
66
67 htp.p('
68 <frameset cols="3,*,3" border=0>');
69 htp.p('
70 <frame
71 src=/OA_HTML/US/POSBLBOR.htm
72 name=borderLeft
73 marginwidth=0
74 scrolling=no> ');
75 htp.p('
76 <frameset rows="15,*,7,45" border=0 >');
77 htp.p('
78 <frame
79 src=/OA_HTML/US/POSDLTOP.htm
80 name=alert_cancel_top
81 marginwidth=0
82 scrolling=no> ');
83 if l_rows = '-1' then
84 -- called from modify promise date
85 l_msg := fnd_message.get_string('ICX','ICX_POS_UPD_SUBMIT');
86 else
87 l_msg := fnd_message.get_string('ICX','ICX_POS_ACK_TOTAL_PO_SUB');
88 l_msg := l_rows || ' ' || l_msg;
89 end if;
90 htp.p('
91 <frame
92 src="javascript:top.drawMe(document' ||', '''|| l_msg || '''' ||');"
93 name=alert_cancel_content
94 marginwidth=6
95 marginheight=2
96 scrolling=auto> ');
97
98 -- lower banner with curved edge
99 htp.p('
100 <frame src="/OA_HTML/US/POSLWBAN.htm"');
101 htp.p(' name=lowerbanner');
102 htp.p(' marginwidth=0');
103 htp.p(' marginheight=2');
104 htp.p(' frameborder=no');
105 htp.p(' scrolling=no> ');
106
107 htp.p('
108 <frame src="' || l_script_name ||
109 '/pos_ack_window_util.buildbuttons?p_button1Name=ICX_POS_EXIT&p_button1Function=discard(top)&p_button2Name=&p_button2Function=&p_button3Name=ICX_POS_CONTINUE_WORKING&p_button3Function=continueWork(top)"');
110
111 htp.p(' name=alert_cancel_bottom');
112 htp.p(' marginwidth=0');
113 htp.p(' scrolling=no >');
114 htp.p('
115 </frameset> ');
116
117 htp.p('
118 <frame src=/OA_HTML/US/POSBLBOR.htm
119 name=borderRight
120 marginwidth=0
121 marginheight=0
122 scrolling=no> ');
123
124 htp.p('
125 </frameset>');
126
127 htp.htmlClose;
128
129 END DialogBox;
130
131
132 /* BuildButtons
133 * ------------
134 */
135 PROCEDURE BuildButtons(p_button1Name VARCHAR2, p_button1Function VARCHAR2,
136 p_button2Name VARCHAR2, p_button2Function VARCHAR2,
137 p_button3Name VARCHAR2, p_button3Function VARCHAR2)
138 IS
139 l_msg VARCHAR2(2000);
140 BEGIN
141
142 IF NOT icx_sec.validatesession THEN
143 RETURN;
144 END IF;
145
146 htp.htmlOpen;
147 htp.linkRel('STYLESHEET', '/OA_HTML/US/POSSTYLE.css');
148
149 htp.headOpen;
150 htp.headClose;
151 htp.bodyOpen(NULL, 'bgcolor=#336699');
152
153 htp.p('
154 <table width=100% bgcolor=#336699 cellpadding=0 cellspacing=0 border=0>
155 <tr><td height=3><img src=/OA_MEDIA/FNDPX3.gif></td></tr>
156 <TR>
157 <TD align=right>');
158
159 -- This is a button table containing 3 buttons.
160 -- The first row defines the edges and tops
161 htp.p('
162 <table cellpadding=0 cellspacing=0 border=0>
163 <tr>
164 <!-- left hand button, round left side and square right side-->
165 <td rowspan=5><img src=/OA_MEDIA/FNDBRNDL.gif></td>
166 <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
167 <td rowspan=5><img src=/OA_MEDIA/FNDBSQRR.gif></td>');
168
169 htp.p('<!-- standard spacer between square button images-->
170 <td width=2 rowspan=5></td>');
171
172 IF (p_button2Name is NOT NULL) THEN
173 htp.p('
174 <!-- middle button with squared ends on both left and right-->
175 <td rowspan=5><img src=/OA_MEDIA/FNDBSQRL.gif></td>
176 <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
177 <td rowspan=5><img src=/OA_MEDIA/FNDBSQRR.gif></td>
178 <!-- standard spacer between square button images-->
179 <td width=2 rowspan=5></td>');
180 ELSE
181 htp.p('
182 <!-- middle button with squared ends on both left and right-->
183 <td rowspan=5></td>
184 <td></td>
185 <td rowspan=5></td>
186 <!-- standard spacer between square button images-->
187 <td width=2 rowspan=5></td>');
188 END IF;
189
190 htp.p('
191 <!-- right hand button, square left side and round right side-->
192 <td rowspan=5><img src=/OA_MEDIA/FNDBSQRL.gif></td>
193 <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
194 <td rowspan=5><img src=/OA_MEDIA/FNDBRNDR.gif></td>
195 <td width=10 rowspan=5></td>
196 </tr>
197 <tr>');
198
199 htp.p('<!-- one cell of this type required for every button -->');
200 htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
201 IF (p_button2Name is NOT NULL) THEN
202 htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
203 ELSE
204 htp.p('<td></td>');
205 END IF;
206 htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
207 htp.p('</tr>');
208 htp.p('<tr>');
209
210 htp.p('<!-- Text and links for each button are listed here-->');
211 htp.p('<td bgcolor=#cccccc height=20 nowrap>');
212 htp.p('<a href="javascript:top.' || p_button1Function || ';">');
213 htp.p('<font class=button>');
214 htp.p('<SCRIPT>');
215 l_msg := fnd_message.get_string('ICX',p_button1Name);
216 htp.p('document.write("' || l_msg ||'")');
217 htp.p('</SCRIPT></font></td>');
218
219
220 IF (p_button2Name is NOT NULL) THEN
221 htp.p('<td bgcolor=#cccccc height=20 nowrap>');
222 htp.p('<a href="javascript:top.' || p_button2Function || ';">');
223 htp.p('<font class=button>');
224 htp.p('<SCRIPT>');
225
226 l_msg := fnd_message.get_string('ICX',p_button2Name);
227 htp.p('document.write("' || l_msg ||'")');
228
229 htp.p('</SCRIPT></font></td>');
230 ELSE
231 htp.p('<td></td>');
232 END IF;
233
234
235 htp.p('<td bgcolor=#cccccc height=20 nowrap>');
236 htp.p('<a href="javascript:top.' || p_button3Function || ';">');
237 htp.p('<font class=button>');
238 htp.p('<SCRIPT>');
239
240 l_msg := fnd_message.get_string('ICX',p_button3Name);
241 htp.p('document.write("' || l_msg ||'")');
242
243 htp.p('</SCRIPT></font></td>');
244
245 htp.p('
246 </tr>
247 <tr>');
248
249 htp.p('<!-- one cell of this type required for every button -->');
250 htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
251 IF (p_button2Name is NOT NULL) THEN
252 htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
253 ELSE
254 htp.p('<td></td>');
255 END IF;
256 htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
257 htp.p('</tr>');
258
259 htp.p('<tr>');
260 htp.p('<!-- one cell of this type required for every button -->');
261 htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
262 IF (p_button2Name is NOT NULL) THEN
263 htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
264 ELSE
265 htp.p('<td></td>');
266 END IF;
267 htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
268 htp.p('</tr>');
269
270 htp.p('</table>');
271
272 htp.p('
273 </td>
274 </tr>
275 <TR><td height=30><img src=/OA_MEDIA/FNDPX3.gif></td></TR>
276 </table>
277 </body>
278 </html>
279 ');
280
281 END BuildButtons;
282
283 END POS_ACK_WINDOW_UTIL;