treport 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/connect.rb +1 -0
  3. data/app/models/db.rb +1 -1
  4. data/app/models/map.rb +1 -0
  5. data/app/models/map_requirement.rb +1 -0
  6. data/app/models/report.rb +17 -9
  7. data/app/models/requirement.rb +1 -0
  8. data/public/treport/plugins/datePicker/My97DatePicker.htm +48 -48
  9. data/public/treport/plugins/datePicker/WdatePicker.js +52 -52
  10. data/public/treport/plugins/datePicker/calendar.js +4 -4
  11. data/public/treport/plugins/datePicker/config.js +16 -16
  12. data/public/treport/plugins/datePicker/lang/en.js +13 -13
  13. data/public/treport/plugins/datePicker/lang/zh-cn.js +13 -13
  14. data/public/treport/plugins/datePicker/lang/zh-tw.js +13 -13
  15. data/public/treport/plugins/datePicker/skin/WdatePicker.css +9 -9
  16. data/public/treport/plugins/datePicker/skin/areo/datepicker.css +301 -301
  17. data/public/treport/plugins/datePicker/skin/armyGreen/datepicker.css +301 -301
  18. data/public/treport/plugins/datePicker/skin/blue/datepicker.css +114 -114
  19. data/public/treport/plugins/datePicker/skin/blueGreen/datepicker.css +301 -301
  20. data/public/treport/plugins/datePicker/skin/darkBlue/datepicker.css +308 -308
  21. data/public/treport/plugins/datePicker/skin/darkYellow/datepicker.css +114 -114
  22. data/public/treport/plugins/datePicker/skin/deepBlue/datepicker.css +300 -300
  23. data/public/treport/plugins/datePicker/skin/default/datepicker.css +245 -245
  24. data/public/treport/plugins/datePicker/skin/green/datepicker.css +114 -114
  25. data/public/treport/plugins/datePicker/skin/lightBlue/datepicker.css +114 -114
  26. data/public/treport/plugins/datePicker/skin/modernBlue/datepicker.css +301 -301
  27. data/public/treport/plugins/datePicker/skin/orange/datepicker.css +114 -114
  28. data/public/treport/plugins/datePicker/skin/red/datepicker.css +114 -114
  29. data/public/treport/plugins/datePicker/skin/whyGreen/datepicker.css +255 -255
  30. data/public/treport/plugins/datePicker/skin/yellowGreen/datepicker.css +114 -114
  31. data/public/treport/plugins/validationEngine/jquery.validationEngine-zh_CN.js +181 -181
  32. data/public/treport/plugins/validationEngine/jquery.validationEngine.js +2160 -2160
  33. data/public/treport/plugins/validationEngine/template.css +124 -124
  34. data/public/treport/plugins/validationEngine/validationEngine.jquery.css +182 -182
  35. data/public/treport/plugins/zDialog/dialog.js +1312 -1312
  36. data/public/treport/plugins/zDialog/drag.js +91 -91
  37. data/public/treport/plugins/zDialog/skins/blue/dir.txt +24 -24
  38. data/public/treport/plugins/zDialog/skins/darkBlue/dir.txt +24 -24
  39. data/public/treport/plugins/zDialog/skins/darkYellow/dir.txt +24 -24
  40. data/public/treport/plugins/zDialog/skins/green/dir.txt +24 -24
  41. data/public/treport/plugins/zDialog/skins/lightBlue/dir.txt +24 -24
  42. data/public/treport/plugins/zDialog/skins/red/dir.txt +24 -24
  43. data/public/treport/plugins/zDialog/skins/yellowGreen/dir.txt +24 -24
  44. data/public/treport/plugins/zDialog/zDialog.js +763 -763
  45. metadata +2 -2
@@ -1,24 +1,24 @@
1
- dialog_bg.jpg
2
- dialog_cb.gif
3
- dialog_cb.png
4
- dialog_closebtn.gif
5
- dialog_closebtn_over.gif
6
- dialog_ct.gif
7
- dialog_ct.png
8
- dialog_lb.gif
9
- dialog_lb.png
10
- dialog_lt.gif
11
- dialog_lt.png
12
- dialog_mlm.gif
13
- dialog_mlm.png
14
- dialog_mrm.gif
15
- dialog_mrm.png
16
- dialog_rb.gif
17
- dialog_rb.png
18
- dialog_rt.gif
19
- dialog_rt.png
20
- dir.txt
21
- icon_alert.gif
22
- icon_dialog.gif
23
- icon_query.gif
24
- window.gif
1
+ dialog_bg.jpg
2
+ dialog_cb.gif
3
+ dialog_cb.png
4
+ dialog_closebtn.gif
5
+ dialog_closebtn_over.gif
6
+ dialog_ct.gif
7
+ dialog_ct.png
8
+ dialog_lb.gif
9
+ dialog_lb.png
10
+ dialog_lt.gif
11
+ dialog_lt.png
12
+ dialog_mlm.gif
13
+ dialog_mlm.png
14
+ dialog_mrm.gif
15
+ dialog_mrm.png
16
+ dialog_rb.gif
17
+ dialog_rb.png
18
+ dialog_rt.gif
19
+ dialog_rt.png
20
+ dir.txt
21
+ icon_alert.gif
22
+ icon_dialog.gif
23
+ icon_query.gif
24
+ window.gif
@@ -1,764 +1,764 @@
1
- var mainprePath = "/admin/";
2
- var themeColor = "blue";
3
- if ($("#skin").attr("prePath") != null) {
4
- mainprePath = $("#skin").attr("prePath")
5
- }
6
- var IMAGESPATH = mainprePath + "plugins/zDialog/skins/blue/";
7
- if ($("#skin").attr("themeColor") != null) {
8
- themeColor = $("#skin").attr("themeColor");
9
- IMAGESPATH = mainprePath + "plugins/zDialog/skins/" + themeColor + "/"
10
- }
11
- var HideScrollbar = true;
12
- var agt = window.navigator.userAgent;
13
- var isIE = agt.toLowerCase().indexOf("msie") != -1;
14
- var isGecko = agt.toLowerCase().indexOf("gecko") != -1;
15
- var ieVer = isIE ? parseInt(agt.split(";")[1].replace(/(^\s*)|(\s*$)/g, "").split(" ")[1]) : 0;
16
- var isIE8 = !! window.XDomainRequest && !! document.documentMode;
17
- var isIE7 = ieVer == 7 && !isIE8;
18
- var ielt7 = isIE && ieVer < 7;
19
- var isQuirks = document.compatMode == "BackCompat";
20
- var maxIndex = 900;
21
- var instance;
22
- var $id = function (a) {
23
- return typeof a == "string" ? document.getElementById(a) : a
24
- };
25
-
26
- function stopEvent(a) {
27
- a = window.event || a;
28
- if (!a) {
29
- return
30
- }
31
- if (isGecko) {
32
- a.preventDefault();
33
- a.stopPropagation()
34
- }
35
- a.cancelBubble = true;
36
- a.returnValue = false
37
- }
38
- Array.prototype.remove = function (c, b) {
39
- if (b) {
40
- var d = [];
41
- for (var a = 0; a < this.length; a++) {
42
- if (c == this[a]) {
43
- d.push(this.splice(a, 1)[0])
44
- }
45
- }
46
- return d
47
- }
48
- for (var a = 0; a < this.length; a++) {
49
- if (c == this[a]) {
50
- this.splice(a, 1)
51
- }
52
- }
53
- return this
54
- };
55
- if (!isIE && HTMLElement) {
56
- if (!HTMLElement.prototype.attachEvent) {
57
- window.attachEvent = document.attachEvent = HTMLElement.prototype.attachEvent = function (b, a) {
58
- b = b.substring(2);
59
- this.addEventListener(b, a, false)
60
- };
61
- window.detachEvent = document.detachEvent = HTMLElement.prototype.detachEvent = function (b, a) {
62
- b = b.substring(2);
63
- this.removeEventListener(b, a, false)
64
- }
65
- }
66
- } else {
67
- if (isIE && ieVer < 8) {
68
- try {
69
- document.execCommand("BackgroundImageCache", false, true)
70
- } catch (e) {}
71
- }
72
- }
73
- var $topWindow = function () {
74
- var a = window;
75
- while (a != a.parent) {
76
- if (a.parent.document.getElementsByTagName("FRAMESET").length > 0) {
77
- break
78
- }
79
- a = a.parent
80
- }
81
- return a
82
- };
83
- var $bodyDimensions = function (j) {
84
- j = j || window;
85
- var h = j.document;
86
- var c = h.compatMode == "BackCompat" ? h.body.clientWidth : h.documentElement.clientWidth;
87
- var g = h.compatMode == "BackCompat" ? h.body.clientHeight : h.documentElement.clientHeight;
88
- var b = Math.max(h.documentElement.scrollLeft, h.body.scrollLeft);
89
- var d = Math.max(h.documentElement.scrollTop, h.body.scrollTop);
90
- var a = Math.max(h.documentElement.scrollWidth, h.body.scrollWidth);
91
- var f = Math.max(h.documentElement.scrollHeight, h.body.scrollHeight);
92
- if (f < g) {
93
- f = g
94
- }
95
- return {
96
- clientWidth: c,
97
- clientHeight: g,
98
- scrollLeft: b,
99
- scrollTop: d,
100
- scrollWidth: a,
101
- scrollHeight: f
102
- }
103
- };
104
- var fadeEffect = function (b, f, a, c, d) {
105
- if (!b.effect) {
106
- b.effect = {
107
- fade: 0,
108
- move: 0,
109
- size: 0
110
- }
111
- }
112
- clearInterval(b.effect.fade);
113
- var c = c || 20;
114
- b.effect.fade = setInterval(function () {
115
- f = f < a ? Math.min(f + c, a) : Math.max(f - c, a);
116
- b.style.opacity = f / 100;
117
- b.style.filter = "alpha(opacity=" + f + ")";
118
- if (f == a) {
119
- clearInterval(b.effect.fade);
120
- if (d) {
121
- d.call(b)
122
- }
123
- }
124
- }, 20)
125
- };
126
- var topWin = $topWindow();
127
- var topDoc = topWin.document;
128
- var Dialog = function () {
129
- this.ID = null;
130
- this.Width = 550;
131
- this.Height = 380;
132
- this.URL = null;
133
- this.OnLoad = null;
134
- this.InnerHtml = "";
135
- this.InvokeElementId = "";
136
- this.Top = "50%";
137
- this.Left = "50%";
138
- this.Title = " ";
139
- this.OkButtonText = " 确 定 ";
140
- this.CancelButtonText = " 取 消 ";
141
- this.OKEvent = null;
142
- this.CancelEvent = null;
143
- this.ShowButtonRow = false;
144
- this.ShowOkButton = true;
145
- this.ShowCancelButton = true;
146
- this.MessageIcon = "window.gif";
147
- this.MessageTitle = "";
148
- this.Message = "";
149
- this.ShowMessageRow = false;
150
- this.Modal = true;
151
- this.Drag = true;
152
- this.AutoClose = null;
153
- this.ShowCloseButton = true;
154
- this.Animator = !ielt7;
155
- this.MsgForESC = "";
156
- this.InnerFrameName = null;
157
- this.dialogDiv = null;
158
- this.bgDiv = null;
159
- this.openerWindow = null;
160
- this.openerDialog = null;
161
- this.innerFrame = null;
162
- this.innerWin = null;
163
- this.innerDoc = null;
164
- this.zindex = 900;
165
- this.cancelButton = null;
166
- this.okButton = null;
167
- this.unauthorized = false;
168
- if (arguments.length > 0 && typeof (arguments[0]) == "string") {
169
- this.ID = arguments[0]
170
- } else {
171
- if (arguments.length > 0 && typeof (arguments[0]) == "object") {
172
- Dialog.setOptions(this, arguments[0])
173
- }
174
- } if (!this.ID) {
175
- this.ID = topWin.Dialog._dialogArray.length + ""
176
- }
177
- };
178
- Dialog._dialogArray = [];
179
- Dialog._childDialogArray = [];
180
- Dialog.bgDiv = null;
181
- Dialog.setOptions = function (c, b) {
182
- if (!b) {
183
- return
184
- }
185
- for (var a in b) {
186
- c[a] = b[a]
187
- }
188
- };
189
- Dialog.attachBehaviors = function () {
190
- document.attachEvent("onkeydown", Dialog.onKeyDown);
191
- window.attachEvent("onresize", Dialog.resetPosition);
192
- if (!HideScrollbar && ielt7) {
193
- window.attachEvent("onscroll", Dialog.resetPosition)
194
- }
195
- };
196
- Dialog.prototype.attachBehaviors = function () {
197
- var c = this;
198
- if (this.Drag && topWin.Drag) {
199
- var a = topWin.$id("_Draghandle_" + this.ID),
200
- b = topWin.$id("_DialogDiv_" + this.ID);
201
- topWin.Drag.init(a, b);
202
- b.onDragStart = function (h, g, f, d) {
203
- if (!isIE && c.URL) {
204
- topWin.$id("_Covering_" + c.ID).style.display = ""
205
- }
206
- };
207
- b.onDragEnd = function (j, h, f, d) {
208
- if (!isIE && c.URL) {
209
- topWin.$id("_Covering_" + c.ID).style.display = "none"
210
- }
211
- var g = $bodyDimensions(topWin);
212
- if (j < 0) {
213
- this.style.left = "0px"
214
- }
215
- if (j + this.clientWidth > g.clientWidth) {
216
- this.style.left = g.clientWidth - this.clientWidth + "px"
217
- }
218
- if (c.fixedPosition) {
219
- if (h < 0) {
220
- this.style.top = "0px"
221
- }
222
- if (h + 33 > g.clientHeight) {
223
- this.style.top = g.clientHeight - 33 + "px"
224
- }
225
- } else {
226
- if (h < g.scrollTop) {
227
- this.style.top = g.scrollTop + "px"
228
- }
229
- if (h + 33 > g.scrollTop + g.clientHeight) {
230
- this.style.top = g.scrollTop + g.clientHeight - 33 + "px"
231
- }
232
- }
233
- }
234
- }
235
- };
236
- Dialog.prototype.displacePath = function () {
237
- if (this.URL.substr(0, 7) == "http://" || this.URL.substr(0, 1) == "/" || this.URL.substr(0, 11) == "javascript:") {
238
- return this.URL
239
- } else {
240
- var a = this.URL;
241
- var b = window.location.href;
242
- b = b.substring(0, b.lastIndexOf("/"));
243
- while (a.indexOf("../") >= 0) {
244
- a = a.substring(3);
245
- b = b.substring(0, b.lastIndexOf("/"))
246
- }
247
- return b + "/" + a
248
- }
249
- };
250
- Dialog.prototype.setPosition = function () {
251
- var d = $bodyDimensions(topWin);
252
- var g = this.Top,
253
- b = this.Left,
254
- c = this.getDialogDiv();
255
- if (typeof this.Top == "string" && this.Top.indexOf("%") != -1) {
256
- var f = parseFloat(this.Top) * 0.01;
257
- g = this.fixedPosition ? d.clientHeight * f - c.scrollHeight * f : d.clientHeight * f - c.scrollHeight * f + d.scrollTop
258
- }
259
- if (typeof this.Left == "string" && this.Left.indexOf("%") != -1) {
260
- var a = parseFloat(this.Left) * 0.01;
261
- b = ielt7 ? d.clientWidth * a - c.scrollWidth * a + d.scrollLeft : d.clientWidth * a - c.scrollWidth * a
262
- }
263
- c.style.top = Math.round(g) + "px";
264
- c.style.left = Math.round(b) + "px"
265
- };
266
- Dialog.setBgDivSize = function () {
267
- var a = $bodyDimensions(topWin);
268
- if (Dialog.bgDiv) {
269
- if (ielt7) {
270
- Dialog.bgDiv.style.height = a.clientHeight + "px";
271
- Dialog.bgDiv.style.top = a.scrollTop + "px";
272
- Dialog.bgDiv.childNodes[0].style.display = "none";
273
- Dialog.bgDiv.childNodes[0].style.display = ""
274
- } else {
275
- Dialog.bgDiv.style.height = a.scrollHeight + "px"
276
- }
277
- }
278
- };
279
- Dialog.resetPosition = function () {
280
- Dialog.setBgDivSize();
281
- for (var b = 0, a = topWin.Dialog._dialogArray.length; b < a; b++) {
282
- topWin.Dialog._dialogArray[b].setPosition()
283
- }
284
- };
285
- Dialog.prototype.create = function () {
286
- var h = $bodyDimensions(topWin);
287
- if (typeof (this.OKEvent) == "function") {
288
- this.ShowButtonRow = true
289
- }
290
- if (!this.Width) {
291
- this.Width = Math.round(h.clientWidth * 4 / 10)
292
- }
293
- if (!this.Height) {
294
- this.Height = Math.round(this.Width / 2)
295
- }
296
- if (this.MessageTitle || this.Message) {
297
- this.ShowMessageRow = true
298
- }
299
- var c = this.Width + 13 + 13;
300
- var g = this.Height + 33 + 13 + (this.ShowButtonRow ? 40 : 0) + (this.ShowMessageRow ? 50 : 0);
301
- if (c > h.clientWidth) {
302
- this.Width = Math.round(h.clientWidth - 26)
303
- }
304
- if (g > h.clientHeight) {
305
- this.Height = Math.round(h.clientHeight - 46 - (this.ShowButtonRow ? 40 : 0) - (this.ShowMessageRow ? 50 : 0))
306
- }
307
- var f = ' <table id="_DialogTable_{thisID}" width="' + (this.Width + 26) + '" cellspacing="0" cellpadding="0" border="0" style="font-size:12px; line-height:1.4;border-collapse: collapse;""> <tr id="_Draghandle_{thisID}" onselectstart="return false;" style="-moz-user-select: -moz-none; ' + (this.Drag ? "cursor: move;" : "") + '"> <td width="13" height="33" style="background-image: url({IMAGESPATH}dialog_lt.png) !important;background: url({IMAGESPATH}dialog_lt.gif) no-repeat 0 0;"><div style="width: 13px;"></div></td> <td height="33" style="background-image:url({IMAGESPATH}dialog_ct.png) !important;background: url({IMAGESPATH}dialog_ct.gif) repeat-x top;"><div style="padding: 9px 0 0 4px; float: left; font-weight: bold; color:#fff;"><img align="absmiddle" src="{IMAGESPATH}icon_dialog.gif"/><span id="_Title_{thisID}">' + this.Title + '</span></div> <div id="_ButtonClose_{thisID}" onclick="fixProgress();Dialog.getInstance(\'{thisID}\').cancelButton.onclick.apply(Dialog.getInstance(\'{thisID}\').cancelButton,[]);" onmouseout="this.style.backgroundImage=\'url({IMAGESPATH}dialog_closebtn.gif)\'" onmouseover="this.style.backgroundImage=\'url({IMAGESPATH}dialog_closebtn_over.gif)\'" style="margin: 4px 0 0;*margin-top: 5px; position: relative;top:auto; cursor: pointer; float: right; height: 17px; width: 28px; background: url({IMAGESPATH}dialog_closebtn.gif) 0 0;' + (ielt7 ? "margin-top: 3px;" : "") + (this.ShowCloseButton ? "" : "display:none;") + '"></div></td> <td width="13" height="33" style="background-image: url({IMAGESPATH}dialog_rt.png) !important;background: url({IMAGESPATH}dialog_rt.gif) no-repeat right 0;"><div style="width: 13px;"><a id="_forTab_{thisID}" href="#;"></a></div></td> </tr> <tr valign="top"> <td width="13" style="background-image: url({IMAGESPATH}dialog_mlm.png) !important;background: url({IMAGESPATH}dialog_mlm.gif) repeat-y left;"></td> <td align="center"><table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" style="background-color: #ffffff !important;"> <tr id="_MessageRow_{thisID}" style="' + (this.ShowMessageRow ? "" : "display:none") + '"> <td valign="top" height="50"><table width="100%" cellspacing="0" cellpadding="0" border="0" style="background:#eaece9 url({IMAGESPATH}dialog_bg.jpg) no-repeat scroll right top;" id="_MessageTable_{thisID}"> <tr> <td width="50" height="50" align="center"><img width="32" height="32" src="{IMAGESPATH}' + this.MessageIcon + '" id="_MessageIcon_{thisID}"/></td> <td align="left" style="line-height: 16px;"><div id="_MessageTitle_{thisID}" style="font-weight:bold">' + this.MessageTitle + '</div> <div id="_Message_{thisID}">' + this.Message + '</div></td> </tr> </table></td> </tr> <tr> <td valign="top" align="center"><div id="_Container_{thisID}" style="position: relative; width: ' + this.Width + "px; height: " + this.Height + 'px;"> <div style="position: absolute; height: 100%; width: 100%; display: none; background-color:#fff; opacity: 0.5;" id="_Covering_{thisID}">&nbsp;</div> ' + (function (k) {
308
- if (k.InnerHtml) {
309
- return k.InnerHtml
310
- }
311
- if (k.URL) {
312
- return '<iframe width="100%" height="100%" frameborder="0" style="border:none 0;" id="_DialogFrame_' + k.ID + '" ' + (k.InnerFrameName ? 'name="' + k.InnerFrameName + '"' : "") + ' src="' + k.displacePath() + '"></iframe>'
313
- }
314
- return ""
315
- })(this) + ' </div></td> </tr> <tr id="_ButtonRow_{thisID}" style="' + (this.ShowButtonRow ? "" : "display:none") + '"> <td height="36"><div id="_DialogButtons_{thisID}" style="border-top: 1px solid #DADEE5; padding: 8px 20px; text-align: right; background-color:#f6f6f6;"> <input type="button" style="' + (this.ShowOkButton ? "" : "display:none") + '" value="' + this.OkButtonText + '" id="_ButtonOK_{thisID}"/> <input type="button" style="' + (this.ShowCancelButton ? "" : "display:none") + '" value="' + this.CancelButtonText + '" onclick="Dialog.getInstance(\'{thisID}\').close();" id="_ButtonCancel_{thisID}"/> </div></td> </tr> </table></td> <td width="13" style="background-image: url({IMAGESPATH}dialog_mrm.png) !important;background: url({IMAGESPATH}dialog_mrm.gif) repeat-y right;"></td> </tr> <tr> <td width="13" height="13" style="background-image: url({IMAGESPATH}dialog_lb.png) !important;background: url({IMAGESPATH}dialog_lb.gif) no-repeat 0 bottom;"></td> <td style="background-image: url({IMAGESPATH}dialog_cb.png) !important;background: url({IMAGESPATH}dialog_cb.gif) repeat-x bottom;"></td> <td width="13" height="13" style="background-image: url({IMAGESPATH}dialog_rb.png) !important;background: url({IMAGESPATH}dialog_rb.gif) no-repeat right bottom;"><a onfocus=\'$id("_forTab_{thisID}").focus();\' href="#;"></a></td> </tr> </table></div>';
316
- f = f.replace(/\{IMAGESPATH\}/gm, IMAGESPATH).replace(/\{thisID\}/gm, this.ID);
317
- var j = topWin.$id("_DialogDiv_" + this.ID);
318
- if (!j) {
319
- j = topDoc.createElement("div");
320
- j.id = "_DialogDiv_" + this.ID;
321
- topDoc.getElementsByTagName("BODY")[0].appendChild(j)
322
- }
323
- if (isIE && topDoc.compatMode == "BackCompat" || ielt7) {
324
- j.style.position = "absolute";
325
- this.fixedPosition = false
326
- } else {
327
- j.style.position = "fixed";
328
- this.fixedPosition = true
329
- }
330
- j.style.left = "-9999px";
331
- j.style.top = "-9999px";
332
- j.innerHTML = f;
333
- if (this.InvokeElementId) {
334
- var d = $id(this.InvokeElementId);
335
- d.style.position = "";
336
- d.style.display = "";
337
- if (isIE) {
338
- var b = topDoc.createElement("div");
339
- b.innerHTML = d.outerHTML;
340
- d.outerHTML = "";
341
- topWin.$id("_Covering_" + this.ID).parentNode.appendChild(b)
342
- } else {
343
- topWin.$id("_Covering_" + this.ID).parentNode.appendChild(d)
344
- }
345
- }
346
- this.openerWindow = window;
347
- if (window.ownerDialog) {
348
- this.openerDialog = window.ownerDialog
349
- }
350
- if (this.URL) {
351
- if (topWin.$id("_DialogFrame_" + this.ID)) {
352
- this.innerFrame = topWin.$id("_DialogFrame_" + this.ID)
353
- }
354
- var a = this;
355
- this.innerFrameOnload = function () {
356
- a.innerWin = a.innerFrame.contentWindow;
357
- try {
358
- a.innerWin.ownerDialog = a;
359
- a.innerDoc = a.innerWin.document;
360
- if (a.Title == " " && a.innerDoc && a.innerDoc.title) {
361
- if (a.innerDoc.title) {
362
- topWin.$id("_Title_" + a.ID).innerHTML = a.innerDoc.title
363
- }
364
- }
365
- } catch (k) {
366
- if (window.console && window.console.log) {
367
- console.log("可能存在访问限制,不能获取到浮动窗口中的文档对象。")
368
- }
369
- a.unauthorized = true
370
- }
371
- if (typeof (a.OnLoad) == "function") {
372
- a.OnLoad()
373
- }
374
- };
375
- if (!isGecko) {
376
- this.innerFrame.attachEvent("onreadystatechange", function () {
377
- if ((/loaded|complete/).test(a.innerFrame.readyState)) {
378
- a.innerFrameOnload()
379
- }
380
- })
381
- } else {
382
- this.innerFrame.onload = a.innerFrameOnload
383
- }
384
- }
385
- topWin.$id("_DialogDiv_" + this.ID).dialogId = this.ID;
386
- topWin.$id("_DialogDiv_" + this.ID).dialogInstance = this;
387
- this.attachBehaviors();
388
- this.okButton = topWin.$id("_ButtonOK_" + this.ID);
389
- this.cancelButton = topWin.$id("_ButtonCancel_" + this.ID);
390
- j = null;
391
- $("input:button[class='']").addClass("button");
392
- $("input:button[class='button']").each(function () {
393
- $(this).hover(function () {
394
- $(this).removeClass("button");
395
- $(this).addClass("button_hover")
396
- }, function () {
397
- $(this).removeClass("button_hover");
398
- $(this).addClass("button")
399
- })
400
- })
401
- };
402
- Dialog.prototype.setSize = function (a, b) {
403
- if (a && +a > 20) {
404
- this.Width = +a;
405
- topWin.$id("_DialogTable_" + this.ID).width = this.Width + 26;
406
- topWin.$id("_Container_" + this.ID).style.width = this.Width + "px"
407
- }
408
- if (b && +b > 10) {
409
- this.Height = +b;
410
- topWin.$id("_Container_" + this.ID).style.height = this.Height + "px"
411
- }
412
- this.setPosition()
413
- };
414
- Dialog.prototype.show = function () {
415
- this.create();
416
- var b = Dialog.getBgdiv(),
417
- f = this.getDialogDiv();
418
- f.style.zIndex = this.zindex = parseInt(Dialog.bgDiv.style.zIndex) + 1;
419
- if (topWin.Dialog._dialogArray.length > 0) {
420
- f.style.zIndex = this.zindex = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1].zindex + 2
421
- } else {
422
- b.style.display = "none";
423
- if (HideScrollbar) {
424
- var d = topDoc.getElementsByTagName(topDoc.compatMode == "BackCompat" ? "BODY" : "HTML")[0];
425
- d.styleOverflow = d.style.overflow;
426
- if (window.navigator.userAgent.indexOf("Firefox/3.6") != -1) {
427
- var c = d.scrollTop;
428
- d.style.overflow = "hidden";
429
- d.scrollTop = c
430
- } else {
431
- d.style.overflow = "hidden"
432
- }
433
- }
434
- }
435
- topWin.Dialog._dialogArray.push(this);
436
- Dialog._childDialogArray.push(this);
437
- if (Dialog._childDialogArray.length == 1) {
438
- if (window.ownerDialog) {
439
- ownerDialog.hiddenCloseButton()
440
- }
441
- }
442
- if (this.Modal) {
443
- b.style.zIndex = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1].zindex - 1;
444
- Dialog.setBgDivSize();
445
- if (b.style.display == "none") {
446
- if (this.Animator) {
447
- var a = topWin.$id("_DialogBGMask");
448
- b.style.display = "";
449
- if (isIE) {} else {}
450
- a = null
451
- } else {
452
- b.style.display = ""
453
- }
454
- }
455
- }
456
- this.setPosition();
457
- if (this.CancelEvent) {
458
- this.cancelButton.onclick = this.CancelEvent
459
- }
460
- if (this.OKEvent) {
461
- this.okButton.onclick = this.OKEvent
462
- }
463
- if (this.AutoClose && this.AutoClose > 0) {
464
- this.autoClose()
465
- }
466
- this.opened = true;
467
- b = null
468
- };
469
- Dialog.prototype.close = function () {
470
- if (this.unauthorized == false) {
471
- if (this.innerWin && this.innerWin.Dialog && this.innerWin.Dialog._childDialogArray.length > 0) {
472
- return
473
- }
474
- }
475
- var j = this.getDialogDiv();
476
- if (this == topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1]) {
477
- var h = topWin.Dialog._dialogArray.pop()
478
- } else {
479
- topWin.Dialog._dialogArray.remove(this)
480
- }
481
- Dialog._childDialogArray.remove(this);
482
- if (Dialog._childDialogArray.length == 0) {
483
- if (window.ownerDialog) {
484
- ownerDialog.showCloseButton()
485
- }
486
- }
487
- if (this.InvokeElementId) {
488
- var d = topWin.$id(this.InvokeElementId);
489
- d.style.display = "none";
490
- if (isIE) {
491
- var g = document.createElement("div");
492
- g.innerHTML = d.outerHTML;
493
- d.outerHTML = "";
494
- document.getElementsByTagName("BODY")[0].appendChild(g)
495
- } else {
496
- document.getElementsByTagName("BODY")[0].appendChild(d)
497
- }
498
- }
499
- if (topWin.Dialog._dialogArray.length > 0) {
500
- if (this.Modal && h) {
501
- var f = topWin.Dialog._dialogArray.length;
502
- var b = true;
503
- while (f) {
504
- --f;
505
- if (topWin.Dialog._dialogArray[f].Modal) {
506
- Dialog.bgDiv.style.zIndex = topWin.Dialog._dialogArray[f].zindex - 1;
507
- b = false;
508
- break
509
- }
510
- }
511
- if (b) {
512
- Dialog.bgDiv.style.display = "none"
513
- }
514
- }
515
- } else {
516
- Dialog.bgDiv.style.zIndex = "900";
517
- Dialog.bgDiv.style.display = "none";
518
- if (HideScrollbar) {
519
- var c = topDoc.getElementsByTagName(topDoc.compatMode == "BackCompat" ? "BODY" : "HTML")[0];
520
- if (c.styleOverflow != undefined) {
521
- if (window.navigator.userAgent.indexOf("Firefox/3.6") != -1) {
522
- var a = c.scrollTop;
523
- c.style.overflow = c.styleOverflow;
524
- c.scrollTop = a
525
- } else {
526
- c.style.overflow = c.styleOverflow
527
- }
528
- }
529
- }
530
- }
531
- this.openerWindow.focus();
532
- if (isIE && !isIE8) {
533
- j.dialogInstance = null;
534
- if (this.CancelEvent) {
535
- this.cancelButton.onclick = null
536
- }
537
- if (this.OKEvent) {
538
- this.okButton.onclick = null
539
- }
540
- topWin.$id("_DialogDiv_" + this.ID).onDragStart = null;
541
- topWin.$id("_DialogDiv_" + this.ID).onDragEnd = null;
542
- topWin.$id("_Draghandle_" + this.ID).onmousedown = null;
543
- topWin.$id("_Draghandle_" + this.ID).root = null;
544
- j.outerHTML = "";
545
- CollectGarbage()
546
- } else {
547
- var k = topWin.$id("_RycDiv");
548
- if (!k) {
549
- k = topDoc.createElement("div");
550
- k.id = "_RycDiv"
551
- }
552
- k.appendChild(j);
553
- k.innerHTML = "";
554
- k = null
555
- }
556
- this.innerFrame = null;
557
- this.bgDiv = null;
558
- j = null;
559
- this.closed = true
560
- };
561
- Dialog.prototype.autoClose = function () {
562
- if (this.closed) {
563
- clearTimeout(this._closeTimeoutId);
564
- return
565
- }
566
- this.AutoClose -= 1;
567
- topWin.$id("_Title_" + this.ID).innerHTML = this.AutoClose + " 秒后自动关闭";
568
- if (this.AutoClose <= 0) {
569
- this.close()
570
- } else {
571
- var a = this;
572
- this._closeTimeoutId = setTimeout(function () {
573
- a.autoClose()
574
- }, 1000)
575
- }
576
- };
577
- Dialog.getInstance = function (b) {
578
- var a = topWin.$id("_DialogDiv_" + b);
579
- if (!a) {
580
- alert("没有取到对应ID的弹出框页面对象")
581
- }
582
- try {
583
- return a.dialogInstance
584
- } finally {
585
- a = null
586
- }
587
- };
588
- Dialog.prototype.addButton = function (f, a, d) {
589
- topWin.$id("_ButtonRow_" + this.ID).style.display = "";
590
- this.ShowButtonRow = true;
591
- var c = topDoc.createElement("input");
592
- c.id = "_Button_" + this.ID + "_" + f;
593
- c.type = "button";
594
- c.style.cssText = "margin-right:5px";
595
- c.value = a;
596
- c.onclick = d;
597
- var b = topWin.$id("_DialogButtons_" + this.ID).getElementsByTagName("INPUT")[0];
598
- b.parentNode.insertBefore(c, b);
599
- $("input:button[class='']").addClass("button");
600
- $("input:button[class='button']").each(function () {
601
- $(this).hover(function () {
602
- $(this).removeClass("button");
603
- $(this).addClass("button_hover")
604
- }, function () {
605
- $(this).removeClass("button_hover");
606
- $(this).addClass("button")
607
- })
608
- });
609
- return c
610
- };
611
- Dialog.prototype.removeButton = function (b) {
612
- var a = topWin.$id("_DialogButtons_" + this.ID).getElementsByTagName("INPUT")[0];
613
- a.parentNode.removeChild(b)
614
- };
615
- Dialog.prototype.hiddenCloseButton = function (b) {
616
- var a = topWin.$id("_ButtonClose_" + this.ID);
617
- if (a) {
618
- a.style.display = "none"
619
- }
620
- };
621
- Dialog.prototype.showCloseButton = function (b) {
622
- var a = topWin.$id("_ButtonClose_" + this.ID);
623
- if (a) {
624
- a.style.display = ""
625
- }
626
- };
627
- Dialog.getBgdiv = function () {
628
- if (Dialog.bgDiv) {
629
- return Dialog.bgDiv
630
- }
631
- var d = topWin.$id("_DialogBGDiv");
632
- if (!d) {
633
- d = topDoc.createElement("div");
634
- d.id = "_DialogBGDiv";
635
- d.style.cssText = "position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:900";
636
- var a = '<div style="position:relative;width:100%;height:100%;">';
637
- var c = '<div id="_DialogBGMask" style="position:absolute;background-color:#333;opacity:0.4;filter:alpha(opacity=40);width:100%;height:100%;"></div>';
638
- var f = ielt7 ? '<iframe src="about:blank" style="filter:alpha(opacity=0);" width="100%" height="100%"></iframe>' : "";
639
- d.innerHTML = a + c + f + "</div>";
640
- topDoc.getElementsByTagName("BODY")[0].appendChild(d);
641
- if (ielt7) {
642
- var b = d.getElementsByTagName("IFRAME")[0].contentWindow.document;
643
- b.open();
644
- b.write("<body style='background-color:#333' oncontextmenu='return false;'></body>");
645
- b.close();
646
- b = null
647
- }
648
- }
649
- Dialog.bgDiv = d;
650
- d = null;
651
- return Dialog.bgDiv
652
- };
653
- Dialog.prototype.getDialogDiv = function () {
654
- var a = topWin.$id("_DialogDiv_" + this.ID);
655
- if (!a) {
656
- alert("获取弹出层页面对象出错!")
657
- }
658
- try {
659
- return a
660
- } finally {
661
- a = null
662
- }
663
- };
664
- Dialog.onKeyDown = function (a) {
665
- var a = window.event || a;
666
- if ((a.shiftKey && a.keyCode == 9) || a.keyCode == 8) {
667
- if (topWin.Dialog._dialogArray.length > 0) {
668
- var c = a.srcElement || a.target;
669
- if (c.tagName != "INPUT" && c.tagName != "TEXTAREA") {
670
- stopEvent(a);
671
- return false
672
- }
673
- }
674
- }
675
- if (a.keyCode == 27) {
676
- var b = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1];
677
- if (b.ShowCloseButton) {
678
- Dialog.close()
679
- }
680
- }
681
- };
682
- Dialog.close = function (b) {
683
- if (topWin.Dialog._dialogArray.length > 0) {
684
- var a = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1];
685
- if (a.MsgForESC) {
686
- Dialog.confirm(a.MsgForESC, function () {
687
- a.cancelButton.onclick.apply(a.cancelButton, [])
688
- })
689
- } else {
690
- a.cancelButton.onclick.apply(a.cancelButton, [])
691
- }
692
- }
693
- };
694
- Dialog.alert = function (f, c, a, b) {
695
- var a = a || 300,
696
- b = b || 110;
697
- var d = new Dialog({
698
- Width: a,
699
- Height: b
700
- });
701
- d.ShowButtonRow = true;
702
- d.Title = "系统提示";
703
- d.CancelEvent = function () {
704
- d.close();
705
- if (c) {
706
- c()
707
- }
708
- };
709
- d.InnerHtml = '<table height="100%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #ffffff !important;"> <tr><td align="right"><img id="Icon_' + this.ID + '" src="' + IMAGESPATH + 'icon_alert.gif" width="34" height="34" align="absmiddle"></td> <td align="left" id="Message_' + this.ID + '" style="font-size:9pt">' + f + "</td></tr> </table>";
710
- d.show();
711
- d.okButton.parentNode.style.textAlign = "center";
712
- d.okButton.style.display = "none";
713
- d.cancelButton.value = d.OkButtonText
714
- };
715
- Dialog.confirm = function (g, c, b, a, d) {
716
- var a = a || 300,
717
- d = d || 110;
718
- var f = new Dialog({
719
- Width: a,
720
- Height: d
721
- });
722
- f.ShowButtonRow = true;
723
- f.Title = "信息确认";
724
- f.CancelEvent = function () {
725
- f.close();
726
- if (b) {
727
- b()
728
- }
729
- };
730
- f.OKEvent = function () {
731
- f.close();
732
- if (c) {
733
- c()
734
- }
735
- };
736
- f.InnerHtml = '<table height="100%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #ffffff !important;"> <tr><td align="right"><img id="Icon_' + this.ID + '" src="' + IMAGESPATH + 'icon_query.gif" width="34" height="34" align="absmiddle"></td> <td align="left" id="Message_' + this.ID + '" style="font-size:9pt">' + g + "</td></tr> </table>";
737
- f.show();
738
- f.okButton.parentNode.style.textAlign = "center"
739
- };
740
- Dialog.open = function (a) {
741
- var b = new Dialog(a);
742
- b.show();
743
- return b
744
- };
745
- window.attachEvent("onload", Dialog.attachBehaviors);
746
- var scripts = document.getElementsByTagName("script");
747
- for (var i = 0; i < scripts.length; i++) {
748
- if (/.*zDrag\.js$/g.test(scripts[i].getAttribute("src"))) {
749
- break
750
- }
751
- if (/.*zDialog\.js$/g.test(scripts[i].getAttribute("src"))) {
752
- var jsPath = scripts[i].getAttribute("src").replace(/zDialog\.js$/g, "");
753
- document.write('<script type="text/javascript" src="' + jsPath + 'zDrag.js"><\/script>');
754
- break
755
- }
756
- }
757
-
758
- function fixProgress() {
759
- try {
760
- if (top.progressFlag == 1) {
761
- top.progressFlag = 0
762
- }
763
- } catch (a) {}
1
+ var mainprePath = "/admin/";
2
+ var themeColor = "blue";
3
+ if ($("#skin").attr("prePath") != null) {
4
+ mainprePath = $("#skin").attr("prePath")
5
+ }
6
+ var IMAGESPATH = mainprePath + "plugins/zDialog/skins/blue/";
7
+ if ($("#skin").attr("themeColor") != null) {
8
+ themeColor = $("#skin").attr("themeColor");
9
+ IMAGESPATH = mainprePath + "plugins/zDialog/skins/" + themeColor + "/"
10
+ }
11
+ var HideScrollbar = true;
12
+ var agt = window.navigator.userAgent;
13
+ var isIE = agt.toLowerCase().indexOf("msie") != -1;
14
+ var isGecko = agt.toLowerCase().indexOf("gecko") != -1;
15
+ var ieVer = isIE ? parseInt(agt.split(";")[1].replace(/(^\s*)|(\s*$)/g, "").split(" ")[1]) : 0;
16
+ var isIE8 = !! window.XDomainRequest && !! document.documentMode;
17
+ var isIE7 = ieVer == 7 && !isIE8;
18
+ var ielt7 = isIE && ieVer < 7;
19
+ var isQuirks = document.compatMode == "BackCompat";
20
+ var maxIndex = 900;
21
+ var instance;
22
+ var $id = function (a) {
23
+ return typeof a == "string" ? document.getElementById(a) : a
24
+ };
25
+
26
+ function stopEvent(a) {
27
+ a = window.event || a;
28
+ if (!a) {
29
+ return
30
+ }
31
+ if (isGecko) {
32
+ a.preventDefault();
33
+ a.stopPropagation()
34
+ }
35
+ a.cancelBubble = true;
36
+ a.returnValue = false
37
+ }
38
+ Array.prototype.remove = function (c, b) {
39
+ if (b) {
40
+ var d = [];
41
+ for (var a = 0; a < this.length; a++) {
42
+ if (c == this[a]) {
43
+ d.push(this.splice(a, 1)[0])
44
+ }
45
+ }
46
+ return d
47
+ }
48
+ for (var a = 0; a < this.length; a++) {
49
+ if (c == this[a]) {
50
+ this.splice(a, 1)
51
+ }
52
+ }
53
+ return this
54
+ };
55
+ if (!isIE && HTMLElement) {
56
+ if (!HTMLElement.prototype.attachEvent) {
57
+ window.attachEvent = document.attachEvent = HTMLElement.prototype.attachEvent = function (b, a) {
58
+ b = b.substring(2);
59
+ this.addEventListener(b, a, false)
60
+ };
61
+ window.detachEvent = document.detachEvent = HTMLElement.prototype.detachEvent = function (b, a) {
62
+ b = b.substring(2);
63
+ this.removeEventListener(b, a, false)
64
+ }
65
+ }
66
+ } else {
67
+ if (isIE && ieVer < 8) {
68
+ try {
69
+ document.execCommand("BackgroundImageCache", false, true)
70
+ } catch (e) {}
71
+ }
72
+ }
73
+ var $topWindow = function () {
74
+ var a = window;
75
+ while (a != a.parent) {
76
+ if (a.parent.document.getElementsByTagName("FRAMESET").length > 0) {
77
+ break
78
+ }
79
+ a = a.parent
80
+ }
81
+ return a
82
+ };
83
+ var $bodyDimensions = function (j) {
84
+ j = j || window;
85
+ var h = j.document;
86
+ var c = h.compatMode == "BackCompat" ? h.body.clientWidth : h.documentElement.clientWidth;
87
+ var g = h.compatMode == "BackCompat" ? h.body.clientHeight : h.documentElement.clientHeight;
88
+ var b = Math.max(h.documentElement.scrollLeft, h.body.scrollLeft);
89
+ var d = Math.max(h.documentElement.scrollTop, h.body.scrollTop);
90
+ var a = Math.max(h.documentElement.scrollWidth, h.body.scrollWidth);
91
+ var f = Math.max(h.documentElement.scrollHeight, h.body.scrollHeight);
92
+ if (f < g) {
93
+ f = g
94
+ }
95
+ return {
96
+ clientWidth: c,
97
+ clientHeight: g,
98
+ scrollLeft: b,
99
+ scrollTop: d,
100
+ scrollWidth: a,
101
+ scrollHeight: f
102
+ }
103
+ };
104
+ var fadeEffect = function (b, f, a, c, d) {
105
+ if (!b.effect) {
106
+ b.effect = {
107
+ fade: 0,
108
+ move: 0,
109
+ size: 0
110
+ }
111
+ }
112
+ clearInterval(b.effect.fade);
113
+ var c = c || 20;
114
+ b.effect.fade = setInterval(function () {
115
+ f = f < a ? Math.min(f + c, a) : Math.max(f - c, a);
116
+ b.style.opacity = f / 100;
117
+ b.style.filter = "alpha(opacity=" + f + ")";
118
+ if (f == a) {
119
+ clearInterval(b.effect.fade);
120
+ if (d) {
121
+ d.call(b)
122
+ }
123
+ }
124
+ }, 20)
125
+ };
126
+ var topWin = $topWindow();
127
+ var topDoc = topWin.document;
128
+ var Dialog = function () {
129
+ this.ID = null;
130
+ this.Width = 550;
131
+ this.Height = 380;
132
+ this.URL = null;
133
+ this.OnLoad = null;
134
+ this.InnerHtml = "";
135
+ this.InvokeElementId = "";
136
+ this.Top = "50%";
137
+ this.Left = "50%";
138
+ this.Title = " ";
139
+ this.OkButtonText = " 确 定 ";
140
+ this.CancelButtonText = " 取 消 ";
141
+ this.OKEvent = null;
142
+ this.CancelEvent = null;
143
+ this.ShowButtonRow = false;
144
+ this.ShowOkButton = true;
145
+ this.ShowCancelButton = true;
146
+ this.MessageIcon = "window.gif";
147
+ this.MessageTitle = "";
148
+ this.Message = "";
149
+ this.ShowMessageRow = false;
150
+ this.Modal = true;
151
+ this.Drag = true;
152
+ this.AutoClose = null;
153
+ this.ShowCloseButton = true;
154
+ this.Animator = !ielt7;
155
+ this.MsgForESC = "";
156
+ this.InnerFrameName = null;
157
+ this.dialogDiv = null;
158
+ this.bgDiv = null;
159
+ this.openerWindow = null;
160
+ this.openerDialog = null;
161
+ this.innerFrame = null;
162
+ this.innerWin = null;
163
+ this.innerDoc = null;
164
+ this.zindex = 900;
165
+ this.cancelButton = null;
166
+ this.okButton = null;
167
+ this.unauthorized = false;
168
+ if (arguments.length > 0 && typeof (arguments[0]) == "string") {
169
+ this.ID = arguments[0]
170
+ } else {
171
+ if (arguments.length > 0 && typeof (arguments[0]) == "object") {
172
+ Dialog.setOptions(this, arguments[0])
173
+ }
174
+ } if (!this.ID) {
175
+ this.ID = topWin.Dialog._dialogArray.length + ""
176
+ }
177
+ };
178
+ Dialog._dialogArray = [];
179
+ Dialog._childDialogArray = [];
180
+ Dialog.bgDiv = null;
181
+ Dialog.setOptions = function (c, b) {
182
+ if (!b) {
183
+ return
184
+ }
185
+ for (var a in b) {
186
+ c[a] = b[a]
187
+ }
188
+ };
189
+ Dialog.attachBehaviors = function () {
190
+ document.attachEvent("onkeydown", Dialog.onKeyDown);
191
+ window.attachEvent("onresize", Dialog.resetPosition);
192
+ if (!HideScrollbar && ielt7) {
193
+ window.attachEvent("onscroll", Dialog.resetPosition)
194
+ }
195
+ };
196
+ Dialog.prototype.attachBehaviors = function () {
197
+ var c = this;
198
+ if (this.Drag && topWin.Drag) {
199
+ var a = topWin.$id("_Draghandle_" + this.ID),
200
+ b = topWin.$id("_DialogDiv_" + this.ID);
201
+ topWin.Drag.init(a, b);
202
+ b.onDragStart = function (h, g, f, d) {
203
+ if (!isIE && c.URL) {
204
+ topWin.$id("_Covering_" + c.ID).style.display = ""
205
+ }
206
+ };
207
+ b.onDragEnd = function (j, h, f, d) {
208
+ if (!isIE && c.URL) {
209
+ topWin.$id("_Covering_" + c.ID).style.display = "none"
210
+ }
211
+ var g = $bodyDimensions(topWin);
212
+ if (j < 0) {
213
+ this.style.left = "0px"
214
+ }
215
+ if (j + this.clientWidth > g.clientWidth) {
216
+ this.style.left = g.clientWidth - this.clientWidth + "px"
217
+ }
218
+ if (c.fixedPosition) {
219
+ if (h < 0) {
220
+ this.style.top = "0px"
221
+ }
222
+ if (h + 33 > g.clientHeight) {
223
+ this.style.top = g.clientHeight - 33 + "px"
224
+ }
225
+ } else {
226
+ if (h < g.scrollTop) {
227
+ this.style.top = g.scrollTop + "px"
228
+ }
229
+ if (h + 33 > g.scrollTop + g.clientHeight) {
230
+ this.style.top = g.scrollTop + g.clientHeight - 33 + "px"
231
+ }
232
+ }
233
+ }
234
+ }
235
+ };
236
+ Dialog.prototype.displacePath = function () {
237
+ if (this.URL.substr(0, 7) == "http://" || this.URL.substr(0, 1) == "/" || this.URL.substr(0, 11) == "javascript:") {
238
+ return this.URL
239
+ } else {
240
+ var a = this.URL;
241
+ var b = window.location.href;
242
+ b = b.substring(0, b.lastIndexOf("/"));
243
+ while (a.indexOf("../") >= 0) {
244
+ a = a.substring(3);
245
+ b = b.substring(0, b.lastIndexOf("/"))
246
+ }
247
+ return b + "/" + a
248
+ }
249
+ };
250
+ Dialog.prototype.setPosition = function () {
251
+ var d = $bodyDimensions(topWin);
252
+ var g = this.Top,
253
+ b = this.Left,
254
+ c = this.getDialogDiv();
255
+ if (typeof this.Top == "string" && this.Top.indexOf("%") != -1) {
256
+ var f = parseFloat(this.Top) * 0.01;
257
+ g = this.fixedPosition ? d.clientHeight * f - c.scrollHeight * f : d.clientHeight * f - c.scrollHeight * f + d.scrollTop
258
+ }
259
+ if (typeof this.Left == "string" && this.Left.indexOf("%") != -1) {
260
+ var a = parseFloat(this.Left) * 0.01;
261
+ b = ielt7 ? d.clientWidth * a - c.scrollWidth * a + d.scrollLeft : d.clientWidth * a - c.scrollWidth * a
262
+ }
263
+ c.style.top = Math.round(g) + "px";
264
+ c.style.left = Math.round(b) + "px"
265
+ };
266
+ Dialog.setBgDivSize = function () {
267
+ var a = $bodyDimensions(topWin);
268
+ if (Dialog.bgDiv) {
269
+ if (ielt7) {
270
+ Dialog.bgDiv.style.height = a.clientHeight + "px";
271
+ Dialog.bgDiv.style.top = a.scrollTop + "px";
272
+ Dialog.bgDiv.childNodes[0].style.display = "none";
273
+ Dialog.bgDiv.childNodes[0].style.display = ""
274
+ } else {
275
+ Dialog.bgDiv.style.height = a.scrollHeight + "px"
276
+ }
277
+ }
278
+ };
279
+ Dialog.resetPosition = function () {
280
+ Dialog.setBgDivSize();
281
+ for (var b = 0, a = topWin.Dialog._dialogArray.length; b < a; b++) {
282
+ topWin.Dialog._dialogArray[b].setPosition()
283
+ }
284
+ };
285
+ Dialog.prototype.create = function () {
286
+ var h = $bodyDimensions(topWin);
287
+ if (typeof (this.OKEvent) == "function") {
288
+ this.ShowButtonRow = true
289
+ }
290
+ if (!this.Width) {
291
+ this.Width = Math.round(h.clientWidth * 4 / 10)
292
+ }
293
+ if (!this.Height) {
294
+ this.Height = Math.round(this.Width / 2)
295
+ }
296
+ if (this.MessageTitle || this.Message) {
297
+ this.ShowMessageRow = true
298
+ }
299
+ var c = this.Width + 13 + 13;
300
+ var g = this.Height + 33 + 13 + (this.ShowButtonRow ? 40 : 0) + (this.ShowMessageRow ? 50 : 0);
301
+ if (c > h.clientWidth) {
302
+ this.Width = Math.round(h.clientWidth - 26)
303
+ }
304
+ if (g > h.clientHeight) {
305
+ this.Height = Math.round(h.clientHeight - 46 - (this.ShowButtonRow ? 40 : 0) - (this.ShowMessageRow ? 50 : 0))
306
+ }
307
+ var f = ' <table id="_DialogTable_{thisID}" width="' + (this.Width + 26) + '" cellspacing="0" cellpadding="0" border="0" style="font-size:12px; line-height:1.4;border-collapse: collapse;""> <tr id="_Draghandle_{thisID}" onselectstart="return false;" style="-moz-user-select: -moz-none; ' + (this.Drag ? "cursor: move;" : "") + '"> <td width="13" height="33" style="background-image: url({IMAGESPATH}dialog_lt.png) !important;background: url({IMAGESPATH}dialog_lt.gif) no-repeat 0 0;"><div style="width: 13px;"></div></td> <td height="33" style="background-image:url({IMAGESPATH}dialog_ct.png) !important;background: url({IMAGESPATH}dialog_ct.gif) repeat-x top;"><div style="padding: 9px 0 0 4px; float: left; font-weight: bold; color:#fff;"><img align="absmiddle" src="{IMAGESPATH}icon_dialog.gif"/><span id="_Title_{thisID}">' + this.Title + '</span></div> <div id="_ButtonClose_{thisID}" onclick="fixProgress();Dialog.getInstance(\'{thisID}\').cancelButton.onclick.apply(Dialog.getInstance(\'{thisID}\').cancelButton,[]);" onmouseout="this.style.backgroundImage=\'url({IMAGESPATH}dialog_closebtn.gif)\'" onmouseover="this.style.backgroundImage=\'url({IMAGESPATH}dialog_closebtn_over.gif)\'" style="margin: 4px 0 0;*margin-top: 5px; position: relative;top:auto; cursor: pointer; float: right; height: 17px; width: 28px; background: url({IMAGESPATH}dialog_closebtn.gif) 0 0;' + (ielt7 ? "margin-top: 3px;" : "") + (this.ShowCloseButton ? "" : "display:none;") + '"></div></td> <td width="13" height="33" style="background-image: url({IMAGESPATH}dialog_rt.png) !important;background: url({IMAGESPATH}dialog_rt.gif) no-repeat right 0;"><div style="width: 13px;"><a id="_forTab_{thisID}" href="#;"></a></div></td> </tr> <tr valign="top"> <td width="13" style="background-image: url({IMAGESPATH}dialog_mlm.png) !important;background: url({IMAGESPATH}dialog_mlm.gif) repeat-y left;"></td> <td align="center"><table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" style="background-color: #ffffff !important;"> <tr id="_MessageRow_{thisID}" style="' + (this.ShowMessageRow ? "" : "display:none") + '"> <td valign="top" height="50"><table width="100%" cellspacing="0" cellpadding="0" border="0" style="background:#eaece9 url({IMAGESPATH}dialog_bg.jpg) no-repeat scroll right top;" id="_MessageTable_{thisID}"> <tr> <td width="50" height="50" align="center"><img width="32" height="32" src="{IMAGESPATH}' + this.MessageIcon + '" id="_MessageIcon_{thisID}"/></td> <td align="left" style="line-height: 16px;"><div id="_MessageTitle_{thisID}" style="font-weight:bold">' + this.MessageTitle + '</div> <div id="_Message_{thisID}">' + this.Message + '</div></td> </tr> </table></td> </tr> <tr> <td valign="top" align="center"><div id="_Container_{thisID}" style="position: relative; width: ' + this.Width + "px; height: " + this.Height + 'px;"> <div style="position: absolute; height: 100%; width: 100%; display: none; background-color:#fff; opacity: 0.5;" id="_Covering_{thisID}">&nbsp;</div> ' + (function (k) {
308
+ if (k.InnerHtml) {
309
+ return k.InnerHtml
310
+ }
311
+ if (k.URL) {
312
+ return '<iframe width="100%" height="100%" frameborder="0" style="border:none 0;" id="_DialogFrame_' + k.ID + '" ' + (k.InnerFrameName ? 'name="' + k.InnerFrameName + '"' : "") + ' src="' + k.displacePath() + '"></iframe>'
313
+ }
314
+ return ""
315
+ })(this) + ' </div></td> </tr> <tr id="_ButtonRow_{thisID}" style="' + (this.ShowButtonRow ? "" : "display:none") + '"> <td height="36"><div id="_DialogButtons_{thisID}" style="border-top: 1px solid #DADEE5; padding: 8px 20px; text-align: right; background-color:#f6f6f6;"> <input type="button" style="' + (this.ShowOkButton ? "" : "display:none") + '" value="' + this.OkButtonText + '" id="_ButtonOK_{thisID}"/> <input type="button" style="' + (this.ShowCancelButton ? "" : "display:none") + '" value="' + this.CancelButtonText + '" onclick="Dialog.getInstance(\'{thisID}\').close();" id="_ButtonCancel_{thisID}"/> </div></td> </tr> </table></td> <td width="13" style="background-image: url({IMAGESPATH}dialog_mrm.png) !important;background: url({IMAGESPATH}dialog_mrm.gif) repeat-y right;"></td> </tr> <tr> <td width="13" height="13" style="background-image: url({IMAGESPATH}dialog_lb.png) !important;background: url({IMAGESPATH}dialog_lb.gif) no-repeat 0 bottom;"></td> <td style="background-image: url({IMAGESPATH}dialog_cb.png) !important;background: url({IMAGESPATH}dialog_cb.gif) repeat-x bottom;"></td> <td width="13" height="13" style="background-image: url({IMAGESPATH}dialog_rb.png) !important;background: url({IMAGESPATH}dialog_rb.gif) no-repeat right bottom;"><a onfocus=\'$id("_forTab_{thisID}").focus();\' href="#;"></a></td> </tr> </table></div>';
316
+ f = f.replace(/\{IMAGESPATH\}/gm, IMAGESPATH).replace(/\{thisID\}/gm, this.ID);
317
+ var j = topWin.$id("_DialogDiv_" + this.ID);
318
+ if (!j) {
319
+ j = topDoc.createElement("div");
320
+ j.id = "_DialogDiv_" + this.ID;
321
+ topDoc.getElementsByTagName("BODY")[0].appendChild(j)
322
+ }
323
+ if (isIE && topDoc.compatMode == "BackCompat" || ielt7) {
324
+ j.style.position = "absolute";
325
+ this.fixedPosition = false
326
+ } else {
327
+ j.style.position = "fixed";
328
+ this.fixedPosition = true
329
+ }
330
+ j.style.left = "-9999px";
331
+ j.style.top = "-9999px";
332
+ j.innerHTML = f;
333
+ if (this.InvokeElementId) {
334
+ var d = $id(this.InvokeElementId);
335
+ d.style.position = "";
336
+ d.style.display = "";
337
+ if (isIE) {
338
+ var b = topDoc.createElement("div");
339
+ b.innerHTML = d.outerHTML;
340
+ d.outerHTML = "";
341
+ topWin.$id("_Covering_" + this.ID).parentNode.appendChild(b)
342
+ } else {
343
+ topWin.$id("_Covering_" + this.ID).parentNode.appendChild(d)
344
+ }
345
+ }
346
+ this.openerWindow = window;
347
+ if (window.ownerDialog) {
348
+ this.openerDialog = window.ownerDialog
349
+ }
350
+ if (this.URL) {
351
+ if (topWin.$id("_DialogFrame_" + this.ID)) {
352
+ this.innerFrame = topWin.$id("_DialogFrame_" + this.ID)
353
+ }
354
+ var a = this;
355
+ this.innerFrameOnload = function () {
356
+ a.innerWin = a.innerFrame.contentWindow;
357
+ try {
358
+ a.innerWin.ownerDialog = a;
359
+ a.innerDoc = a.innerWin.document;
360
+ if (a.Title == " " && a.innerDoc && a.innerDoc.title) {
361
+ if (a.innerDoc.title) {
362
+ topWin.$id("_Title_" + a.ID).innerHTML = a.innerDoc.title
363
+ }
364
+ }
365
+ } catch (k) {
366
+ if (window.console && window.console.log) {
367
+ console.log("可能存在访问限制,不能获取到浮动窗口中的文档对象。")
368
+ }
369
+ a.unauthorized = true
370
+ }
371
+ if (typeof (a.OnLoad) == "function") {
372
+ a.OnLoad()
373
+ }
374
+ };
375
+ if (!isGecko) {
376
+ this.innerFrame.attachEvent("onreadystatechange", function () {
377
+ if ((/loaded|complete/).test(a.innerFrame.readyState)) {
378
+ a.innerFrameOnload()
379
+ }
380
+ })
381
+ } else {
382
+ this.innerFrame.onload = a.innerFrameOnload
383
+ }
384
+ }
385
+ topWin.$id("_DialogDiv_" + this.ID).dialogId = this.ID;
386
+ topWin.$id("_DialogDiv_" + this.ID).dialogInstance = this;
387
+ this.attachBehaviors();
388
+ this.okButton = topWin.$id("_ButtonOK_" + this.ID);
389
+ this.cancelButton = topWin.$id("_ButtonCancel_" + this.ID);
390
+ j = null;
391
+ $("input:button[class='']").addClass("button");
392
+ $("input:button[class='button']").each(function () {
393
+ $(this).hover(function () {
394
+ $(this).removeClass("button");
395
+ $(this).addClass("button_hover")
396
+ }, function () {
397
+ $(this).removeClass("button_hover");
398
+ $(this).addClass("button")
399
+ })
400
+ })
401
+ };
402
+ Dialog.prototype.setSize = function (a, b) {
403
+ if (a && +a > 20) {
404
+ this.Width = +a;
405
+ topWin.$id("_DialogTable_" + this.ID).width = this.Width + 26;
406
+ topWin.$id("_Container_" + this.ID).style.width = this.Width + "px"
407
+ }
408
+ if (b && +b > 10) {
409
+ this.Height = +b;
410
+ topWin.$id("_Container_" + this.ID).style.height = this.Height + "px"
411
+ }
412
+ this.setPosition()
413
+ };
414
+ Dialog.prototype.show = function () {
415
+ this.create();
416
+ var b = Dialog.getBgdiv(),
417
+ f = this.getDialogDiv();
418
+ f.style.zIndex = this.zindex = parseInt(Dialog.bgDiv.style.zIndex) + 1;
419
+ if (topWin.Dialog._dialogArray.length > 0) {
420
+ f.style.zIndex = this.zindex = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1].zindex + 2
421
+ } else {
422
+ b.style.display = "none";
423
+ if (HideScrollbar) {
424
+ var d = topDoc.getElementsByTagName(topDoc.compatMode == "BackCompat" ? "BODY" : "HTML")[0];
425
+ d.styleOverflow = d.style.overflow;
426
+ if (window.navigator.userAgent.indexOf("Firefox/3.6") != -1) {
427
+ var c = d.scrollTop;
428
+ d.style.overflow = "hidden";
429
+ d.scrollTop = c
430
+ } else {
431
+ d.style.overflow = "hidden"
432
+ }
433
+ }
434
+ }
435
+ topWin.Dialog._dialogArray.push(this);
436
+ Dialog._childDialogArray.push(this);
437
+ if (Dialog._childDialogArray.length == 1) {
438
+ if (window.ownerDialog) {
439
+ ownerDialog.hiddenCloseButton()
440
+ }
441
+ }
442
+ if (this.Modal) {
443
+ b.style.zIndex = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1].zindex - 1;
444
+ Dialog.setBgDivSize();
445
+ if (b.style.display == "none") {
446
+ if (this.Animator) {
447
+ var a = topWin.$id("_DialogBGMask");
448
+ b.style.display = "";
449
+ if (isIE) {} else {}
450
+ a = null
451
+ } else {
452
+ b.style.display = ""
453
+ }
454
+ }
455
+ }
456
+ this.setPosition();
457
+ if (this.CancelEvent) {
458
+ this.cancelButton.onclick = this.CancelEvent
459
+ }
460
+ if (this.OKEvent) {
461
+ this.okButton.onclick = this.OKEvent
462
+ }
463
+ if (this.AutoClose && this.AutoClose > 0) {
464
+ this.autoClose()
465
+ }
466
+ this.opened = true;
467
+ b = null
468
+ };
469
+ Dialog.prototype.close = function () {
470
+ if (this.unauthorized == false) {
471
+ if (this.innerWin && this.innerWin.Dialog && this.innerWin.Dialog._childDialogArray.length > 0) {
472
+ return
473
+ }
474
+ }
475
+ var j = this.getDialogDiv();
476
+ if (this == topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1]) {
477
+ var h = topWin.Dialog._dialogArray.pop()
478
+ } else {
479
+ topWin.Dialog._dialogArray.remove(this)
480
+ }
481
+ Dialog._childDialogArray.remove(this);
482
+ if (Dialog._childDialogArray.length == 0) {
483
+ if (window.ownerDialog) {
484
+ ownerDialog.showCloseButton()
485
+ }
486
+ }
487
+ if (this.InvokeElementId) {
488
+ var d = topWin.$id(this.InvokeElementId);
489
+ d.style.display = "none";
490
+ if (isIE) {
491
+ var g = document.createElement("div");
492
+ g.innerHTML = d.outerHTML;
493
+ d.outerHTML = "";
494
+ document.getElementsByTagName("BODY")[0].appendChild(g)
495
+ } else {
496
+ document.getElementsByTagName("BODY")[0].appendChild(d)
497
+ }
498
+ }
499
+ if (topWin.Dialog._dialogArray.length > 0) {
500
+ if (this.Modal && h) {
501
+ var f = topWin.Dialog._dialogArray.length;
502
+ var b = true;
503
+ while (f) {
504
+ --f;
505
+ if (topWin.Dialog._dialogArray[f].Modal) {
506
+ Dialog.bgDiv.style.zIndex = topWin.Dialog._dialogArray[f].zindex - 1;
507
+ b = false;
508
+ break
509
+ }
510
+ }
511
+ if (b) {
512
+ Dialog.bgDiv.style.display = "none"
513
+ }
514
+ }
515
+ } else {
516
+ Dialog.bgDiv.style.zIndex = "900";
517
+ Dialog.bgDiv.style.display = "none";
518
+ if (HideScrollbar) {
519
+ var c = topDoc.getElementsByTagName(topDoc.compatMode == "BackCompat" ? "BODY" : "HTML")[0];
520
+ if (c.styleOverflow != undefined) {
521
+ if (window.navigator.userAgent.indexOf("Firefox/3.6") != -1) {
522
+ var a = c.scrollTop;
523
+ c.style.overflow = c.styleOverflow;
524
+ c.scrollTop = a
525
+ } else {
526
+ c.style.overflow = c.styleOverflow
527
+ }
528
+ }
529
+ }
530
+ }
531
+ this.openerWindow.focus();
532
+ if (isIE && !isIE8) {
533
+ j.dialogInstance = null;
534
+ if (this.CancelEvent) {
535
+ this.cancelButton.onclick = null
536
+ }
537
+ if (this.OKEvent) {
538
+ this.okButton.onclick = null
539
+ }
540
+ topWin.$id("_DialogDiv_" + this.ID).onDragStart = null;
541
+ topWin.$id("_DialogDiv_" + this.ID).onDragEnd = null;
542
+ topWin.$id("_Draghandle_" + this.ID).onmousedown = null;
543
+ topWin.$id("_Draghandle_" + this.ID).root = null;
544
+ j.outerHTML = "";
545
+ CollectGarbage()
546
+ } else {
547
+ var k = topWin.$id("_RycDiv");
548
+ if (!k) {
549
+ k = topDoc.createElement("div");
550
+ k.id = "_RycDiv"
551
+ }
552
+ k.appendChild(j);
553
+ k.innerHTML = "";
554
+ k = null
555
+ }
556
+ this.innerFrame = null;
557
+ this.bgDiv = null;
558
+ j = null;
559
+ this.closed = true
560
+ };
561
+ Dialog.prototype.autoClose = function () {
562
+ if (this.closed) {
563
+ clearTimeout(this._closeTimeoutId);
564
+ return
565
+ }
566
+ this.AutoClose -= 1;
567
+ topWin.$id("_Title_" + this.ID).innerHTML = this.AutoClose + " 秒后自动关闭";
568
+ if (this.AutoClose <= 0) {
569
+ this.close()
570
+ } else {
571
+ var a = this;
572
+ this._closeTimeoutId = setTimeout(function () {
573
+ a.autoClose()
574
+ }, 1000)
575
+ }
576
+ };
577
+ Dialog.getInstance = function (b) {
578
+ var a = topWin.$id("_DialogDiv_" + b);
579
+ if (!a) {
580
+ alert("没有取到对应ID的弹出框页面对象")
581
+ }
582
+ try {
583
+ return a.dialogInstance
584
+ } finally {
585
+ a = null
586
+ }
587
+ };
588
+ Dialog.prototype.addButton = function (f, a, d) {
589
+ topWin.$id("_ButtonRow_" + this.ID).style.display = "";
590
+ this.ShowButtonRow = true;
591
+ var c = topDoc.createElement("input");
592
+ c.id = "_Button_" + this.ID + "_" + f;
593
+ c.type = "button";
594
+ c.style.cssText = "margin-right:5px";
595
+ c.value = a;
596
+ c.onclick = d;
597
+ var b = topWin.$id("_DialogButtons_" + this.ID).getElementsByTagName("INPUT")[0];
598
+ b.parentNode.insertBefore(c, b);
599
+ $("input:button[class='']").addClass("button");
600
+ $("input:button[class='button']").each(function () {
601
+ $(this).hover(function () {
602
+ $(this).removeClass("button");
603
+ $(this).addClass("button_hover")
604
+ }, function () {
605
+ $(this).removeClass("button_hover");
606
+ $(this).addClass("button")
607
+ })
608
+ });
609
+ return c
610
+ };
611
+ Dialog.prototype.removeButton = function (b) {
612
+ var a = topWin.$id("_DialogButtons_" + this.ID).getElementsByTagName("INPUT")[0];
613
+ a.parentNode.removeChild(b)
614
+ };
615
+ Dialog.prototype.hiddenCloseButton = function (b) {
616
+ var a = topWin.$id("_ButtonClose_" + this.ID);
617
+ if (a) {
618
+ a.style.display = "none"
619
+ }
620
+ };
621
+ Dialog.prototype.showCloseButton = function (b) {
622
+ var a = topWin.$id("_ButtonClose_" + this.ID);
623
+ if (a) {
624
+ a.style.display = ""
625
+ }
626
+ };
627
+ Dialog.getBgdiv = function () {
628
+ if (Dialog.bgDiv) {
629
+ return Dialog.bgDiv
630
+ }
631
+ var d = topWin.$id("_DialogBGDiv");
632
+ if (!d) {
633
+ d = topDoc.createElement("div");
634
+ d.id = "_DialogBGDiv";
635
+ d.style.cssText = "position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:900";
636
+ var a = '<div style="position:relative;width:100%;height:100%;">';
637
+ var c = '<div id="_DialogBGMask" style="position:absolute;background-color:#333;opacity:0.4;filter:alpha(opacity=40);width:100%;height:100%;"></div>';
638
+ var f = ielt7 ? '<iframe src="about:blank" style="filter:alpha(opacity=0);" width="100%" height="100%"></iframe>' : "";
639
+ d.innerHTML = a + c + f + "</div>";
640
+ topDoc.getElementsByTagName("BODY")[0].appendChild(d);
641
+ if (ielt7) {
642
+ var b = d.getElementsByTagName("IFRAME")[0].contentWindow.document;
643
+ b.open();
644
+ b.write("<body style='background-color:#333' oncontextmenu='return false;'></body>");
645
+ b.close();
646
+ b = null
647
+ }
648
+ }
649
+ Dialog.bgDiv = d;
650
+ d = null;
651
+ return Dialog.bgDiv
652
+ };
653
+ Dialog.prototype.getDialogDiv = function () {
654
+ var a = topWin.$id("_DialogDiv_" + this.ID);
655
+ if (!a) {
656
+ alert("获取弹出层页面对象出错!")
657
+ }
658
+ try {
659
+ return a
660
+ } finally {
661
+ a = null
662
+ }
663
+ };
664
+ Dialog.onKeyDown = function (a) {
665
+ var a = window.event || a;
666
+ if ((a.shiftKey && a.keyCode == 9) || a.keyCode == 8) {
667
+ if (topWin.Dialog._dialogArray.length > 0) {
668
+ var c = a.srcElement || a.target;
669
+ if (c.tagName != "INPUT" && c.tagName != "TEXTAREA") {
670
+ stopEvent(a);
671
+ return false
672
+ }
673
+ }
674
+ }
675
+ if (a.keyCode == 27) {
676
+ var b = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1];
677
+ if (b.ShowCloseButton) {
678
+ Dialog.close()
679
+ }
680
+ }
681
+ };
682
+ Dialog.close = function (b) {
683
+ if (topWin.Dialog._dialogArray.length > 0) {
684
+ var a = topWin.Dialog._dialogArray[topWin.Dialog._dialogArray.length - 1];
685
+ if (a.MsgForESC) {
686
+ Dialog.confirm(a.MsgForESC, function () {
687
+ a.cancelButton.onclick.apply(a.cancelButton, [])
688
+ })
689
+ } else {
690
+ a.cancelButton.onclick.apply(a.cancelButton, [])
691
+ }
692
+ }
693
+ };
694
+ Dialog.alert = function (f, c, a, b) {
695
+ var a = a || 300,
696
+ b = b || 110;
697
+ var d = new Dialog({
698
+ Width: a,
699
+ Height: b
700
+ });
701
+ d.ShowButtonRow = true;
702
+ d.Title = "系统提示";
703
+ d.CancelEvent = function () {
704
+ d.close();
705
+ if (c) {
706
+ c()
707
+ }
708
+ };
709
+ d.InnerHtml = '<table height="100%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #ffffff !important;"> <tr><td align="right"><img id="Icon_' + this.ID + '" src="' + IMAGESPATH + 'icon_alert.gif" width="34" height="34" align="absmiddle"></td> <td align="left" id="Message_' + this.ID + '" style="font-size:9pt">' + f + "</td></tr> </table>";
710
+ d.show();
711
+ d.okButton.parentNode.style.textAlign = "center";
712
+ d.okButton.style.display = "none";
713
+ d.cancelButton.value = d.OkButtonText
714
+ };
715
+ Dialog.confirm = function (g, c, b, a, d) {
716
+ var a = a || 300,
717
+ d = d || 110;
718
+ var f = new Dialog({
719
+ Width: a,
720
+ Height: d
721
+ });
722
+ f.ShowButtonRow = true;
723
+ f.Title = "信息确认";
724
+ f.CancelEvent = function () {
725
+ f.close();
726
+ if (b) {
727
+ b()
728
+ }
729
+ };
730
+ f.OKEvent = function () {
731
+ f.close();
732
+ if (c) {
733
+ c()
734
+ }
735
+ };
736
+ f.InnerHtml = '<table height="100%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #ffffff !important;"> <tr><td align="right"><img id="Icon_' + this.ID + '" src="' + IMAGESPATH + 'icon_query.gif" width="34" height="34" align="absmiddle"></td> <td align="left" id="Message_' + this.ID + '" style="font-size:9pt">' + g + "</td></tr> </table>";
737
+ f.show();
738
+ f.okButton.parentNode.style.textAlign = "center"
739
+ };
740
+ Dialog.open = function (a) {
741
+ var b = new Dialog(a);
742
+ b.show();
743
+ return b
744
+ };
745
+ window.attachEvent("onload", Dialog.attachBehaviors);
746
+ var scripts = document.getElementsByTagName("script");
747
+ for (var i = 0; i < scripts.length; i++) {
748
+ if (/.*zDrag\.js$/g.test(scripts[i].getAttribute("src"))) {
749
+ break
750
+ }
751
+ if (/.*zDialog\.js$/g.test(scripts[i].getAttribute("src"))) {
752
+ var jsPath = scripts[i].getAttribute("src").replace(/zDialog\.js$/g, "");
753
+ document.write('<script type="text/javascript" src="' + jsPath + 'zDrag.js"><\/script>');
754
+ break
755
+ }
756
+ }
757
+
758
+ function fixProgress() {
759
+ try {
760
+ if (top.progressFlag == 1) {
761
+ top.progressFlag = 0
762
+ }
763
+ } catch (a) {}
764
764
  };