PageSourceSearch

https://kbrainc.com/weven_service/asset/js/bm2/com/toolset/ToolTab.js

js kbrainc.com collected 2026-10-04 11:43:30 UTC 2,042 bytes, 68 lines download raw bytes

1/**
2 * created by WEVEN on 2020-03-02
3 * 아래의 소스는 WEVEN에 저작권이 있으므로 무단 사용 및 재 배포를 금합니다.
4 */
5var ToolTab = function() {
6    this.targetLine = null;
7
8    this.onBtnClick = function(e) {
9    }
10}
11
12bm.extend(ToolBase , ToolTab);
13
14ToolTab.prototype.onChangeTarget = function(target) {
15    if(!target || $(target).closest('[data-wv-tab]').length != 1) {
16        return;
17    }
18    const _this = this;
19    var i, btn;
20    var len = _this.toolBtnList.length;
21    for(i = 0; i < len; i++) {
22        btn = _this.toolBtnList[i];
23        btn.changeTarget(target);
24    }
25
26    if (_this.element && !wvAdminIFrameBridge.iframeWindow.document.querySelector(`[data-wv-toolset="${_this.element.getAttribute('data-wv-toolset')}"]`)) {
27        wvAdminIFrameBridge.iframeWindow.document.body.prepend(_this.element);
28        _this.deactive();
29        _this.active();
30    }
31
32    _this.show();
33    _this.reposition();
34}
35
36ToolTab.prototype.reposition = function () {
37    var tabTarget = null;
38    if( this.targetElement ){
39
40        if($(this.targetElement).closest('[data-wv-tab]').length) tabTarget = this.targetElement;
41        else return;
42
43        var top = $(tabTarget).offset().top - this.element.offsetHeight - 10;
44        var left = $(tabTarget).offset().left;
45        var scrollTop = $(this.innerWindow.document).scrollTop();
46
47        if( top < 0 || top < scrollTop ) {
48            top = $(tabTarget).offset().top + tabTarget.offsetHeight + 10;
49        }
50
51        // 화면을 벗어나는 경우
52        if(window["wvAdminIFrameBridge"] && $(this.innerWindow.document.body).width() - $(this.element)[0].offsetWidth < left){
53            left = $(tabTarget).offset().left + tabTarget.offsetWidth - $(this.element)[0].offsetWidth;
54        }
55
56        if(left < 0) left = 0;
57
58        $(this.element).css( { "top" : top , "left" : left });
59
60    }
61}
62
63ToolTab.prototype.addEvent = function() {
64}
65
66ToolTab.prototype.removeEvent = function() {
67}
68

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.