PageSourceSearch

https://quranpuyan.com/ScriptResource.axd?d=vcSHJGrOrdgHJiN7y8vuEi…4EMH0dQTu87JlCkI-bOpROva2oAasTg2&t=5f4a0b92

js quranpuyan.com collected 2026-09-25 10:26:26 UTC 37,396 bytes, 922 lines download raw bytes

1// Name:        UpdateControls.debug.js
2// Assembly:    nStuff.UpdateControls
3// Version:     1.2.0.0
4// FileVersion: 1.2.0.0
5//! UpdateControls.js
6//! Copyright (c) Nikhil Kothari, 2007. All Rights Reserved.
7//! http://www.nikhilk.net
8//!
9//! This product's copyrights are licensed under the Creative
10//! Commons Attribution-ShareAlike (version 2.5).B
11//! http://creativecommons.org/licenses/by-sa/2.5/
12//!
13//! You are free to:
14//! - copy, distribute, display, and perform the work 
15//! - make derivative works 
16//! - make commercial use of the work 
17//! as long as the work is itself not a server control offering of
18//! any sort, under the following conditions:
19//! Attribution. You must attribute the original work in your
20//!              product or release.
21//! Share Alike. If you alter, transform, or build upon this work,
22//!              you may distribute the resulting work only under
23//!              a license identical to this one.
24//!
25
26
27Type.registerNamespace('nStuff');
28
29////////////////////////////////////////////////////////////////////////////////
30// nStuff.AnimationType
31
32nStuff.AnimationType = function() { };
33nStuff.AnimationType.prototype = {
34    crossFade: 0, 
35    highlight: 1, 
36    slideUp: 2, 
37    slideDown: 3, 
38    wipeLeft: 4, 
39    wipeRight: 5
40}
41nStuff.AnimationType.registerEnum('nStuff.AnimationType', false);
42
43
44////////////////////////////////////////////////////////////////////////////////
45// nStuff.AnimatedUpdatePanelOptions
46
47nStuff.$create_AnimatedUpdatePanelOptions = function nStuff_AnimatedUpdatePanelOptions() { return {}; }
48
49
50////////////////////////////////////////////////////////////////////////////////
51// nStuff.UpdateIndicatorOptions
52
53nStuff.$create_UpdateIndicatorOptions = function nStuff_UpdateIndicatorOptions() { return {}; }
54
55
56////////////////////////////////////////////////////////////////////////////////
57// nStuff.UpdateActionOptions
58
59nStuff.$create_UpdateActionOptions = function nStuff_UpdateActionOptions() { return {}; }
60
61
62////////////////////////////////////////////////////////////////////////////////
63// nStuff.ScrollOffset
64
65nStuff.ScrollOffset = function() { };
66nStuff.ScrollOffset.prototype = {
67    top: 0, 
68    bottom: 1, 
69    middle: 2
70}
71nStuff.ScrollOffset.registerEnum('nStuff.ScrollOffset', false);
72
73
74////////////////////////////////////////////////////////////////////////////////
75// nStuff.UpdateHistoryOptions
76
77nStuff.$create_UpdateHistoryOptions = function nStuff_UpdateHistoryOptions() { return {}; }
78
79
80////////////////////////////////////////////////////////////////////////////////
81// nStuff.AnimatedUpdatePanel
82
83nStuff.AnimatedUpdatePanel = function nStuff_AnimatedUpdatePanel(element) {
84    nStuff.AnimatedUpdatePanel.initializeBase(this, [ element ]);
85}
86nStuff.AnimatedUpdatePanel.prototype = {
87    _animation$2: null,
88    _pageLoadedHandler$2: null,
89    _pageLoadingHandler$2: null,
90    _updatePanel$2: null,
91    _oldUpdatePanel$2: null,
92    
93    get_animation: function nStuff_AnimatedUpdatePanel$get_animation() {
94        return null;
95    },
96    set_animation: function nStuff_AnimatedUpdatePanel$set_animation(value) {
97        this._animation$2 = value;
98        return value;
99    },
100    
101    dispose: function nStuff_AnimatedUpdatePanel$dispose() {
102        if (this._pageLoadedHandler$2) {
103            var prm = Sys.WebForms.PageRequestManager.getInstance();
104            prm.remove_pageLoaded(this._pageLoadedHandler$2);
105            prm.remove_pageLoading(this._pageLoadingHandler$2);
106            this._pageLoadedHandler$2 = null;
107            this._pageLoadingHandler$2 = null;
108        }
109        nStuff.AnimatedUpdatePanel.callBaseMethod(this, 'dispose');
110    },
111    
112    initialize: function nStuff_AnimatedUpdatePanel$initialize() {
113        nStuff.AnimatedUpdatePanel.callBaseMethod(this, 'initialize');
114        this._pageLoadedHandler$2 = Function.createDelegate(this, this._onPageLoaded$2);
115        this._pageLoadingHandler$2 = Function.createDelegate(this, this._onPageLoading$2);
116        var prm = Sys.WebForms.PageRequestManager.getInstance();
117        prm.add_pageLoaded(this._pageLoadedHandler$2);
118        prm.add_pageLoading(this._pageLoadingHandler$2);
119        var element = this.get_element();
120        var childNodes = element.childNodes;
121        for (var i = childNodes.length - 1; i >= 0; i--) {
122            if (childNodes[i].nodeType === 1) {
123                this._updatePanel$2 = childNodes[i];
124                element.style.width = this._updatePanel$2.offsetWidth + 'px';
125                element.style.height = this._updatePanel$2.offsetHeight + 'px';
126                var updatePanelStyle = this._updatePanel$2.style;
127                updatePanelStyle.position = 'absolute';
128                updatePanelStyle.left = '0px';
129                updatePanelStyle.top = '0px';
130                break;
131            }
132        }
133    },
134    
135    _onPageLoaded$2: function nStuff_AnimatedUpdatePanel$_onPageLoaded$2(sender, e) {
136        if (!Array.contains(e.get_panelsUpdated(), this._updatePanel$2)) {
137            return;
138        }
139        var element = this.get_element();
140        element.style.width = this._updatePanel$2.offsetWidth + 'px';
141        element.style.height = this._updatePanel$2.offsetHeight + 'px';
142        if (this._animation$2.type === nStuff.AnimationType.highlight) {
143            var overlay = document.createElement('div');
144            overlay.className = this._animation$2.highlightCssClass;
145            var overlayStyle = overlay.style;
146            overlayStyle.display = 'none';
147            overlayStyle.position = 'absolute';
148            overlayStyle.top = '0px';
149            overlayStyle.left = '0px';
150            overlayStyle.width = element.offsetWidth + 'px';
151            overlayStyle.height = element.offsetHeight + 'px';
152            element.appendChild(overlay);
153            var effect = new nStuff._highlightOverlayEffect(overlay, this._animation$2.duration);
154            effect.play(null);
155        }
156        else {
157            this._oldUpdatePanel$2.style.width = this._updatePanel$2.offsetWidth + 'px';
158            this._oldUpdatePanel$2.style.height = this._updatePanel$2.offsetHeight + 'px';
159            var updatePanelStyle = this._updatePanel$2.style;
160            updatePanelStyle.position = 'absolute';
161            updatePanelStyle.left = '0px';
162            updatePanelStyle.top = '0px';
163            if (this._animation$2.type === nStuff.AnimationType.crossFade) {
164                var effect = new nStuff._crossFadeEffect(element, this._animation$2.duration);
165                effect.playEffect(this._oldUpdatePanel$2, this._updatePanel$2);
166            }
167            else {
168                var effect = new nStuff._slideOrWipeEffect(element, this._animation$2.duration);
169                effect.playEffect(this._animation$2.type, this._oldUpdatePanel$2, this._updatePanel$2);
170            }
171        }
172    },
173    
174    _onPageLoading$2: function nStuff_AnimatedUpdatePanel$_onPageLoading$2(sender, e) {
175        if (!Array.contains(e.get_panelsUpdating(), this._updatePanel$2)) {
176            return;
177        }
178        if (this._animation$2.type !== nStuff.AnimationType.highlight) {
179            this._oldUpdatePanel$2 = this._updatePanel$2;
180            this._updatePanel$2 = document.createElement(this._oldUpdatePanel$2.tagName);
181            this._updatePanel$2.className = this._oldUpdatePanel$2.className;
182            this._updatePanel$2.id = this._oldUpdatePanel$2.id;
183            this._updatePanel$2.style.visibility = 'hidden';
184            this._oldUpdatePanel$2.id = '';
185            this._oldUpdatePanel$2.style.overflow = 'hidden';
186            var oldHTML = this._oldUpdatePanel$2.innerHTML;
187            sender._destroyTree(this._oldUpdatePanel$2);
188            this._oldUpdatePanel$2.innerHTML = oldHTML;
189            this.get_element().appendChild(this._updatePanel$2);
190        }
191    }
192}
193
194
195////////////////////////////////////////////////////////////////////////////////
196// nStuff.UpdateIndicator
197
198nStuff.UpdateIndicator = function nStuff_UpdateIndicator(element) {
199    nStuff.UpdateIndicator.initializeBase(this, [ element ]);
200}
201nStuff.UpdateIndicator.prototype = {
202    _options$2: null,
203    
204    get_options: function nStuff_UpdateIndicator$get_options() {
205        return this._options$2;
206    },
207    set_options: function nStuff_UpdateIndicator$set_options(value) {
208        this._options$2 = value;
209        return value;
210    },
211    
212    dispose: function nStuff_UpdateIndicator$dispose() {
213        nStuff.UpdateIndicator.callBaseMethod(this, 'dispose');
214    },
215    
216    initialize: function nStuff_UpdateIndicator$initialize() {
217        nStuff.UpdateIndicator.callBaseMethod(this, 'initialize');
218        var element = this.get_element();
219        var location = Sys.UI.DomElement.getLocation(element);
220        var offset = 0;
221        if (this._options$2.scrollOffset === nStuff.ScrollOffset.bottom) {
222            offset = element.offsetHeight;
223        }
224        else if (this._options$2.scrollOffset === nStuff.ScrollOffset.middle) {
225            offset = Math.floor(element.offsetHeight / 2);
226        }
227        var scroll = new nStuff._scrollEffect(document.body, this._options$2.scrollDuration);
228        scroll.playEffect(location.x, location.y + offset, Function.createDelegate(this, this._onScrollCompleted$2));
229    },
230    
231    _onHighlightCompleted$2: function nStuff_UpdateIndicator$_onHighlightCompleted$2() {
232        this.dispose();
233    },
234    
235    _onScrollCompleted$2: function nStuff_UpdateIndicator$_onScrollCompleted$2() {
236        if (this._options$2.highlightDuration) {
237            var element = this.get_element();
238            var overlay = document.createElement('div');
239            overlay.className = this._options$2.highlightCssClass;
240            var overlayStyle = overlay.style;
241            overlayStyle.display = 'none';
242            overlayStyle.position = 'absolute';
243            overlayStyle.top = '0px';
244            overlayStyle.left = '0px';
245            overlayStyle.width = element.offsetWidth + 'px';
246            overlayStyle.height = element.offsetHeight + 'px';
247            element.appendChild(overlay);
248            var effect = new nStuff._highlightOverlayEffect(overlay, this._options$2.highlightDuration);
249            effect.play(Function.createDelegate(this, this._onHighlightCompleted$2));
250        }
251        else {
252            this.dispose();
253        }
254    }
255}
256
257
258////////////////////////////////////////////////////////////////////////////////
259// nStuff._scrollEffect
260
261nStuff._scrollEffect = function nStuff__scrollEffect(domElement, duration) {
262    nStuff._scrollEffect.initializeBase(this, [ domElement, duration ]);
263    this.set_easingFunction(Function.createDelegate(null, nStuff.Glitz.TimedAnimation.easeInOut));
264}
265nStuff._scrollEffect.prototype = {
266    _offsetX$2: 0,
267    _offsetY$2: 0,
268    _scrollXDelta$2: 0,
269    _scrollYDelta$2: 0,
270    
271    performTweening: function nStuff__scrollEffect$performTweening(frame) {
272        var scrollX = Math.ceil(frame * this._scrollXDelta$2) + this._offsetX$2;
273        var scrollY = Math.ceil(frame * this._scrollYDelta$2) + this._offsetY$2;
274        window.scrollTo(scrollX, scrollY);
275    },
276    
277    playEffect: function nStuff__scrollEffect$playEffect(scrollToX, scrollToY, completedCallback) {
278        this._offsetX$2 = document.body.scrollLeft;
279        this._offsetY$2 = document.body.scrollTop;
280        this._scrollXDelta$2 = scrollToX - this._offsetX$2;
281        this._scrollYDelta$2 = scrollToY - this._offsetY$2;
282        this.play(completedCallback);
283    }
284}
285
286
287////////////////////////////////////////////////////////////////////////////////
288// nStuff.UpdateAction
289
290nStuff.UpdateAction = function nStuff_UpdateAction() {
291    nStuff.UpdateAction.initializeBase(this);
292}
293nStuff.UpdateAction.prototype = {
294    _appLoadHandler$1: null,
295    _beginRequestHandler$1: null,
296    _endRequestHandler$1: null,
297    _options$1: null,
298    _updateOptions$1: null,
299    _scrollLeft$1: 0,
300    _scrollTop$1: 0,
301    
302    get_options: function nStuff_UpdateAction$get_options() {
303        return this._options$1;
304    },
305    set_options: function nStuff_UpdateAction$set_options(value) {
306        this._options$1 = value;
307        return value;
308    },
309    
310    dispose: function nStuff_UpdateAction$dispose() {
311        if (this._endRequestHandler$1) {
312            Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler$1);
313            this._endRequestHandler$1 = null;
314        }
315        if (this._beginRequestHandler$1) {
316            Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler$1);
317            this._beginRequestHandler$1 = null;
318        }
319        nStuff.UpdateAction.callBaseMethod(this, 'dispose');
320    },
321    
322    initialize: function nStuff_UpdateAction$initialize() {
323        nStuff.UpdateAction.callBaseMethod(this, 'initialize');
324        this._appLoadHandler$1 = Function.createDelegate(this, this._onAppLoad$1);
325        Sys.Application.add_load(this._appLoadHandler$1);
326    },
327    
328    _onAppLoad$1: function nStuff_UpdateAction$_onAppLoad$1(sender, e) {
329        Sys.Application.remove_load(this._appLoadHandler$1);
330        this._appLoadHandler$1 = null;
331        this._endRequestHandler$1 = Function.createDelegate(this, this._onPageRequestManagerEndRequest$1);
332        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler$1);
333        this._beginRequestHandler$1 = Function.createDelegate(this, this._onPageRequestManagerBeginRequest$1);
334        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler$1);
335        this._performActionsCore$1(this._options$1, false);
336    },
337    
338    _onPageRequestManagerBeginRequest$1: function nStuff_UpdateAction$_onPageRequestManagerBeginRequest$1(sender, e) {
339        Sys.WebForms.PageRequestManager.getInstance()._scrollPosition = null;
340        Sys.WebForms.PageRequestManager.getInstance()._controlIDToFocus = null;
341        if (this._options$1.maintainScrollPosition) {
342            this._scrollLeft$1 = document.body.scrollLeft;
343            this._scrollTop$1 = document.body.scrollTop;
344        }
345    },
346    
347    _onPageRequestManagerEndRequest$1: function nStuff_UpdateAction$_onPageRequestManagerEndRequest$1(sender, e) {
348        this._updateOptions$1 = e.get_dataItems()[this._options$1.dataID];
349        if (this._updateOptions$1) {
350            window.setTimeout(Function.createDelegate(this, this._performActions$1), 100);
351        }
352    },
353    
354    _performActions$1: function nStuff_UpdateAction$_performActions$1() {
355        this._performActionsCore$1(this._updateOptions$1, true);
356    },
357    
358    _performActionsCore$1: function nStuff_UpdateAction$_performActionsCore$1(options, update) {
359        if (update) {
360            if (options.scrollToID) {
361                var scrollToElement = $get(options.scrollToID);
362                if (scrollToElement) {
363                    var location = Sys.UI.DomElement.getLocation(scrollToElement);
364                    var offset = 0;
365                    if (options.scrollOffset === nStuff.ScrollOffset.bottom) {
366                        offset = scrollToElement.offsetHeight;
367                    }
368                    else if (options.scrollOffset === nStuff.ScrollOffset.middle) {
369                        offset = Math.floor(scrollToElement.offsetHeight / 2);
370                    }
371                    var scroll = new nStuff._scrollEffect(document.body, 1000);
372                    scroll.playEffect(location.x, location.y + offset, null);
373                }
374            }
375            else if (options.maintainScrollPosition) {
376                window.scrollTo(this._scrollLeft$1, this._scrollTop$1);
377            }
378        }
379        if (options.message) {
380            alert(options.message);
381        }
382        if (options.focusID) {
383            window.WebForm_AutoFocus(options.focusID);
384        }
385    }
386}
387
388
389////////////////////////////////////////////////////////////////////////////////
390// nStuff._slideOrWipeEffect
391
392nStuff._slideOrWipeEffect = function nStuff__slideOrWipeEffect(domElement, duration) {
393    nStuff._slideOrWipeEffect.initializeBase(this, [ domElement, duration ]);
394    this.set_easingFunction(Function.createDelegate(null, nStuff.Glitz.TimedAnimation.easeInOut));
395}
396nStuff._slideOrWipeEffect.prototype = {
397    _animation$2: 0,
398    _oldContent$2: null,
399    _newContent$2: null,
400    _height$2: 0,
401    _width$2: 0,
402    
403    performCleanup: function nStuff__slideOrWipeEffect$performCleanup() {
404        this._oldContent$2.parentNode.removeChild(this._oldContent$2);
405        this._newContent$2.style.top = '0px';
406        this._newContent$2.style.left = '0px';
407        this._newContent$2.style.height = this._height$2 + 'px';
408        this._newContent$2.style.overflow = 'visible';
409        this._newContent$2.style.clip = 'rect(auto auto auto auto)';
410    },
411    
412    performSetup: function nStuff__slideOrWipeEffect$performSetup() {
413        this._height$2 = this.get_domElement().offsetHeight;
414        this._width$2 = this.get_domElement().offsetWidth;
415        this._newContent$2.style.visibility = 'visible';
416        this._newContent$2.style.overflow = 'hidden';
417        switch (this._animation$2) {
418            case nStuff.AnimationType.slideUp:
419                this._newContent$2.style.top = this._height$2 + 'px';
420                this._newContent$2.style.height = '0px';
421                break;
422            case nStuff.AnimationType.slideDown:
423                this._newContent$2.style.height = this._height$2 + 'px';
424                this._newContent$2.style.clip = 'rect(auto auto 0px auto)';
425                break;
426            case nStuff.AnimationType.wipeLeft:
427                this._newContent$2.style.height = this._height$2 + 'px';
428                this._newContent$2.style.clip = String.format('rect(auto auto auto {0}px)', this._width$2);
429                break;
430            case nStuff.AnimationType.wipeRight:
431                this._newContent$2.style.height = this._height$2 + 'px';
432                this._newContent$2.style.clip = 'rect(auto 0px auto auto)';
433                break;
434        }
435    },
436    
437    performTweening: function nStuff__slideOrWipeEffect$performTweening(frame) {
438        switch (this._animation$2) {
439            case nStuff.AnimationType.slideUp:
440                var yOffset = Math.floor(this._height$2 * (1 - frame));
441                this._newContent$2.style.top = yOffset + 'px';
442                this._newContent$2.style.height = (this._height$2 - yOffset) + 'px';
443                break;
444            case nStuff.AnimationType.slideDown:
445                this._newContent$2.style.clip = String.format('rect(auto auto {0}px auto)', Math.floor(this._height$2 * frame));
446                break;
447            case nStuff.AnimationType.wipeLeft:
448                var xOffset = Math.floor(this._width$2 * (1 - frame));
449                break;
450            case nStuff.AnimationType.wipeRight:
451                this._newContent$2.style.clip = String.format('rect(auto {0}px auto auto)', Math.floor(this._width$2 * frame));
452                break;
453        }
454    },
455    
456    playEffect: function nStuff__slideOrWipeEffect$playEffect(animation, oldContent, newContent) {
457        this._animation$2 = animation;
458        this._oldContent$2 = oldContent;
459        this._newContent$2 = newContent;
460        this.play(null);
461    }
462}
463
464
465////////////////////////////////////////////////////////////////////////////////
466// nStuff._crossFadeEffect
467
468nStuff._crossFadeEffect = function nStuff__crossFadeEffect(domElement, duration) {
469    nStuff._crossFadeEffect.initializeBase(this, [ domElement, duration ]);
470    this.set_easingFunction(Function.createDelegate(null, nStuff.Glitz.TimedAnimation.easeInOut));
471}
472nStuff._crossFadeEffect.prototype = {
473    _oldContent$2: null,
474    _newContent$2: null,
475    
476    performCleanup: function nStuff__crossFadeEffect$performCleanup() {
477        this._oldContent$2.parentNode.removeChild(this._oldContent$2);
478    },
479    
480    performSetup: function nStuff__crossFadeEffect$performSetup() {
481        this._setOpacity$2(this._newContent$2, 0);
482        this._newContent$2.style.visibility = 'visible';
483        this._newContent$2.style.filter = '';
484    },
485    
486    performTweening: function nStuff__crossFadeEffect$performTweening(frame) {
487        this._setOpacity$2(this._newContent$2, frame);
488        this._setOpacity$2(this._oldContent$2, 1 - frame);
489    },
490    
491    playEffect: function nStuff__crossFadeEffect$playEffect(oldContent, newContent) {
492        this._oldContent$2 = oldContent;
493        this._newContent$2 = newContent;
494        this.play(null);
495    },
496    
497    _setOpacity$2: function nStuff__crossFadeEffect$_setOpacity$2(element, opacity) {
498        if (window.navigator.userAgent.indexOf('MSIE') >= 0) {
499            element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
500        }
501        else {
502            element.style.opacity = opacity.toString();
503        }
504    }
505}
506
507
508////////////////////////////////////////////////////////////////////////////////
509// nStuff._highlightOverlayEffect
510
511nStuff._highlightOverlayEffect = function nStuff__highlightOverlayEffect(domElement, duration) {
512    nStuff._highlightOverlayEffect.initializeBase(this, [ domElement, duration ]);
513}
514nStuff._highlightOverlayEffect.prototype = {
515    
516    performCleanup: function nStuff__highlightOverlayEffect$performCleanup() {
517        this.get_domElement().parentNode.removeChild(this.get_domElement());
518    },
519    
520    performSetup: function nStuff__highlightOverlayEffect$performSetup() {
521        this._setOpacity$2(0);
522        this.get_domElement().style.display = '';
523    },
524    
525    performTweening: function nStuff__highlightOverlayEffect$performTweening(frame) {
526        this._setOpacity$2(Math.sin(frame * Math.PI) * 0.75);
527    },
528    
529    playEffect: function nStuff__highlightOverlayEffect$playEffect() {
530        this.play(null);
531    },
532    
533    _setOpacity$2: function nStuff__highlightOverlayEffect$_setOpacity$2(opacity) {
534        if (window.navigator.userAgent.indexOf('MSIE') >= 0) {
535            this.get_domElement().style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
536        }
537        else {
538            this.get_domElement().style.opacity = opacity.toString();
539        }
540    }
541}
542
543
544////////////////////////////////////////////////////////////////////////////////
545// nStuff.UpdateHistory
546
547nStuff.UpdateHistory = function nStuff_UpdateHistory() {
548    nStuff.UpdateHistory.initializeBase(this);
549}
550nStuff.UpdateHistory.prototype = {
551    _timerCookie$1: 0,
552    _timerHandler$1: null,
553    _iframeLoadHandler$1: null,
554    _appLoadHandler$1: null,
555    _endRequestHandler$1: null,
556    _ignoreIFrame$1: false,
557    _ignoreTimer$1: false,
558    _historyFrame$1: null,
559    _emptyPageURL$1: null,
560    _dataID$1: null,
561    _postbackID$1: null,
562    _currentEntry$1: null,
563    
564    get_options: function nStuff_UpdateHistory$get_options() {
565        return null;
566    },
567    set_options: function nStuff_UpdateHistory$set_options(value) {
568        this._currentEntry$1 = (value.initialEntry) ? value.initialEntry : '';
569        this._dataID$1 = value.dataID;
570        this._postbackID$1 = value.postbackID;
571        return value;
572    },
573    
574    _addEntry$1: function nStuff_UpdateHistory$_addEntry$1(entry) {
575        this._ignoreTimer$1 = true;
576        if (this._historyFrame$1) {
577            this._ignoreIFrame$1 = true;
578            this._historyFrame$1.src = this._emptyPageURL$1 + entry;
579        }
580        else {
581            this._setEntry$1(entry);
582        }
583    },
584    
585    dispose: function nStuff_UpdateHistory$dispose() {
586        if (this._historyFrame$1) {
587            this._historyFrame$1.detachEvent('onload', this._iframeLoadHandler$1);
588            this._historyFrame$1 = null;
589        }
590        if (this._timerCookie$1) {
591            window.clearTimeout(this._timerCookie$1);
592            this._timerCookie$1 = 0;
593        }
594        if (this._endRequestHandler$1) {
595            Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler$1);
596            this._endRequestHandler$1 = null;
597        }
598        nStuff.UpdateHistory.callBaseMethod(this, 'dispose');
599    },
600    
601    _getEntry$1: function nStuff_UpdateHistory$_getEntry$1() {
602        var entry = window.location.hash;
603        if ((entry.length >= 1) && (entry.charAt(0) === '#')) {
604            entry = entry.substr(1);
605        }
606        return entry;
607    },
608    
609    initialize: function nStuff_UpdateHistory$initialize() {
610        nStuff.UpdateHistory.callBaseMethod(this, 'initialize');
611        this._appLoadHandler$1 = Function.createDelegate(this, this._onAppLoad$1);
612        Sys.Application.add_load(this._appLoadHandler$1);
613    },
614    
615    _navigate$1: function nStuff_UpdateHistory$_navigate$1(entry) {
616        __doPostBack(this._postbackID$1, entry);
617    },
618    
619    _onAppLoad$1: function nStuff_UpdateHistory$_onAppLoad$1(sender, e) {
620        Sys.Application.remove_load(this._appLoadHandler$1);
621        this._appLoadHandler$1 = null;
622        this._endRequestHandler$1 = Function.createDelegate(this, this._onPageRequestManagerEndRequest$1);
623        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler$1);
624        if (window.navigator.userAgent.indexOf('MSIE') >= 0) {
625            this._historyFrame$1 = $get('__historyFrame');
626            this._emptyPageURL$1 = this._historyFrame$1.src + '?';
627            this._iframeLoadHandler$1 = Function.createDelegate(this, this._onIFrameLoad$1);
628            this._historyFrame$1.attachEvent('onload', this._iframeLoadHandler$1);
629        }
630        this._timerHandler$1 = Function.createDelegate(this, this._onTick$1);
631        this._timerCookie$1 = window.setTimeout(this._timerHandler$1, 100);
632        var loadedEntry = this._getEntry$1();
633        if (loadedEntry !== this._currentEntry$1) {
634            this._currentEntry$1 = loadedEntry;
635            this._navigate$1(loadedEntry);
636        }
637    },
638    
639    _onIFrameLoad$1: function nStuff_UpdateHistory$_onIFrameLoad$1() {
640        var entry = this._historyFrame$1.contentWindow.location.search;
641        if ((entry.length >= 1) && (entry.charAt(0) === '?')) {
642            entry = entry.substr(1);
643        }
644        this._setEntry$1(entry);
645        if (this._ignoreIFrame$1) {
646            this._ignoreIFrame$1 = false;
647            return;
648        }
649        this._navigate$1(entry);
650    },
651    
652    _onPageRequestManagerEndRequest$1: function nStuff_UpdateHistory$_onPageRequestManagerEndRequest$1(sender, e) {
653        var entry = e.get_dataItems()[this._dataID$1];
654        if (entry) {
655            this._addEntry$1(entry);
656        }
657    },
658    
659    _onTick$1: function nStuff_UpdateHistory$_onTick$1() {
660        this._timerCookie$1 = 0;
661        var entry = this._getEntry$1();
662        if (entry !== this._currentEntry$1) {
663            if (!this._ignoreTimer$1) {
664                this._currentEntry$1 = entry;
665                this._navigate$1(entry);
666            }
667        }
668        else {
669            this._ignoreTimer$1 = false;
670        }
671        this._timerCookie$1 = window.setTimeout(this._timerHandler$1, 100);
672    },
673    
674    _setEntry$1: function nStuff_UpdateHistory$_setEntry$1(entry) {
675        this._currentEntry$1 = entry;
676        window.location.hash = entry;
677    }
678}
679
680
681Type.registerNamespace('nStuff.Glitz');
682
683////////////////////////////////////////////////////////////////////////////////
684// nStuff.Glitz.AnimationStopState
685
686nStuff.Glitz.AnimationStopState = function() { };
687nStuff.Glitz.AnimationStopState.prototype = {
688    complete: 0, 
689    abort: 1, 
690    revert: 2
691}
692nStuff.Glitz.AnimationStopState.registerEnum('nStuff.Glitz.AnimationStopState', false);
693
694
695////////////////////////////////////////////////////////////////////////////////
696// nStuff.Glitz.Animation
697
698nStuff.Glitz.Animation = function nStuff_Glitz_Animation(domElement) {
699    if (!domElement) {
700        domElement = document.documentElement;
701    }
702    this._domElement = domElement;
703    Sys.Application.registerDisposableObject(this);
704}
705nStuff.Glitz.Animation.prototype = {
706    _domElement: null,
707    _completed: false,
708    _isPlaying: false,
709    _completedCallback: null,
710    
711    get_completed: function nStuff_Glitz_Animation$get_completed() {
712        return this._completed;
713    },
714    
715    get_domElement: function nStuff_Glitz_Animation$get_domElement() {
716        return this._domElement;
717    },
718    
719    get_isPlaying: function nStuff_Glitz_Animation$get_isPlaying() {
720        return this._isPlaying;
721    },
722    
723    dispose: function nStuff_Glitz_Animation$dispose() {
724        if (this._isPlaying) {
725            this.stop(nStuff.Glitz.AnimationStopState.abort);
726        }
727        if (this._domElement) {
728            this._domElement = null;
729            Sys.Application.unregisterDisposableObject(this);
730        }
731    },
732    
733    _onPlay: function nStuff_Glitz_Animation$_onPlay(reversed) {
734        this.performSetup();
735        this._isPlaying = true;
736        this.playCore();
737    },
738    
739    _onStop: function nStuff_Glitz_Animation$_onStop(completed, stopState) {
740        this.stopCore(completed, stopState);
741        this._completed = completed;
742        this._isPlaying = false;
743        this.performCleanup();
744        if (completed && (this._completedCallback)) {
745            this._completedCallback();
746        }
747    },
748    
749    _onProgress: function nStuff_Glitz_Animation$_onProgress(timeStamp) {
750        return this.progressCore(timeStamp);
751    },
752    
753    performCleanup: function nStuff_Glitz_Animation$performCleanup() {
754    },
755    
756    performSetup: function nStuff_Glitz_Animation$performSetup() {
757    },
758    
759    play: function nStuff_Glitz_Animation$play(completedCallback) {
760        Sys.Debug.assert(!this.get_isPlaying());
761        this._completed = false;
762        this._completedCallback = completedCallback;
763        nStuff.Glitz.AnimationManager._play(this, this._domElement);
764    },
765    
766    stop: function nStuff_Glitz_Animation$stop(stopState) {
767        Sys.Debug.assert(this.get_isPlaying());
768        nStuff.Glitz.AnimationManager._stop(this, stopState);
769    }
770}
771
772
773////////////////////////////////////////////////////////////////////////////////
774// nStuff.Glitz.AnimationManager
775
776nStuff.Glitz.AnimationManager = function nStuff_Glitz_AnimationManager() {
777}
778nStuff.Glitz.AnimationManager.get_FPS = function nStuff_Glitz_AnimationManager$get_FPS() {
779    return nStuff.Glitz.AnimationManager._fps;
780}
781nStuff.Glitz.AnimationManager.set_FPS = function nStuff_Glitz_AnimationManager$set_FPS(value) {
782    Sys.Debug.assert((value > 0) && (value <= 100));
783    nStuff.Glitz.AnimationManager._fps = value;
784    return value;
785}
786nStuff.Glitz.AnimationManager._onTick = function nStuff_Glitz_AnimationManager$_onTick() {
787    nStuff.Glitz.AnimationManager._timerCookie = 0;
788    if (!nStuff.Glitz.AnimationManager._activeAnimations.length) {
789        return;
790    }
791    var timeStamp = (new Date()).getTime();
792    var currentAnimations = nStuff.Glitz.AnimationManager._activeAnimations;
793    var newAnimations = [];
794    nStuff.Glitz.AnimationManager._activeAnimations = null;
795    for (var i = 0; i < currentAnimations.length; i++) {
796        var animation = currentAnimations[i];
797        var completed = animation._onProgress(timeStamp);
798        if (completed) {
799            animation._onStop(true, nStuff.Glitz.AnimationStopState.complete);
800        }
801        else {
802            Array.add(newAnimations, animation);
803        }
804    }
805    if (newAnimations.length) {
806        nStuff.Glitz.AnimationManager._activeAnimations = newAnimations;
807        if (!nStuff.Glitz.AnimationManager._timerCookie) {
808            nStuff.Glitz.AnimationManager._timerCookie = window.setTimeout(Function.createDelegate(null, nStuff.Glitz.AnimationManager._onTick), 1000 / nStuff.Glitz.AnimationManager._fps);
809        }
810    }
811}
812nStuff.Glitz.AnimationManager._play = function nStuff_Glitz_AnimationManager$_play(animation, domElement) {
813    if (!nStuff.Glitz.AnimationManager._activeAnimations) {
814        nStuff.Glitz.AnimationManager._activeAnimations = [];
815    }
816    Array.add(nStuff.Glitz.AnimationManager._activeAnimations, animation);
817    animation._onPlay(false);
818    if (!nStuff.Glitz.AnimationManager._timerCookie) {
819        nStuff.Glitz.AnimationManager._timerCookie = window.setTimeout(Function.createDelegate(null, nStuff.Glitz.AnimationManager._onTick), 1000 / nStuff.Glitz.AnimationManager._fps);
820    }
821}
822nStuff.Glitz.AnimationManager._stop = function nStuff_Glitz_AnimationManager$_stop(animation, stopState) {
823    Sys.Debug.assert(nStuff.Glitz.AnimationManager._activeAnimations);
824    animation._onStop(false, stopState);
825    Array.remove(nStuff.Glitz.AnimationManager._activeAnimations, animation);
826}
827
828
829////////////////////////////////////////////////////////////////////////////////
830// nStuff.Glitz.TimedAnimation
831
832nStuff.Glitz.TimedAnimation = function nStuff_Glitz_TimedAnimation(domElement, duration) {
833    nStuff.Glitz.TimedAnimation.initializeBase(this, [ domElement ]);
834    Sys.Debug.assert(duration > 0);
835    this._duration$1 = duration;
836}
837nStuff.Glitz.TimedAnimation.easeIn = function nStuff_Glitz_TimedAnimation$easeIn(t) {
838    return t * t;
839}
840nStuff.Glitz.TimedAnimation.easeInOut = function nStuff_Glitz_TimedAnimation$easeInOut(t) {
841    t = t * 2;
842    if (t < 1) {
843        return t * t / 2;
844    }
845    return -((--t) * (t - 2) - 1) / 2;
846}
847nStuff.Glitz.TimedAnimation.easeOut = function nStuff_Glitz_TimedAnimation$easeOut(t) {
848    return -t * (t - 2);
849}
850nStuff.Glitz.TimedAnimation.prototype = {
851    _duration$1: 0,
852    _easingFunction$1: null,
853    _startTimeStamp$1: 0,
854    
855    get_duration: function nStuff_Glitz_TimedAnimation$get_duration() {
856        return this._duration$1;
857    },
858    set_duration: function nStuff_Glitz_TimedAnimation$set_duration(value) {
859        Sys.Debug.assert(!this.get_isPlaying());
860        Sys.Debug.assert(this._duration$1 >= 0);
861        this._duration$1 = value;
862        return value;
863    },
864    
865    get_easingFunction: function nStuff_Glitz_TimedAnimation$get_easingFunction() {
866        return this._easingFunction$1;
867    },
868    set_easingFunction: function nStuff_Glitz_TimedAnimation$set_easingFunction(value) {
869        Sys.Debug.assert(!this.get_isPlaying());
870        this._easingFunction$1 = value;
871        return value;
872    },
873    
874    playCore: function nStuff_Glitz_TimedAnimation$playCore() {
875        this._startTimeStamp$1 = (new Date()).getTime();
876        this.progressCore(this._startTimeStamp$1);
877    },
878    
879    progressCore: function nStuff_Glitz_TimedAnimation$progressCore(timeStamp) {
880        var frame = 0;
881        var completed = false;
882        frame = (timeStamp - this._startTimeStamp$1) / this._duration$1;
883        completed = (frame >= 1);
884        frame = Math.min(1, frame);
885        if ((!completed) && (this._easingFunction$1)) {
886            frame = this._easingFunction$1(frame);
887        }
888        this.performTweening(frame);
889        return completed;
890    },
891    
892    stopCore: function nStuff_Glitz_TimedAnimation$stopCore(completed, stopState) {
893        if (!completed) {
894            if (stopState === nStuff.Glitz.AnimationStopState.complete) {
895                this.performTweening(1);
896            }
897            else if (stopState === nStuff.Glitz.AnimationStopState.revert) {
898                this.performTweening(0);
899            }
900        }
901    }
902}
903
904
905nStuff.AnimatedUpdatePanel.registerClass('nStuff.AnimatedUpdatePanel', Sys.UI.Control);
906nStuff.UpdateIndicator.registerClass('nStuff.UpdateIndicator', Sys.UI.Behavior);
907nStuff.Glitz.Animation.registerClass('nStuff.Glitz.Animation', null, Sys.IDisposable);
908nStuff.Glitz.TimedAnimation.registerClass('nStuff.Glitz.TimedAnimation', nStuff.Glitz.Animation);
909nStuff._scrollEffect.registerClass('nStuff._scrollEffect', nStuff.Glitz.TimedAnimation);
910nStuff.UpdateAction.registerClass('nStuff.UpdateAction', Sys.Component);
911nStuff._slideOrWipeEffect.registerClass('nStuff._slideOrWipeEffect', nStuff.Glitz.TimedAnimation);
912nStuff._crossFadeEffect.registerClass('nStuff._crossFadeEffect', nStuff.Glitz.TimedAnimation);
913nStuff._highlightOverlayEffect.registerClass('nStuff._highlightOverlayEffect', nStuff.Glitz.TimedAnimation);
914nStuff.UpdateHistory.registerClass('nStuff.UpdateHistory', Sys.Component);
915nStuff.Glitz.AnimationManager.registerClass('nStuff.Glitz.AnimationManager');
916nStuff.Glitz.AnimationManager._fps = 100;
917nStuff.Glitz.AnimationManager._activeAnimations = null;
918nStuff.Glitz.AnimationManager._timerCookie = 0;
919
920// ---- Do not remove this footer ----
921// Generated using Script# v0.3.0.0 (http://projects.nikhilk.net)
922// -----------------------------------

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.