PageSourceSearch

https://spac.gov.jo/ScriptResource.axd?d=q1K-66DjbeGDfNwjLlzy5R-hQ…5COd6zMhaT9Y497EVo5py2TsZ8sKx9P0&t=5e95cc64

js spac.gov.jo collected 2026-10-08 07:25:12 UTC 17,823 bytes, 417 lines download raw bytes

1// Name:        BaseScripts.debug.js
2// Assembly:    AjaxControlToolkit
3// Version:     18.1.0.0
4// FileVersion: 18.1.0.0
5Type.registerNamespace('Sys.Extended.UI');
6
7Sys.Extended.UI.BehaviorBase = function(element) {
8    // Base behavior for all extender behaviors
9    // "element" - element the behavior is associated with
10    Sys.Extended.UI.BehaviorBase.initializeBase(this,[element]);
11    
12    this._clientStateFieldID = null;
13    this._pageRequestManager = null;
14    this._partialUpdateBeginRequestHandler = null;
15    this._partialUpdateEndRequestHandler = null;
16}
17Sys.Extended.UI.BehaviorBase.prototype = {
18    initialize : function() {
19        Sys.Extended.UI.BehaviorBase.callBaseMethod(this, 'initialize');
20    },
21
22    dispose : function() {
23        Sys.Extended.UI.BehaviorBase.callBaseMethod(this, 'dispose');
24
25        if (this._pageRequestManager) {
26            if (this._partialUpdateBeginRequestHandler) {
27                this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler);
28                this._partialUpdateBeginRequestHandler = null;
29            }
30            if (this._partialUpdateEndRequestHandler) {
31                this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler);
32                this._partialUpdateEndRequestHandler = null;
33            }
34            this._pageRequestManager = null;
35        }
36    },
37
38    get_ClientStateFieldID : function() {
39        // ID of the hidden field used to store client state
40        return this._clientStateFieldID;
41    },
42    set_ClientStateFieldID : function(value) {
43        if (this._clientStateFieldID != value) {
44            this._clientStateFieldID = value;
45            this.raisePropertyChanged('ClientStateFieldID');
46        }
47    },
48
49    get_ClientState : function() {
50        if (this._clientStateFieldID) {
51            var input = document.getElementById(this._clientStateFieldID);
52            if (input) {
53                return input.value;
54            }
55        }
56        return null;
57    },
58    set_ClientState : function(value) {
59        if (this._clientStateFieldID) {
60            var input = document.getElementById(this._clientStateFieldID);
61            if (input) {
62                input.value = value;
63            }
64        }
65    },
66
67    registerPartialUpdateEvents : function() {
68        // Register for beginRequest and endRequest events on the PageRequestManager,
69        // (which cause _partialUpdateBeginRequest and _partialUpdateEndRequest to be
70        // called when an UpdatePanel refreshes)
71
72        if (Sys && Sys.WebForms && Sys.WebForms.PageRequestManager){
73            this._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
74            if (this._pageRequestManager) {
75                this._partialUpdateBeginRequestHandler = Function.createDelegate(this, this._partialUpdateBeginRequest);
76                this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler);
77                this._partialUpdateEndRequestHandler = Function.createDelegate(this, this._partialUpdateEndRequest);
78                this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler);
79            }
80        }
81    },
82
83    _partialUpdateBeginRequest : function(sender, beginRequestEventArgs) {
84        // Method that will be called when a partial update (via an UpdatePanel) begins,
85        // if registerPartialUpdateEvents() has been called.
86        // "sender" - sender
87        // "beginRequestEventArgs" - event arguments
88    },
89    
90    _partialUpdateEndRequest : function(sender, endRequestEventArgs) {
91        // Method that will be called when a partial update (via an UpdatePanel) finishes,
92        // if registerPartialUpdateEvents() has been called.
93        // "sender" - sender
94        // "endRequestEventArgs" - event arguments
95    }
96}
97Sys.Extended.UI.BehaviorBase.registerClass('Sys.Extended.UI.BehaviorBase', Sys.UI.Behavior);
98
99
100Sys.Extended.UI.DynamicPopulateBehaviorBase = function(element) {
101    /// DynamicPopulateBehaviorBase is used to add DynamicPopulateBehavior funcitonality
102    /// to other extenders.  It will dynamically populate the contents of the target element
103    /// when its populate method is called.
104    /// "element" - DOM Element the behavior is associated with
105    Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(this, [element]);
106    
107    this._DynamicControlID = null;
108    this._DynamicContextKey = null;
109    this._DynamicServicePath = null;
110    this._DynamicServiceMethod = null;
111    this._cacheDynamicResults = false;
112    this._dynamicPopulateBehavior = null;
113    this._populatingHandler = null;
114    this._populatedHandler = null;
115}
116Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype = {
117    initialize : function() {
118        Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this, 'initialize');
119
120        this._populatingHandler = Function.createDelegate(this, this._onPopulating);
121        this._populatedHandler = Function.createDelegate(this, this._onPopulated);
122    },
123
124    dispose : function() {
125        if (this._populatedHandler) {
126            if (this._dynamicPopulateBehavior) {
127                this._dynamicPopulateBehavior.remove_populated(this._populatedHandler);
128            }
129            this._populatedHandler = null;
130        }
131        if (this._populatingHandler) {
132            if (this._dynamicPopulateBehavior) {
133                this._dynamicPopulateBehavior.remove_populating(this._populatingHandler);
134            }
135            this._populatingHandler = null;
136        }
137
138        if (this._dynamicPopulateBehavior) {
139            this._dynamicPopulateBehavior.dispose();
140            this._dynamicPopulateBehavior = null;
141        }
142        Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this, 'dispose');
143    },
144
145    populate : function(contextKeyOverride) {
146        // Demand-create the DynamicPopulateBehavior and use it to populate the target element
147        // "contextKeyOverride"  - an arbitrary string value to be passed to the web method.
148        // For example, if the element to be populated is within a data-bound repeater, this could be the ID of the current row.
149
150        if (this._dynamicPopulateBehavior && (this._dynamicPopulateBehavior.get_element() != $get(this._DynamicControlID))) {
151            this._dynamicPopulateBehavior.dispose();
152            this._dynamicPopulateBehavior = null;
153        }
154        
155        if (!this._dynamicPopulateBehavior && this._DynamicControlID && this._DynamicServiceMethod) {
156            this._dynamicPopulateBehavior = $create(Sys.Extended.UI.DynamicPopulateBehavior,
157                {
158                    "id" : this.get_id() + "_DynamicPopulateBehavior",
159                    "ContextKey" : this._DynamicContextKey,
160                    "ServicePath" : this._DynamicServicePath,
161                    "ServiceMethod" : this._DynamicServiceMethod,
162                    "cacheDynamicResults" : this._cacheDynamicResults
163                }, null, null, $get(this._DynamicControlID));
164
165            this._dynamicPopulateBehavior.add_populating(this._populatingHandler);
166            this._dynamicPopulateBehavior.add_populated(this._populatedHandler);
167        }
168        
169        if (this._dynamicPopulateBehavior) {
170            this._dynamicPopulateBehavior.populate(contextKeyOverride ? contextKeyOverride : this._DynamicContextKey);
171        }
172    },
173
174    _onPopulating : function(sender, eventArgs) {
175        // Handler for DynamicPopulate behavior's Populating event
176        // "sender" - DynamicPopulate behavior
177        // "eventArgs" - event args
178        this.raisePopulating(eventArgs);
179    },
180
181    _onPopulated : function(sender, eventArgs) {
182        // Handler for DynamicPopulate behavior's Populated event
183        // "sender" - DynamicPopulate behavior
184        // "eventArgs" - event args
185        this.raisePopulated(eventArgs);
186    },
187
188    get_dynamicControlID : function() {
189        // ID of the element to populate with dynamic content
190        return this._DynamicControlID;
191    },
192    get_DynamicControlID : this.get_dynamicControlID,
193    set_dynamicControlID : function(value) {
194        if (this._DynamicControlID != value) {
195            this._DynamicControlID = value;
196            this.raisePropertyChanged('dynamicControlID');
197            this.raisePropertyChanged('DynamicControlID');
198        }
199    },
200    set_DynamicControlID : this.set_dynamicControlID,
201
202    get_dynamicContextKey : function() {
203        // An arbitrary string value to be passed to the web method.
204        // For example, if the element to be populated is within a
205        // data-bound repeater, this could be the ID of the current row.
206        return this._DynamicContextKey;
207    },
208    get_DynamicContextKey : this.get_dynamicContextKey,
209    set_dynamicContextKey : function(value) {
210        if (this._DynamicContextKey != value) {
211            this._DynamicContextKey = value;
212            this.raisePropertyChanged('dynamicContextKey');
213            this.raisePropertyChanged('DynamicContextKey');
214        }
215    },
216    set_DynamicContextKey : this.set_dynamicContextKey,
217
218    get_dynamicServicePath : function() {
219        // The URL of the web service to call.  If the ServicePath is not defined, then we will invoke a PageMethod instead of a web service.
220        return this._DynamicServicePath;
221    },
222    get_DynamicServicePath : this.get_dynamicServicePath,
223    set_dynamicServicePath : function(value) {
224        if (this._DynamicServicePath != value) {
225            this._DynamicServicePath = value;
226            this.raisePropertyChanged('dynamicServicePath');
227            this.raisePropertyChanged('DynamicServicePath');
228        }
229    },
230    set_DynamicServicePath : this.set_dynamicServicePath,
231
232    get_dynamicServiceMethod : function() {
233        // The name of the method to call on the page or web service
234        // The signature of the method must exactly match the following:
235        //     [WebMethod]
236        //     string DynamicPopulateMethod(string contextKey)
237        //     {
238        //         ...
239        //     }
240        return this._DynamicServiceMethod;
241    },
242    get_DynamicServiceMethod : this.get_dynamicServiceMethod,
243    set_dynamicServiceMethod : function(value) {
244        if (this._DynamicServiceMethod != value) {
245            this._DynamicServiceMethod = value;
246            this.raisePropertyChanged('dynamicServiceMethod');
247            this.raisePropertyChanged('DynamicServiceMethod');
248        }
249    },
250    set_DynamicServiceMethod : this.set_dynamicServiceMethod,
251    
252    get_cacheDynamicResults : function() {
253        // Whether the results of the dynamic population should be cached and
254        // not fetched again after the first load
255        return this._cacheDynamicResults;
256    },
257    set_cacheDynamicResults : function(value) {
258        if (this._cacheDynamicResults != value) {
259            this._cacheDynamicResults = value;
260            this.raisePropertyChanged('cacheDynamicResults');
261        }
262    },
263    
264    add_populated : function(handler) {
265        // Add a handler on the populated event
266        // "handler" - handler
267        this.get_events().addHandler("populated", handler);
268    },
269    remove_populated : function(handler) {
270        // Remove a handler from the populated event
271        // "handler" - handler
272        this.get_events().removeHandler("populated", handler);
273    },
274    raisePopulated : function(arg) {
275        // Raise the populated event
276        // "arg" - event arguments
277        var handler = this.get_events().getHandler("populated");  
278        if (handler) handler(this, arg);
279    },
280    
281    add_populating : function(handler) {
282        // Add an event handler for the populating event
283        // "handler" - event handler
284        this.get_events().addHandler('populating', handler);
285    },
286    remove_populating : function(handler) {
287        // Remove an event handler from the populating event
288        // "handler" - event handler
289        this.get_events().removeHandler('populating', handler);
290    },
291    raisePopulating : function(eventArgs) {
292        // Raise the populating event
293        // "eventArgs" - event arguments for the populating event
294        
295        var handler = this.get_events().getHandler('populating');
296        if (handler) {
297            handler(this, eventArgs);
298        }
299    }
300}
301Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass('Sys.Extended.UI.DynamicPopulateBehaviorBase', Sys.Extended.UI.BehaviorBase);
302
303
304Sys.Extended.UI.ControlBase = function(element) {
305    Sys.Extended.UI.ControlBase.initializeBase(this, [element]);
306    this._clientStateField = null;
307    this._callbackTarget = null;
308    this._onsubmit$delegate = Function.createDelegate(this, this._onsubmit);
309    this._oncomplete$delegate = Function.createDelegate(this, this._oncomplete);
310    this._onerror$delegate = Function.createDelegate(this, this._onerror);
311}
312
313Sys.Extended.UI.ControlBase.__doPostBack = function(eventTarget, eventArgument) {
314    if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
315        for (var i = 0; i < Sys.Extended.UI.ControlBase.onsubmitCollection.length; i++) {
316            Sys.Extended.UI.ControlBase.onsubmitCollection[i]();
317        }
318    }
319    Function.createDelegate(window, Sys.Extended.UI.ControlBase.__doPostBackSaved)(eventTarget, eventArgument);
320}
321
322Sys.Extended.UI.ControlBase.prototype = {
323    initialize: function() {
324        Sys.Extended.UI.ControlBase.callBaseMethod(this, "initialize");
325        if (this._clientStateField) {
326            this.loadClientState(this._clientStateField.value);
327        }
328        if (typeof (Sys.WebForms) !== "undefined" && typeof (Sys.WebForms.PageRequestManager) !== "undefined") {
329            Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, this._onsubmit$delegate);
330            if (Sys.Extended.UI.ControlBase.__doPostBackSaved == null || typeof Sys.Extended.UI.ControlBase.__doPostBackSaved == "undefined") {
331                Sys.Extended.UI.ControlBase.__doPostBackSaved = window.__doPostBack;
332                window.__doPostBack = Sys.Extended.UI.ControlBase.__doPostBack;
333                Sys.Extended.UI.ControlBase.onsubmitCollection = new Array();
334            }
335            Array.add(Sys.Extended.UI.ControlBase.onsubmitCollection, this._onsubmit$delegate);
336        } else {
337            $addHandler(document.forms[0], "submit", this._onsubmit$delegate);
338        }
339    },
340    dispose: function() {
341        if (typeof (Sys.WebForms) !== "undefined" && typeof (Sys.WebForms.PageRequestManager) !== "undefined") {
342            Array.remove(Sys.Extended.UI.ControlBase.onsubmitCollection, this._onsubmit$delegate);
343            Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, this._onsubmit$delegate);
344        } else {
345            $removeHandler(document.forms[0], "submit", this._onsubmit$delegate);
346        }
347        Sys.Extended.UI.ControlBase.callBaseMethod(this, "dispose");
348    },
349
350    findElement: function(id) {
351        return $get(this.get_id() + '_' + id.split(':').join('_'));
352    },
353    get_clientStateField: function() {
354        return this._clientStateField;
355    },
356    set_clientStateField: function(value) {
357        if (this.get_isInitialized()) throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_CannotSetClientStateField);
358        if (this._clientStateField != value) {
359            this._clientStateField = value;
360            this.raisePropertyChanged('clientStateField');
361        }
362    },
363    loadClientState: function(value) {
364        // override this method to intercept client state loading after a callback
365    },
366    saveClientState: function() {
367        // override this method to intercept client state acquisition before a callback
368        return null;
369    },
370    _invoke: function(name, args, cb) {
371        // invokes a callback method on the server control
372        if (!this._callbackTarget) {
373            throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_ControlNotRegisteredForCallbacks);
374        }
375        if (typeof (WebForm_DoCallback) === "undefined") {
376            throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_PageNotRegisteredForCallbacks);
377        }
378        var ar = [];
379        for (var i = 0; i < args.length; i++)
380            ar[i] = args[i];
381        var clientState = this.saveClientState();
382        if (clientState != null && !String.isInstanceOfType(clientState)) {
383            throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_InvalidClientStateType);
384        }
385        var payload = Sys.Serialization.JavaScriptSerializer.serialize({ name: name, args: ar, state: this.saveClientState() });
386        WebForm_DoCallback(this._callbackTarget, payload, this._oncomplete$delegate, cb, this._onerror$delegate, true);
387    },
388    _oncomplete: function(result, context) {
389        result = Sys.Serialization.JavaScriptSerializer.deserialize(result);
390        if (result.error) {
391            throw Error.create(result.error);
392        }
393        this.loadClientState(result.state);
394        context(result.result);
395    },
396    _onerror: function(message, context) {
397        throw Error.create(message);
398    },
399    _onsubmit: function() {
400        if (this._clientStateField) {
401            this._clientStateField.value = this.saveClientState();
402        }
403        return true;
404    }
405
406}
407Sys.Extended.UI.ControlBase.registerClass("Sys.Extended.UI.ControlBase", Sys.UI.Control);
408
409var isUnminified = /param/.test(function(param) { });
410
411Sys.Extended.Deprecated = function(oldMethodName, properMethodName) {
412    if(isUnminified && window.console && console.warn)
413        if(arguments.length == 1)
414            console.warn(oldMethodName + " is deprecated.");
415        else
416            console.warn(oldMethodName + " is deprecated. Use " + properMethodName + " instead.");
417}

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.