PageSourceSearch

https://dignityeducation.org/ScriptResource.axd?d=3oWpZyWZJ0eLukcC…gkAA0wU7RaX5D__pHdieKD67ZvaY70g2&t=7f16157c

js dignityeducation.org collected 2026-10-01 12:03:20 UTC 3,341 bytes, 133 lines download raw bytes

1// Name:        Compat.Timer.Timer.debug.js
2// Assembly:    AjaxControlToolkit
3// Version:     4.1.60623.0
4// FileVersion: 4.1.60623
5// (c) 2010 CodePlex Foundation
6
7
8
9/// <reference name="MicrosoftAjax.js" />
10
11(function() {
12var scriptName = "ExtendedTimer";
13
14function execute() {
15
16var version = Sys.version;
17if (!version && !Sys._versionChecked) {
18    Sys._versionChecked = true;
19    throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");
20}
21
22///////////////////////////////////////////////////////////////////////////////
23
24Sys.Timer = function() {
25    Sys.Timer.initializeBase(this);
26    
27    this._interval = 1000;
28    this._enabled = false;
29    this._timer = null;
30}
31
32Sys.Timer.prototype = {
33    get_interval: function() {
34        
35        return this._interval;
36    },
37    set_interval: function(value) {
38        
39        if (this._interval !== value) {
40            this._interval = value;
41            this.raisePropertyChanged('interval');
42            
43            if (!this.get_isUpdating() && (this._timer !== null)) {
44                this._stopTimer();
45                this._startTimer();
46            }
47        }
48    },
49    
50    get_enabled: function() {
51        
52        return this._enabled;
53    },
54    set_enabled: function(value) {
55        
56        if (value !== this.get_enabled()) {
57            this._enabled = value;
58            this.raisePropertyChanged('enabled');
59            if (!this.get_isUpdating()) {
60                if (value) {
61                    this._startTimer();
62                }
63                else {
64                    this._stopTimer();
65                }
66            }
67        }
68    },
69
70    
71    add_tick: function(handler) {
72        
73        
74        this.get_events().addHandler("tick", handler);
75    },
76
77    remove_tick: function(handler) {
78        
79        
80        this.get_events().removeHandler("tick", handler);
81    },
82
83    dispose: function() {
84        this.set_enabled(false);
85        this._stopTimer();
86        
87        Sys.Timer.callBaseMethod(this, 'dispose');
88    },
89    
90    updated: function() {
91        Sys.Timer.callBaseMethod(this, 'updated');
92
93        if (this._enabled) {
94            this._stopTimer();
95            this._startTimer();
96        }
97    },
98
99    _timerCallback: function() {
100        var handler = this.get_events().getHandler("tick");
101        if (handler) {
102            handler(this, Sys.EventArgs.Empty);
103        }
104    },
105
106    _startTimer: function() {
107        this._timer = window.setInterval(Function.createDelegate(this, this._timerCallback), this._interval);
108    },
109
110    _stopTimer: function() {
111        window.clearInterval(this._timer);
112        this._timer = null;
113    }
114}
115
116Sys.Timer.descriptor = {
117    properties: [   {name: 'interval', type: Number},
118                    {name: 'enabled', type: Boolean} ],
119    events: [ {name: 'tick'} ]
120}
121
122Sys.Timer.registerClass('Sys.Timer', Sys.Component);
123
124} // execute
125
126if (window.Sys && Sys.loader) {
127    Sys.loader.registerScript(scriptName, ["ComponentModel"], execute);
128}
129else {
130    execute();
131}
132
133})();

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.