PageSourceSearch

https://masonrymagazine.com/DXR.axd?r=1_12-V3vLw&order=3

js masonrymagazine.com collected 2026-10-02 04:03:46 UTC 90,659 bytes, 2,439 lines download raw bytes

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

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.