PageSourceSearch

https://neptun.or-zse.hu/oktato/javascript/neptun2.js

js or-zse.hu collected 2026-10-01 12:18:51 UTC 47,151 bytes, 1,245 lines download raw bytes

1// JScript File
2/// <reference name="MicrosoftAjax.js" />
3/// <reference path="~/javascript/jquery-1.7.min.js"/>
4/// <reference path="~/javascript/jquery-ui.min.js"/>
5/// <reference path="~/javascript/neptun.js" />
6
7// -------------------------------------------- Modalpopup-hoz tartozo resize esemenyek ------------------
8// ModalPopup resize esemenyek
9var _resizebehaviorid = null;
10var _modalpanelid = null;
11var _modalpanel = null;
12var _oldboundsarray = new Array();
13
14// Minimum képernyő méretűre állítjuk a magasságot, hogy a footer alulra kerüljön
15$(document).ready(function () {
16  if ($('#tableMain') != null) {
17    var innerheight = Math.max($(document).height(), $(window).height(), /* For opera: */document.documentElement.clientHeight);
18    $('#tableMain').css('min-height', innerheight + 'px');
19    // Ez azért kell, mert mozillában nem működik a min-height
20    if (Sys.Browser.agent == Sys.Browser.Firefox) {
21      $('#tableMain').css('height', innerheight + 'px');
22    }
23  }
24});
25
26//collection ami tartalmazza a modalpopupok tulajdonsagait
27var ModalCollection = new Array();
28// a modalhoz beallitom a hozzatartozo controlokat
29function SetControlClientIDs(modalpanelid, modalpanelbehaviorid, pnlmodalid, modalpopuptitleid, modalcontentid, resizebehaviorid) {
30  // modalpanel betoltese
31  _modalpanelid = modalpanelid;
32  _modalpanel = $get(modalpanelid);
33  if (_modalpanel) {
34
35    //_modalpanel._sdamodalpanel = $find(modalpanelbehaviorid);
36    if (resizebehaviorid)
37      _modalpanel._resizectrl = $find(resizebehaviorid);  // resize kontrol
38    _modalpanel._modalcontent = $get(modalcontentid);   // modal panel content
39
40    _modalpanel._modalpopuptitle = $get(modalpopuptitleid); // fejlec
41    _modalpanel._pnlmodal = $get(pnlmodalid);   // az egesz modal panel
42
43    if (_modalpanel._runCounter == null)
44      _modalpanel._runCounter = 0;
45    _modalpanel._handleImage = null;
46    _modalpanel._pnlmodal.style.filter = 'alpha(opacity=100)';
47    _modalpanel.style.filter = 'alpha(opacity=100)';
48    _modalpanel._modalpopuptitle.style.filter = 'alpha(opacity=100)';
49
50    _modalpanel._pnlmodal.style.MozOpacity = '1';
51    _modalpanel.style.MozOpacity = '1';
52    _modalpanel._modalpopuptitle.style.MozOpacity = '1';
53
54    // ha van beallitva az adott modalhoz alapertelmezett szelesseg es magassag
55    if (_modalpanel.attributes['initialwidth'] != null
56      && _modalpanel.attributes['initialwidth'].value > 0) {
57      _modalpanel._defaultwidth = parseInt(_modalpanel.attributes['initialwidth'].value);
58    }
59    else {
60      // beallitom a default modal ablak magassagat (80%a az aktualis kepernyo magassaganak)
61      _modalpanel._defaultwidth = parseInt((this.getClientBounds().width / 100) * 80);
62      if (_modalpanel._defaultwidth < 300)
63        _modalpanel._defaultwidth = 300;
64    }
65
66    if (_modalpanel.attributes['initialheight'] != null
67      && _modalpanel.attributes['initialheight'].value > 0) {
68      _modalpanel._defaultheight = parseInt(_modalpanel.attributes['initialheight'].value);
69    }
70    else {
71      // beallitom a default modal ablak magassagat (70%a az aktualis kepernyo magassaganak)
72      _modalpanel._defaultheight = parseInt((this.getClientBounds().height / 100) * 70);
73      if (_modalpanel._defaultheight < 200)
74        _modalpanel._defaultheight = 200;
75    }
76  }
77}
78
79//Ha a balalasó átméretezővel méretezzük át
80var oldmodalbounds = null;
81var olddivpanelheight = null;
82function ModalClientResizeBegin(sender, eventArgs) {
83  oldmodalbounds = sender.get_Size(); // regi meret elmentese a modalnak
84  elteresmagassag = 0;
85  if (_modalpanel.isfullscreenstate) {
86    fullscreenimage = $get(_oldboundsarray[_modalpanel.id + '_fullscreenimageid']);
87    fullsreenimgurl = _oldboundsarray[_modalpanel.id + '_fullsreenimgurl'];
88
89    _modalpanel.isfullscreenstate = false;
90
91    // normal image allitas
92    fullscreenimage.src = fullsreenimgurl;
93    _oldboundsarray[_modalpanel.id + '_oldmodalbounds'] = null;
94  }
95  _modalpanel._runCounter = 2;
96}
97
98//Modal megjelenéskor átméretei a modalt
99var elteresmagassag = null; // az uj magassagbol kivonjuk a regi magassagot
100var oldwidth, oldheight; // a vegtelen ciklus kikuszobolesere kell
101function ModalClientResizing(sender, eventArgs) {
102  _modalpanel = $get(sender.get_id().replace('resize_', ''));
103  _modalpanel._resizectrl = sender;
104  if (_modalpanel && _modalpanel._runCounter > 0) {
105    var modallocation = Sys.UI.DomElement.getLocation(_modalpanel._pnlmodal);
106    var modalsize = sender.get_Size();
107    var fullclientsize = getFullClientSize();
108    var width = Number(modalsize.width);
109    var height = Number(modalsize.height);
110
111    if (modallocation.x + Number(modalsize.width) > fullclientsize.width) {
112      width = fullclientsize.width - modallocation.x;
113    }
114    if (modallocation.y + Number(modalsize.height) > fullclientsize.height) {
115      height = fullclientsize.height - modallocation.y;
116    }
117
118    if (Number(modalsize.width) != width || Number(modalsize.height) != height) {
119      // 20090701 - GyP - A set_Size meghvita ModalClientResizing-ot, igy lett egy vegtelen ciklus. Ennek kikuszobolesere
120      // kell ez a feltetel, mi szerint a set_Size csak akkor mehet, ha a width vagy a height valtozott.
121      if (oldwidth != width || oldheight != height) {
122        // 20101102 - GyP - kikommenteztem, mert ez okozta a modal job alsó kiszaladását méretezéskor
123        // Kérdés: miért volt erre szükség?
124        //sender.set_Size({ width: width, height: height });
125      }
126    }
127
128    // megjegyzem az beallitott meretet
129    oldwidth = width;
130    oldheight = height;
131
132    if (oldmodalbounds) {   // az uj magassagbol kivonjuk a regi magassagot
133      elteresmagassag = _modalpanel._resizectrl.get_Size().height - oldmodalbounds.height;
134    }
135
136    // atmeretezem a modalpanelcontentet is
137    var ModalclientHeight = _modalpanel._resizectrl.get_Size().height;
138    if (ModalclientHeight > 0)
139      _modalpanel._modalcontent.style.height = (ModalclientHeight - 73).toString() + 'px';
140    _modalpanel._modalcontent.style.width = (_modalpanel._resizectrl.get_Size().width - 15).toString() + 'px';
141    _modalpanel._modalcontent.style.width = '100%';
142    // atmeretezem a kontrolokat (jelenleg csak a grideket)
143    DoResizingCtrls(_modalpanel._modalcontent);
144    //havégzett eltávolítjuk az opacítiy mert másképpen teljes méretnél lesz egy fekete keret.
145    //hamarabb nem lehet, mert akkor villog
146    _modalpanel._pnlmodal.style.filter = '';
147    _modalpanel.style.filter = '';
148    _modalpanel._modalpopuptitle.style.filter = '';
149
150    _modalpanel._pnlmodal.style.MozOpacity = '';
151    _modalpanel.style.MozOpacity = '';
152    _modalpanel._modalpopuptitle.style.MozOpacity = '';
153  }
154
155  //if (navigator.userAgent.indexOf("Chrome") != -1) {
156  try {
157    $.each($("div.handleFullScreen"),
158      function (index) {
159        var rightleft = this.parentElement.parentElement.children[2].children[0].children[1].children[2].offsetLeft; //($("td.modalbodyright")[index]).offsetLeft;
160        var rightwidth = this.parentElement.parentElement.children[2].children[0].children[1].children[2].offsetWidth; //($("td.modalbodyright")[index]).offsetWidth;
161        var handlewidth = this.offsetWidth;
162        this.style.left = (parseInt(rightleft) + parseInt(rightwidth) - parseInt(handlewidth)).toString() + 'px'; //- parseInt(handlewidth)
163
164
165      }
166    );
167  }
168  catch (err) { }
169}
170
171// atmeretezes vegen
172function ModalClientResize(sender, eventArgs) {
173  _modalpanel = $get(sender.get_id().replace('resize_', ''));
174  var e = sender.get_element();
175
176  // a vegen resetelem a regi meretet es a magassagot
177  if (_modalpanel._runCounter == 2) {
178    _modalpanel._runCounter = 1;
179    _oldboundsarray[_modalpanel.id + '_modallocation'] = Sys.UI.DomElement.getLocation(_modalpanel._pnlmodal);  // elmentem az aktualis meretet
180  }
181  oldmodalbounds = null;
182  olddivpanelheight = null;
183  aktualissdatabmagassag = aktualissdatabmagassag + elteresmagassag;
184
185  if (_modalpanel._runCounter > 0) {
186    _oldboundsarray[_modalpanel.id + '_modalsize'] = sender.get_Size();  // elmentem az aktualis meretet
187    _oldboundsarray[_modalpanel.id + '_isfullscreenstate'] = _modalpanel.isfullscreenstate;
188    elteresmagassag = 0;
189  }
190
191  //if (navigator.userAgent.indexOf("Chrome") != -1) {
192  try {
193    $.each($("div.handleFullScreen"),
194      function (index) {
195        var rightleft = this.parentElement.parentElement.children[2].children[0].children[1].children[2].offsetLeft; //($("td.modalbodyright")[index]).offsetLeft;
196        var rightwidth = this.parentElement.parentElement.children[2].children[0].children[1].children[2].offsetWidth; //($("td.modalbodyright")[index]).offsetWidth;
197        var handlewidth = this.offsetWidth;
198        this.style.left = (parseInt(rightleft) + parseInt(rightwidth) - parseInt(handlewidth)).toString() + 'px'; //- parseInt(handlewidth)
199
200
201      }
202    );
203  }
204  catch (err) { }
205}
206
207// beallitja az adott modal meretet, a modalpanelcontenthez allitja hozza a modalpanelt
208function SetModalPanelSize() {
209  if (_modalpanel._resizectrl && _modalpanel._modalcontent
210    && _modalpanel._modalpopuptitle) {
211    _modalpanel._runCounter = 0;
212    if (_oldboundsarray[_modalpanel.id + '_modalsize'] == null) {
213      // ha meg nem volt ilyen modal megjelenitve
214
215      // a modal meretet eloszor beallitja egy fix meretre
216      _modalpanel._resizectrl.set_Size({ width: _modalpanel._defaultwidth, height: _modalpanel._defaultheight });
217
218      // modal minimalis meretenek megadasa, ennel kisebbre ne lehessen meretezni
219      _modalpanel._resizectrl.set_MinimumHeight(_modalpanel._defaultheight);
220      _modalpanel._resizectrl.set_MinimumWidth(_modalpanel._defaultwidth);
221
222      // atmeretezem a modalpanelcontentet is
223      var ModalclientHeight = _modalpanel._resizectrl.get_Size().height;
224      if (ModalclientHeight > 0)
225        _modalpanel._modalcontent.style.height = (ModalclientHeight - 73).toString() + 'px';
226      _modalpanel._modalcontent.style.width = (_modalpanel._defaultwidth - 15).toString() + 'px';
227
228      // beallitom a content-ben az egyes controlokat
229      DoResizingCtrls(_modalpanel._modalcontent);
230
231      // modal poziciojanak allitasa
232      var modallocation = this.getClientCenterLocation(_modalpanel._modalcontent);
233      Sys.UI.DomElement.setLocation(_modalpanel._pnlmodal, modallocation.x, modallocation.y);
234      _oldboundsarray[_modalpanel.id + '_modalsize'] = _modalpanel._resizectrl.get_Size();  // elmentem az aktualis meretet
235
236      // innen 1es allapotba kerul
237      _modalpanel._runCounter = 1;
238    }
239    else {
240      // ha mar volt ilyen modal
241      var oldbounds = _oldboundsarray[_modalpanel.id + '_modalsize'];
242      var oldlocation = _oldboundsarray[_modalpanel.id + '_modallocation'];
243      var isfullscreenstate = _oldboundsarray[_modalpanel.id + '_isfullscreenstate'];
244
245      // atmeretezem a modalpanelcontentet is
246      var ModalclientHeight = Number(oldbounds.height);
247
248      if (isfullscreenstate) {
249        _modalpanel.isfullscreenstate = !isfullscreenstate;
250
251        SetModalState(_modalpanel.id, null, null, null);
252      }
253      else {
254        // meret beallitasa
255        _modalpanel._resizectrl.set_Size(oldbounds);
256        _modalpanel._modalcontent.style.height = (ModalclientHeight - 73).toString() + 'px';
257        _modalpanel._modalcontent.style.width = (_modalpanel._resizectrl.get_Size().width - 15).toString() + 'px';
258
259        // beallitom a content-ben az egyes controlokat
260        DoResizingCtrls(_modalpanel._modalcontent);
261
262        // modal poziciojanak allitasa
263        //                if (oldlocation)
264        //                    Sys.UI.DomElement.setLocation(_modalpanel._pnlmodal, oldlocation.x, oldlocation.y);
265      }
266      _modalpanel._runCounter = 1;
267    }
268  }
269}
270
271// control bal felso pozicio megadasa
272function getModalClientZeroLocation() {
273  if (_modalpanel && _modalpanel._pnlmodal) {
274    var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
275
276    return new Sys.UI.Point(0, scrollTop);
277  }
278}
279
280// teljes kepernyore/normal kepernyore valtas
281function SetModalState(modalpanelid, fullscreenimageid, normalscreenimgurl, fullsreenimgurl, level) {
282  //ha a masodik szintet akarjuk teljes kepernyőre rakni akkor először az elsőt kell
283  //mert a masodik div az elsőn belül van
284  //    _modalpanel._pnlmodal.style.filter = '';
285  //    _modalpanel.style.filter = '';
286  //    _modalpanel._modalpopuptitle.style.filter = '';
287
288  if (level == null) {
289    var level = _modalpanel._pnlmodal.attributes["Level"] ? parseInt(_modalpanel._pnlmodal.attributes["Level"].value) : 1;
290    if (level > 1) {
291      var parentlevel = level - 2;
292      var parentmodal = ModalCollection[parentlevel];
293      var fullscreenstate = _oldboundsarray[parentmodal.id + '_isfullscreenstate'];
294      if (fullscreenstate == null || fullscreenstate == false) {
295        _modalpanel = parentmodal;
296        SetModalState(_modalpanel.id, _modalpanel.id + '_fullscreenbutton', normalscreenimgurl, fullsreenimgurl, level);
297        _modalpanel = ModalCollection[level - 1];
298      }
299    }
300  }
301
302  var fullscreenimage = null;
303  if (_oldboundsarray[_modalpanel.id + '_fullscreenimageid'] == null) {
304    // elmentem a valtozokat
305    fullscreenimage = $get(fullscreenimageid);
306    _oldboundsarray[_modalpanel.id + '_fullscreenimageid'] = fullscreenimageid;
307    _oldboundsarray[_modalpanel.id + '_normalscreenimgurl'] = normalscreenimgurl;
308    _oldboundsarray[_modalpanel.id + '_fullsreenimgurl'] = fullsreenimgurl;
309  }
310  else {
311    fullscreenimage = $get(_oldboundsarray[_modalpanel.id + '_fullscreenimageid']);
312    normalscreenimgurl = _oldboundsarray[_modalpanel.id + '_normalscreenimgurl'];
313    fullsreenimgurl = _oldboundsarray[_modalpanel.id + '_fullsreenimgurl'];
314  }
315
316  // allapot allitas
317  var isfullscreenstate = false;
318  if (_modalpanel && _modalpanel.isfullscreenstate != null)
319    isfullscreenstate = _modalpanel.isfullscreenstate;
320
321  isfullscreenstate = !isfullscreenstate;
322  _modalpanel.isfullscreenstate = isfullscreenstate;
323
324  // image allitas
325  if (fullscreenimage) {
326    if (isfullscreenstate) {
327      // teljes kepernyonel
328      fullscreenimage.src = normalscreenimgurl;
329    }
330    else {  // normal kepernyonel
331      fullscreenimage.src = fullsreenimgurl;
332    }
333  }
334
335  if (isfullscreenstate == true) {
336    // teljes kepernyo
337
338    // teljes lathato kepernyo adatainak lekerdezese
339    var FullScreenWidth = this.getClientBounds().width, FullScreenHeight = this.getClientBounds().height;
340
341    // regi kepernyo beallitasok elmentese
342    oldmodalbounds = _modalpanel.oldbounds = Sys.UI.DomElement.getBounds(_modalpanel._pnlmodal);
343
344    if (_oldboundsarray[_modalpanel.id + '_oldmodalbounds'] == null)
345      _oldboundsarray[_modalpanel.id + '_oldmodalbounds'] = oldmodalbounds;
346
347    // modal poziciojanak allitasa
348    var modallocation = this.getModalClientZeroLocation();
349    if (modallocation.x < 0)
350      modallocation.x = 0;
351    if (modallocation.y < 0)
352      modallocation.y = 0;
353    Sys.UI.DomElement.setLocation(_modalpanel._pnlmodal, modallocation.x + 6, modallocation.y + 4);
354
355    // atmeretezzuk a lathato kepernyo meretre
356    //_modalpanel._runCounter = 4;
357    _modalpanel._resizectrl.set_Size({ width: FullScreenWidth - 15, height: FullScreenHeight - 15 });
358    //_modalpanel._runCounter = 1;
359  }
360  else {
361    // normal kepernyo
362    // visszatoltjuk pozicioilag es meretileg a regi adatokat
363    oldmodalbounds = Sys.UI.DomElement.getBounds(_modalpanel._pnlmodal);
364    _modalpanel.oldbounds = _oldboundsarray[_modalpanel.id + '_oldmodalbounds'];
365    _oldboundsarray[_modalpanel.id + '_oldmodalbounds'] = null;
366    Sys.UI.DomElement.setLocation(_modalpanel._pnlmodal, _modalpanel.oldbounds.x, _modalpanel.oldbounds.y);
367
368    //_modalpanel._runCounter = 4;
369    _modalpanel._resizectrl.set_Size({ width: _modalpanel.oldbounds.width, height: _modalpanel.oldbounds.height });
370    //_modalpanel._runCounter = 1;
371  }
372}
373
374// megkeresi az osszes gridet a modalon belul es beallitja a szelesseget es magassagat a modalpanelhez kepest
375var aktualissdatabmagassag = 0; // aktualis tab magassaga
376function DoResizingCtrls(ctrl) {    // ctrl = a modalpanelcontent
377  _modalpanel._modalcontent.style.width = '100%';
378
379  // megkeressuk az osszes modalon levo gridet jQueryvel, amelynek tipusa gridcontent
380  var szelesseg = Number(_modalpanel._resizectrl.get_Size().width);
381  var magassag = Sys.UI.DomElement.getBounds(ctrl).height;
382
383  // tabok keresese
384  var sdawebtabok = $('#' + _modalpanel.id + ' div .ajax__tab_body:visible');
385  if (sdawebtabok.length > 0) {
386    // ha uj sdawebtab van
387    sdawebtabok.css('overflowY', 'auto');
388    //if (Sys.UI.DomElement.getBounds(sdawebtabok[0]).height > magassag) {
389    // ha a webtab tartalmanak a magassaga nagyobb mint a modal tartalmanak magassaga,
390    // akkor biztosan kirakja a scrolbart
391    // ilyenkor behuzok egy paddingot
392    //sdawebtabok.css('padding-right', '15px');
393    //}
394    if (elteresmagassag == null)
395      elteresmagassag = 0;
396    sdawebtabok.height(magassag - 44);
397    sdawebtabok.css('padding-right', '5px');
398    sdawebtabok.css('padding-top', '5px');
399    sdawebtabok.css('padding-left', '5px');
400  }
401  else {  // ha nincs tab
402    // divpanelnel scroll
403    //var divpanelek = $('#' + ctrl.id).find('div').filter('.DivPanel').css('overflowY', 'auto');
404    //divpanelek.css('padding', '5px');
405    //if (divpanelek.length == 0) {
406    //    divpanelek = $('#' + ctrl.id).find('div').filter('.DivPanel_330').css('overflowY', 'auto');
407
408    //    if (divpanelek.length == 0) {
409    //        divpanelek = $('#' + ctrl.id).find('div').filter('.DivPanel_330_with_xscrollbar').css('overflowY', 'auto');
410    //    }
411    //}
412    //if (divpanelek.length > 0) {
413    //    if (elteresmagassag != null && elteresmagassag > 0 && olddivpanelheight == null) {
414    //        olddivpanelheight = Sys.UI.DomElement.getBounds(divpanelek[0]).height;
415    //    }
416    //    else {
417    //        divpanelek.height(_modalpanel._modalcontent.clientHeight - 28);
418    //    }
419
420    //    if (elteresmagassag != null && divpanelek.length > 0 && olddivpanelheight != null) {
421    //        var aktdivpanelmagassag = olddivpanelheight + elteresmagassag;
422    //        divpanelek.height(aktdivpanelmagassag);
423    //    }
424    //}
425  }
426
427  // full uj ajaxgrid
428  //    var ajaxgridek = $('div .gridmaindiv:visible');
429  //    if (ajaxgridek != null && ajaxgridek.length > 0) {
430  //        ajaxgridek
431  //    }
432  //
433
434}
435
436// ----------------------------------------- main tab top menu valtasa ----------------------------------
437function TabTopMenuValtas(tab) {
438  //if (tab._activeTabIndex == 0)
439  //$('#' + tab._element.id).removeClass().addClass('TabTopMenuNeptun ajax__tab_container ajax__tab_default');
440  //tab._element.className = 'TabTopMenuNeptun ajax__tab_container ajax__tab_default';
441  //else
442  //$('#' + tab._element.id).removeClass().addClass('TabTopMenuKollabTer ajax__tab_container ajax__tab_default');
443  //tab._element.className = 'TabTopMenuKollabTer ajax__tab_container ajax__tab_default';
444}
445
446// mindegyik tab valtaskor meghivodik
447// csak akkor frissuljon a tab, ha szukseges ( nem volt meg a tartalma betoltve )
448//function SDAWebTabClick(tab) {
449//    var activeTabIndex = tab._activeTabIndex;
450
451//    // csak akkor toltodjon be a tabitem legeloszor, ha az adott tabitemhez a enableautopostbackalgorythm valtozo be van allitva
452//    var enableautopostbackalgorythm = false;
453//    if (tab._element.attributes['enableautopostbackalgorythm_'+activeTabIndex] != null)
454//        enableautopostbackalgorythm = tab._element.attributes['enableautopostbackalgorythm_' + activeTabIndex].value;
455
456//    if (enableautopostbackalgorythm == 'False')
457//        return;
458//
459//    var betoltve = 'false';
460//    if (tab._element.attributes['betoltve_' + activeTabIndex] != null) {
461//        betoltve = tab._element.attributes['betoltve_' + activeTabIndex].value;
462//    }
463//
464//    if (betoltve == 'true') {
465//        if (tab._autoPostBackId != '')  // ha kiveszem az autoPostBackId-t, akkor nem megy le a szerverre
466//            tab._oldautoPostBackId = activeTabIndex;
467//        tab._autoPostBackId = '';
468//    }
469//    else if (tab._oldautoPostBackId != null) {
470//        tab._autoPostBackId = tab._oldautoPostBackId;
471//    }
472
473//    tab._element.setAttribute('betoltve_' + activeTabIndex, 'true');
474//}
475
476function SchedulerViewerSettings(args) {
477  // a naptar heti nezetekor az elemeket ra kell igazitani magassagban a tablazatra
478  // csak megjelenites utan tudjuk, milyen magas
479  var radiobuttons = $('table[radiotype=listtype] :radio:visible');
480  if (radiobuttons.length == 0
481    || (radiobuttons.length > 0 && radiobuttons[1].checked == false)) {
482    return;
483  }
484  // return;
485  var scheduleritemdivek = $('div .item');
486  for (var i = scheduleritemdivek.length - 1; i >= 0; i--) {
487    var itemdiv = $('div .item:eq(' + i.toString() + ') #scheduleritem');
488    if (itemdiv.length == 1) {
489      var scheduleritemdivheight = Sys.UI.DomElement.getBounds(scheduleritemdivek[i]).height;
490      itemdiv[0].style.height = (scheduleritemdivheight - 5).toString() + 'px';
491      var j = 0;
492    }
493    else
494      break;
495  }
496}
497
498// ha egy sem lenne becsekkelve, akkor az aktualisat visszacsekkelem
499function chkCalendarClicked(clickedID) {
500  if ($('#tableCheckedBoxs input:checkbox:checked').length == 0)
501    $get(clickedID).checked = true;
502}
503
504function chkCalendarClickedTab(clickedID) {
505  if ($('#tableCheckedBoxsSettings input:checkbox:checked').length == 0)
506    $get(clickedID).checked = true;
507}
508
509// exportalast inditom
510function ExportOutlook(link) {
511  location.href = link;
512}
513
514//kervenyek csatolmany
515function SetAttachment(btnID, caller) {
516  var result = false;
517  //checkbox
518  if (caller.type == 'checkbox') {
519    result = caller.checked ? false : true;
520  }
521  //combobox
522  else if (caller.type == 'select-one') {
523    result = caller.value != "" && caller.value != "---" ? false : true;
524  }
525  //radio
526  else if (caller.type == "radio") {
527    // barmit valaszt, az jo
528    result = false;
529  }
530  //textbox
531  else {
532    result = caller.value != "" ? false : true;
533  }
534  document.getElementById(btnID).disabled = result;
535}
536function GenerateICS(chkFeladatokID, chkFeliratkozasiListakID, chkOrarendID, chkTalalkozokID,
537  chkVizsgakID, chkOktatoMentesitesekID, chkKonzultaciokID, chkFinalExamsID,
538  dateFromID, dateToID, sdp,
539  trainingID, linkbtnid, hipeid, fromButton) {
540  // megnezem, hogy milyen esemenyek vannak becsekkelve
541  var chkFeladatok_Checked = $get(chkFeladatokID).checked;
542  var chkOrarend_Checked = $get(chkOrarendID).checked;
543  var chkVizsgak_Checked = $get(chkVizsgakID).checked;
544  var chkTalalkozok_Checked = $get(chkTalalkozokID).checked;
545  var chkFeliratkozasiListak_Checked = $get(chkFeliratkozasiListakID).checked;
546  var chkOktatoMentesitesek_Checked = false;
547
548  // ha oktato
549  if ($get(chkOktatoMentesitesekID) != null)
550    chkOktatoMentesitesek_Checked = $get(chkOktatoMentesitesekID).checked;
551
552  var chkKonzultaciokID_Checked = $get(chkKonzultaciokID).checked;
553  var chkFinalExamsID_Checked = $get(chkFinalExamsID).checked;
554
555  var validatorHipe = $find(hipeid);
556  var cmbTraining = $get(trainingID);
557
558  var trainingIDSel = "0";
559  if (cmbTraining != null)
560    trainingIDSel = cmbTraining.options[cmbTraining.selectedIndex].value;
561
562  // beallitom, hogy milyen esemenyek jojjenek le
563  var boxesChecked = chkOrarend_Checked ? '1' : '0';
564  boxesChecked += chkVizsgak_Checked ? '_1' : '_0';
565  boxesChecked += chkTalalkozok_Checked ? '_1' : '_0';
566  boxesChecked += chkFeladatok_Checked ? '_1' : '_0';
567  boxesChecked += chkFeliratkozasiListak_Checked ? '_1' : '_0';
568  boxesChecked += chkOktatoMentesitesek_Checked ? '_1' : '_0';
569  boxesChecked += chkKonzultaciokID_Checked ? '_1' : '_0';
570  boxesChecked += chkFinalExamsID_Checked ? '_1' : '_0';
571
572  // osszehasonlitom a tol,ig datumokat.
573  var fromDate = $('#' + dateFromID).datepicker({ dateFormat: datepickerRegional.dateFormat }).val();
574  var toDate = $('#' + dateToID).datepicker({ dateFormat: datepickerRegional.dateFormat }).val();
575
576  var timeFor = $.datepicker.parseDate(datepickerRegional.dateFormat, fromDate);
577  var timeTo = $.datepicker.parseDate(datepickerRegional.dateFormat, toDate);
578
579  timeTo.setHours(timeTo.getHours() + 23);
580  timeTo.setMinutes(timeTo.getMinutes() + 59);
581  timeTo.setSeconds(timeTo.getSeconds() + 59);
582
583  // ha jol adta meg a datumszurest
584  if (timeTo >= timeFor) {
585    // validator elrejtese
586    validatorHipe.hide();
587    ActivateAlertDiv('progress', 'block');
588
589    if (fromButton == 'outlook') {
590      //PageMethods.GetICS(boxesChecked, fromDate.value + ' 00:00:00', toDate.value + ' 23:59:59', trainingIDSel, function (result) {
591      PageMethods.GetICS(boxesChecked, fromDate, toDate, trainingIDSel, function (result) {
592        if (result == "ok") {
593          window.open('CommonControls/SaveFileDialog.aspx?id=' + boxesChecked + '&Func=exportcalendar&from=' + fromDate + '&to=' + toDate + '&trainingid=' + trainingIDSel, '_top');
594          ActivateAlertDiv('progress', 'none');
595        }
596        else {
597          var prm = Sys.WebForms.PageRequestManager.getInstance();
598          prm._doPostBack(linkbtnid, ''); // csinal postbacket a modal uzenet szamara
599        }
600      });
601    }
602    else if (fromButton == 'excel') {
603      PageMethods.GetExcel(boxesChecked, fromDate, toDate, trainingIDSel, function (result) {
604        var EVENTARG = '';
605        if (result == "ok") {
606          window.open('ExcelFileDownload.aspx?ExportExcel=excelexport' + boxesChecked + '&Func=exportcalendar&from=' + fromDate + '&to=' + toDate + '&trainingid=' + trainingIDSel, '_top');
607          ActivateAlertDiv('progress', 'none');
608        }
609        else {
610          var prm = Sys.WebForms.PageRequestManager.getInstance();
611          prm._doPostBack(linkbtnid, EVENTARG); // csinal postbacket az excel export szamara
612        }
613      });
614    }
615  }
616  else {
617    // validator es figyelmezteto uzenet megjelenitese
618    validatorHipe.show();
619  }
620}
621
622//var tvID = "upFunction_c_message_rules_upParent_tcMessage_Rules_ctl01_upNotifications_tVNotifications";
623//function OnLoadNode() {
624//    if ($get(tvID) != null) {
625//        var links = $get(tvID).getElementsByTagName('input');
626//        var tds = $get(tvID).getElementsByTagName('td');
627
628//        // a nowrap-et veszi le
629//
630//        for (var j = 0; j < tds.length; j++) {
631//            tds[j].style.cssText = '';
632//        }
633
634//        for (var i = 0; i < links.length; i++) {
635//            links[i].setAttribute('cursor', 'pointer');
636//        }
637
638//        var linksSpan = $("#" + tvID + " table" + " span[haschildren='true']");
639
640//        for (var j = 0; j < linksSpan.length; j++) {
641//            var tags = linksSpan[j].parentNode;
642//            for (var k = 0; k < tags.childNodes.length; k++) {
643//                if (tags.childNodes[k].type == 'checkbox') {
644//                    // az elso hierarchia checkbox-jai
645//                    var chkBox = tags.childNodes[k];
646
647//                    if (chkBox.getAttribute('chknumber') == null) {
648//                        chkBox.setAttribute("chknumber", "firstchk");
649//                        chkBox.setAttribute("onclick", "javascript:NodeClick('" + chkBox.id + "','firstchk')");
650//                    }
651//                    else {
652//                        chkBox.setAttribute("onclick", "javascript:NodeClick('" + chkBox.id + "','secondchk','" + chkBox.parentNode.childNodes[0].id + "')");
653//                    }
654
655//                    chkBox.setAttribute("style", "cursor:pointer;");
656//                }
657//            }
658//        }
659//    }
660//}
661
662//function NodeClick(id, attribute, nodeID) {
663//    var nodeLink = document.getElementById(id);
664//    var id2 = id.replace('CheckBox', 'Nodes');
665//    var id3 = '';
666//    if (nodeID != null)
667//        id3 = nodeID.replace('CheckBox', 'Nodes');
668
669//    if (nodeLink.checked) {
670//        if (attribute == 'firstchk')
671//            $("#" + id2 + ' input' + '[chknumber != "secondchk" ]').attr({ checked: "checked" });
672//        else
673//            $('#' + id3 + ' input' + '[chknumber =' + attribute + ']').attr({ checked: "checked" });
674//    }
675//    else {
676//        if (attribute == 'firstchk')
677//            $("#" + id2 + ' input' + '[chknumber != "secondchk"]').removeAttr("checked");
678//        else
679//            $("#" + id3 + ' input' + '[chknumber =' + attribute + ']').removeAttr("checked");
680//    }
681//}
682
683//function copyToClipboard(lblURLID) {
684//    $('a#btnCopyToClipboard').zclip({
685//        path: 'ZeroClipboard.swf',
686//        copy: $('#upFunction_c_options_UpdatePanel1_tab_SDAWebTabItem1_calexport_upAddMessage_lblGoogleCalendarExport').text()
687//    });
688//}
689
690//function iframeload(iFrameClientID, modalid) {
691//    // ha az src '#end''-el végződik, akkor becsukom a modált, mert vége a kérdőívnek
692//    var timeout = window.setTimeout(function () {
693//        var unipoll = $('iframe[id=' + iFrameClientID + '][src$="#end"]');
694//        //var ttt = document.getElementById(iFrameClientID).contentWindow.location.href;
695//        //var currentIFrame = $('#' + iFrameClientID);
696//        //var vmi = currentIFrame.contents();
697//        //alert(ttt);
698//        if (unipoll.length == 1) {
699//            var x = $find(modalid);
700//            if (x != null) {
701//                x.hide();
702//                submitCount = 0;
703
704//                // kikapcsolom a timeout-ot
705//                if (timeout != null) {
706//                    window.clearTimeout(timeout);
707//                    timeout = null;
708//                }
709//            }
710//        }
711
712//    }, 2000);
713//}
714
715//$(document).ready(function () {
716//    $("#upBoxes_upCalendar_gdgCalendar_ctl35_calendar_upPanel_calendar_")
717//		.datePicker({ inline: true });
718//});
719
720function onSubmit(sender, args) {
721  // sender = a customvalidator
722  var listViewItem = $(sender).closest('table').children('tbody');
723
724  /*van-e 0%*/
725  var ok0 = false;
726  var textboxes = listViewItem.find('table[id*="tblEntries"] > tbody > tr > td > input[type="text"]');
727  //$('table[id*="tblEntries"] input[type="text"]');
728  $.each(textboxes, function (index) {
729    if ($(this).val() == "0") {
730      ok0 = true;
731      return false; //break
732    }
733  });
734
735  /*van-e 100%*/
736  var ok100 = false;
737  $.each(textboxes, function (index) {
738    if ($(this).val() == "100") {
739      ok100 = true;
740      return false; //break
741    }
742  });
743
744  /*ki van e toltve mindenhol a kezdo es a veg ertek, vagy egyik sincs*/
745  var gapOk = false;
746  var vmi = listViewItem.find('table[id*="tblEntries"] > tbody > tr');
747
748  $.each(vmi, function (index) {
749    if (index != 0) {
750      var from = $(this).find('input[id*="txtPercentFrom"]');
751      var to = $(this).find('input[id*="txtPercentTo"]');
752
753      gapOk = from.val() != '' && to.val() != '' || from.val() == '' && to.val() == '';
754      if (!gapOk) {
755        return false;
756      }
757    }
758  });
759
760  /*0-100 koze esik e minden ertek*/
761  var rangeok = false;
762  $.each(textboxes, function (index) {
763    if ($(this).val() != '') {
764      rangeok = (parseInt($(this).val()) >= 0 && parseInt($(this).val()) <= 100) || $(this).val() == '';
765      if (!rangeok) {
766        return false;
767      }
768    }
769  });
770
771  // barmilyen sorrendben vannak megadva az intervallumok, megnezem, h hiany nelkul megvan-e 0-100-ig
772  var intervalOk = false;
773  var percents = new Array();
774
775  $.each(listViewItem.find('table[id*="tblEntries"] > tbody > tr'), function (index) {
776    // ha mar nem a tabla fejlecenel vagyok
777    if (index != 0) {
778      var from = $(this).find('input[id*="txtPercentFrom"]');
779      var to = $(this).find('input[id*="txtPercentTo"]');
780
781      if (from.val() != '' && to.val() != '') {
782        if (parseInt(to.val()) >= parseInt(from.val())) {
783          var i = parseInt(from.val());
784          var j = parseInt(to.val());
785          for (szlo = i; szlo <= j; szlo++) {
786            // ha meg nincs benne a listaban
787            if (percents.indexOf(szlo) == -1)
788              percents.push(szlo);
789          }
790        }
791      }
792    }
793  });
794
795  // ha van 101 kiskutya :), akkor 0-100-ig mindent megadott
796  if (percents.length == 101) {
797    intervalOk = true;
798  }
799
800  args.IsValid = ok0 && ok100 && rangeok && intervalOk && gapOk;
801}
802
803
804function onSubmit2(sender, args) {
805  var listViewItem = $(sender).closest('table').children('tbody');
806
807  /* -az alapertelmezettet megadta-e? */
808  var defaultOk = false;
809
810  /*-jó intervallumnál adta-e meg?*/
811  var defaultSelectedOk = false;
812
813  var radioButtons = listViewItem.find('table[id*="tblEntries"] > tbody > tr');
814
815  $.each(radioButtons, function (index) {
816    if (index != 0) {
817      var radio = $(this).find('input[type = "radio"][id*="rbDefault"]')[0];
818      var from = $(this).find('input[id*="txtPercentFrom"]');
819      var to = $(this).find('input[id*="txtPercentTo"]');
820
821      //var radio = //radioButtons[index];
822      if (radio.checked) {
823        defaultOk = true;
824
825        /* a default-ot ott kell megadni, ahol intervallum is van megadva */
826        if (from.val() != '' && to.val() != '')
827          defaultSelectedOk = true;
828        //return;
829      }
830    }
831  });
832
833  args.IsValid = defaultOk && defaultSelectedOk;
834}
835
836
837function OpenCampus() {
838  ActivateAlertDiv('progress', "block");
839  $.ajax({
840    type: "POST",
841    url: "main.aspx/GotoCampus",
842    contentType: "application/json; charset=utf-8",
843    dataType: "json",
844    async: false,
845    success: function (data) {
846      InitializeTimer();
847      ActivateAlertDiv('progress', "none");
848
849      OpenCampusWindow(data); // ez valo ide
850      //CallCampusErrorMessage(); // ez tesztelesre
851    },
852    complete: function (data) {
853    },
854    error: function (data) {
855      InitializeTimer();
856      ActivateAlertDiv('progress', "none");
857      CallCampusErrorMessage();
858    }
859  });
860}
861
862
863
864function PasswordChanged(txt) {
865  $(txt).prev().val($(txt).val());
866}
867
868function ShowPasswordFromHidden(gridClientID) {
869  var $tds = $('#' + gridClientID + '_gridtopdiv').find("td[n='EExamPassword'] input.passwordtext");
870  $tds.each(function () {
871    var txtPassword = $(this);
872
873    var hiddenPassword = $(this).parent().find("input.passwordhidden");
874    var chkShowedPassword = $(this).parent().find("input.chkshowpasswordhidden");
875
876    //console.error(chkShowedPassword.val());
877
878    if (chkShowedPassword.val() == '1') {
879      // elrejtem
880      chkShowedPassword.val(0);
881      hiddenPassword.val(txtPassword.val());
882      if (txtPassword.val().length > 0) {
883        var lngth = hiddenPassword.val().length;
884        var psswd = '';
885        for (i = 0; i < lngth; i++) { psswd += "*"; }
886        txtPassword.val(psswd);
887      }
888
889      txtPassword.attr("style", "display:block;");
890    } else { // megmutatom
891      txtPassword.val(hiddenPassword.val());
892      chkShowedPassword.val(1);
893    };
894  });
895};
896
897function ShowPassword(txtUniPasswordID, chkGroupPasswordID, hiddenPasswordID) {
898  var txtPassword = $('#' + txtUniPasswordID);
899  var hiddenPassword = $('#' + hiddenPasswordID);
900
901  if ($('#' + chkGroupPasswordID).is(':checked')) {
902    // ekkor megmutatom a password-ot
903    txtPassword.val(hiddenPassword.val());
904  }
905  else {   // ekkor meg elrejtem
906    hiddenPassword.val(txtPassword.val());
907    if (txtPassword.val().length > 0) {
908      var lngth = hiddenPassword.val().length;
909      var psswd = '';
910      for (i = 0; i < lngth; i++) { psswd += "*"; }
911      txtPassword.val(psswd);
912    }
913  }
914}
915
916function CancelPress(event) {
917  if (event != null) {
918    event.returnValue = false;
919    event.cancelBubble = true;
920    if (event.preventDefault) event.preventDefault();
921    if (event.stopPropagation) event.stopPropagation();
922  }
923}
924
925function PasswordPress(event, txtUniPasswordID, hiddenPasswordID, chkGroupPasswordID,
926  which, keyCode, ctrlKey, Code) {
927  var _which, _keyCode, _ctrlKey, charCode, charStr, _code;
928
929  if (event == null) {
930    _which = which;
931    _keyCode = keyCode;
932    _ctrlKey = ctrlKey;
933    charCode = _which || _keyCode;
934    _code = Code;
935  }
936  else {
937    event = event || window.event;
938    charCode = event.which || event.keyCode;
939    _ctrlKey = event.ctrlKey;
940    _code = event.code;
941  }
942
943  var charStr = String.fromCharCode(charCode);
944  var txtPassword = $('#' + txtUniPasswordID);
945  var hiddenPassword = $('#' + hiddenPasswordID);
946  var selStart = txtPassword[0].selectionStart;
947  var selEnd = txtPassword[0].selectionEnd;
948  var showpasswd = false;
949
950  if (chkGroupPasswordID.startsWith("hChkShowPassword"))
951    showpasswd = $('#' + chkGroupPasswordID).val() == '1';
952  else
953    showpasswd = $('#' + chkGroupPasswordID).is(':checked');
954
955  //if (event.key == 'Alt') {
956  //    //CancelPress(event);
957  //    //return;
958  //}
959
960  if (_ctrlKey == true) {
961    if (charCode == 118) // v
962    {
963      // ha FF es ha nem jeloltem ki semmit es nincs megjelenitve
964      if ((selStart == selEnd) && !showpasswd) {
965        return;
966      }
967      else {
968        // frissitse a hidden-t
969        hiddenPassword.val(txtPassword.val());
970        return;
971      }
972    }
973    else // ha ctrl van, akkor viszlat
974    //if (charCode == 99 || charCode == 120 || charCode == 88) // c, x
975    {
976      CancelPress(event);
977      return;
978    }
979  }
980
981  var cancelKeypress = /^(8|9|12|13|16|17|18|19|20|32|33|34|35|36|37|38|39|40|42|43|45|46|96|144)$/.test("" + charCode);
982  if (!cancelKeypress) { // ha mehet a karakter
983    var vanSelect = txtPassword[0].selectionStart != txtPassword[0].selectionEnd;
984
985    var selStart = txtPassword[0].selectionStart;
986    var selEnd = txtPassword[0].selectionEnd;
987    var hVal = hiddenPassword.val();
988    var position = -1;
989    var eventKey = charStr;
990
991    hiddenPassword.val(hVal.substr(0, selStart) + eventKey + hVal.substr(selEnd, hVal.length - selEnd));
992    //console.log(eventKey + ' - ' + hiddenPassword.val() + ' ---- ' + txtPassword[0].selectionStart + ' - ' + txtPassword[0].selectionEnd);
993
994    // ha van kijeloles, akkor azt kitorlom
995    if (vanSelect) {
996      txtPassword.val(hiddenPassword.val());
997      txtPassword[0].selectionStart = selStart + 1;
998      txtPassword[0].selectionEnd = selStart + 1;
999    }
1000
1001    /*itt volt*/
1002
1003    // ha nincs select, akkor atirom a jelszot *-ra
1004    if (showpasswd == false) {
1005
1006      var lngth = txtPassword.val().length;
1007      var ps = '';
1008      for (i = 0; i < lngth; i++) {
1009        ps += '*';
1010      }
1011
1012      txtPassword.val(ps + (vanSelect ? '' : '*'));
1013
1014      // pozicionalom a txt-ben, kuloben a vegere kerulne
1015      if (position != -1)
1016        txtPassword[0].setSelectionRange(position, position);
1017
1018      // teszteleshez
1019      //console.error(hiddenPassword.val());
1020
1021      CancelPress(event);
1022    }
1023    else if (vanSelect) {   // ha volt select, majd leutottem valamit helyette, akkor az automatikus is betenne azt a karakter, pedig en mar manualisan megtettem
1024      CancelPress(event);
1025    }
1026  }
1027  else { // ha tiltott karakterek es torles
1028
1029    var cancelKeypress2 = /^(8|46)$/.test("" + charCode);
1030    if (cancelKeypress2 && (_code == "Delete" || _code == "Backspace")) {
1031      // ekkor torlok
1032      var hVal = hiddenPassword.val();
1033      var tVal = txtPassword.val();
1034
1035      // ha nem jeloltem ki semmit
1036      if (selStart == selEnd) {
1037        // ha a stringben vagyok
1038        if (selStart > 0 || selStart < hVal.length - 1) {
1039          if (charCode == 8) // backspace
1040            hiddenPassword.val(hVal.substr(0, selStart - 1) + hVal.substring(selEnd, hVal.length));
1041          else if (charCode == 46) // delete
1042            hiddenPassword.val(hVal.substr(0, selStart) + hVal.substring(selEnd + 1, hVal.length));
1043        }
1044        else if (selStart == 0 || selStart == hVal.length - 1) // ha a string elejen/vegen vagyok
1045        {
1046          if (txtPassword.length == 1)
1047            hiddenPassword.val('');
1048          else
1049            hiddenPassword.val(hVal.substr(selStart, 1));
1050        }
1051      }
1052      else // ha kijeloltem
1053        hiddenPassword.val(hVal.substr(0, selStart) + hVal.substr(selEnd, hVal.length - selEnd));
1054    }
1055    else // ekkor NEM kell semmit tenni
1056    {
1057      //console.error(charCode);
1058      //var cancelKeypress3 = /^(32|39|42|43|45|48|96|106|107|108|109|110|111|122|126|144)$/.test("" + charCode);
1059      var cancelKeypress3 = /^(35|36|37|38|39|40)$/.test("" + charCode);
1060      if (!cancelKeypress3) {
1061        CancelPress(event);
1062      }
1063    }
1064  }
1065}
1066
1067function TextBoxEncode(textBoxClientId, hiddenSetTwoFactorPasswordId) {
1068
1069  var textBox = $('#' + textBoxClientId);
1070  var textBoxValue = textBox.val();
1071  var textBoxEncodeValue = encodeURIComponent(textBoxValue);
1072
1073  var hiddenSetTwoFactorPassword = $('#' + hiddenSetTwoFactorPasswordId);
1074  hiddenSetTwoFactorPassword.val(textBoxEncodeValue);
1075
1076}
1077
1078function TextBoxEncodeChangePassword(textBoxOldPasswordClientId, hiddenOldPasswordId, textBoxNewPasswordClientId, hiddenNewPasswordId,textBoxNewPasswordAgainClientId, hiddenNewPasswordAgainId) {
1079
1080  var oldValue = $('#' + textBoxOldPasswordClientId).val();
1081  var oldEncodeValue = encodeURIComponent(oldValue);
1082
1083  $('#' + hiddenOldPasswordId).val(oldEncodeValue);
1084
1085  var newValue = $('#' + textBoxNewPasswordClientId).val();
1086  var newEncodeValue = encodeURIComponent(newValue);
1087
1088  $('#' + hiddenNewPasswordId).val(newEncodeValue);
1089
1090  var newValueAgain = $('#' + textBoxNewPasswordAgainClientId).val();
1091  var newEncodeValueAgain = encodeURIComponent(newValueAgain);
1092
1093  $('#' + hiddenNewPasswordAgainId).val(newEncodeValueAgain);
1094}
1095
1096function PasswordKeyDown(event, txtUniPasswordID, hiddenPasswordID, chkGroupPasswordID) {
1097  event = event || window.event;
1098  var charCode = event.which || event.keyCode;
1099  var charStr = String.fromCharCode(charCode);
1100  var shiftAndValidChars = /^(35|36|37|38|39|40)$/.test("" + charCode);// end, home, left arrow, right arrow, up, down
1101  var cancelSpecChars = /^(110|188|190|222)$/.test("" + charCode);// decimal point, commma, period, single quote
1102
1103  if (event.ctrlKey && (charCode == 88 /*x*/ || charCode == 67 /*c*/ /*|| charCode == 86 /*v */) ||
1104    (charCode > 111 && charCode < 127) /*F1-F15*/ ||
1105    cancelSpecChars ||
1106    event.altKey ||
1107    event.shiftKey && !(shiftAndValidChars || (charCode >= 65 && charCode <= 90))) {
1108    CancelPress(event);
1109  }
1110  else {
1111    // ekkor manualisan meghivom a press-t backspace es del eseten
1112    if (BrowserDetect.browser == "Chrome" || BrowserDetect.browser == "Explorer") {
1113      // ha backspace vagy del, akkor meghivom keypress-t, mert kulonben IE-n, Chrome-on nem menne
1114      var cancelKeypress2 = /^(8|46)$/.test("" + charCode);
1115      if (cancelKeypress2 || (cancelKeypress2 && event.shiftKey)) {
1116        var charCodeParam = (charCode == 46 ? 'Delete' : 'Backspace');
1117        PasswordPress(null, txtUniPasswordID, hiddenPasswordID, chkGroupPasswordID,
1118          event.which, event.keyCode, event.ctrlKey, charCodeParam);
1119      }
1120    }
1121  }
1122}
1123
1124var clickedControlClientID = '';
1125function OnDropDownClick(clientID) {
1126  try {
1127    clickedControlClientID = clientID;
1128  }
1129  catch (err) { }
1130}
1131
1132function CKEDITOROnBlur(CKEDITOR) {
1133
1134  try {
1135
1136    if (document.activeElement != null && document.activeElement != undefined)
1137      if (clickedControlClientID != '') {
1138        if (clickedControlClientID != document.activeElement.id) {
1139          $('#' + clickedControlClientID)[0].focus();
1140          clickedControlClientID = '';
1141          //console.error('blur-CKEDITOROnBlur - focused on combo');
1142        }
1143      }
1144  }
1145  catch (abc) { }
1146}
1147
1148function loaddefaultpage() {
1149  var prm = Sys.WebForms.PageRequestManager.getInstance();
1150  var param = 'divNeptunLogo_';
1151  prm._doPostBack(param, null);
1152}
1153
1154function focusNextInputOnEnter(event) {
1155  if (event && event.keyCode) {
1156    if (event.keyCode === 13) {
1157      focusNextInput(event.target);
1158    }
1159  }
1160}
1161
1162function focusNextInput(currentInput) {
1163  let inputs = Object.values(document.getElementsByTagName('input'));
1164
1165  if (currentInput) {
1166    let indexOfCurrentInput = inputs.indexOf(currentInput);
1167    if (indexOfCurrentInput && indexOfCurrentInput >= 0) {
1168      let indexOfNextInput = indexOfCurrentInput + 1;
1169      if (indexOfNextInput < inputs.length) {
1170        inputs[indexOfNextInput].focus();
1171        return;
1172      }
1173    }
1174  }
1175
1176  if (inputs && inputs.length) {
1177    inputs[0].focus();
1178    return;
1179  }
1180}
1181
1182function validateNumberAndLength(e, text) {
1183  var charCode;
1184  charCode = text.charCode;
1185
1186  if (!(charCode >= 48 && charCode <= 57 || charCode == 0)) {
1187    text.preventDefault()
1188  }
1189
1190  if (e.maxLength - e.value.length == 0) {
1191    text.returnValue = false;
1192  }
1193}
1194
1195function checkCapsLock(event) {
1196  var tooltipCapsLock = document.getElementById("tooltipPwd");
1197
1198  if (event.getModifierState("CapsLock")) {
1199    tooltipCapsLock.style.visibility = "visible";
1200  } else {
1201    tooltipCapsLock.style.visibility = "hidden";
1202  }
1203}
1204
1205function isOldPasswordEmpty(event, password, tooltipIsOldPasswordEmptyId) {
1206  var tooltipIsOldPasswordEmpty = document.getElementById(tooltipIsOldPasswordEmptyId);
1207  if (password.value === '') {
1208    event.preventDefault();
1209    tooltipIsOldPasswordEmpty.style.visibility = "visible";
1210  }else {
1211    tooltipIsOldPasswordEmpty.style.visibility = "hidden";
1212  }
1213}
1214
1215function isNewPasswordEmptyAndIsTheSameAsNewPasswordAgain(event, password, tooltipIsNewPasswordEmptyId,passwordAgainId) {
1216  var tooltipIsNewPasswordEmpty = document.getElementById(tooltipIsNewPasswordEmptyId);
1217
1218  var tooltipIsTheSameAsNewPassword = document.getElementById("tooltipIsTheSameAsNewPassword");
1219  var txtpasswordAgain = document.getElementById(passwordAgainId);
1220  if (password.value === '') {
1221    event.preventDefault();
1222    tooltipIsNewPasswordEmpty.style.visibility = "visible";
1223  } else {
1224    tooltipIsNewPasswordEmpty.style.visibility = "hidden";
1225  }
1226
1227  if (password.value === txtpasswordAgain.value) {
1228    tooltipIsTheSameAsNewPassword.style.visibility = "hidden";
1229  } else {
1230    tooltipIsTheSameAsNewPassword.style.visibility = "visible";
1231  }
1232}
1233function specialCharsAllow(ids){
1234  for (i=0; i<ids.length; i++) {
1235    var element = $('#' + ids[i]);
1236    if(element != null && element != undefined && (false==isEncoded(element.val()))) {
1237      element.val(encodeURIComponent(element.val()));
1238    }
1239  }
1240}
1241function isEncoded(str) {
1242  return typeof str == "string" && decodeURIComponent(str) !== str;
1243}
1244
1245

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.