PageSourceSearch

https://neptun.or-zse.hu/oktato/ScriptResource.axd?d=-REpsHUeZ4reH…me8PgA8p1wCSGHsiQ5FFrxVdn5sfTAY1&t=409622c0

js or-zse.hu collected 2026-10-01 12:19:02 UTC 11,169 bytes, 250 lines download raw bytes

1// (c) Copyright Microsoft Corporation.
2// This source is subject to the Microsoft Public License.
3// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
4// All other rights reserved.
5
6
7/// <reference name="MicrosoftAjax.debug.js" />
8/// <reference name="MicrosoftAjaxTimer.debug.js" />
9/// <reference name="MicrosoftAjaxWebForms.debug.js" />
10/// <reference path="../ExtenderBase/BaseScripts.js" />
11/// <reference path="../Common/Common.js" />
12/// <reference path="../Compat/Timer/Timer.js" />
13/// <reference path="../Animation/Animations.js" />
14/// <reference path="../Animation/AnimationBehavior.js" />
15/// <reference path="../PopupExtender/PopupBehavior.js" />
16
17
18Type.registerNamespace('SDA.Neptun.WebControls');
19
20SDA.Neptun.WebControls.ValidatorCalloutBehavior = function (element) {
21    SDA.Neptun.WebControls.ValidatorCalloutBehavior.initializeBase(this, [element]);
22    // FIX: CalloutPosition
23    this._calloutPosition = SDA.Neptun.WebControls.CalloutPosition.Right;
24    this._calloutPositionOffset = 0;
25    // FIX - END: CalloutPosition
26}
27SDA.Neptun.WebControls.ValidatorCalloutBehavior.prototype = {
28    // FIX: CalloutPosition
29    get_calloutPosition: function () {
30        /// <value type="AjaxControlToolkit.CalloutPosition">Callout Position.</value>
31        return this._calloutPosition;
32    },
33    set_calloutPosition: function (mode) {
34        this._calloutPosition = mode;
35        this.raisePropertyChanged('calloutPosition');
36    },
37    get_calloutPositionOffset: function () {
38        return this._calloutPositionOffset;
39    },
40    set_calloutPositionOffset: function (value) {
41        this._calloutPositionOffset = value;
42        this.raisePropertyChanged('calloutPositionOffset');
43    },
44    // FIX - END: CalloutPosition
45    initialize: function () {
46        SDA.Neptun.WebControls.ValidatorCalloutBehavior.callBaseMethod(this, 'initialize');
47    },
48    _ensureCallout: function () {
49        if (!this._isBuilt) {
50
51            var elt = this.get_element();
52            //
53            // create the DOM elements
54            //
55            var elementToValidate = this._elementToValidate = $get(elt.controltovalidate);
56            var popupTableBody = document.createElement("tbody");
57            var popupTableRow = document.createElement("tr");
58            var calloutCell = document.createElement("td");
59            var calloutTable = document.createElement("table");
60            var calloutTableBody = document.createElement("tbody");
61            var calloutTableRow = document.createElement("tr");
62            var iconCell = document.createElement("td");
63            var closeCell = document.createElement("td");
64            var closeCellInnerDiv = this._closeCellInnerDiv = document.createElement("div");
65            var popupTable = this._popupTable = document.createElement("table");
66            var calloutArrowCell = this._calloutArrowCell = document.createElement("td");
67            var warningIconImage = this._warningIconImage = document.createElement("img");
68            var closeImage = this._closeImage = document.createElement("img");
69            var errorMessageCell = this._errorMessageCell = document.createElement("td");
70            //
71            // popupTable
72            //
73            popupTable.id = this.get_id() + "_popupTable";
74            popupTable.cellPadding = 0;
75            popupTable.cellSpacing = 0;
76            popupTable.border = 0;
77            popupTable.width = this.get_width();
78            popupTable.className = this._cssClass + " ajax__validatorcallout_popup_table";
79            //
80            // popupTableRow
81            //
82            popupTableRow.className = "ajax__validatorcallout_popup_table_row";
83            //
84            // calloutCell
85            //
86            calloutCell.className = "ajax__validatorcallout_callout_cell";
87            //
88            // calloutTable
89            //
90            calloutTable.cellPadding = 0;
91            calloutTable.cellSpacing = 0;
92            calloutTable.border = 0;
93            calloutTable.className = "ajax__validatorcallout_callout_table";
94            //
95            // calloutTableRow
96            //
97            calloutTableRow.className = "ajax__validatorcallout_callout_table_row";
98            //
99            // calloutArrowCell
100            //
101            // FIX: CalloutPosition
102            switch (this._calloutPosition) {
103                case SDA.Neptun.WebControls.CalloutPosition.Right:
104                    calloutArrowCell.className = "ajax__validatorcallout_callout_arrow_cell";
105                    break;
106                case SDA.Neptun.WebControls.CalloutPosition.Left:
107                    calloutArrowCell.className = "ajax__validatorcallout_callout_arrow_cell__left";
108                    break;
109            }
110            // FIX - END: CalloutPosition
111            //
112            // iconCell
113            //
114            iconCell.className = "ajax__validatorcallout_icon_cell";
115            //
116            // _warningIconImage
117            //
118            warningIconImage.border = 0;
119            warningIconImage.src = this.get_warningIconImageUrl();
120            warningIconImage.alt = "";
121
122            //
123            // _errorMessageCell
124            //
125            errorMessageCell.className = "ajax__validatorcallout_error_message_cell";
126            errorMessageCell.innerHTML = this._getErrorMessage();
127            //
128            // closeCell
129            //
130            closeCell.className = "ajax__validatorcallout_close_button_cell";
131            //
132            // closeImage
133            //
134            closeCellInnerDiv.className = "ajax__validatorcallout_innerdiv";
135            closeImage.src = this.get_closeImageUrl();
136            closeImage.alt = "";
137
138            //
139            // Create the DOM tree
140            //
141            elt.parentNode.appendChild(popupTable)
142            popupTable.appendChild(popupTableBody);
143            popupTableBody.appendChild(popupTableRow);
144
145            // FIX: CalloutPosition
146            if (this._calloutPosition == SDA.Neptun.WebControls.CalloutPosition.Right) {
147                popupTableRow.appendChild(calloutCell);
148                calloutCell.appendChild(calloutTable);
149                calloutTable.appendChild(calloutTableBody);
150                calloutTableBody.appendChild(calloutTableRow);
151                calloutTableRow.appendChild(calloutArrowCell);
152            }
153            // FIX - END: CalloutPosition
154
155            popupTableRow.appendChild(iconCell);
156            iconCell.appendChild(warningIconImage);
157            popupTableRow.appendChild(errorMessageCell);
158            popupTableRow.appendChild(closeCell);
159            closeCellInnerDiv.appendChild(closeImage);
160            closeCell.appendChild(closeCellInnerDiv);
161
162            // FIX: CalloutPosition
163            if (this._calloutPosition == SDA.Neptun.WebControls.CalloutPosition.Left) {
164                popupTableRow.appendChild(calloutCell);
165                calloutCell.appendChild(calloutTable);
166                calloutTable.appendChild(calloutTableBody);
167                calloutTableBody.appendChild(calloutTableRow);
168                calloutTableRow.appendChild(calloutArrowCell);
169            }
170            // FIX - END: CalloutPosition
171
172            //
173            // initialize callout arrow
174            //
175            var div = document.createElement("div");
176
177            // FIX: CalloutPosition
178            switch (this._calloutPosition) {
179                case SDA.Neptun.WebControls.CalloutPosition.Right:
180                    div.className = "ajax__validatorcallout_innerdiv";
181                    break;
182                case SDA.Neptun.WebControls.CalloutPosition.Left:
183                    div.className = "ajax__validatorcallout_innerdiv__left";
184                    break;
185            }
186            // FIX - END: CalloutPosition
187            calloutArrowCell.appendChild(div);
188            for (var i = 14; i > 0; i--) {
189                var line = document.createElement("div");
190                line.style.width = i.toString() + "px";
191                div.appendChild(line);
192            }
193            //
194            // initialize behaviors
195            //
196            this._popupBehavior = $create(
197                Sys.Extended.UI.PopupBehavior,
198                {
199                    positioningMode: Sys.Extended.UI.PositioningMode.Absolute,
200                    parentElement: elementToValidate
201                },
202                {},
203                null,
204                this._popupTable);
205
206            // Create the animations (if they were set before initialize was called)
207            if (this._onShowJson) {
208                this._popupBehavior.set_onShow(this._onShowJson);
209            }
210            if (this._onHideJson) {
211                this._popupBehavior.set_onHide(this._onHideJson);
212            }
213
214            $addHandler(this._closeCellInnerDiv, "click", this._closeClickHandler);
215            this._isBuilt = true;
216        }
217    },
218    show: function (force) {
219        if (force || !this.get_isOpen()) {
220            if (force && Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout) {
221                Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout.hide();
222            }
223            if (Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout != null) {
224                return;
225            }
226            Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout = this;
227            // FIX: CalloutPosition
228            switch (this._calloutPosition) {
229                case SDA.Neptun.WebControls.CalloutPosition.Right:
230                    this._popupBehavior.set_x($common.getSize(this._elementToValidate).width + this._calloutPositionOffset);
231                    break;
232                case SDA.Neptun.WebControls.CalloutPosition.Left:
233                    //this._popupBehavior.set_x((parseFloat(this._width) + $common.getSize(this._elementToValidate).width + this._calloutPositionOffset) * -1);
234                    //this._popupBehavior.set_x((this._elementToValidate.getBoundingClientRect().left - (parseFloat(this._width)) + this._calloutPositionOffset)*-1);
235                    this._popupBehavior.set_x(((parseFloat(this._width)) - this._calloutPositionOffset) * -1);
236                    break;
237            }
238            // FIX - END: CalloutPosition
239            this._errorMessageCell.innerHTML = this._getErrorMessage();			
240            this._popupBehavior.show();
241
242            // modalon megjelenitve hatterbe kerul, ezert at kell helyezni a modal ele
243            if (modallevel && modallevel > 0) {
244                $('.ajax__validatorcallout_').first().appendTo($('div.dialog_modal' + modallevel + modallevel));//$('.ajax__validatorcallout_').parent()
245                $('.ajax__validatorcallout_').first()[0]._behaviors[0].set_y(-1);
246            }
247        }
248    }
249}
250SDA.Neptun.WebControls.ValidatorCalloutBehavior.registerClass('SDA.Neptun.WebControls.ValidatorCalloutBehavior', Sys.Extended.UI.ValidatorCalloutBehavior);

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.