PageSourceSearch

https://eproc.poscofuturem.com:8449/pct/js/lightbox3.js

js poscofuturem.com collected 2026-09-25 04:00:44 UTC 24,632 bytes, 674 lines download raw bytes

1/******************************************************************************
2 파일명 : lightbox3.js
3 ******************************************************************************
4 내  용 : lightbox3
5 작성자 : samE
6 작성일 : 2008-06-18
7 수정일 : 
8 버  전 : 1.0
9*******************************************************************************/
10
11
12var _lightboxObj;
13
14/** Lightbox를 화면에 표시한다.  */
15function showLightbox() {
16    var lightboxDiv = document.getElementById('lightbox_div_layout');
17    if(lightboxDiv == null) {
18        _lightboxObj = new _lightbox3();
19    }
20    _lightboxObj.isLoading = true;
21    _lightboxObj.loadLightbox();
22}
23
24/** Lightbox를 화면에서 제거한다.  */
25function hideLightbox() {
26	//DHTMLX
27	try{
28		if(typeof(parent._dhtmlxWin) != "undefined"){
29			var win = parent._dhtmlxWin.window(_entityWin);
30			if (win != null && win.getId() == _entityWin) {
31				win.detachObject();
32				win.hide();
33				win.setModal(false);
34				return;
35			}
36		}
37	}catch(err){}
38	
39    if(_lightboxObj != null) {
40        _lightboxObj.hideLightbox();
41    }
42}
43
44
45/** Lightbox 생성자 */
46function _lightbox3() {
47    this.layoutObjectId = "main_td_content";  // layoutDiv의 기준이 될 최상위 객체의 id
48
49    this.layoutDiv  = null;
50    this.boxFrame   = null;
51    this.resizeDiv  = null;
52    this.targetName = "lightbox3";
53    this.isDisplay  = false;
54    this.isLoading  = false;  // 2009-04-15(samE), loading 중인지 여부 (exception 처리를 위함)
55    this.level      = 1; // lightbox level (여러개 띄웠을 때의 구분을 위해)
56
57    // for resize
58    this.eventWinObj = null;
59    this.eventTdObj  = null;
60    this.mousedownX  = 0;
61    this.mousedownY  = 0;
62
63    // config setting
64    var DEFAULT_MOVE_LEFT             = -5;      // layoutDiv left 위치 조절 값
65    var DEFAULT_MOVE_TOP              = -8;      // layoutDiv top 위치 조절 값
66    var DEFAULT_RESIZE_LAYOUT_WIDTH   = 5;       // layoutDiv width 길이 조절 값  (표시될 위치의 layout object(td) 대비 크기 조절)
67    var DEFAULT_RESIZE_LAYOUT_HEIGHT  = 5;       // layoutDiv height 길이 조절 값 (표시될 위치의 layout object(td) 대비 크기 조절)
68    var DEFAULT_RESIZE_BOX_WIDTH      = -25;     // box iframe width 길이 조절 값  (layoutDiv 대비 크기 조절)
69    var DEFAULT_RESIZE_BOX_HEIGHT     = -25;     // box iframe height 길이 조절 값 (layoutDiv 대비 크기 조절)
70    var DEFAULT_RESIZE_TD_THICK       = 10;      // lightbox 크기 조절을 위해 만든 실제 td 두께
71    var DEFAULT_RESIZE_LINE_THICK     = 2;       // lightbox 크기 조절을 위해 보여질 line 두께
72    var DEFAULT_MINIMUM_BOX_WIDTH     = 250;     // box iframe width  최소 값
73    var DEFAULT_MINIMUM_BOX_HEIGHT    = 250;     // box iframe height 최소 값
74
75    this.config    = {
76                    moveLeft          : DEFAULT_MOVE_LEFT,
77                    moveTop           : DEFAULT_MOVE_TOP,
78                    resizeLayoutWidth : DEFAULT_RESIZE_LAYOUT_WIDTH,
79                    resizeLayoutHeight: DEFAULT_RESIZE_LAYOUT_HEIGHT,
80                    resizeBoxWidth    : DEFAULT_RESIZE_BOX_WIDTH,
81                    resizeBoxHeight   : DEFAULT_RESIZE_BOX_HEIGHT,
82                    resizeTdThick     : DEFAULT_RESIZE_TD_THICK,
83                    resizeLineThick   : DEFAULT_RESIZE_LINE_THICK,
84                    minimumBoxWidth   : DEFAULT_MINIMUM_BOX_WIDTH,
85                    minimumBoxHeight  : DEFAULT_MINIMUM_BOX_HEIGHT
86    };
87}
88
89/** Lightbox를 Load 한다. */
90_lightbox3.prototype.loadLightbox = function() {
91    this.createLightbox();
92
93    // page load가 끝나면 showLightbox
94    this.boxFrame.onreadystatechange = function() {
95        if(document.readyState == "complete") {
96            _lightboxObj.showLightbox();
97        }
98    };
99
100    _hideOverlapObject("select", this.layoutDiv); // For IE6, selectbox 충돌 문제
101}
102
103/** Lightbox를 화면에 표시한다. */
104_lightbox3.prototype.showLightbox = function() {
105    if(this.level != 1) {
106        document.body.scroll = "no";
107        window.scrollTo(0, 0);
108
109        // 기존 resize td의 resize event는 제거한다.
110        if(parent._lightboxObj != null) {
111            //parent._lightboxObj.detachResizeEvent();
112        }
113    }
114
115    this.isDisplay = true;
116    this.layoutDiv.style.display = "";
117    this.boxFrame.style.display  = "";
118    //this.resizeDiv.style.display = "";
119    this.resizeLightbox();
120    this.positionLightbox();
121}
122
123/** Lightbox를 화면에서 제거한다. */
124_lightbox3.prototype.hideLightbox = function() {
125    if(this.level != 1) {
126        document.body.scroll = "";
127
128        // 기존 resize td에 resize event를 추가한다.
129        if(parent._lightboxObj != null) {
130            //parent._lightboxObj.attachResizeEvent();
131        }
132    }
133
134    this.isDisplay = false;
135    //this.resizeDiv.style.display = "none";
136    this.boxFrame.style.display  = "none";
137    this.layoutDiv.style.display = "none";
138
139    _showOverlapObject(this.layoutDiv); // For IE6, selectbox 충돌 문제
140}
141
142/** Lightbox가 화면에 표시되어 있는 경우 제거하고, 표시되어 있지 않은 경우 화면에 표시한다. */
143_lightbox3.prototype.toggleLightbox = function() {
144    if(this._lightbox3.style.display == "none") {
145        this.showLightbox();
146    } else {
147        this.hideLightbox();
148    }
149}
150
151/** LightBox 크기를 조절한다. */
152_lightbox3.prototype.resizeLightbox = function() {
153	var offsetHeight = document.body.offsetHeight;
154    if(this.level == 1) {
155        var targetRect = getBounds(document.getElementById(this.layoutObjectId));
156        this.layoutDiv.style.width = targetRect.width  + this.config.resizeLayoutWidth;
157        if(new Number(this.layoutDiv.style.height.replace("px", "")) < offsetHeight) {
158			this.layoutDiv.style.height  = targetRect.height + (this.level == 1 ? this.config.resizeLayoutHeight - 2 : this.config.resizeLayoutHeight);
159		} else {
160			this.layoutDiv.style.height  = (offsetHeight - 100) + (this.level == 1 ? this.config.resizeLayoutHeight - 2 : this.config.resizeLayoutHeight);
161		}
162    } else {
163        this.layoutDiv.style.width   = document.body.offsetWidth  + this.config.resizeLayoutWidth ;
164        this.layoutDiv.style.height  = document.body.offsetHeight + (this.level == 1 ? this.config.resizeLayoutHeight - 2 : this.config.resizeLayoutHeight);
165    }
166
167    var layoutDivRect = getBounds(this.layoutDiv);
168    this.boxFrame.style.width   = (layoutDivRect.width  + this.config.resizeBoxWidth );
169    this.boxFrame.style.height  = (layoutDivRect.height + this.config.resizeBoxHeight);
170    //this.resizeResizeDiv();
171}
172
173/** box frame 대비 resize div 크기를 조절한다. */
174_lightbox3.prototype.resizeResizeDiv = function() {
175    var boxFrameRect = getBounds(this.boxFrame);
176    var resizeTable = this.resizeDiv.firstChild;
177
178    var middleWidth  = boxFrameRect.width  - (this.config.resizeTdThick * 2) + (this.config.resizeLineThick * 2);
179    var middleHeight = boxFrameRect.height - (this.config.resizeTdThick * 2) + (this.config.resizeLineThick * 2);
180    resizeTable.rows[0].cells[1].style.width  = middleWidth;
181    resizeTable.rows[1].cells[0].style.height = middleHeight;
182    resizeTable.style.width  = middleWidth  + (this.config.resizeTdThick * 2);
183    resizeTable.style.height = middleHeight + (this.config.resizeTdThick * 2);
184
185    var resizeTableRect = getBounds(resizeTable);
186    this.resizeDiv.style.width  = resizeTableRect.width ;
187    this.resizeDiv.style.height = resizeTableRect.height;
188}
189
190/** LightBox 위치를 조절한다. */
191_lightbox3.prototype.positionLightbox = function() {
192    var targetRect = getBounds(document.getElementById(this.layoutObjectId));
193    this.layoutDiv.style.left   = targetRect.left   + this.config.moveLeft + this.config.resizeLineThick;
194    this.layoutDiv.style.top    = targetRect.top    + this.config.moveTop  + this.config.resizeLineThick;
195
196    var layoutDivRect = getBounds(this.layoutDiv);
197    var boxFrameRect  = getBounds(this.boxFrame);
198    this.boxFrame.style.left = layoutDivRect.left + Math.floor((layoutDivRect.width  - boxFrameRect.width ) / 2);
199    this.boxFrame.style.top  = layoutDivRect.top  + Math.floor((layoutDivRect.height - boxFrameRect.height) / 2);
200    //this.positionResizeDiv();
201}
202
203/** box frame 대비 resize div 위치를 조절한다. */
204_lightbox3.prototype.positionResizeDiv = function() {
205    boxFrameRect = getBounds(this.boxFrame);
206    this.resizeDiv.style.left = boxFrameRect.left - this.config.resizeLineThick - (this.level == 1 ? this.config.resizeLineThick : 0);
207    this.resizeDiv.style.top  = boxFrameRect.top  - this.config.resizeLineThick - (this.level == 1 ? this.config.resizeLineThick : 0);
208}
209
210/** Lightbox를 생성한다. */
211_lightbox3.prototype.createLightbox = function() {
212
213    // levelt을 설정한다.
214    this.setLevel();
215
216    this.layoutDiv = document.getElementById("lightbox_div_layout");
217    this.boxFrame  = document.getElementById("lightbox_iframe_box");
218    //this.resizeDiv = document.getElementById("lightbox_div_resize");
219
220    var layoutDiv, boxFrame, resizeDiv;
221
222    // 최초 생성시
223    //if(this.layoutDiv == null || this.boxFrame == null || this.resizeDiv == null) {
224    if(this.layoutDiv == null || this.boxFrame == null) {
225        var layoutDiv = this.createLayoutDiv();
226        var boxFrame  = this.createBoxFrame ();
227        //var resizeDiv = this.createResizeDiv();
228        
229        this.layoutDiv = layoutDiv;
230        this.boxFrame  = boxFrame;
231        //this.resizeDiv = resizeDiv;
232        //this.attachResizeEvent();
233
234        // body 맨 뒤에 append 하면 scroll이 발생하여 수정
235        //document.body.appendChild(layoutDiv);
236        //document.body.appendChild(boxFrame );
237        //document.body.appendChild(resizeDiv);
238        document.body.insertBefore(layoutDiv, document.body.lastChild);
239        document.body.insertBefore(boxFrame , document.body.lastChild);
240        //document.body.insertBefore(resizeDiv, document.body.lastChild);
241
242        // iframe element에 name 속성이 안 먹어서, frame element로 가져와서 name 속성 적용
243        window.frames["lightbox_iframe_box"].name = this.getTarget();
244    }
245}
246
247/** layout div 객체를 생성한다. */
248_lightbox3.prototype.createLayoutDiv = function() {
249    var divObj = document.createElement("div");
250    divObj.id = "lightbox_div_layout";
251    divObj.style.display = "none";
252    divObj.style.filter  = "Alpha(opacity=" + (this.level * 20) + "); opacity:" + (this.level * 0.1) + "; -moz-opacity:" + (this.level * 0.1);
253    divObj.onclick = function() { event.cancelBubble = true; }
254    return divObj;
255}
256
257/** box iframe 객체를 생성한다. */
258_lightbox3.prototype.createBoxFrame = function() {
259    var iframeObj = document.createElement("iframe");
260    iframeObj.id = "lightbox_iframe_box";
261    iframeObj.style.display = "none";
262    iframeObj.frameBorder = "0";
263    return iframeObj;
264}
265
266/** lightbox 크기 조절을 위한 테두리를 가진 div 객체를 생성한다. */
267_lightbox3.prototype.createResizeDiv = function() {
268    var divObj = document.createElement("div");
269    divObj.id = "lightbox_div_resize";
270    divObj.style.display = "none";
271    divObj.style.filter  = "Alpha(opacity=" + (this.level * 20) + "); opacity:" + (this.level * 0.1) + "; -moz-opacity:" + (this.level * 0.1);
272
273    var tableObj, trObj, tdObj;
274    tableObj = document.createElement("table");
275    tableObj.border = "0";
276    tableObj.cellSpacing  = "0";
277    tableObj.cellPadding  = "0";
278    
279    var resizeTdThick = this.config.resizeTdThick;
280
281    // top row
282    trObj = tableObj.insertRow(-1);
283
284    // nw
285    tdObj = trObj.insertCell(0);
286    tdObj.style.width  = resizeTdThick;
287    tdObj.style.height = resizeTdThick;
288    tdObj.style.cursor = "nw-resize";
289
290    // n
291    tdObj = trObj.insertCell(1);
292    tdObj.style.width  = "auto";
293    tdObj.style.height = resizeTdThick;
294    tdObj.style.cursor = "n-resize";
295
296    // ne
297    tdObj = trObj.insertCell(2);
298    tdObj.style.width  = resizeTdThick;
299    tdObj.style.height = resizeTdThick;
300    tdObj.style.cursor = "ne-resize";
301
302
303    // middle row
304    trObj = tableObj.insertRow(-1);
305
306    // w
307    tdObj = trObj.insertCell(0);
308    tdObj.style.width  = resizeTdThick;
309    tdObj.style.height = "auto";
310    tdObj.style.cursor = "w-resize";
311
312    // c
313    tdObj = trObj.insertCell(1);
314    tdObj.style.width  = "auto";
315    tdObj.style.height = "auto";
316
317    // e
318    tdObj = trObj.insertCell(2);
319    tdObj.style.width  = resizeTdThick;
320    tdObj.style.height = "auto";
321    tdObj.style.cursor = "e-resize";
322
323
324    // bottom row
325    trObj = tableObj.insertRow(-1);
326
327    // sw
328    tdObj = trObj.insertCell(0);
329    tdObj.style.width  = resizeTdThick;
330    tdObj.style.height = resizeTdThick;
331    tdObj.style.cursor = "sw-resize";
332
333    // s
334    tdObj = trObj.insertCell(1);
335    tdObj.style.width  = "auto";
336    tdObj.style.height = resizeTdThick;
337    tdObj.style.cursor = "s-resize";
338
339    // se
340    tdObj = trObj.insertCell(2);
341    tdObj.style.width  = resizeTdThick;
342    tdObj.style.height = resizeTdThick;
343    tdObj.style.cursor = "se-resize";
344    
345    divObj.appendChild(tableObj);
346
347    return divObj;
348}
349
350/** resize div - table의 td 객체에 resize event를 부여한다 */
351_lightbox3.prototype.attachResizeEvent = function() {
352    var tdCursors = ["nw", "n", "ne", "w", "", "e", "sw", "s", "se"];
353    var tdObjs    = this.resizeDiv.firstChild.getElementsByTagName("td");
354    var tdObjCnt  = tdObjs.length;
355    for(var i=0; i<tdObjCnt; i++) {
356        tdObjs[i].onmousedown  = lightboxResizeMouseDown;
357        tdObjs[i].style.cursor = tdCursors[i] + "-resize";
358    }
359}
360
361/** resize div - table의 td 객체에서 resize event를 제거한다. */
362_lightbox3.prototype.detachResizeEvent = function() {
363    var tdObjs   = this.resizeDiv.firstChild.getElementsByTagName("td");
364    var tdObjCnt = tdObjs.length;
365    for(var i=0; i<tdObjCnt; i++) {
366        tdObjs[i].onmousedown  = null;
367        tdObjs[i].style.cursor = "";
368    }
369}
370
371/** lightbox level을 설정한다 */
372_lightbox3.prototype.setLevel = function() {
373    if(window.name == "mwfRootWindow") {
374        this.level = 1;
375    } else {
376        this.level = new Number(window.name.replace(this.targetName + ":", "")) + 1;
377		// IE6, Web Server 거쳤을 시 Window Name이 다르게 나와서 예외 처리
378		if(isNaN(this.level)) {
379			this.level = 1;
380		}
381    }
382}
383
384/** target name을 가져온다 */
385_lightbox3.prototype.getTarget = function() {
386    return this.targetName + ":" + this.level;
387}
388
389
390
391////////////////////////////////////////////////////////////////
392//                           Resize                           //
393////////////////////////////////////////////////////////////////
394
395
396/** lightbox 크기 조절 mousedown event */
397function lightboxResizeMouseDown() {
398    var rootWindow = getRootWindow();
399    rootWindow._lightboxObj.eventWinObj = window;
400    rootWindow._lightboxObj.eventTdObj  = window.event.srcElement;
401    rootWindow._lightboxObj.mousedownX  = window.event.screenX;
402    rootWindow._lightboxObj.mousedownY  = window.event.screenY;
403
404    var win = rootWindow;
405    while(true) {
406        if(win == null) {
407            break;
408        }
409        win.document.onselectstart = function() { return false; };
410        win.document.onmouseup = win.lightboxResizeMouseUp;
411
412        // Release 화면과 같이 iframe을 쓰는 경우
413        var iframeObjs = win.document.getElementsByTagName("iframe");
414        var iframeCnt  = iframeObjs.length;
415        for(var i=0; i<iframeCnt; i++) {
416            if(iframeObjs[i].id.indexOf("table_") == 0) {
417                var iframeWin = win.frames[iframeObjs[i].id];
418                iframeWin.document.onselectstart = function() { return false; };
419                iframeWin.document.onmouseup     = iframeWin.lightboxResizeMouseUp;
420            }
421        }
422        win = win.frames["lightbox_iframe_box"];
423    }
424}
425
426/** lightbox 크기 조절 mouseup event */
427function lightboxResizeMouseUp() {
428    var rootWindow      = getRootWindow();
429    var rootLightboxObj = rootWindow._lightboxObj;
430
431    var eventWinObj = rootLightboxObj.eventWinObj;
432    var eventTdObj  = rootLightboxObj.eventTdObj;
433    var direction   = eventTdObj.style.cursor.replace("-resize", "");
434
435    var mouseupX = window.event.screenX;
436    var mouseupY = window.event.screenY;
437
438    var diffX    = mouseupX - rootLightboxObj.mousedownX;
439    var diffY    = mouseupY - rootLightboxObj.mousedownY;
440
441    var changeWidth  = 0;
442    var changeHeight = 0;
443    var changeLeft   = 0;
444    var changeTop    = 0;
445    switch(direction) {
446        case "nw":
447            changeWidth  = -diffX;
448            changeHeight = -diffY;
449            changeLeft   = +diffX;
450            changeTop    = +diffY;
451            break;
452
453        case "n" :
454            changeHeight = -diffY;
455            changeTop    = +diffY;
456            break;
457
458        case "ne":
459            changeWidth  = +diffX;
460            changeHeight = -diffY;
461            changeTop    = +diffY;
462            break;
463
464        case "e" :
465            changeWidth  = +diffX;
466            break;
467
468        case "w" :
469            changeWidth  = -diffX;
470            changeLeft   = +diffX;
471            break;
472
473        case "sw":
474            changeWidth  = -diffX;
475            changeHeight = +diffY;
476            changeLeft   = +diffX;
477            break;
478
479        case "s" :
480            changeHeight = +diffY;
481            break;
482
483        case "se":
484            changeWidth  = +diffX;
485            changeHeight = +diffY;
486            break;
487
488        default:
489            break;
490    }
491
492    var winLightboxObj = eventWinObj._lightboxObj;
493
494    var layoutDivRect  = getBounds(winLightboxObj.layoutDiv);
495    var boxFrameObj    = winLightboxObj.boxFrame;
496    var boxFrameRect   = getBounds(boxFrameObj);
497
498    var calWidth  = boxFrameRect.width  + changeWidth  - (winLightboxObj.config.resizeLineThick * 2);
499    var calHeight = boxFrameRect.height + changeHeight - (winLightboxObj.config.resizeLineThick * 2);
500    var calLeft   = boxFrameRect.left   + changeLeft;
501    var calTop    = boxFrameRect.top    + changeTop;
502
503    var minLeft = layoutDivRect.left - Math.floor(winLightboxObj.config.resizeBoxWidth / 2);
504    var maxLeft = layoutDivRect.left + layoutDivRect.width  + Math.floor(winLightboxObj.config.resizeBoxWidth / 2);
505    var minTop  = layoutDivRect.top  - Math.floor(winLightboxObj.config.resizeBoxWidth / 2);
506    var maxTop  = layoutDivRect.top  + layoutDivRect.height + Math.floor(winLightboxObj.config.resizeBoxWidth / 2);
507
508    // width
509    if(changeWidth != 0) {
510        var minWidth  = winLightboxObj.config.minimumBoxWidth;
511        var maxWidth  = layoutDivRect.width + winLightboxObj.config.resizeBoxWidth;
512
513        // width 값이 최소값보다 작을 경우
514        if(calWidth < minWidth) {
515            calLeft  = calLeft + (calWidth - minWidth);
516            calWidth = minWidth;
517
518        // width 값이 최대값보다 클 경우
519        } else if(calWidth > maxWidth) {
520            calLeft  = calLeft + (calWidth - maxWidth);
521            calWidth = maxWidth;
522        }
523
524        // left 값이 최소값보다 작을 경우
525        if(calLeft < minLeft) {
526            calWidth = calWidth + (calLeft - minLeft);
527            calLeft  = minLeft;
528
529        // left + width 값이 최대값보다 클 경우
530        } else if(calLeft + calWidth > maxLeft) {
531            var rWidth = maxLeft - (calLeft + calWidth);
532            calLeft  = calLeft  + rWidth;
533            calWidth = calWidth + rWidth;
534        }
535
536        // left값에 의해 width값이 변할 수 있으므로, 다시 한번 체크한다.
537        // width 값이 최소값보다 작을 경우
538        if(calWidth < minWidth) {
539            calLeft  = calLeft + (calWidth - minWidth);
540            calWidth = minWidth;
541
542        // width 값이 최대값보다 클 경우
543        } else if(calWidth > maxWidth) {
544            calLeft  = calLeft + (calWidth - maxWidth);
545            calWidth = maxWidth;
546        }
547        boxFrameObj.style.width  = calWidth;
548    }
549
550    // height
551    if(changeHeight != 0) {
552        var minHeight = winLightboxObj.config.minimumBoxHeight;
553        var maxHeight = layoutDivRect.height + winLightboxObj.config.resizeBoxHeight;
554
555        // height 값이 최소값보다 작을 경우
556        if(calHeight < minHeight) {
557            calTop    = calTop + (calHeight - minHeight);
558            calHeight = minHeight;
559
560        // height 값이 최대값보다 클 경우
561        } else if(calHeight > maxHeight) {
562            calTop    = calTop + (calHeight - maxHeight);
563            calHeight = maxHeight;
564        }
565
566        // top 값이 최소값보다 작을 경우
567        if(calTop < minTop) {
568            calHeight = calHeight + (calTop - minTop);
569            calTop    = minTop;
570        
571        // top + height 값이 최대값보다 클 경우
572        } else if(calTop + calHeight > maxTop) {
573            var rHeight = maxTop - (calTop + calHeight);
574            calTop    = calTop    + rHeight;
575            calHeight = calHeight + rHeight;
576        }
577
578        // top값에 의해 height값이 변할 수 있으므로, 다시 한번 체크한다.
579        // height 값이 최소값보다 작을 경우
580        if(calHeight < minHeight) {
581            calTop    = calTop + (calHeight - minHeight);
582            calHeight = minHeight;
583
584        // height 값이 최대값보다 클 경우
585        } else if(calHeight > maxHeight) {
586            calTop    = calTop + (calHeight - maxHeight);
587            calHeight = maxHeight;
588        }
589        boxFrameObj.style.height = calHeight;
590    }
591
592    // left
593    if(changeLeft != 0) {
594        boxFrameObj.style.left = calLeft;
595    }
596
597    // top
598    if(changeTop != 0) {
599        boxFrameObj.style.top = calTop;
600    }
601
602    winLightboxObj.resizeResizeDiv  ();
603    winLightboxObj.positionResizeDiv();
604
605    var win = rootWindow;
606    while(true) {
607        if(win == null) {
608            break;
609        }
610        win.document.onselectstart = null;
611        win.document.onmouseup = null;
612
613        // Release 화면과 같이 iframe을 쓰는 경우
614        var iframeObjs = win.document.getElementsByTagName("iframe");
615        var iframeCnt  = iframeObjs.length;
616        for(var i=0; i<iframeCnt; i++) {
617            if(iframeObjs[i].id.indexOf("table_") == 0) {
618                var iframeWin = win.frames[iframeObjs[i].id];
619                iframeWin.document.onselectstart = null;
620                iframeWin.document.onmouseup     = null;
621            }
622        }
623        win = win.frames["lightbox_iframe_box"];
624    }
625}
626
627
628
629////////////////////////////////////////////////////////////////
630//            Move (동작하지 않음, 다음에..)                  //
631////////////////////////////////////////////////////////////////
632
633/** lightbox 이동 mousedown event */
634function lightboxMoveMouseDown() {
635    var rootWindow      = getRootWindow();
636    var rootLightboxObj = rootWindow._lightboxObj;
637
638    rootLightboxObj.mousedownX  = window.event.screenX;
639    rootLightboxObj.mousedownY  = window.event.screenY;
640
641    document.onselectstart = function() { return false; };
642    document.onmousemove   = lightboxMoveMouseMove;
643    document.onmouseup     = lightboxMoveMouseUp;
644}
645
646/** lightbox 이동 mousemove event */
647function lightboxMoveMouseMove() {
648    var rootWindow      = getRootWindow();
649    var rootLightboxObj = rootWindow._lightboxObj;
650
651    var mouseupX = window.event.screenX;
652    var mouseupY = window.event.screenY;
653
654    var diffX = mouseupX - rootLightboxObj.mousedownX;
655    var diffY = mouseupY - rootLightboxObj.mousedownY;
656
657    rootLightboxObj.mousedownX  = mouseupX;
658    rootLightboxObj.mousedownY  = mouseupY;
659
660    var boxFrameObj  = parent._lightboxObj.boxFrame
661    var boxFrameRect = getBounds(boxFrameObj);
662    boxFrameObj.style.left = boxFrameRect.left + diffX;
663    boxFrameObj.style.top  = boxFrameRect.top  + diffY;
664}
665
666/** lightbox 이동 mouseup event */
667function lightboxMoveMouseUp() {
668    document.onselectstart = null;
669    document.onmousemove = null;
670    document.onmouseup = null;
671}
672
673
674

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.