PageSourceSearch

https://neptun.or-zse.hu/oktato/ScriptResource.axd?d=OSrpKv6d57sLk…WFKupe7CH7JdlWUU0aJ4Ru8bM_T-6xA2&t=409622c0

js or-zse.hu collected 2026-09-24 09:56:47 UTC 4,059 bytes, 92 lines download raw bytes

1/// <reference name="MicrosoftAjax.js"/>
2Type.registerNamespace("SDA.Neptun.WebControls");
3
4SDA.Neptun.WebControls.SDACapsLockWarning = function (element) {
5    SDA.Neptun.WebControls.SDACapsLockWarning.initializeBase(this, [element]);
6    this._hipeBehaviodID = null;
7    this._onKeyPressAttached = false;
8    this._onKeyPressHandler = Function.createDelegate(this, this._onKeyPress);
9    this._capsLockWarningEnable = true;
10    this._capsLockWriteEnable = true;
11    this._elementobj = null;
12    this._keypressNonStandard = new Array(18 /*alt*/, 37 /*left*/, 38/*up*/, 39/*right*/, 40/*down*/, 8/*backspace*/, 20/*caps lock*/, 17/*ctrl*/,
13                                          46 /*delete*/, 35/*end*/, 13/*enter*/, 27/*escape*/,
14                                          112/*f1*/, 113/*f2*/, 114/*f3*/, 115/*f4*/, 116/*f5*/, 117/*f6*/, 118/*f7*/, 119/*f8*/, 120/*f9*/, 121/*f10*/, 122/*f11*/, 123/*f12*/,
15                                          36/*home*/, 45/*insert*/, 144/*num lock*/, 33/*page up*/, 34/*page down*/, 16/*shift*/, 9/*tab*/);
16}
17
18SDA.Neptun.WebControls.SDACapsLockWarning.prototype = {
19    initialize: function () {
20        SDA.Neptun.WebControls.SDACapsLockWarning.callBaseMethod(this, 'initialize');
21        this._elementobj = this.get_element();
22
23        if (!this._onKeyPressAttached && this._capsLockWarningEnable) {
24            $addHandler(this._elementobj, "keypress", this._onKeyPressHandler);
25            this._onKeyPressAttached = true;
26        }
27        // Add custom initialization here
28    },
29    dispose: function () {
30        if (this._onKeyPressAttached) {
31            $removeHandler(this._elementobj, "keypress", this._onKeyPressHandler);
32            this._onKeyPressAttached = false;
33        }
34        this.ID = null;
35        this._elementobj = null;
36        SDA.Neptun.WebControls.SDACapsLockWarning.callBaseMethod(this, 'dispose');
37    },
38
39    _onKeyPress: function (event) {
40        var betu;
41        var KeyCode = 0;
42        var e = event.rawEvent;
43        var _hoverInfoPanel = $find(this._hipeBehaviodID);
44        // Így nincs benne a chrome
45        //if (Sys.Browser.agent == Sys.Browser.Firefox || Sys.Browser.agent == Sys.Browser.Opera || Sys.Browser.agent == Sys.Browser.Safari)
46        //    KeyCode = e.which;
47        if (Sys.Browser.agent == Sys.Browser.InternetExplorer)
48            KeyCode = e.keyCode;
49        // Az előző helyett kell, mert úgy nem volt benne a chrome
50        else
51            KeyCode = e.which;
52        betu = String.fromCharCode(KeyCode);
53      var CapsOn = ((betu != betu.toLowerCase() && !event.shiftKey) ||
54        (betu == betu.toLowerCase() && event.shiftKey && KeyCode >= 65 && KeyCode != 95));
55        if (CapsOn)
56            _hoverInfoPanel.show(true);
57        else
58            _hoverInfoPanel.hide();
59
60        var returnvalue = true;
61        if (CapsOn && !this._capsLockWriteEnable) {
62            e.cancelBubble = true;
63            if (e.stopPropagation) e.stopPropagation();
64            if (e.preventDefault) e.preventDefault();
65            returnvalue = false;
66        }
67        return returnvalue;
68    },
69
70    get_hipeBehaviodID: function () {
71        return this._hipeBehaviodID;
72    },
73    set_hipeBehaviodID: function (value) {
74        this._hipeBehaviodID = value;
75        this.raisePropertyChanged('hipeBehaviodID');
76    },
77    get_capsLockWarningEnable: function () {
78        return this._capsLockWarningEnable;
79    },
80    set_capsLockWarningEnable: function (value) {
81        this._capsLockWarningEnable = value;
82        this.raisePropertyChanged('capsLockWarningEnable');
83    },
84    get_capsLockWriteEnable: function () {
85        return this._capsLockWriteEnable;
86    },
87    set_capsLockWriteEnable: function (value) {
88        this._capsLockWriteEnable = value;
89        this.raisePropertyChanged('capsLockWriteEnable');
90    }
91}
92SDA.Neptun.WebControls.SDACapsLockWarning.registerClass('SDA.Neptun.WebControls.SDACapsLockWarning', Sys.Extended.UI.BehaviorBase);

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.