PageSourceSearch

https://www.ohca.org/DXR.axd?r=1_12-zrGPs

js ohca.org collected 2026-10-02 09:56:53 UTC 90,611 bytes, 2,437 lines download raw bytes

1(function module(ASPx) {
2ASPx.modules.Controls = module;
3var ASPxClientBeginCallbackEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
4 constructor: function(command){
5  this.constructor.prototype.constructor.call(this);
6  this.command = command;
7 }
8});
9var ASPxClientGlobalBeginCallbackEventArgs = ASPx.CreateClass(ASPxClientBeginCallbackEventArgs, {
10 constructor: function(control, command){
11  this.constructor.prototype.constructor.call(this, command);
12  this.control = control;
13 }
14});
15var ASPxClientEndCallbackEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
16 constructor: function(command){
17  this.constructor.prototype.constructor.call(this);
18  this.command = command;
19 }
20});
21var ASPxClientGlobalEndCallbackEventArgs = ASPx.CreateClass(ASPxClientEndCallbackEventArgs, {
22 constructor: function(control){
23  this.constructor.prototype.constructor.call(this);
24  this.control = control;
25 }
26});
27var ASPxClientCustomDataCallbackEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
28 constructor: function(result) {
29  this.constructor.prototype.constructor.call(this);
30  this.result = result;
31 }
32});
33var ASPxClientCallbackErrorEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
34 constructor: function (message, callbackId) {
35  this.constructor.prototype.constructor.call(this);
36  this.message = message;
37  this.handled = false;
38  this.callbackId = callbackId;
39 }
40});
41var ASPxClientGlobalCallbackErrorEventArgs = ASPx.CreateClass(ASPxClientCallbackErrorEventArgs, {
42 constructor: function (control, message, callbackId) {
43  this.constructor.prototype.constructor.call(this, message, callbackId);
44  this.control = control;
45 }
46});
47var ASPxClientValidationCompletedEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
48 constructor: function (container, validationGroup, invisibleControlsValidated, isValid, firstInvalidControl, firstVisibleInvalidControl) {
49  this.constructor.prototype.constructor.call(this);
50  this.container = container;
51  this.validationGroup = validationGroup;
52  this.invisibleControlsValidated = invisibleControlsValidated;
53  this.isValid = isValid;
54  this.firstInvalidControl = firstInvalidControl;
55  this.firstVisibleInvalidControl = firstVisibleInvalidControl;
56 }
57});
58var ASPxClientControlsInitializedEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
59 constructor: function(isCallback) {
60  this.isCallback = isCallback;
61 }
62});
63var ASPxClientControlBeforePronounceEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
64 constructor: function(messageParts, control){
65  this.constructor.prototype.constructor.call(this);
66  this.messageParts = messageParts;
67  this.control = control;
68 }
69});
70var ASPxClientControlUnloadEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
71 constructor: function(control){
72  this.constructor.prototype.constructor.call(this);
73  this.control = control;
74 }
75});
76var ASPxClientEndFocusEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
77 constructor: function(item) {
78  this.constructor.prototype.constructor.call(this);
79  this.item = item;
80 }
81});
82var ASPxClientItemFocusedEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
83 constructor: function(item) {
84  this.constructor.prototype.constructor.call(this);
85  this.item = item;
86 }
87});
88var BeforeInitCallbackEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
89 constructor: function(callbackOwnerID){
90  this.constructor.prototype.constructor.call(this);
91  this.callbackOwnerID = callbackOwnerID;
92 }
93});
94var ASPxClientBrowserWindowResizedInternalEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
95 constructor: function(eventInfo) {
96  this.constructor.prototype.constructor.call(this);
97  this.htmlEvent = eventInfo.htmlEvent;
98  this.windowClientWidth = eventInfo.wndWidth;
99  this.windowClientHeigth = eventInfo.wndHeight;
100  this.previousWindowClientWidth = eventInfo.prevWndWidth;
101  this.previousWindowClientHeight = eventInfo.prevWndHeight;
102  this.virtualKeyboardShownOnAndroid = eventInfo.virtualKeyboardShownOnAndroid;
103 }
104});
105ASPx.createControl = function(type, name, windowName, properties, events, setupMethod, data){
106 var globalName = windowName && windowName.length > 0 ? windowName : name;
107 var dxo = new type(name);
108 var haveWrapper = ASPx.Platform === "NETCORE" && dxo.createWrapper && !DevExpress.AspNetCore.Internal.BackwardCompatibility.useLegacyClientAPI;
109 if(haveWrapper) {
110  window[globalName] = dxo.createWrapper();
111  dxo.aspNetCoreWrapperInstance = window[globalName];
112 }
113 else
114  dxo.InitGlobalVariable(globalName);
115 if(properties)
116  dxo.SetProperties(properties);
117 if(events)
118  dxo.SetEvents(events);
119 if(setupMethod)
120  setupMethod.call(dxo);
121 if(data)
122  dxo.SetData(data);
123 dxo.AfterCreate();
124};
125var ASPxClientControlBase = ASPx.CreateClass(null, {
126 constructor: function(name){
127  this.name = name;
128  this.uniqueID = name;   
129  this.globalName = name;
130  this.stateObject = null;
131  this.needEncodeState = true;
132  this.encodeHtml = true;
133  this.enabled = true;
134  this.clientEnabled = true;
135  this.savedClientEnabled = true;
136  this.clientVisible = true;
137  this.accessibilityCompliant = false;
138  this.parseJSPropertiesOnCallbackError = false;
139  this.autoPostBack = false;
140  this.allowMultipleCallbacks = true;
141  this.callBack = null;
142  this.enableCallbackAnimation = false;
143  this.enableSlideCallbackAnimation = false;
144  this.slideAnimationDirection = null;
145  this.beginCallbackAnimationProcessing = false;
146  this.endCallbackAnimationProcessing = false;
147  this.savedCallbackResult = null;
148  this.savedCallbacks = null;
149  this.isCallbackAnimationPrevented = false;
150  this.lpDelay = 300;
151  this.lpTimer = -1;
152  this.requestCount = 0;
153  this.enableSwipeGestures = false;
154  this.disableSwipeGestures = false;
155  this.supportGestures = false;
156  this.repeatedGestureValue = 0;
157  this.repeatedGestureCount = 0;
158  this.isInitialized = false;
159  this.initialFocused = false;
160  this.leadingAfterInitCall = ASPxClientControl.LeadingAfterInitCallConsts.None; 
161  this.serverEvents = [];
162  this.loadingPanelElement = null;
163  this.loadingDivElement = null;  
164  this.hasPhantomLoadingElements = false;
165  this.mainElement = null;
166  this.touchUIMouseScroller = null;
167  this.hiddenFields = {};
168  this.scPrefix = "dx";
169  this.callbackHandlersQueue = new ASPx.ControlCallbackHandlersQueue(this);
170  this.callbackCommand = {};
171  this.currentCallbackID = -1;
172  this.InitializeIntersectionObserversManager();
173  this.Init = new ASPxClientEvent();
174  this.BeginCallback = new ASPxClientEvent();
175  this.EndCallback = new ASPxClientEvent();
176  this.EndCallbackAnimationStart = new ASPxClientEvent();
177  this.CallbackError = new ASPxClientEvent();
178  this.CustomDataCallback = new ASPxClientEvent();
179  this.BeforePronounce = new ASPxClientEvent();
180  this.Unload = new ASPxClientEvent();
181  this.Disposed = new ASPxClientEvent(); 
182  aspxGetControlCollection().Add(this);
183 },
184 Initialize: function() {
185  if(this.callBack != null)
186   this.InitializeCallBackData();
187  if (this.useCallbackQueue())
188   this.callbackQueueHelper = new ASPx.ControlCallbackQueueHelper(this);
189  ASPx.AccessibilityUtils.createAccessibleBackgrounds(this);
190  if(this.accessibilityCompliant)
191   ASPx.AccessibilityPronouncer.EnsureInitialize();
192 },
193 FinalizeInitialization: function() { },
194 InlineInitialize: function() {
195  this.savedClientEnabled = this.clientEnabled;
196 },
197 InitializeGestures: function() {
198  if(this.isSwipeGesturesEnabled() && this.supportGestures) {
199   ASPx.GesturesHelper.AddSwipeGestureHandler(this.name, 
200    function() { return this.GetCallbackAnimationElement(); }.aspxBind(this), 
201    function(evt) { return this.CanHandleGestureCore(evt); }.aspxBind(this), 
202    function(value) { return this.AllowStartGesture(value); }.aspxBind(this),
203    function(value) { return this.StartGesture(); }.aspxBind(this),
204    function(value) { return this.AllowExecuteGesture(value); }.aspxBind(this),
205    function(value) { this.ExecuteGesture(value); }.aspxBind(this),
206    function(value) { this.CancelGesture(value); }.aspxBind(this),
207    this.GetDefaultanimationEngineType(),
208    this.rtl
209   );
210   if(ASPx.Browser.MSTouchUI)
211    this.touchUIMouseScroller = ASPx.MouseScroller.Create(
212     function() { return this.GetCallbackAnimationElement(); }.aspxBind(this),
213     function() { return null; },
214     function() { return this.GetCallbackAnimationElement(); }.aspxBind(this),
215     function(element) { return this.NeedPreventTouchUIMouseScrolling(element); }.aspxBind(this),
216     true
217    );
218  }
219 },
220 isSwipeGesturesEnabled: function() {
221  return !this.disableSwipeGestures && (this.enableSwipeGestures || ASPx.Browser.TouchUI);
222 },
223 isSlideCallbackAnimationEnabled: function() {
224  return this.enableSlideCallbackAnimation || this.isSwipeGesturesEnabled(); 
225 },
226 InitGlobalVariable: function(varName){
227  if(!window) return;
228  this.globalName = varName;
229  window[varName] = this;
230 },
231 SetElementDisplay: function(element, value, checkCurrentStyle, makeInline) {
232  ASPx.SetElementDisplay(element, value, checkCurrentStyle, makeInline);
233 },
234 SetProperties: function(properties, obj){
235  if(!obj) obj = this;
236  var isAspNetCoreWrapperInstanceExist = !!obj.aspNetCoreWrapperInstance;
237  for(var name in properties){
238   if(!properties.hasOwnProperty(name)) continue;
239   obj[name] = properties[name];
240   if(isAspNetCoreWrapperInstanceExist && name.indexOf("cp") === 0)
241    obj.aspNetCoreWrapperInstance[name] = properties[name]; 
242  }
243 },
244 SetEvents: function(events, obj){
245  if(!obj) obj = this;
246  for(var name in events){
247   if(events.hasOwnProperty(name) && obj[name] && obj[name].AddHandler)
248    obj[name].AddHandler(events[name]);
249  }
250 },
251 SetData: function(data){
252 },
253 useCallbackQueue: function(){
254  return false;
255 },
256 NeedPreventTouchUIMouseScrolling: function(element) {
257  return false;
258 },
259 InitializeFocus: function() {
260  if(this.initialFocused && this.IsVisible()) {
261   if(ASPxClientUtils.iOSPlatform || ASPxClientUtils.androidPlatform)
262    setTimeout(function() { this.Focus(); }.bind(this), ASPx.FOCUS_TIMEOUT);
263   else
264    this.Focus();
265  }
266 },
267 AfterCreate: function() {
268  this.AddDefaultStateControllerItems();
269  this.InlineInitialize();
270  this.InitializeGestures();
271 },
272 AfterInitialize: function() {
273  this.initializeAriaDescriptor();
274  this.InitializeFocus();
275  this.isInitialized = true;
276  this.RaiseInit();
277  if(this.savedCallbacks) {
278   for(var i = 0; i < this.savedCallbacks.length; i++) 
279    this.CreateCallbackInternal(this.savedCallbacks[i].arg, this.savedCallbacks[i].command, 
280     false, this.savedCallbacks[i].callbackInfo);
281   this.savedCallbacks = null;
282  }
283 },
284 InitializeCallBackData: function() {
285 },
286 AtlasPreInitialize: function() {
287 },
288 AtlasInitialize: function() {
289 },
290 IsDOMDisposed: function() { 
291  return !ASPx.IsExistsElement(this.GetMainElement());
292 },
293 initializeAriaDescriptor: function() {
294  if(this.ariaDescription) {
295   var descriptionObject = ASPx.Json.Eval(this.ariaDescription);
296   if(descriptionObject) {
297    this.ariaDescriptor = new AriaDescriptor(this, descriptionObject);
298    this.applyAccessibilityAttributes(this.ariaDescriptor); 
299   }
300  }
301 },
302 applyAccessibilityAttributes: function() { },
303 setAriaDescription: function(selector, argsList) {
304  if(this.ariaDescriptor)
305   this.ariaDescriptor.setDescription(selector, argsList || [[]]);
306 },
307 allowRestoreFocusOnCallbacks: function(){
308  return this.accessibilityCompliant;
309 },
310 HtmlEncode: function(text) {
311  return this.encodeHtml ? ASPx.Str.EncodeHtml(text) : text;
312 },
313 IsServerEventAssigned: function(eventName){
314  return ASPx.Data.ArrayIndexOf(this.serverEvents, eventName) >= 0;
315 },
316 OnPost: function(args){
317  this.SerializeStateHiddenField();
318 },
319 SerializeStateHiddenField: function() {
320  this.UpdateStateObject();
321  if(this.stateObject != null)
322   this.UpdateStateHiddenField();
323 },
324 OnPostFinalization: function(args){
325 },
326 UpdateStateObject: function(){
327 },
328 UpdateStateObjectWithObject: function(obj){
329  if(!obj) return;
330  if(!this.stateObject)
331   this.stateObject = { };
332  for(var key in obj)
333   if(obj.hasOwnProperty(key))
334    this.stateObject[key] = obj[key];
335 },
336 UpdateStateHiddenField: function() {
337  var stateHiddenField = this.GetStateHiddenField();
338  if(stateHiddenField) {
339   var stateObjectStr = ASPx.Json.ToJson(this.stateObject, !this.needEncodeState);
340   stateHiddenField.value = this.needEncodeState ? ASPx.Str.EncodeHtml(stateObjectStr) : stateObjectStr;
341  }
342 },
343 GetStateHiddenField: function() {
344  return this.GetHiddenField(this.GetStateHiddenFieldName(), this.GetStateHiddenFieldID(), 
345   this.GetStateHiddenFieldParent(), this.GetStateHiddenFieldOrigin());
346 },
347 GetStateHiddenFieldName: function() {
348  return this.uniqueID;
349 },
350 GetStateHiddenFieldID: function() {
351  return this.name + "_State";
352 },
353 GetStateHiddenFieldOrigin: function() {
354  return this.GetMainElement();
355 },
356 GetStateHiddenFieldParent: function() {
357  var element = this.GetStateHiddenFieldOrigin();
358  return element ? element.parentNode : null;
359 },
360 GetHiddenField: function(name, id, parent, beforeElement) {
361  var hiddenField = this.hiddenFields[id];
362  if(!hiddenField || !ASPx.IsValidElement(hiddenField)) {
363   if(parent) {
364    var existingHiddenField = ASPx.GetElementById(this.GetStateHiddenFieldID());
365    this.hiddenFields[id] = hiddenField = existingHiddenField || ASPx.CreateHiddenField(name, id);
366    if(existingHiddenField)
367     return existingHiddenField;
368    if(beforeElement)
369     parent.insertBefore(hiddenField, beforeElement);
370    else
371     parent.appendChild(hiddenField);
372   }
373  }
374  return hiddenField;
375 },
376 GetChildElement: function(idPostfix){
377  var mainElement = this.GetMainElement();
378  if(idPostfix.charAt && idPostfix.charAt(0) !== "_")
379   idPostfix = "_" + idPostfix;
380  return mainElement ? ASPx.CacheHelper.GetCachedChildById(this, mainElement, this.name + idPostfix) : null;
381 },
382 getChildControl: function(idPostfix) {
383  var result = null;
384  var childControlId = this.getChildControlUniqueID(idPostfix);
385  ASPx.GetControlCollection().ProcessControlsInContainer(this.GetMainElement(), function(control) {
386   if(control.uniqueID == childControlId)
387    result = control;
388  });
389  return result;  
390 },
391 getChildControlUniqueID: function(idPostfix) {
392  idPostfix = idPostfix.split("_").join("$");
393  if(idPostfix.charAt && idPostfix.charAt(0) !== "$")
394   idPostfix = "$" + idPostfix;
395  return this.uniqueID + idPostfix;  
396 },
397 getInnerControl: function(idPostfix) {
398  var name = this.name + idPostfix;
399  var result = window[name];
400  return result && Ident.IsASPxClientControl(result)
401   ? result
402   : null;
403 },
404 GetParentForm: function(){
405  return ASPx.GetParentByTagName(this.GetMainElement(), "FORM");
406 },
407 GetMainElement: function(){
408  if(!ASPx.IsExistsElement(this.mainElement))
409   this.mainElement = ASPx.GetElementById(this.GetMainElementId());
410  return this.mainElement;
411 },
412 GetMainElementId: function() {
413  return this.name;
414 },
415 IsLoadingContainerVisible: function(){
416  return this.IsVisible();
417 },
418 GetLoadingPanelElement: function(){
419  return ASPx.GetElementById(this.name + "_LP");
420 },
421 GetClonedLoadingPanel: function(){
422  return document.getElementById(this.GetLoadingPanelElement().id + "V"); 
423 },
424 CloneLoadingPanel: function(element, parent) {
425  var clone = element.cloneNode(true);
426  clone.id = element.id + "V";
427  parent.appendChild(clone);
428  return clone;
429 },
430 CreateLoadingPanelWithoutBordersInsideContainer: function(container) {
431  var loadingPanel = this.CreateLoadingPanelInsideContainer(container, false, true, true);
432  var contentStyle = ASPx.GetCurrentStyle(container);
433  if(!loadingPanel || !contentStyle)
434   return;
435  var elements = [ ];
436  var table = (loadingPanel.tagName == "TABLE") ? loadingPanel : ASPx.GetNodeByTagName(loadingPanel, "TABLE", 0);
437  if(table != null)
438   elements.push(table);
439  else
440   elements.push(loadingPanel);
441  var cells = ASPx.GetNodesByTagName(loadingPanel, "TD");
442  if(!cells) cells = [ ];
443  for(var i = 0; i < cells.length; i++)
444   elements.push(cells[i]);
445  for(var i = 0; i < elements.length; i++) {
446   var el = elements[i];
447   el.style.backgroundColor = contentStyle.backgroundColor;
448   ASPx.RemoveBordersAndShadows(el);
449  }
450 },
451 CreateLoadingPanelInsideContainer: function(parentElement, hideContent, collapseHeight, collapseWidth) {
452  if(this.ShouldHideExistingLoadingElements())
453   this.HideLoadingPanel();
454  if(parentElement == null)
455   return null;
456  if(!this.IsLoadingContainerVisible()) {
457   this.hasPhantomLoadingElements = true;
458   return null;
459  }
460  var element = this.GetLoadingPanelElement();
461  if(element != null){
462   var width = collapseWidth ? 0 : ASPx.GetClearClientWidth(parentElement);
463   var height = collapseHeight ? 0 : ASPx.GetClearClientHeight(parentElement);
464   if(hideContent){
465    for(var i = parentElement.childNodes.length - 1; i > -1; i--){
466     if(parentElement.childNodes[i].style)
467      parentElement.childNodes[i].style.display = "none";
468     else if(parentElement.childNodes[i].nodeType == 3) 
469      parentElement.removeChild(parentElement.childNodes[i]);
470    }
471   }
472   else
473    parentElement.innerHTML = "";
474   var table = document.createElement("TABLE");
475   parentElement.appendChild(table);
476   table.border = 0;
477   table.cellPadding = 0;
478   table.cellSpacing = 0;
479   ASPx.SetStyles(table, {
480    width: (width > 0) ? width : "100%",
481    height: (height > 0) ? height : "100%"
482   });
483   var tbody = document.createElement("TBODY");
484   table.appendChild(tbody);
485   var tr = document.createElement("TR");
486   tbody.appendChild(tr);
487   var td = document.createElement("TD");
488   tr.appendChild(td);
489   td.align = "center";
490   td.vAlign = "middle";
491   element = this.CloneLoadingPanel(element, td);
492   ASPx.SetElementDisplay(element, true);
493   this.loadingPanelElement = element;
494   return element;
495  } else
496   parentElement.innerHTML = "&nbsp;";
497  return null;
498 },
499 CreateLoadingPanelWithAbsolutePosition: function(parentElement, offsetElement) {
500  if(this.ShouldHideExistingLoadingElements())
501   this.HideLoadingPanel();
502  if(parentElement == null)
503   return null;
504  if(!this.IsLoadingContainerVisible()) {
505   this.hasPhantomLoadingElements = true;
506   return null;
507  }
508  if(!offsetElement)
509   offsetElement = parentElement;
510  var element = this.GetLoadingPanelElement();
511  if(element != null) {
512   element = this.CloneLoadingPanel(element, parentElement);
513   ASPx.SetStyles(element, {
514    position: "absolute"
515   });
516   ASPx.SetElementDisplay(element, true);
517   ASPx.Evt.AttachEventToElement(element, ASPx.Evt.GetMouseWheelEventName(), ASPx.Evt.PreventEvent);
518   this.SetLoadingPanelLocation(offsetElement, element);
519   this.loadingPanelElement = element;
520   return element;
521  }
522  return null;
523 },
524 CreateLoadingPanelInline: function(parentElement, centerInParent){
525  if(this.ShouldHideExistingLoadingElements())
526   this.HideLoadingPanel();
527  if(parentElement == null)
528   return null;
529  if(!this.IsLoadingContainerVisible()) {
530   this.hasPhantomLoadingElements = true;
531   return null;
532  }
533  var element = this.GetLoadingPanelElement();
534  if(element != null) {
535   element = this.CloneLoadingPanel(element, parentElement);
536   if(centerInParent){
537    ASPx.SetElementDisplay(element, true);
538    parentElement.style.textAlign = "center";
539   }
540   else
541    ASPx.SetElementDisplay(element, true);
542   this.loadingPanelElement = element;
543   return element;
544  }
545  return null;
546 },
547 ShowLoadingPanel: function() {
548 },
549 ShowLoadingElements: function() {
550  if(this.InCallback() || this.lpTimer > -1) return;
551  this.ShowLoadingDiv();
552  if(this.IsCallbackAnimationEnabled())
553   this.StartBeginCallbackAnimation();
554  else
555   this.ShowLoadingElementsInternal();
556 },
557 ShowLoadingElementsInternal: function() {
558  if(this.lpDelay > 0 && !this.IsCallbackAnimationEnabled()) 
559   this.lpTimer = window.setTimeout(function() { 
560    this.ShowLoadingPanelOnTimer(); 
561   }.aspxBind(this), this.lpDelay);
562  else {
563   this.RestoreLoadingDivOpacity();
564   this.ShowLoadingPanel();
565  }
566 },
567 GetLoadingPanelOffsetElement: function (baseElement) {
568  if(this.IsCallbackAnimationEnabled()) {
569   var element = this.GetLoadingPanelCallbackAnimationOffsetElement();
570   if(element) {
571    var container = typeof(ASPx.AnimationHelper) != "undefined" ? ASPx.AnimationHelper.findSlideAnimationContainer(element) : null;
572    if(container)
573     return container.parentNode.parentNode;
574    else
575     return element;
576   }
577  }
578  return baseElement;
579 },
580 GetLoadingPanelCallbackAnimationOffsetElement: function () {
581  return this.GetCallbackAnimationElement();
582 },
583 IsCallbackAnimationEnabled: function () {
584  return (this.enableCallbackAnimation || this.isSlideCallbackAnimationEnabled()) && !this.isCallbackAnimationPrevented;
585 },
586 GetDefaultanimationEngineType: function() {
587  return ASPx.AnimationEngineType.DEFAULT;
588 },
589 StartBeginCallbackAnimation: function () {
590  this.beginCallbackAnimationProcessing = true;
591  this.isCallbackFinished = false;
592  var element = this.GetCallbackAnimationElement();
593  if (element && this.isSlideCallbackAnimationEnabled() && this.slideAnimationDirection)
594   ASPx.AnimationHelper.slideOut(element, this.slideAnimationDirection, this.FinishBeginCallbackAnimation.aspxBind(this), this.GetDefaultanimationEngineType(), this.rtl);
595  else if(element && this.enableCallbackAnimation) 
596   ASPx.AnimationHelper.fadeOut(element, this.FinishBeginCallbackAnimation.aspxBind(this), null, ASPx.AnimationEngineType.JS);
597  else
598   this.FinishBeginCallbackAnimation();
599 },
600 CancelBeginCallbackAnimation: function() {
601  if(this.beginCallbackAnimationProcessing) {
602   this.beginCallbackAnimationProcessing = false;
603   var element = this.GetCallbackAnimationElement();
604   ASPx.AnimationHelper.cancelAnimation(element);
605  }
606 },
607 FinishBeginCallbackAnimation: function () {
608  this.beginCallbackAnimationProcessing = false;
609  if(!this.isCallbackFinished)
610   this.ShowLoadingElementsInternal();
611  else {
612   this.DoCallback(this.savedCallbackResult);
613   this.savedCallbackResult = null;
614  }
615 },
616 CheckBeginCallbackAnimationInProgress: function(callbackResult) {
617  if(this.beginCallbackAnimationProcessing) {
618   this.savedCallbackResult = callbackResult;
619   this.isCallbackFinished = true;
620   return true;
621  }
622  return false;
623 },
624 StartEndCallbackAnimation: function () {
625  this.HideLoadingPanel();
626  this.SetInitialLoadingDivOpacity();
627  this.RaiseEndCallbackAnimationStart();
628  this.endCallbackAnimationProcessing = true;
629  var element = this.GetCallbackAnimationElement();
630  if(element && this.isSlideCallbackAnimationEnabled() && this.slideAnimationDirection) 
631   ASPx.AnimationHelper.slideIn(element, this.slideAnimationDirection, this.FinishEndCallbackAnimation.aspxBind(this), this.GetDefaultanimationEngineType(), this.rtl);
632  else if(element && this.enableCallbackAnimation) 
633   ASPx.AnimationHelper.fadeIn(element, this.FinishEndCallbackAnimation.aspxBind(this), null, ASPx.AnimationEngineType.JS);
634  else
635   this.FinishEndCallbackAnimation();
636  this.slideAnimationDirection = null;
637 },
638 FinishEndCallbackAnimation: function () {
639  this.DoEndCallback();
640  this.endCallbackAnimationProcessing = false;
641  this.CheckRepeatGesture();
642 },
643 CheckEndCallbackAnimationNeeded: function() {
644  if(!this.endCallbackAnimationProcessing && this.requestCount == 1) {
645   this.StartEndCallbackAnimation();
646   return true;
647  }
648  return false;
649 },
650 PreventCallbackAnimation: function() {
651  this.isCallbackAnimationPrevented = true;
652 },
653 GetCallbackAnimationElement: function() {
654  return null;
655 },
656 AssignSlideAnimationDirectionByPagerArgument: function(arg, currentPageIndex) {
657  this.slideAnimationDirection = null;
658  if(this.isSlideCallbackAnimationEnabled() && typeof(ASPx.AnimationHelper) != "undefined") {
659   if(arg == PagerCommands.Next || arg == PagerCommands.Last)
660    this.slideAnimationDirection = ASPx.AnimationHelper.SLIDE_LEFT_DIRECTION;
661   else if(arg == PagerCommands.First || arg == PagerCommands.Prev)
662    this.slideAnimationDirection = ASPx.AnimationHelper.SLIDE_RIGHT_DIRECTION;
663   else if(!isNaN(currentPageIndex) && arg.indexOf(PagerCommands.PageNumber) == 0) {
664    var newPageIndex = parseInt(arg.substring(2));
665    if (!isNaN(newPageIndex)) {
666     var leftDir = this.rtl ? ASPx.AnimationHelper.SLIDE_LEFT_DIRECTION : ASPx.AnimationHelper.SLIDE_RIGHT_DIRECTION;
667     var rightDir = this.rtl ? ASPx.AnimationHelper.SLIDE_RIGHT_DIRECTION : ASPx.AnimationHelper.SLIDE_LEFT_DIRECTION;
668     this.slideAnimationDirection = newPageIndex < currentPageIndex ? leftDir : rightDir;
669    }
670   }
671  }
672 },
673 TryShowPhantomLoadingElements: function () {
674  if(this.hasPhantomLoadingElements && this.InCallback()) {
675   this.hasPhantomLoadingElements = false;
676   this.ShowLoadingDivAndPanel();
677  }
678 },
679 ShowLoadingDivAndPanel: function () {
680  this.ShowLoadingDiv();
681  this.RestoreLoadingDivOpacity();
682  this.ShowLoadingPanel();
683 },
684 HideLoadingElements: function() {
685  this.CancelBeginCallbackAnimation();
686  this.HideLoadingPanel();
687  this.HideLoadingDiv();
688 },
689 ShowLoadingPanelOnTimer: function() {
690  this.ClearLoadingPanelTimer();
691  if(!this.IsDOMDisposed()) {
692   this.RestoreLoadingDivOpacity();
693   this.ShowLoadingPanel();
694  }
695 },
696 ClearLoadingPanelTimer: function() {
697  this.lpTimer = ASPx.Timer.ClearTimer(this.lpTimer);  
698 },
699 HideLoadingPanel: function() {
700  this.ClearLoadingPanelTimer();
701  this.hasPhantomLoadingElements = false;
702  if(ASPx.IsExistsElement(this.loadingPanelElement)) {
703   ASPx.RemoveElement(this.loadingPanelElement);
704   this.loadingPanelElement = null;
705  }
706 },
707 SetLoadingPanelLocation: function(offsetElement, loadingPanel, x, y, offsetX, offsetY) {
708  if(!ASPx.IsExists(x) || !ASPx.IsExists(y)){
709   var x1 = ASPx.GetAbsoluteX(offsetElement);
710   var y1 = ASPx.GetAbsoluteY(offsetElement);
711   var x2 = x1;
712   var y2 = y1;
713   if(offsetElement == document.body) {
714    x1 = 0;
715    y1 = 0;
716    x2 = ASPx.GetDocumentMaxClientWidth();
717    y2 = ASPx.GetDocumentMaxClientHeight();
718   }
719   else{
720    x2 += offsetElement.offsetWidth;
721    y2 += offsetElement.offsetHeight;
722   }
723   if(x1 < ASPx.GetDocumentScrollLeft())
724    x1 = ASPx.GetDocumentScrollLeft();
725   if(y1 < ASPx.GetDocumentScrollTop())
726    y1 = ASPx.GetDocumentScrollTop();
727   if(x2 > ASPx.GetDocumentScrollLeft() + ASPx.GetDocumentClientWidth())
728    x2 = ASPx.GetDocumentScrollLeft() + ASPx.GetDocumentClientWidth();
729   if(y2 > ASPx.GetDocumentScrollTop() + ASPx.GetDocumentClientHeight())
730    y2 = ASPx.GetDocumentScrollTop() + ASPx.GetDocumentClientHeight();
731   x = x1 + ((x2 - x1 - loadingPanel.offsetWidth) / 2);
732   y = y1 + ((y2 - y1 - loadingPanel.offsetHeight) / 2);
733  }
734  if(ASPx.IsExists(offsetX) && ASPx.IsExists(offsetY)){
735   x += offsetX;
736   y += offsetY;
737  }
738  x = ASPx.PrepareClientPosForElement(x, loadingPanel, true);
739  y = ASPx.PrepareClientPosForElement(y, loadingPanel, false);
740  ASPx.SetStyles(loadingPanel, { left: x, top: y });
741 },
742 GetLoadingDiv: function(){
743  return ASPx.GetElementById(this.name + "_LD");
744 },
745 CreateLoadingDiv: function(parentElement, offsetElement){
746  if(this.ShouldHideExistingLoadingElements())
747   this.HideLoadingDiv();
748  if(parentElement == null) 
749   return null;
750  if(!this.IsLoadingContainerVisible()) {
751   this.hasPhantomLoadingElements = true;
752   return null;
753  }
754  if(!offsetElement)
755   offsetElement = parentElement;
756  var div = this.GetLoadingDiv();
757  if(div != null){
758   div = div.cloneNode(true);
759   parentElement.appendChild(div);
760   ASPx.SetElementDisplay(div, true);
761   ASPx.Evt.AttachEventToElement(div, ASPx.TouchUIHelper.touchMouseDownEventName, ASPx.Evt.PreventEvent);
762   ASPx.Evt.AttachEventToElement(div, ASPx.TouchUIHelper.touchMouseMoveEventName, ASPx.Evt.PreventEvent);
763   ASPx.Evt.AttachEventToElement(div, ASPx.TouchUIHelper.touchMouseUpEventName, ASPx.Evt.PreventEvent);
764   ASPx.Evt.AttachEventToElement(div, ASPx.Evt.GetMouseWheelEventName(), ASPx.Evt.PreventEvent);
765   this.SetLoadingDivBounds(offsetElement, div);
766   this.loadingDivElement = div;
767   this.SetInitialLoadingDivOpacity();
768   return div;
769  }
770  return null;
771 },
772 SetInitialLoadingDivOpacity: function() {
773  if(!this.loadingDivElement) return;
774  ASPx.Attr.SaveStyleAttribute(this.loadingDivElement, "opacity");
775  ASPx.Attr.SaveStyleAttribute(this.loadingDivElement, "filter");
776  ASPx.SetElementOpacity(this.loadingDivElement, 0.01);
777 },
778 RestoreLoadingDivOpacity: function() {
779  if(!this.loadingDivElement) return;
780  ASPx.Attr.RestoreStyleAttribute(this.loadingDivElement, "opacity");
781  ASPx.Attr.RestoreStyleAttribute(this.loadingDivElement, "filter");
782 },
783 SetLoadingDivBounds: function(offsetElement, loadingDiv) {
784  var absX = (offsetElement == document.body) ? 0 : ASPx.GetAbsoluteX(offsetElement);
785  var absY = (offsetElement == document.body) ? 0 : ASPx.GetAbsoluteY(offsetElement);
786  ASPx.SetStyles(loadingDiv, {
787   left: ASPx.PrepareClientPosForElement(absX, loadingDiv, true),
788   top: ASPx.PrepareClientPosForElement(absY, loadingDiv, false)
789  });
790  var width = (offsetElement == document.body) ? ASPx.GetDocumentWidth() : offsetElement.offsetWidth;
791  var height = (offsetElement == document.body) ? ASPx.GetDocumentHeight() : offsetElement.offsetHeight;
792  if(height < 0) 
793   height = 0;
794  ASPx.SetStyles(loadingDiv, { width: width, height: height });
795  var correctedWidth = 2 * width - loadingDiv.offsetWidth;
796  if(correctedWidth <= 0) correctedWidth = width;
797  var correctedHeight = 2 * height - loadingDiv.offsetHeight;
798  if(correctedHeight <= 0) correctedHeight = height;
799  ASPx.SetStyles(loadingDiv, { width: correctedWidth, height: correctedHeight });
800 },
801 ShowLoadingDiv: function() {
802 },
803 HideLoadingDiv: function() {
804  this.hasPhantomLoadingElements = false;
805  if(ASPx.IsExistsElement(this.loadingDivElement)){
806   ASPx.RemoveElement(this.loadingDivElement);
807   this.loadingDivElement = null;
808  }
809 },
810 CanHandleGesture: function(evt) {
811  return false;
812 },
813 CanHandleGestureCore: function(evt) {
814  var source = ASPx.Evt.GetEventSource(evt);
815  if(ASPx.GetIsParent(this.loadingPanelElement, source) || ASPx.GetIsParent(this.loadingDivElement, source))
816   return true; 
817  var callbackAnimationElement = this.GetCallbackAnimationElement();
818  if(!callbackAnimationElement)
819   return false;
820  var animationContainer = ASPx.AnimationHelper.getSlideAnimationContainer(callbackAnimationElement, false, false);
821  if(animationContainer && ASPx.GetIsParent(animationContainer, source) && !ASPx.GetIsParent(animationContainer.childNodes[0], source))
822   return true; 
823  return this.CanHandleGesture(evt); 
824 },
825 AllowStartGesture: function() {
826  return !this.beginCallbackAnimationProcessing && !this.endCallbackAnimationProcessing;
827 },
828 StartGesture: function() {
829 },
830 AllowExecuteGesture: function(value) {
831  return false;
832 },
833 ExecuteGesture: function(value) {
834 },
835 CancelGesture: function(value) {
836  if(this.repeatedGestureCount === 0) {
837   this.repeatedGestureValue = value;
838   this.repeatedGestureCount = 1;
839  }
840  else {
841   if(this.repeatedGestureValue * value > 0)
842    this.repeatedGestureCount++;
843   else
844    this.repeatedGestureCount--;
845   if(this.repeatedGestureCount === 0)
846    this.repeatedGestureCount = 0;
847  }
848 },
849 CheckRepeatGesture: function() {
850  if(this.repeatedGestureCount !== 0) {
851   if(this.AllowExecuteGesture(this.repeatedGestureValue))
852    this.ExecuteGesture(this.repeatedGestureValue, this.repeatedGestureCount);
853   this.repeatedGestureValue = 0;
854   this.repeatedGestureCount = 0;
855  }
856 },
857 AllowExecutePagerGesture: function (pageIndex, pageCount, value) {
858  if(pageIndex < 0) return false;
859  if(pageCount <= 1) return false;
860  if(value > 0 && pageIndex === 0) return false;
861  if(value < 0 && pageIndex === pageCount - 1) return false;
862  return true;
863 },
864 ExecutePagerGesture: function(pageIndex, pageCount, value, count, method) {
865  if(!count) count = 1;
866  var pageIndex = pageIndex + (value < 0 ? count : -count);
867  if(pageIndex < 0) pageIndex = 0;
868  if(pageIndex > pageCount - 1) pageIndex = pageCount - 1;
869  method(PagerCommands.PageNumber + pageIndex);
870 },
871 RaiseInit: function(){
872  if(!this.Init.IsEmpty()){
873   var args = new ASPxClientEventArgs();
874   this.Init.FireEvent(this, args);
875  }
876 },
877 RaiseBeginCallbackInternal: function(command){
878  if(!this.BeginCallback.IsEmpty()){
879   var args = new ASPxClientBeginCallbackEventArgs(command);
880   this.BeginCallback.FireEvent(this, args);
881  }
882 },
883 RaiseEndCallbackInternal: function(command) {
884  if(!this.EndCallback.IsEmpty()){
885   var args = new ASPxClientEndCallbackEventArgs(command);
886   this.EndCallback.FireEvent(this, args);
887  }
888 },
889 RaiseCallbackErrorInternal: function(message, callbackId) {
890  if(!this.CallbackError.IsEmpty()) {
891   var args = new ASPxClientCallbackErrorEventArgs(message, callbackId);
892   this.CallbackError.FireEvent(this, args);
893   if(args.handled)
894    return { isHandled: true, errorMessage: args.message };
895  }
896 },
897 RaiseBeginCallback: function(command){
898  this.RaiseBeginCallbackInternal(command);    
899  aspxGetControlCollection().RaiseBeginCallback(this, command);
900 },
901 RaiseEndCallback: function(command){
902  this.RaiseEndCallbackInternal(command);
903  aspxGetControlCollection().RaiseEndCallback(this, command);
904 },
905 RaiseCallbackError: function (message, callbackId) {
906  var result = this.RaiseCallbackErrorInternal(message, callbackId);
907  if(!result) 
908   result = aspxGetControlCollection().RaiseCallbackError(this, message, callbackId);
909  return result;
910 },
911 RaiseEndCallbackAnimationStart: function(){
912  if(!this.EndCallbackAnimationStart.IsEmpty()){
913   var args = new ASPxClientEventArgs();
914   this.EndCallbackAnimationStart.FireEvent(this, args);
915  }
916 },
917 RaiseBeforePronounce: function(message) {
918  var args = new ASPxClientControlBeforePronounceEventArgs(message, this);
919  if(!this.BeforePronounce.IsEmpty())
920   this.BeforePronounce.FireEvent(this, args);
921  return args;
922 },
923 RaiseUnload: function() {
924  var args = new ASPxClientControlUnloadEventArgs(this);
925  if(!this.Unload.IsEmpty())
926   this.Unload.FireEvent(this, args);
927 },
928 RaiseDisposed: function() {
929  this.Disposed.FireEvent(this, new ASPxClientEventArgs(this));
930 },
931 SendMessageToAssistiveTechnology: function(message) {
932  if(!this.accessibilityCompliant)
933   return;
934  this.PronounceMessageInternal(message, ASPx.AccessibilityPronouncerType.live);
935 },
936 PronounceMessageInternal: function(messageArg, type) {
937  var message = messageArg;
938  if(!ASPx.Ident.IsArray(messageArg))
939   message = [messageArg];
940  var args = this.RaiseBeforePronounce(message);
941  ASPx.AccessibilityPronouncer.Pronounce(args, type);
942 },
943 IsVisible: function() {
944  var element = this.GetMainElement();
945  return ASPx.IsElementVisible(element);
946 },
947 IsDisplayedElement: function(element) {
948  while(element && element.tagName != "BODY") {
949   if(!ASPx.GetElementDisplay(element)) 
950    return false;
951   element = element.parentNode;
952  }
953  return true;
954 },
955 IsDisplayed: function() {
956  return this.IsDisplayedElement(this.GetMainElement());
957 },
958 IsHiddenElement: function(element) {
959  return element && element.offsetWidth == 0 && element.offsetHeight == 0;
960 },
961 IsHidden: function() {
962  return this.IsHiddenElement(this.GetMainElement());
963 },
964 IsDisposed: function() {
965  return this.disposed;
966 },
967 GetParentControl: function() {
968  var mainElement = this.getActualMainElement();
969  var popupPostfix = ASPx.PCWIdSuffix + "-1";
970  var result = null;
971  ASPx.GetParent(mainElement, function(element) {
972   if(element === mainElement || !element.id)
973    return false;
974   var controlName = element.id.replace(popupPostfix, "");
975   result = ASPx.GetControlCollection().Get(controlName);
976   return !!result;
977  });
978  return result;
979 },
980 getActualMainElement: function() { return this.GetMainElement(); },
981 findParentByType: function (type) {
982  var ctrl = this;
983  while (ctrl) {
984   var parent = ctrl.GetParentControl();
985   if (parent && parent instanceof type)
986    return parent;
987   ctrl = parent;
988  }
989  return null;
990 },
991 Focus: function() {
992 },
993 GetClientVisible: function(){
994  return this.GetVisible();
995 },
996 SetClientVisible: function(visible){
997  this.SetVisible(visible);
998 },
999 GetVisible: function(){
1000  return this.clientVisible;
1001 },
1002 SetVisible: function(visible){
1003  if(this.clientVisible != visible){
1004   this.clientVisible = visible;
1005   ASPx.SetElementDisplay(this.GetMainElement(), visible);
1006   if(visible) {
1007    this.AdjustControl();
1008    var mainElement = this.GetMainElement();
1009    if(mainElement)
1010     aspxGetControlCollection().AdjustControls(mainElement);
1011   }
1012  }
1013 },
1014 GetEnabled: function() {
1015  return this.clientEnabled;
1016 },
1017 SetEnabled: function(enabled) {
1018  this.clientEnabled = enabled;
1019  if(ASPxClientControl.setEnabledLocked)
1020   return;
1021  else
1022   ASPxClientControl.setEnabledLocked = true;
1023  this.savedClientEnabled = enabled;
1024  aspxGetControlCollection().ProcessControlsInContainer(this.GetMainElement(), function(control) {
1025   if(ASPx.IsFunction(control.SetEnabled))
1026    control.SetEnabled(enabled && control.savedClientEnabled);
1027  });
1028  delete ASPxClientControl.setEnabledLocked;
1029 },
1030 InCallback: function() {
1031  return this.requestCount > 0;
1032 },
1033 DoBeginCallback: function(command) {
1034  this.RaiseBeginCallback(command || "");
1035  aspxGetControlCollection().Before_WebForm_InitCallback(this.name);
1036  if(typeof(WebForm_InitCallback) != "undefined" && WebForm_InitCallback) {
1037   __theFormPostData = "";
1038   __theFormPostCollection = [ ];
1039   this.ClearPostBackEventInput("__EVENTTARGET");
1040   this.ClearPostBackEventInput("__EVENTARGUMENT");
1041   WebForm_InitCallback();
1042   this.savedFormPostData = __theFormPostData;
1043   this.savedFormPostCollection = __theFormPostCollection;
1044  }
1045 },
1046 ClearPostBackEventInput: function(id){
1047  var element = ASPx.GetElementById(id);
1048  if(element != null) element.value = "";
1049 },
1050 PerformDataCallback: function(arg, handler) {
1051  this.CreateCustomDataCallback(arg, "", handler);
1052 },
1053 sendCallbackViaQueue: function (prefix, arg, showLoadingPanel, context, handler, onBeforeSend) {
1054  if (!this.useCallbackQueue())
1055   return false;
1056  var context = context || this;
1057  var token = this.callbackQueueHelper.sendCallback(ASPx.FormatCallbackArg(prefix, arg), context, handler || context.OnCallback, prefix, onBeforeSend);
1058  if (showLoadingPanel)
1059   this.callbackQueueHelper.showLoadingElements();
1060  return token;
1061 },
1062 CreateCallback: function (arg, command, handler) {
1063  var callbackInfo = this.CreateCallbackInfo(ASPx.CallbackType.Common, handler || null);
1064  var callbackID = this.CreateCallbackByInfo(arg, command, callbackInfo);
1065  return callbackID;
1066 },
1067 CreateCustomDataCallback: function(arg, command, handler) {
1068  var callbackInfo = this.CreateCallbackInfo(ASPx.CallbackType.Data, handler);
1069  this.CreateCallbackByInfo(arg, command, callbackInfo);
1070 },
1071 CreateCallbackByInfo: function(arg, command, callbackInfo) {
1072  if(!this.CanCreateCallback()) return;
1073  var callbackID;
1074  if(typeof(WebForm_DoCallback) != "undefined" && WebForm_DoCallback && ASPx.documentLoaded || ASPx.Platform === "NETCORE")
1075   callbackID = this.CreateCallbackInternal(arg, command, true, callbackInfo);
1076  else {
1077   if(!this.savedCallbacks)
1078    this.savedCallbacks = [];
1079   var callbackInfo = { arg: arg, command: command, callbackInfo: callbackInfo };
1080   if(this.allowMultipleCallbacks)
1081    this.savedCallbacks.push(callbackInfo);
1082   else
1083    this.savedCallbacks[0] = callbackInfo;
1084  }
1085  return callbackID;
1086 },
1087 CreateCallbackInternal: function(arg, command, viaTimer, callbackInfo) {
1088  var watcher = ASPx.ControlUpdateWatcher.getInstance();
1089  if(watcher && !watcher.CanSendCallback(this, arg)) {
1090   this.CancelCallbackInternal();
1091   return;
1092  }
1093  this.requestCount++;
1094  this.DoBeginCallback(command);
1095  if(typeof(arg) == "undefined")
1096   arg = "";
1097  if(typeof(command) == "undefined")
1098   command = "";
1099  var callbackID = this.SaveCallbackInfo(callbackInfo, command),
1100   customArgs = this.GetCustomCallbackArgs();
1101  if(viaTimer)
1102   window.setTimeout(function() { this.CreateCallbackCoreWithCustomArgs(arg, command, callbackID, customArgs); }.aspxBind(this), 0);
1103  else
1104   this.CreateCallbackCoreWithCustomArgs(arg, command, callbackID, customArgs);
1105  return callbackID;
1106 },
1107 CreateCallbackCoreWithCustomArgs: function(arg, command, callbackID, customArgs) {
1108  this.CreateCallbackCore(arg, command, callbackID);
1109 },
1110 GetCustomCallbackArgs: function() {
1111  return {};
1112 },
1113 CancelCallbackInternal: function() {
1114  this.CancelCallbackCore();
1115  this.HideLoadingElements();
1116 },
1117 CancelCallbackCore: function() {
1118 },
1119 CreateCallbackCore: function(arg, command, callbackID) {
1120  var callBackMethod = this.GetCallbackMethod(command);
1121  __theFormPostData = this.savedFormPostData;
1122  __theFormPostCollection = this.savedFormPostCollection;
1123  callBackMethod.call(this, this.GetSerializedCallbackInfoByID(callbackID) + arg);
1124 },
1125 GetCallbackMethod: function(command){
1126  return this.callBack;
1127 },
1128 CanCreateCallback: function() {
1129  return !this.InCallback() || (this.allowMultipleCallbacks && !this.beginCallbackA
1129nimationProcessing && !this.endCallbackAnimationProcessing);
1130 },
1131 DoLoadCallbackScripts: function() {
1132  ASPx.ProcessScriptsAndLinks(this.name, true);
1133 },
1134 DoEndCallback: function() {
1135  if(this.IsCallbackAnimationEnabled() && this.CheckEndCallbackAnimationNeeded()) 
1136   return;
1137  this.requestCount--;
1138  if (this.requestCount < 1) 
1139   this.callbackHandlersQueue.executeCallbacksHandlers();
1140  if(this.HideLoadingPanelOnCallback() && this.requestCount < 1) 
1141   this.HideLoadingElements();
1142  if(this.isSwipeGesturesEnabled() && this.supportGestures) {
1143   ASPx.GesturesHelper.UpdateSwipeAnimationContainer(this.name);
1144   if(this.touchUIMouseScroller)
1145    this.touchUIMouseScroller.update();
1146  }
1147  this.isCallbackAnimationPrevented = false;
1148  this.OnCallbackFinalized();
1149  this.AssignEllipsisTooltips();
1150  var command = this.GetCallbackCommand();
1151  this.RaiseEndCallback(command);
1152  this.InitializeIntersectionObserversManager();
1153  this.currentCallbackID = -1;
1154 },
1155 DoFinalizeCallback: function() {
1156 },
1157 OnCallbackFinalized: function() {
1158 },
1159 AssignEllipsisTooltips: function() { },
1160 GetCallbackCommand: function() {
1161  var result = "";
1162  if(this.currentCallbackID != -1) {
1163   var command = this.callbackCommand[this.currentCallbackID];
1164   if(command)
1165    result = command;
1166  }
1167  return result;
1168 },
1169 HideLoadingPanelOnCallback: function() {
1170  return true;
1171 },
1172 ShouldHideExistingLoadingElements: function() {
1173  return true;
1174 },
1175 EvalCallbackResult: function(resultString) {
1176  return eval(resultString);
1177 },
1178 ParseJSProperties: function(resultObj) {
1179  if(resultObj.cp) {
1180   for(var name in resultObj.cp)
1181    if(resultObj.cp.hasOwnProperty(name)) {
1182     this[name] = resultObj.cp[name];
1183     if(this.aspNetCoreWrapperInstance)
1184      this.aspNetCoreWrapperInstance[name] = resultObj.cp[name]; 
1185    }
1186  }
1187 },
1188 DoCallback: function(result) {
1189  if(this.IsCallbackAnimationEnabled() && this.CheckBeginCallbackA
1189nimationInProgress(result))
1190   return;
1191  result = ASPx.Str.Trim(result);
1192  if(result instanceof ASPx.NetworkError || result.indexOf(ASPx.CallbackResultPrefix) != 0)
1193   this.ProcessCallbackGeneralError(result, false);
1194  else {
1195   var resultObj = null;
1196   try {
1197    resultObj = this.EvalCallbackResult(result);
1198   } 
1199   catch(e) {
1200   }
1201   if(resultObj) {
1202    this.currentCallbackID = resultObj.id;
1203    ASPx.CacheHelper.DropCache(this);
1204    if(resultObj.redirect) {
1205     this.ParseJSProperties(resultObj); 
1206     ASPx.Url.Redirect(resultObj.redirect);
1207    }
1208    else if(ASPx.IsExists(resultObj.generalError)) {
1209     this.ProcessCallbackGeneralError(resultObj.generalError, true);
1210    }
1211    else {
1212     var errorObj = resultObj.error;
1213     if(errorObj) { 
1214      if(this.parseJSPropertiesOnCallbackError)
1215       this.ParseJSProperties(resultObj);
1216      this.ProcessCallbackError(errorObj,resultObj.id);
1217     } else {
1218      this.ParseJSProperties(resultObj);
1219      var callbackInfo = this.DequeueCallbackInfo(resultObj.id);
1220      if(callbackInfo && callbackInfo.type == ASPx.CallbackType.Data)
1221       this.ProcessCustomDataCallback(resultObj.result, callbackInfo);
1222      else {
1223       if (this.useCallbackQueue() && this.callbackQueueHelper.getCallbackInfoById(resultObj.id))
1224        this.callbackQueueHelper.processCallback(resultObj.result, resultObj.id);
1225       else {
1226        this.ProcessCallback(resultObj.result, resultObj.id);
1227        if(callbackInfo && callbackInfo.handler) {
1228         var handlerInfo = { handler: callbackInfo.handler, result: resultObj.result.data };
1229         this.callbackHandlersQueue.addCallbackHandler(handlerInfo);
1230        }
1231       }
1232      }
1233     }
1234    }
1235   }
1236  }
1237  this.DoLoadCallbackScripts();
1238 },
1239 DoCallbackError: function(result) {
1240  this.HideLoadingElements();
1241  this.ProcessCallbackGeneralError(result, false); 
1242 },
1243 DoControlClick: function(evt) {
1244  this.OnControlClick(ASPx.Evt.GetEventSource(evt), evt);
1245 },
1246 ProcessCallback: function (result, callbackId) {
1247  this.OnCallback(result, callbackId);
1248 },
1249 ProcessCustomDataCallback: function(result, callbackInfo) {
1250  if(callbackInfo.handler != null)
1251   callbackInfo.handler(this, result);
1252  this.RaiseCustomDataCallback(result);
1253 },
1254 RaiseCustomDataCallback: function(result) {
1255  if(!this.CustomDataCallback.IsEmpty()) {
1256   var arg = new ASPxClientCustomDataCallbackEventArgs(result);
1257   this.CustomDataCallback.FireEvent(this, arg);
1258  }
1259 },
1260 OnCallback: function(result) {
1261 },
1262 CreateCallbackInfo: function(type, handler) {
1263  return { type: type, handler: handler };
1264 },
1265 GetSerializedCallbackInfoByID: function(callbackID) {
1266  return this.GetCallbackInfoByID(callbackID).type + callbackID + ASPx.CallbackSeparator;
1267 },
1268 SaveCallbackInfo: function(info, command) {
1269  var callbacks = this.GetActiveCallbacksInfo();
1270  var index = callbacks.indexOf(null);
1271  if(index === -1)
1272   index = callbacks.length;
1273  callbacks[index] = info;
1274  this.callbackCommand[index] = command;
1275  return index;
1276 },
1277 GetActiveCallbacksInfo: function() {
1278  var persistentProperties = this.GetPersistentProperties();
1279  if(!persistentProperties.activeCallbacks)
1280   persistentProperties.activeCallbacks = [ ];
1281  return persistentProperties.activeCallbacks;
1282 },
1283 GetPersistentProperties: function() {
1284  var storage = _aspxGetPersistentControlPropertiesStorage();
1285  var persistentProperties = storage[this.name];
1286  if(!persistentProperties) {
1287   persistentProperties = { };
1288   storage[this.name] = persistentProperties;
1289  }
1290  return persistentProperties;
1291 },
1292 GetCallbackInfoByID: function(callbackID) {
1293  return this.GetActiveCallbacksInfo()[callbackID];
1294 },
1295 DequeueCallbackInfo: function(index) {
1296  var activeCallbacksInfo = this.GetActiveCallbacksInfo();
1297  if(index < 0 || index >= activeCallbacksInfo.length)
1298   return null;
1299  var result = activeCallbacksInfo[index];
1300  activeCallbacksInfo[index] = null;
1301  return result;
1302 },
1303 ProcessCallbackError: function (errorObj, callbackId) {
1304  var data = ASPx.IsExists(errorObj.data) ? errorObj.data : null;
1305  var result = this.RaiseCallbackError(errorObj.message, callbackId);
1306  if(result.isHandled)
1307   this.OnCallbackErrorAfterUserHandle(result.errorMessage, data); 
1308  else
1309   this.OnCallbackError(result.errorMessage, data); 
1310 },
1311 OnCallbackError: function(errorMessage, data) {
1312  if(errorMessage)
1313   ASPx.ShowErrorAlert(errorMessage);
1314 },
1315 OnCallbackErrorAfterUserHandle: function(errorMessage, data) {
1316 },
1317 ProcessCallbackGeneralError: function(error, serverExceptionOnLastCallback) {
1318  this.serverExceptionOnLastCallback = serverExceptionOnLastCallback;
1319  var isNetworkError = error instanceof ASPx.NetworkError;
1320  var errorMessage = isNetworkError ? error.message : error;
1321  var result = this.RaiseCallbackError(errorMessage);
1322  if(result.isHandled)
1323   this.OnCallbackGeneralErrorAfterUserHandle(result.errorMessage);
1324  else if(isNetworkError)
1325   this.OnCallbackNetworkError(result.errorMessage);
1326  else
1327   this.OnCallbackGeneralError(result.errorMessage);
1328 },
1329 OnCallbackGeneralError: function(errorMessage) {
1330  this.OnCallbackError(errorMessage, null);
1331 },
1332 OnCallbackNetworkError: function(errorMessage) {
1333  console.error(errorMessage);
1334 },
1335 OnCallbackGeneralErrorAfterUserHandle: function (errorMessage) {
1336 },
1337 SendPostBack: function(params, preventConvertToUpdatePanelCallback) {
1338  if(preventConvertToUpdatePanelCallback)
1339   this.sendMSAjaxCompatPostBack(params);
1340  else
1341   this.sendPostBackInternal(params);
1342 },
1343 sendPostBackInternal: function(params) {
1344  if(typeof(__doPostBack) != "undefined")
1345   __doPostBack(this.uniqueID, params);
1346  else{
1347   var form = this.GetParentForm();
1348   if(form) form.submit();
1349  }
1350 },
1351 sendMSAjaxCompatPostBack: function(params) {
1352  var rm = ASPx.GetMSAjaxRequestManager();
1353  var triggers = rm ? rm._postBackControlClientIDs : null;
1354  var needRegister = triggers && ASPx.Ident.IsArray(triggers) && ASPx.Data.ArrayIndexOf(triggers, this.name) == -1;
1355  if(needRegister)
1356   triggers.unshift(this.name);
1357  this.sendPostBackInternal(params);
1358  if(needRegister)
1359   triggers.shift();
1360 },
1361 IsValidInstance: function () {
1362  return aspxGetControlCollection().GetByName(this.name) === this;
1363 },
1364 OnDispose: function() { 
1365  this.RaiseDisposed();
1366  var varName = this.globalName;
1367  if(varName && varName !== "" && window && window[varName] && window[varName] == this){
1368   try{
1369    delete window[varName];
1370   }
1371   catch(e){  }
1372  }
1373  if(this.callbackQueueHelper)
1374   this.callbackQueueHelper.detachEvents();
1375  if (!this.IsDisposed())
1376   this.disposed = true;
1377 },
1378 OnGlobalControlsInitialized: function(args) { 
1379 },
1380 OnGlobalBrowserWindowResized: function(args) { 
1381 },
1382 OnGlobalBeginCallback: function(args) { 
1383 },
1384 OnGlobalEndCallback: function(args) { 
1385 },
1386 OnGlobalCallbackError: function(args) { 
1387 },
1388 OnGlobalValidationCompleted: function(args) { 
1389 },
1390 AddDefaultStateControllerItems: function() {
1391  var states = this.scStates;
1392  if(!states) return;
1393  var postfix = this.scPostfix ? ("_" + this.scPostfix) : "";
1394  var mainElementId = this.GetMainElementId();
1395  if(states & 2)
1396   this.AddDefaultReadOnlyStateControllerItem(this.scPrefix + "ReadOnly" + postfix, mainElementId);
1397  if(states & 4)
1398   this.AddDefaultDisabledStateControllerItem(this.scPrefix + "Disabled" + postfix, mainElementId);
1399 },
1400 AddDefaultReadOnlyStateControllerItem: function(cssClass, mainElementId) { throw "Not implemented"; },
1401 AddDefaultDisabledStateControllerItem: function(cssClass, mainElementId) { throw "Not implemented"; },
1402 DOMContentLoaded: function() { },
1403 IsStateControllerEnabled: function() { return false; },
1404 InitializeDOM: function() {
1405  var mainElement = this.GetMainElement();
1406  if(mainElement)
1407   ASPx.SetElementInitializedFlag(mainElement);
1408 },
1409 IsDOMInitialized: function() {
1410  var mainElement = this.GetMainElement();
1411  return mainElement && ASPx.GetElementInitializedFlag(mainElement);
1412 },
1413 AdjustControl: function(nestedCall) { },
1414 OnBrowserWindowResizeInternal: function(e) { },
1415 RegisterInControlTree: function(tree) { },
1416 InitializeIntersectionObserversManager: function () {
1417  var elementToObserve = this.getElementToObserveVisibilityChange();
1418  if(elementToObserve) {
1419   ASPx.IntersectionObserversManager.SubscribeElemensVisibilityChangeInBrowserWindow(elementToObserve, this.processVisibilityChanged.bind(this));
1420  }
1421 },
1422 getElementToObserveVisibilityChange: function () { },
1423 processVisibilityChanged: function (visible) { }
1424});
1425ASPxClientControlBase.Cast = function(obj) {
1426 if(typeof obj == "string")
1427  return window[obj];
1428 return obj;
1429};
1430var persistentControlPropertiesStorage = null;
1431function _aspxGetPersistentControlPropertiesStorage() {
1432 if(persistentControlPropertiesStorage == null)
1433  persistentControlPropertiesStorage = { };
1434 return persistentControlPropertiesStorage;
1435}
1436var ELLIPSIS_MARKER_CLASS = "dx-ellipsis";
1437var ELLIPSIS_TOOLTIP_MARKER_ATTR = "dxEllipsisTitle";
1438var ASPxClientControl = ASPx.CreateClass(ASPxClientControlBase, {
1439 constructor: function(name){
1440  this.constructor.prototype.constructor.call(this, name);
1441  this.rtl = false;
1442  this.enableEllipsis = false;
1443  this.isNative = false;
1444  this.isControlCollapsed = false;
1445  this.isInsideHierarchyAdjustment = false;
1446  this.controlOwner = null;
1447  this.adjustedSizes = { };
1448  this.dialogContentHashTable = { };
1449  this.renderIFrameForPopupElements = false;
1450  this.widthValueSetInPercentage = false;
1451  this.heightValueSetInPercentage = false;
1452  this.verticalAlignedElements = { };
1453  this.wrappedTextContainers = { };
1454  this.scrollPositionState = { };
1455  this.sizingConfig = {
1456   allowSetWidth: true,
1457   allowSetHeight: true,
1458   correction : false,
1459   adjustControl : false,
1460   supportPercentHeight: false,
1461   supportAutoHeight: false
1462  };
1463  this.percentSizeConfig = {
1464   width: -1,
1465   height: -1,
1466   markerWidth: -1,
1467   markerHeight: -1
1468  };  
1469 },
1470 querySelector: function(selector) { return this.querySelectorAll(selector)[0] || null; },
1471 querySelectorAll: function(selector) {
1472  return ASPx.CacheHelper.GetCachedElement(this, "querySelectorAll_" + selector,
1473   function() { return Array.prototype.slice.call(this.GetMainElement().querySelectorAll(selector)); });
1474 },
1475 createAccessKey: function (popupItem, getPopupElement, keyTipElement, key, onlyClick, manualStopProcessing) {
1476  return new ASPx.AccessKey(popupItem, getPopupElement, keyTipElement, key, onlyClick, manualStopProcessing);
1477 },
1478 InlineInitialize: function() {
1479  this.InitializeDOM();
1480  ASPxClientControlBase.prototype.InlineInitialize.call(this);
1481 },
1482 AfterCreate: function() { 
1483  ASPxClientControlBase.prototype.AfterCreate.call(this);
1484  if(!this.CanInitializeAdjustmentOnDOMContentLoaded() || ASPx.IsStartupScriptsRunning())
1485   this.InitializeAdjustment();
1486 },
1487 DOMContentLoaded: function() {
1488  if(this.CanInitializeAdjustmentOnDOMContentLoaded()) 
1489   this.InitializeAdjustment();
1490 },
1491 CanInitializeAdjustmentOnDOMContentLoaded: function() {
1492  return true;
1493 },
1494 InitializeAdjustment: function() {
1495  this.UpdateAdjustmentFlags();
1496  this.AdjustControl();
1497 },
1498 AfterInitialize: function() {
1499  this.AdjustControl();
1500  ASPxClientControlBase.prototype.AfterInitialize.call(this);
1501 },
1502 IsStateControllerEnabled: function(){
1503  return typeof(ASPx.GetStateController) != "undefined" && ASPx.GetStateController();
1504 },
1505 GetWidth: function() {
1506  return this.GetMainElement().offsetWidth;
1507 },
1508 GetHeight: function() {
1509  return this.GetMainElement().offsetHeight;
1510 },
1511 SetWidth: function(width) {
1512  if(this.sizingConfig.allowSetWidth)
1513   this.SetSizeCore("width", width, "GetWidth", false);
1514 },
1515 SetHeight: function(height) {
1516  if(this.sizingConfig.allowSetHeight)
1517   this.SetSizeCore("height", height, "GetHeight", false);
1518 },
1519 SetSizeCore: function(sizePropertyName, size, getFunctionName, corrected) {
1520  if(size < 0 || !this.GetMainElement())
1521   return;
1522  this.GetMainElement().style[sizePropertyName] = size + "px";
1523  this.UpdateAdjustmentFlags(sizePropertyName);
1524  if(this.sizingConfig.adjustControl)
1525   this.AdjustControl(true);
1526  if(this.sizingConfig.correction && !corrected) {
1527   var realSize = this[getFunctionName]();
1528   if(realSize != size) {
1529    var correctedSize = size - (realSize - size);
1530    this.SetSizeCore(sizePropertyName, correctedSize, getFunctionName, true);
1531   }
1532  }
1533 },
1534 AdjustControl: function(nestedCall) {
1535  if(this.IsAdjustmentRequired() && (!ASPxClientControl.adjustControlLocked || nestedCall)) {
1536   ASPxClientControl.adjustControlLocked = true;
1537   try {
1538    if(!this.IsAdjustmentAllowed())
1539     return;
1540    this.AdjustControlCore();
1541    this.UpdateAdjustedSizes();
1542   } 
1543   finally {
1544    delete ASPxClientControl.adjustControlLocked;
1545   }
1546  }
1547  this.AssignEllipsisTooltips();
1548  this.TryShowPhantomLoadingElements();
1549 },
1550 ResetControlAdjustment: function () {
1551  this.adjustedSizes = { };
1552 },
1553 UpdateAdjustmentFlags: function(sizeProperty) {
1554  var mainElement = this.GetMainElement();
1555  if(mainElement) {
1556   var mainElementStyle = ASPx.GetCurrentStyle(mainElement);
1557   this.UpdatePercentSizeConfig([mainElementStyle.width, mainElement.style.width], [mainElementStyle.height, mainElement.style.height], sizeProperty);
1558  }
1559 },
1560 UpdatePercentSizeConfig: function(widths, heights, modifyStyleProperty) {
1561  switch(modifyStyleProperty) {
1562   case "width":
1563    this.UpdatePercentWidthConfig(widths);
1564    break;
1565   case "height":
1566    this.UpdatePercentHeightConfig(heights);
1567    break;
1568   default:
1569    this.UpdatePercentWidthConfig(widths);
1570    this.UpdatePercentHeightConfig(heights);
1571    break;
1572  }
1573  this.ResetControlPercentMarkerSize();
1574 },
1575 UpdatePercentWidthConfig: function(widths) {
1576  this.widthValueSetInPercentage = false;
1577  for(var i = 0; i < widths.length; i++) {
1578   if(this.IsPercentageWidth(widths[i])) {
1579    this.percentSizeConfig.width = widths[i];
1580    this.widthValueSetInPercentage = true;
1581    break;
1582   }
1583  }
1584 },
1585 IsPercentageWidth: function(width) { return ASPx.IsPercentageSize(width); },
1586 UpdatePercentHeightConfig: function(heights) {
1587  this.heightValueSetInPercentage = false;
1588    for(var i = 0; i < heights.length; i++) {
1589   if(ASPx.IsPercentageSize(heights[i])) {
1590    this.percentSizeConfig.height = heights[i];
1591    this.heightValueSetInPercentage = true;
1592    break;
1593   }
1594  }
1595 },
1596 GetAdjustedSizes: function() {
1597  var mainElement = this.GetMainElement();
1598  if(mainElement) 
1599   return { width: mainElement.offsetWidth, height: mainElement.offsetHeight };
1600  return { width: 0, height: 0 };
1601 },
1602 IsAdjusted: function() {
1603  return (this.adjustedSizes.width && this.adjustedSizes.width > 0) && (this.adjustedSizes.height && this.adjustedSizes.height > 0);
1604 },
1605 IsAdjustmentRequired: function() {
1606  if(!this.IsAdjusted())
1607   return true;
1608  if(this.widthValueSetInPercentage)
1609   return true;
1610  if(this.heightValueSetInPercentage)
1611   return true;
1612  var sizes = this.GetAdjustedSizes();
1613  for(var name in sizes){
1614   if(this.adjustedSizes[name] !== sizes[name])
1615    return true;
1616  }
1617  return false;
1618 },
1619 IsAdjustmentAllowed: function() {
1620  var mainElement = this.GetMainElement();
1621  return mainElement && this.IsDisplayed() && !this.IsHidden() && this.IsDOMInitialized();
1622 },
1623 UpdateAdjustedSizes: function() {
1624  var sizes = this.GetAdjustedSizes();
1625  for(var name in sizes)
1626   if(sizes.hasOwnProperty(name))
1627    this.adjustedSizes[name] = sizes[name];
1628 },
1629 AdjustControlCore: function() {
1630 },
1631 AdjustAutoHeight: function() {
1632 },
1633 IsControlCollapsed: function() {
1634  return this.isControlCollapsed;
1635 },
1636 NeedCollapseControl: function() {
1637  return this.NeedCollapseControlCore() && this.IsAdjustmentRequired() && this.IsAdjustmentAllowed();
1638 },
1639 NeedCollapseControlCore: function() {
1640  return false;
1641 },
1642 CollapseEditor: function() {
1643 },
1644 CollapseControl: function() {
1645  this.SaveScrollPositions();
1646  var mainElement = this.GetMainElement(),
1647   marker = this.GetControlPercentSizeMarker();
1648  marker.style.height = this.heightValueSetInPercentage && this.sizingConfig.supp
1648ortPercentHeight
1649   ? this.percentSizeConfig.height 
1650   : (mainElement.offsetHeight + "px");
1651  mainElement.style.display = "none";
1652  this.isControlCollapsed = true;
1653 },
1654 ExpandControl: function() {
1655  var mainElement = this.GetMainElement();
1656  mainElement.style.display = "";
1657  this.GetControlPercentSizeMarker().style.height = "0px";
1658  this.isControlCollapsed = false;
1659  this.RestoreScrollPositions();
1660 },
1661 CanCauseReadjustment: function() {
1662  return this.NeedCollapseControlCore();
1663 },
1664 IsExpandableByAdjustment: function() {
1665  return false;
1666 },
1667 HasFixedPosition: function() {
1668  return false;
1669 },
1670 SaveScrollPositions: function() {
1671  var mainElement = this.GetMainElement();
1672  this.scrollPositionState.outer = ASPx.GetOuterScrollPosition(mainElement.parentNode);
1673  this.scrollPositionState.inner = ASPx.GetInnerScrollPositions(mainElement);
1674 },
1675 RestoreScrollPositions: function() {
1676  ASPx.RestoreOuterScrollPosition(this.scrollPositionState.outer);
1677  ASPx.RestoreInnerScrollPositions(this.scrollPositionState.inner);
1678 },
1679 GetControlPercentSizeMarker: function() {
1680  if(this.percentSizeMarker === undefined) {
1681   this.percentSizeMarker = ASPx.CreateHtmlElementFromString("<div style='height:0px;font-size:0px;line-height:0;width:100%;'></div>");
1682   ASPx.InsertElementAfter(this.percentSizeMarker, this.GetMainElement());
1683  }
1684  return this.percentSizeMarker;
1685 },
1686 KeepControlPercentSizeMarker: function(needCollapse, needCalculateHeight) {
1687  var marker = this.GetControlPercentSizeMarker(),
1688   markerHeight;
1689  if(needCollapse)
1690   this.CollapseControl();
1691  if(this.widthValueSetInPercentage && marker.style.width !== this.percentSizeConfig.width)
1692   marker.style.width = this.percentSizeConfig.width;
1693  if(needCalculateHeight) {
1694   if(this.IsControlCollapsed())
1695    markerHeight = marker.style.height;
1696   marker.style.height = this.percentSizeConfig.height;
1697  }
1698  this.percentSizeConfig.markerWidth = marker.offsetWidth;
1699  if(needCalculateHeight) {
1700   this.percentSizeConfig.markerHeight = marker.offsetHeight;
1701   if(this.IsControlCollapsed())
1702    marker.style.height = markerHeight;
1703   else
1704    marker.style.height = "0px";
1705  }
1706  if(needCollapse)
1707   this.ExpandControl();
1708 },
1709 ResetControlPercentMarkerSize: function() {
1710  this.percentSizeConfig.markerWidth = -1;
1711  this.percentSizeConfig.markerHeight = -1;
1712 },
1713 GetControlPercentMarkerSize: function(hideControl, force) {
1714  var needCalculateHeight = this.heightValueSetInPercentage && this.sizingConfig.supportPercentHeight;
1715  if(force || this.percentSizeConfig.markerWidth < 1 || (needCalculateHeight && this.percentSizeConfig.markerHeight < 1))
1716   this.KeepControlPercentSizeMarker(hideControl && !this.IsControlCollapsed(), needCalculateHeight);
1717  return {
1718   width: this.percentSizeConfig.markerWidth,
1719   height: this.percentSizeConfig.markerHeight
1720  };
1721 },
1722 AssignEllipsisTooltips: function() {
1723  if(this.RequireAssignTooltips())
1724   this.AssignEllipsisTooltipsCore();
1725 },
1726 AssignEllipsisTooltipsCore: function(rootElement, reassingExistingTooltips) {
1727  var requirePaddingManipulation = ASPx.Browser.Edge || ASPx.Browser.Firefox;
1728  rootElement = rootElement || this.GetMainElement();
1729  var nodes = this.GetEllipsisNodes(rootElement);
1730  var nodeInfos = [];
1731  var nodesCount = nodes.length;
1732  for(var i = 0; i < nodesCount; i++) {
1733   var node = nodes[i];
1734   var info = { node: node };
1735   if(requirePaddingManipulation) {
1736    var style = ASPx.GetCurrentStyle(node);
1737    info.paddingLeft = node.style.paddingLeft;
1738    info.totalPadding = ASPx.GetLeftRightPaddings(node, style);
1739   }
1740   nodeInfos.push(info);
1741  }
1742  if(requirePaddingManipulation) {
1743   for(var i = 0; i < nodesCount; i++) {
1744    var info = nodeInfos[i];
1745    ASPx.SetStyles(info.node, { paddingLeft: info.totalPadding }, true);
1746   }
1747  }
1748  for(var i = 0; i < nodesCount; i++) {
1749   var info = nodeInfos[i];
1750   var node = info.node;
1751   info.isTextShortened = node.scrollWidth > node.clientWidth;
1752   info.hasTitle = ASPx.Attr.GetAttribute(node, "title") !== null;
1753   if(!info.hasTitle || reassingExistingTooltips)
1754    info.title = ASPx.GetEllipsisTooltipText(node);
1755  }
1756  for(var i = 0; i < nodesCount; i++) {
1757   var info = nodeInfos[i];
1758   var node = info.node;
1759   if(info.isTextShortened && info.title) {
1760    ASPx.Attr.SetAttribute(node, "title", info.title);
1761    ASPx.Attr.SetAttribute(node, ELLIPSIS_TOOLTIP_MARKER_ATTR, true);
1762   }
1763   if(!info.isTextShortened && info.hasTitle)
1764    ASPx.Attr.RemoveAttribute(node, "title");
1765  }
1766  if(requirePaddingManipulation) {
1767   for(var i = 0; i < nodesCount; i++) {
1768    var info = nodeInfos[i];
1769    var node = info.node;
1770    node.style.paddingLeft = info.paddingLeft;
1771   }
1772  }
1773 },
1774 GetEllipsisNodes: function(element) {
1775  var ellipsibleNodes = ASPx.Data.CollectionToArray(ASPx.GetNodesByClassName(element, ELLIPSIS_MARKER_CLASS));
1776  if(ASPx.ElementHasCssClass(element, ELLIPSIS_MARKER_CLASS))
1777   ellipsibleNodes.push(element);
1778  return ellipsibleNodes.filter(function(node) {
1779   return !ASPx.Attr.IsExistsAttribute(node, "title") || ASPx.Attr.IsExistsAttribute(node, ELLIPSIS_TOOLTIP_MARKER_ATTR);
1780  });
1781 },
1782 RequireAssignTooltips: function() {
1783  return this.enableEllipsis && !ASPx.Browser.MobileUI;
1784 },
1785 RemoveEllipsisFromNode: function(node) {
1786  ASPx.RemoveClassNameFromElement(node, ELLIPSIS_MARKER_CLASS);
1787  this.RemoveEllipsisTooltip(node);
1788 },
1789 RemoveEllipsisTooltip: function(node) {
1790  if(ASPx.Attr.IsExistsAttribute(node, ELLIPSIS_TOOLTIP_MARKER_ATTR)) {
1791   ASPx.Attr.RemoveAttribute(node, "title");
1792   ASPx.Attr.RemoveAttribute(node, ELLIPSIS_TOOLTIP_MARKER_ATTR);
1793  }
1794 },
1795 OnBrowserWindowResize: function(e) {
1796 },
1797 OnBrowserWindowResizeInternal: function(e){
1798  if(this.BrowserWindowResizeSubscriber()) 
1799   this.OnBrowserWindowResize(e);
1800 },
1801 BrowserWindowResizeSubscriber: function() {
1802  return this.widthValueSetInPercentage || !this.IsAdjusted();
1803 },
1804 ShrinkWrappedText: function(getElements, key, reCorrect) {
1805  if(!ASPx.Browser.Safari) return;
1806  var elements = ASPx.CacheHelper.GetCachedElements(this, key, getElements, this.wrappedTextContainers);
1807  for(var i = 0; i < elements.length; i++)
1808   this.ShrinkWrappedTextInContainer(elements[i], reCorrect);
1809 },
1810 ShrinkWrappedTextInContainer: function(container, reCorrect) {
1811  if(!ASPx.Browser.Safari || !container || (container.dxWrappedTextShrinked && !reCorrect) || container.offsetWidth === 0) return;
1812  ASPx.ShrinkWrappedTextInContainer(container);
1813  container.dxWrappedTextShrinked = true;
1814 },
1815 CorrectWrappedText: function(getElements, key, reCorrect) {
1816  var elements = ASPx.CacheHelper.GetCachedElements(this, key, getElements, this.wrappedTextContainers);
1817  for(var i = 0; i < elements.length; i++)
1818   this.CorrectWrappedTextInContainer(elements[i], reCorrect);
1819 },
1820 CorrectWrappedTextInContainer: function(container, reCorrect) {
1821  if(!container || (container.dxWrappedTextCorrected && !reCorrect) || container.offsetWidth === 0) return;
1822  ASPx.AdjustWrappedTextInContainer(container);
1823  container.dxWrappedTextCorrected = true;
1824 },
1825 CorrectVerticalAlignment: function(alignMethod, getElements, key, reAlign) {
1826  var elements = ASPx.CacheHelper.GetCachedElements(this, key, getElements, this.verticalAlignedElements);
1827  for(var i = 0; i < elements.length; i++)
1828   this.CorrectElementVerticalAlignment(alignMethod, elements[i], reAlign);
1829 },
1830 CorrectElementVerticalAlignment: function(alignMethod, element, reAlign) {
1831  if(!element || (element.dxVerticalAligned && !reAlign) || element.offsetHeight === 0) return;
1832  alignMethod(element);
1833  element.dxVerticalAligned = true;
1834 },
1835 ClearVerticalAlignedElementsCache: function() {
1836  ASPx.CacheHelper.DropCache(this.verticalAlignedElements);
1837 },
1838 ClearWrappedTextContainersCache: function() {
1839  ASPx.CacheHelper.DropCache(this.wrappedTextContainers);
1840 },
1841 AdjustPagerControls: function() {
1842  if(typeof(ASPx.GetPagersCollection) != "undefined")
1843   ASPx.GetPagersCollection().AdjustControls(this.GetMainElement());
1844 },
1845 RegisterInControlTree: function(tree) {
1846  var mainElement = this.GetMainElement();
1847  if(mainElement && mainElement.id)
1848   tree.createNode(mainElement.id, this);
1849 },
1850 GetItemElementName: function(element) {
1851  var name = "";
1852  if(element.id)
1853   name = element.id.substring(this.name.length + 1);
1854  return name;
1855 },
1856 GetLinkElement: function(element) {
1857  if(element == null) return null;
1858  return (element.tagName == "A") ? element : ASPx.GetNodeByTagName(element, "A", 0);
1859 },
1860 GetInternalHyperlinkElement: function(parentElement, index) {
1861  var element = ASPx.GetNodeByTagName(parentElement, "A", index);
1862  if(element == null) 
1863   element = ASPx.GetNodeByTagName(parentElement, "SPAN", index);
1864  return element;
1865 },
1866 OnControlClick: function(clickedElement, htmlEvent) {
1867 }
1868});
1869ASPxClientControl.Cast = function(obj) {
1870 if(typeof obj == "string")
1871  return window[obj];
1872 return obj;
1873};
1874ASPxClientControl.AdjustControls = function(container, collapseControls){
1875 aspxGetControlCollection().AdjustControls(container, collapseControls);
1876};
1877ASPxClientControl.GetControlCollection = function(){
1878 return aspxGetControlCollection();
1879};
1880ASPxClientControl.LeadingAfterInitCallConsts = {
1881 None: 0,
1882 Direct: 1,
1883 Reverse: 2
1884};
1885var ASPxClientComponent = ASPx.CreateClass(ASPxClientControl, {
1886 constructor: function (name) {
1887  this.constructor.prototype.constructor.call(this, name);
1888 },
1889 IsDOMDisposed: function() { 
1890  return false;
1891 }
1892});
1893var ASPxClientControlCollection = ASPx.CreateClass(ASPx.CollectionBase, {
1894 constructor: function(){
1895  this.constructor.prototype.constructor.call(this);
1896  this.prevWndWidth = "";
1897  this.prevWndHeight = "";
1898  this.requestCountInternal = 0; 
1899  this.BeforeInitCallback = new ASPxClientEvent();
1900  this.ControlsInitialized = new ASPxClientEvent();
1901  this.BrowserWindowResized = new ASPxClientEvent();
1902  this.BrowserWindowResizedInternal = new ASPxClientEvent();
1903  this.BeginCallback = new ASPxClientEvent();
1904  this.EndCallback = new ASPxClientEvent();
1905  this.CallbackError = new ASPxClientEvent();
1906  this.ValidationCompleted = new ASPxClientEvent();
1907  aspxGetControlCollectionCollection().Add(this);
1908 },
1909 Add: function(element) {
1910  var existsElement = this.Get(element.name);
1911  if(existsElement && existsElement !== element) 
1912   this.Remove(existsElement);
1913  ASPx.CollectionBase.prototype.Add.call(this, element.name, element);
1914 },
1915 Remove: function(element) {
1916  if(element && element instanceof ASPxClientControl && !element.IsDisposed())
1917   element.OnDispose();
1918  ASPx.CollectionBase.prototype.Remove.call(this, element.name);
1919 },
1920 GetGlobal: function(name) {
1921  var result = window[name];
1922  return result && Ident.IsASPxClientControl(result)
1923   ? result
1924   : null;
1925 },
1926 GetByName: function(name){
1927  return this.Get(name) || this.GetGlobal(name);
1928 },
1929 GetCollectionType: function(){
1930  return ASPxClientControlCollection.BaseCollectionType;
1931 },
1932 GetControlsByPredicate: function(predicate) {
1933  var result = [];
1934  this.ForEachControl(function(control) {
1935   if(!predicate || predicate(control))
1936    result.push(control);
1937  });
1938  return result;
1939 },
1940 GetControlsByType: function(type) {
1941  return this.GetControlsByPredicate(function(control) { 
1942   return type && (control instanceof type);
1943  });
1944 },
1945 ForEachControl: function(action, context) {
1946  context = context || this;
1947  this.elementsMap.forEachEntry(function(name, control) {
1948   if(Ident.IsASPxClientControl(control) && (!this.filterPredicate || this.filterPredicate(control)))
1949    return action.call(context, control);
1950  }, context);
1951 },
1952 ProcessActionByPredicate: function(action, predicate) {
1953  try {
1954   this.filterPredicate = predicate;
1955   action(this);
1956  }
1957  finally {
1958   this.filterPredicate = null;
1959  }
1960 },
1961 adjustControlsInternal: function(container, context, collapseControls, adjustFunc) {
1962  context = context || this;
1963  var func = function(control) {
1964   adjustFunc.call(context, control);
1965  };
1966  ASPx.GetControlAdjuster().adjustControlsInHierarchy(this, func, container, collapseControls);
1967 },
1968 AdjustControls: function(container, collapseControls) {
1969  container = container || null;
1970  window.setTimeout(function() {
1971   this.AdjustControlsCore(container, collapseControls);
1972  }.aspxBind(this), 0);
1973 },
1974 AdjustControlsCore: function(container, collapseControls) {
1975  var adjustFunction = function(control) { control.AdjustControl(); };
1976  this.adjustControlsInternal(container, this, collapseControls, adjustFunction);
1977 },
1978 CollapseControls: function(container) {
1979  this.ProcessControlsInContainer(container, function(control) {
1980   if(control.isASPxClientEdit)
1981    control.CollapseEditor();
1982   else if(!!window.ASPxClientRibbon && control instanceof ASPxClientRibbon)
1983    control.CollapseControl();
1984  });
1985 },
1986 AtlasInitialize: function(isCallback) {
1987  this.ForEachControl(function(control) {
1988   control.AtlasPreInitialize();
1989  });
1990  ASPx.ProcessScriptsAndLinks("", isCallback);
1991  this.ForEachControl(function(control) {
1992   control.AtlasInitialize();
1993  });
1994 },
1995 DOMContentLoaded: function() {
1996  this.ForEachControl(function(control){
1997    control.DOMContentLoaded();
1998  });
1999 },
2000 OnDocumentUnload: function() {
2001  this.ForEachControl(function(control) {
2002   control.RaiseUnload();
2003  });
2004 },
2005 Initialize: function() {
2006  ASPx.GetPostHandler().Post.AddHandler(
2007   function(s, e) { this.OnPost(e); }.aspxBind(this)
2008  );
2009  ASPx.GetPostHandler().PostFinalization.AddHandler(
2010   function(s, e) { this.OnPostFinalization(e); }.aspxBind(this)
2011  );
2012  this.InitializeElements(false );
2013  if(typeof(Sys) != "undefined" && typeof(Sys.Application) != "undefined") {
2014   var checkIsInitialized = function() {
2015    if(Sys.Application.get_isInitialized())
2016     Sys.Application.add_load(aspxCAInit);
2017    else
2018     setTimeout(checkIsInitialized, 0);
2019   };
2020   checkIsInitialized();
2021  }
2022  this.InitWindowSizeCache();
2023 },
2024 FinalizeInitialization: function() {
2025  this.ForEachControl(function(control) {
2026   control.FinalizeInitialization();
2027  });
2028 },
2029 InitializeElements: function(isCallback) {
2030  this.ForEachControl(function(control){
2031   if(!control.isInitialized)
2032    control.Initialize();
2033  });
2034  this.AfterInitializeElementsLeadingCall();
2035  this.AfterInitializeElements();
2036  this.RaiseControlsInitialized(isCallback);
2037 },
2038 AfterInitializeElementsLeadingCall: function() {
2039  var controls = {};
2040  controls[ASPxClientControl.LeadingAfterInitCallConsts.Direct] = [];
2041  controls[ASPxClientControl.LeadingAfterInitCallConsts.Reverse] = [];
2042  this.ForEachControl(function(control) {
2043   if(control.leadingAfterInitCall != ASPxClientControl.LeadingAfterInitCallConsts.None && !control.isInitialized)
2044    controls[control.leadingAfterInitCall].push(control);
2045  });
2046  var directInitControls = controls[ASPxClientControl.LeadingAfterInitCallConsts.Direct],
2047   reverseInitControls = controls[ASPxClientControl.LeadingAfterInitCallConsts.Reverse];
2048  for(var i = 0, control; control = directInitControls[i]; i++)
2049   control.AfterInitialize();
2050  for(var i = reverseInitControls.length - 1, control; control = reverseInitControls[i]; i--)
2051   control.AfterInitialize();
2052 },
2053 AfterInitializeElements: function() {
2054  this.ForEachControl(function(control) {
2055   if(control.leadingAfterInitCall == ASPxClientControl.LeadingAfterInitCallConsts.None && !control.isInitialized)
2056    control.AfterInitialize();
2057  });
2058  ASPx.RippleHelper.Init();
2059 },
2060 DoFinalizeCallback: function() {
2061  this.ForEachControl(function(control){
2062   control.DoFinalizeCallback();
2063  });
2064 },
2065 ProcessControlsInContainer: function(container, processFunc, filterFunc) {
2066  this.ForEachControl(function(control){
2067   if((!filterFunc || filterFunc(control)) && (!container || this.IsControlInContainer(container, control)))
2068    processFunc(control);
2069  });
2070 },
2071 IsControlInContainer: function(container, control) {
2072  if(control.GetMainElement) {
2073   var mainElement = control.GetMainElement();
2074   if(mainElement && (mainElement != container)) {
2075    if(ASPx.GetIsParent(container, mainElement))
2076     return true;
2077   }
2078  }
2079  return false;
2080 },
2081 RaiseControlsInitialized: function(isCallback) {
2082  if(typeof(isCallback) == "undefined")
2083   isCallback = true;
2084  var args = new ASPxClientControlsInitializedEventArgs(isCallback);
2085  if(!this.ControlsInitialized.IsEmpty())  
2086   this.ControlsInitialized.FireEvent(this, args);
2087  this.ForEachControl(function(control){
2088   control.OnGlobalControlsInitialized(args);
2089  });
2090 },
2091 RaiseBrowserWindowResized: function() {
2092  var args = new ASPxClientEventArgs();
2093  if(!this.BrowserWindowResized.IsEmpty())
2094   this.BrowserWindowResized.FireEvent(this, args);
2095  this.ForEachControl(function(control){
2096   control.OnGlobalBrowserWindowResized(args);
2097  });
2098 },
2099 RaiseBrowserWindowResizedInternal: function(eventInfo) {
2100  var args = new ASPxClientBrowserWindowResizedInternalEventArgs(eventInfo);
2101  if(!this.BrowserWindowResizedInternal.IsEmpty())
2102   this.BrowserWindowResizedInternal.FireEvent(this, args);
2103 },
2104 RaiseBeginCallback: function (control, command) {
2105  var args = new ASPxClientGlobalBeginCallbackEventArgs(control, command);
2106  if(!this.BeginCallback.IsEmpty())
2107   this.BeginCallback.FireEvent(this, args);
2108  this.ForEachControl(function(control){
2109   control.OnGlobalBeginCallback(args);
2110  });
2111  this.IncrementRequestCount();
2112 },
2113 RaiseEndCallback: function (control) {
2114  var args = new ASPxClientGlobalEndCallbackEventArgs(control);
2115  if (!this.EndCallback.IsEmpty()) 
2116   this.EndCallback.FireEvent(this, args);
2117  this.ForEachControl(function(control){
2118   control.OnGlobalEndCallback(args);
2119  });
2120  this.DecrementRequestCount();
2121 },
2122 InCallback: function() {
2123  return this.requestCountInternal > 0;
2124 },
2125 RaiseCallbackError: function (control, message, callbackId) {
2126  var args = new ASPxClientGlobalCallbackErrorEventArgs(control, message, callbackId);
2127  if (!this.CallbackError.IsEmpty()) 
2128   this.CallbackError.FireEvent(this, args);
2129  this.ForEachControl(function(control){
2130   control.OnGlobalCallbackError(args);
2131  });
2132  if(args.handled)
2133   return { isHandled: true, errorMessage: args.message };  
2134  return { isHandled: false, errorMessage: message };
2135 },
2136 RaiseValidationCompleted: function (container, validationGroup, invisibleControlsValidated, isValid, firstInvalidControl, firstVisibleInvalidControl) {
2137  var args = new ASPxClientValidationCompletedEventArgs(container, validationGroup, invisibleControlsValidated, isValid, firstInvalidControl, firstVisibleInvalidControl);
2138  if (!this.ValidationCompleted.IsEmpty()) 
2139   this.ValidationCompleted.FireEvent(this, args);
2140  this.ForEachControl(function(control){
2141   control.OnGlobalValidationCompleted(args);
2142  });
2143  return args.isValid;
2144 },
2145 Before_WebForm_InitCallback: function(callbackOwnerID){
2146  var args = new BeforeInitCallbackEventArgs(callbackOwnerID);
2147  this.BeforeInitCallback.FireEvent(this, args);
2148 },
2149 InitWindowSizeCache: function(){
2150  this.prevWndWidth = ASPx.GetDocumentClientWidth();
2151  this.prevWndHeight = ASPx.GetDocumentClientHeight();
2152 },
2153 OnBrowserWindowResize: function(evt){
2154  this.OnBrowserWindowResizeCore(evt);
2155 },
2156 OnBrowserWindowResizeCore: function(htmlEvent){
2157  var args = this.CreateOnBrowserWindowResizeEventArgs(htmlEvent);
2158  if(this.CalculateIsBrowserWindowSizeChanged()) {
2159   this.RaiseBrowserWindowResizedInternal(args);
2160   this.adjustControlsInternal(null, this, true, function(control) {
2161    if(control.IsDOMInitialized())
2162     control.OnBrowserWindowResizeInternal(args);
2163   });
2164   this.RaiseBrowserWindowResized();
2165  }
2166 },
2167 CreateOnBrowserWindowResizeEventArgs: function(htmlEvent) {
2168  return {
2169   htmlEvent: htmlEvent,
2170   wndWidth: ASPx.GetDocumentClientWidth(),
2171   wndHeight: ASPx.GetDocumentClientHeight(),
2172   prevWndWidth: this.prevWndWidth,
2173   prevWndHeight: this.prevWndHeight,
2174   virtualKeyboardShownOnAndroid: this.IsVirtualKeyboardShownOnAndroid()
2175  };
2176 },
2177 IsVirtualKeyboardShownOnAndroid: function() {
2178  if(!ASPx.Browser.AndroidMobilePlatform)
2179   return false;
2180  var documentClientWidth = ASPx.GetDocumentClientWidth();
2181  var documentClientHeight = ASPx.GetDocumentClientHeight();
2182  var isDocumentClientHeightChangedOnly = documentClientWidth === this.prevWndWidth && documentClientHeight !== this.prevWndHeight;
2183  return isDocumentClientHeightChangedOnly && this.IsElementSupportKeyboardInput(document.activeElement);
2184 },
2185 IsElementSupportKeyboardInput: function(element) {
2186  if(!element || !element.tagName)
2187   return false;
2188  var supportedKeyboardInputTagNames = ["INPUT", "TEXTAREA"];
2189  return supportedKeyboardInputTagNames.indexOf(element.tagName) !== -1;
2190 },
2191 CalculateIsBrowserWindowSizeChanged: function(){
2192  var wndWidth = ASPx.GetDocumentClientWidth();
2193  var wndHeight = ASPx.GetDocumentClientHeight();
2194  var isBrowserWindowSizeChanged = (this.prevWndWidth != wndWidth) || (this.prevWndHeight != wndHeight);
2195  if(isBrowserWindowSizeChanged){
2196   this.prevWndWidth = wndWidth;
2197   this.prevWndHeight = wndHeight;
2198   return true;
2199  }
2200  return false;
2201 },
2202 OnPost: function(args){
2203  this.ForEachControl(function(control) {
2204   control.OnPost(args);
2205  }, null);
2206 },
2207 OnPostFinalization: function(args){
2208  this.ForEachControl(function(control) {
2209   control.OnPostFinalization(args);
2210  }, null);
2211 },
2212 IncrementRequestCount: function() {
2213  this.requestCountInternal++;
2214 },
2215 DecrementRequestCount: function() {
2216  this.requestCountInternal--;
2217 },
2218 ResetRequestCount: function() {
2219  this.requestCountInternal = 0;
2220 }
2221});
2222ASPxClientControlCollection.BaseCollectionType = "Control";
2223var controlCollection = null;
2224function aspxGetControlCollection(){
2225 if(controlCollection == null) {
2226  controlCollection = new ASPxClientControlCollection();
2227  if(ASPx.loadControlCollectionPreloadHandlers)
2228   ASPx.loadControlCollectionPreloadHandlers(controlCollection);
2229 }
2230 return controlCollection;
2231}
2232var ControlCollectionCollection = ASPx.CreateClass(ASPx.CollectionBase, {
2233 constructor: function(){
2234  this.constructor.prototype.constructor.call(this);
2235 },
2236 Add: function(element) {
2237  var key = element.GetCollectionType();
2238  if(!key) throw "The collection type isn't specified.";
2239  if(this.Get(key)) throw "The collection with type='" + key + "' already exists.";
2240  ASPx.CollectionBase.prototype.Add.call(this, key, element);
2241 },
2242 RemoveDisposedControls: function(){
2243  var baseCollection = this.Get(ASPxClientControlCollection.BaseCollectionType);
2244  var disposedControls = [];
2245  baseCollection.elementsMap.forEachEntry(function(name, control) {
2246   if(!ASPx.Ident.IsASPxClientControl(control)) return;
2247   if(control.IsDOMDisposed())
2248    disposedControls.push(control);
2249  });
2250  this.RemoveControls(disposedControls);
2251 },
2252 RemoveControls: function(controls){
2253  for(var i = 0; i < controls.length; i++) {
2254   this.elementsMap.forEachEntry(function(key, collection) {
2255    if(ASPx.Ident.IsASPxClientCollection(collection))
2256     collection.Remove(controls[i]);
2257   });
2258  }
2259 }
2260});
2261var controlCollectionCollection = null;
2262function aspxGetControlCollectionCollection(){
2263 if(controlCollectionCollection == null)
2264  controlCollectionCollection = new ControlCollectionCollection();
2265 return controlCollectionCollection;
2266}
2267var AriaDescriptionAttributes = {
2268 Role: "0",
2269 AriaLabel: "1",
2270 TabIndex: "2",
2271 AriaOwns: "3",
2272 AriaDescribedBy: "4",
2273 AriaDisabled: "5",
2274 AriaHasPopup: "6",
2275 AriaLevel: "7"
2276};
2277var AriaDescriptor = ASPx.CreateClass(null, {
2278 constructor: function(ownerControl, description) {
2279  this.ownerControl = ownerControl;
2280  this.rootElement = ownerControl.GetMainElement();
2281  this.description = description;
2282 },
2283 setDescription: function(name, argList) {
2284  var description = this.findChildDescription(name);
2285  if(description) {
2286   var elements = name ? this.rootElement.querySelectorAll(this.getDescriptionSelector(description)) : [this.rootElement];
2287   for(var i = 0; i < elements.length; i++)
2288    this.applyDescriptionToElement(elements[i], description, argList[i] || argList[0]);
2289  }
2290 },
2291 getDescriptionName: function(description) {
2292  return description.n;
2293 },
2294 getDescriptionSelector: function(description) {
2295  return description.s;
2296 },
2297 findChildDescription: function(name) {
2298  if(name === this.getDescriptionName(this.description))
2299   return this.description;
2300  var childCollection = this.description.c || [];
2301  for(var i = 0; i < childCollection.length; i++) {
2302   var childDescription = childCollection[i];
2303   if(this.getDescriptionName(childDescription) === name)
2304    return childDescription;
2305  }
2306  return null;
2307 },
2308 applyDescriptionToElement: function(element, description, args) {
2309  if(!description || !element)
2310   return;
2311  this.trySetAriaOwnsAttribute(element, description);
2312  this.trySetAriaDescribedByAttribute(element, description);
2313  this.trySetAttribute(element, description, AriaDescriptionAttributes.Role, "role");
2314  this.trySetAttribute(element, description, AriaDescriptionAttributes.TabIndex, "tabindex");
2315  this.trySetAttribute(element, description, AriaDescriptionAttributes.AriaLevel, "aria-level");
2316  this.executeOnDescription(description, AriaDescriptionAttributes.AriaLabel, function(value) {
2317   ASPx.Attr.SetAttribute(element, "aria-label", ASPx.Str.ApplyReplacement(value, args
2317));
2318  });
2319  this.executeOnDescription(description, AriaDescriptionAttributes.AriaDisabled, function(value) {
2320   ASPx.Attr.SetAttribute(element, "aria-disabled", !!value); 
2321  });
2322  this.executeOnDescription(description, AriaDescriptionAttributes.AriaHasPopup, function(value) {
2323   ASPx.Attr.SetAttribute(element, "aria-haspopup", !!value);
2324  });
2325 },
2326 trySetAriaDescribedByAttribute: function(element, description) {
2327  this.executeOnDescription(description, AriaDescriptionAttributes.AriaDescribedBy, function(selectorInfo) {
2328   var descriptor = this.getNodesBySelector(element, selectorInfo.descriptorSelector)[0];
2329   var target = this.getNodesBySelector(element, selectorInfo.targetSelector)[0];
2330   if(!target || !descriptor)
2331    return;
2332   ASPx.Attr.SetAttribute(target, "aria-describedby", this.getNodeId(descriptor));
2333  });
2334 },
2335 trySetAriaOwnsAttribute: function(element, description) {
2336  this.executeOnDescription(description, AriaDescriptionAttributes.AriaOwns, function(selector) {
2337   var ownedNodes = this.getNodesBySelector(element, selector);
2338   var ariaOwnsAttributeValue = "";
2339   for(var i = 0; i < ownedNodes.length; i++)
2340    ariaOwnsAttributeValue += (this.getNodeId(ownedNodes[i]) + (i != ownedNodes.length - 1 ? " " : ""));
2341   ASPx.Attr.SetAttribute(element, "aria-owns", ariaOwnsAttributeValue);
2342  });
2343 },
2344 trySetAttribute: function(element, description, ariaAttribute, attributeName) {
2345  this.executeOnDescription(description, ariaAttribute, function(value) { 
2346   ASPx.Attr.SetAttribute(element, attributeName, description[ariaAttribute]); 
2347  });
2348 },
2349 executeOnDescription: function(description, ariaDescAttr, callback) {
2350  var descInfo = description[ariaDescAttr];
2351  if(ASPx.IsExists(descInfo))
2352   callback.aspxBind(this)(descInfo);
2353 },
2354 getNodesBySelector: function(element, selector) {
2355  var id = element.id || "";
2356  var childNodes = element.querySelectorAll("#" + this.getNodeId(element) + " > " + selector);
2357  ASPx.Attr.SetOrRemoveAttribute(element, "id", id);
2358  return childNodes;
2359 },
2360 getNodeId: function(node) {
2361  if(!node.id)
2362   node.id = this.createRandomId();
2363  return node.id; 
2364 },
2365 createRandomId: function() {
2366  return "r" + ASPx.CreateGuid();
2367 }
2368});
2369PagerCommands = {
2370 Next : "PBN",
2371 Prev : "PBP",
2372 Last : "PBL",
2373 First : "PBF",
2374 PageNumber : "PN",
2375 PageSize : "PSP"
2376};
2377ASPx.callbackProcessed = false;
2378ASPx.Callback = function(result, context){ 
2379 var collection = aspxGetControlCollection();
2380 collection.DoFinalizeCallback();
2381 var control = collection.Get(context);
2382 if(control != null)
2383  control.DoCallback(result);
2384 ASPx.RippleHelper.ReInit();
2385 ASPx.callbackProcessed = true;
2386};
2387ASPx.CallbackError = function(result, context){
2388 var control = aspxGetControlCollection().Get(context);
2389 if(control != null)
2390  control.DoCallbackError(result, false);
2391 ASPx.callbackProcessed = true;
2392};
2393ASPx.CClick = function(name, evt) {
2394 var control = aspxGetControlCollection().Get(name);
2395 if(control != null) control.DoControlClick(evt);
2396};
2397function aspxCAInit() {
2398 var isAppInit = typeof(Sys$_Application$initialize) != "undefined" &&
2399  ASPx.FunctionIsInCallstack(arguments.callee, Sys$_Application$initialize, 10 );
2400 aspxGetControlCollection().AtlasInitialize(!isAppInit);
2401}
2402ASPx.Evt.AttachEventToElement(window, "resize", aspxGlobalWindowResize);
2403function aspxGlobalWindowResize(evt){
2404 aspxGetControlCollection().OnBrowserWindowResize(evt); 
2405}
2406ASPx.Evt.AttachEventToElement(window, "unload", aspxClassesUnload);
2407function aspxClassesUnload(evt) {
2408 aspxGetControlCollection().OnDocumentUnload();
2409}
2410ASPx.attachToLoad(aspxClassesDOMContentLoaded);
2411function aspxClassesDOMContentLoaded(evt){
2412 aspxGetControlCollection().DOMContentLoaded();
2413}
2414ASPx.GetControlCollection = aspxGetControlCollection;
2415ASPx.GetControlCollectionCollection = aspxGetControlCollectionCollection;
2416ASPx.GetPersistentControlPropertiesStorage = _aspxGetPersistentControlPropertiesStorage;
2417ASPx.PagerCommands = PagerCommands;
2418ASPx.ELLIPSIS_MARKER_CLASS = ELLIPSIS_MARKER_CLASS;
2419window.ASPxClientBeginCallbackEventArgs = ASPxClientBeginCallbackEventArgs;
2420window.ASPxClientGlobalBeginCallbackEventArgs = ASPxClientGlobalBeginCallbackEventArgs;
2421window.ASPxClientEndCallbackEventArgs = ASPxClientEndCallbackEventArgs;
2422window.ASPxClientGlobalEndCallbackEventArgs = ASPxClientGlobalEndCallbackEventArgs;
2423window.ASPxClientCallbackErrorEventArgs = ASPxClientCallbackErrorEventArgs;
2424window.ASPxClientGlobalCallbackErrorEventArgs = ASPxClientGlobalCallbackErrorEventArgs;
2425window.ASPxClientCustomDataCallbackEventArgs = ASPxClientCustomDataCallbackEventArgs;
2426window.ASPxClientValidationCompletedEventArgs = ASPxClientValidationCompletedEventArgs;
2427window.ASPxClientControlsInitializedEventArgs = ASPxClientControlsInitializedEventArgs;
2428window.ASPxClientControlBeforePronounceEventArgs = ASPxClientControlBeforePronounceEventArgs;
2429window.ASPxClientControlUnloadEventArgs = ASPxClientControlUnloadEventArgs;
2430window.ASPxClientEndFocusEventArgs = ASPxClientEndFocusEventArgs;
2431window.ASPxClientItemFocusedEventArgs = ASPxClientItemFocusedEventArgs;
2432window.ASPxClientControlCollection = ASPxClientControlCollection;
2433window.ASPxClientControlBase = ASPxClientControlBase;
2434window.ASPxClientControl = ASPxClientControl;
2435window.ASPxClientComponent = ASPxClientComponent;
2436})(ASPx);
2437

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.