PageSourceSearch

https://amfostacolo.ro/js/functions.js

js amfostacolo.ro collected 2026-10-02 12:14:57 UTC 31,613 bytes, 1,085 lines download raw bytes

1
2var PlsWaitImg200 = '<div style="text-align:center; margin:0 auto;"><img src="/images/loading_spinner_200.gif"> <br />Rog aşteptaţi (functions)</div>';
3/*
4 * Detact Mobile Browser
5 */
6 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
7     $('html').addClass('ismobile');
8     $('.desktopOnly').addClass('ismobile');
9     $('.mobileOnly').addClass('ismobile');
10     $('.AndroidOnly').addClass('ismobile');
11 }
12 if( /webOS|iPhone|iPad|iPod/i.test(navigator.userAgent) ) {
13     $('.AndroidOnly').addClass('isApple');
14 }
15
16
17$(window).load(function () {
18    /* --------------------------------------------------------
19     Page Loader
20     -----------------------------------------------------------*/
21    if(!$('html').hasClass('ismobile')) {
22        if($('.page-loader')[0]) {
23            /*setTimeout (function () {
24                $('.page-loader').fadeOut();
25            }, 200);*/
26            $('.page-loader').hide(); // modificat de mine, îmi pare mai "rapid"
27        }
28    }
29})
30
31$(document).ready(function(){
32    /* --------------------------------------------------------
33        Layout
34    -----------------------------------------------------------*/
35    (function () {
36
37        //Get saved layout type from LocalStorage
38        var layoutStatus = localStorage.getItem('ma-layout-status');
39
40        if(!$('#header-2')[0]) {  //Make it work only on normal headers
41            if (layoutStatus == 1) {
42                $('body').addClass('sw-toggled');
43                $('#tw-switch').prop('checked', true);
44            }
45        }
46
47        $('body').on('change', '#toggle-width input:checkbox', function () {
48            if ($(this).is(':checked')) {
49                setTimeout(function () {
50                    $('body').addClass('toggled sw-toggled');
51                    localStorage.setItem('ma-layout-status', 1);
52                }, 250);
53            }
54            else {
55                setTimeout(function () {
56                    $('body').removeClass('toggled sw-toggled');
57                    localStorage.setItem('ma-layout-status', 0);
58                }, 250);
59            }
60        });
61    })();
62
63    /* --------------------------------------------------------
64        Scrollbar
65    -----------------------------------------------------------*/
66    function scrollBar(selector, theme, mousewheelaxis) {
67        $(selector).mCustomScrollbar({
68            theme: theme,
69            scrollInertia: 100,
70            axis:'yx',
71            mouseWheel: {
72                enable: true,
73                axis: mousewheelaxis,
74                preventDefault: true
75            }
76        });
77    }
78
79    if (!$('html').hasClass('ismobile')) {
80        //On Custom Class
81        if ($('.c-overflow')[0]) {
82            scrollBar('.c-overflow', 'minimal-dark', 'y');
83        }
84    }
85
86    /*
87     * Top Search
88     */
89    (function(){
90        $('body').on('click', '#top-search > a', function(e){
91            e.preventDefault();
92
93            $('#header').addClass('search-toggled');
94            $('#top-search-wrap input').focus();
95        });
96
97        $('body').on('click', '#top-search-close', function(e){
98            e.preventDefault();
99
100            $('#header').removeClass('search-toggled');
101        });
102    })();
103
104    /*
105     * Sidebar
106     */
107    (function(){
108        //Toggle
109        $('body').on('click', '#menu-trigger, #chat-trigger', function(e){
110            e.preventDefault();
111            var x = $(this).data('trigger');
112
113            $(x).toggleClass('toggled');
114            $(this).toggleClass('open');
115
116    	    //Close opened sub-menus
117    	    $('.sub-menu.toggled').not('.active').each(function(){
118        		$(this).removeClass('toggled');
119        		$(this).find('ul').hide();
120    	    });
121
122
123
124	    $('.profile-menu .main-menu').hide();
125
126            if (x == '#sidebar') {
127
128                $elem = '#sidebar';
129                $elem2 = '#menu-trigger';
130
131                $('#chat-trigger').removeClass('open');
132
133                if (!$('#chat').hasClass('toggled')) {
134                    $('#header').toggleClass('sidebar-toggled');
135                }
136                else {
137                    $('#chat').removeClass('toggled');
138                }
139            }
140
141            if (x == '#chat') {
142                $elem = '#chat';
143                $elem2 = '#chat-trigger';
144
145                $('#menu-trigger').removeClass('open');
146
147                if (!$('#sidebar').hasClass('toggled')) {
148                    $('#header').toggleClass('sidebar-toggled');
149                }
150                else {
151                    $('#sidebar').removeClass('toggled');
152                }
153                $(document).ready(function() {
154                  //alert('loading');
155                  LoadModsOnline();
156                  LoadFriendsOnline();
157                });   
158            }
159
160
161            //When clicking outside
162            if ($('#header').hasClass('sidebar-toggled')) {
163                $(document).on('click', function (e) {
164                    if (($(e.target).closest($elem).length === 0) && ($(e.target).closest($elem2).length === 0)) {
165                        setTimeout(function(){
166                            $($elem).removeClass('toggled');
167                            $('#header').removeClass('sidebar-toggled');
168                            $($elem2).removeClass('open');
169                        });
170                    }
171                });
172            }
173
174            /*if (x == '#chat') {
175                $(document).ready(function() {
176                  LoadModsOnline;
177                });
178            }*/
179
180        })
181
182        //Submenu -- && incarcari asincrone
183        $('body').on('click', '.sub-menu > a', function(e){
184            e.preventDefault();
185            var x = $(this).data('trigger');
186            //alert(x);
187            if (x == '#mods') {
188                var DivVisible = $('#modsonline').is(":visible");
189                if (DivVisible==false) {
190                    LoadModsOnline();
191                }
192            }
193            else if (x == '#VoturiNoi') {
194                var SignVisible = $('#NotifVoturiRefrSign').is(":visible");
195                if (SignVisible==false) {
196                    LoadVoturiNoi(uidCrt);
197                }
198                // show/hide RefreshSign
199                $('#NotifVoturiRefrSign').toggle();
200            }
201            else if (x == '#EcouriNoi') {
202                var SignVisible = $('#NotifEcouriRefrSign').is(":visible");
203                if (SignVisible==false) {
204                    LoadEcouriNoi(uidCrt);
205                }
206                // show/hide RefreshSign
207                $('#NotifEcouriRefrSign').toggle();
208            }
209            else if (x == '#RspNoi') {
210                var SignVisible = $('#NotifRspRefrSign').is(":visible");
211                if (SignVisible==false) {
212                    LoadRspNoi(uidCrt);
213                }
214                // show/hide RefreshSign
215                $('#NotifRspRefrSign').toggle();
216            }
217
218            $(this).next().slideToggle(200);
219            $(this).parent().toggleClass('toggled');
220        });
221    })();
222
223    /*
224     * Clear Notification
225     */
226    $('body').on('click', '[data-clear="notification"]', function(e){
227      e.preventDefault();
228
229      var x = $(this).closest('.listview');
230      var y = x.find('.lv-item');
231      var z = y.size();
232
233      var ConfirmMsg = $(this).attr('title')+"\n\nRog CONFIRMAÅ¢I";
234      if (confirm(ConfirmMsg) == false) {
235            return false; // abandon 
236      }
237
238      $(this).parent().fadeOut();
239      //var TipNotif = $(this).parent().attr('id');
240      var TipNotif = x.attr('tip');
241      //alert('TipNotif [id] = '+TipNotif + ' - '+ $(this).attr('id'));
242
243      x.find('.list-group').prepend('<i class="grid-loading hide-it"></i>');
244      x.find('.grid-loading').fadeIn(1500);
245
246
247      var w = 0;
248      y.each(function(){
249          var z = $(this);
250          var NotifID = z.attr('nid');
251          var bPreventDblClick = 0;
252          if (TipNotif == 'NotifVoturiUL' || TipNotif == 'NotifVoturi') {
253            //alert('StingNotif [id]'+NotifID + ' -- cmd:'+z.attr('cmd'));
254            VotOKcitit(NotifID,bPreventDblClick);
255          }
256          else if (TipNotif == 'NotifEcouri_UL') {
257            //alert('EcouOKcitit(NotifID) - id='+NotifID);
258            EcouOKcitit(NotifID);
259          }
260          setTimeout(function(){
261          z.addClass('animated fadeOutRightBig').delay(1000).queue(function(){
262              z.remove();
263              //alert('Notifid='+z.attr('nid'));
264          });
265          }, w+=150);
266      })
267
268	//Popup empty message
269	setTimeout(function(){
270	    //$('#notifications').addClass('empty');
271        //alert('gata tot');
272	}, (z*150)+200); 
273    });
274
275    /*
276     * Dropdown Menu
277     */
278    if($('.dropdown')[0]) {
279	//Propagate
280	$('body').on('click', '.dropdown.open .dropdown-menu', function(e){
281	    e.stopPropagation();
282	});
283
284	$('.dropdown').on('shown.bs.dropdown', function (e) {
285	    if($(this).attr('data-animation')) {
286		$animArray = [];
287		$animation = $(this).data('animation');
288		$animArray = $animation.split(',');
289		$animationIn = 'animated '+$animArray[0];
290		$animationOut = 'animated '+ $animArray[1];
291		$animationDuration = ''
292		if(!$animArray[2]) {
293		    $animationDuration = 500; //if duration is not defined, default is set to 500ms
294		}
295		else {
296		    $animationDuration = $animArray[2];
297		}
298
299		$(this).find('.dropdown-menu').removeClass($animationOut)
300		$(this).find('.dropdown-menu').addClass($animationIn);
301	    }
302	});
303
304	$('.dropdown').on('hide.bs.dropdown', function (e) {
305	    if($(this).attr('data-animation')) {
306    		e.preventDefault();
307    		$this = $(this);
308    		$dropdownMenu = $this.find('.dropdown-menu');
309
310    		$dropdownMenu.addClass($animationOut);
311    		setTimeout(function(){
312    		    $this.removeClass('open')
313
314    		}, $animationDuration);
315    	    }
316    	});
317    }
318
319    /*
320     * Calendar Widget
321     */
322    /*if($('#calendar-widget')[0]) {
323        (function(){
324            $('#calendar-widget').fullCalendar({
325		        contentHeight: 'auto',
326		        theme: true,
327                header: {
328                    right: '',
329                    center: 'prev, title, next',
330                    left: ''
331                },
332                defaultDate: '2014-06-12',
333                editable: true,
334                events: [
335                    {
336                        title: 'All Day',
337                        start: '2014-06-01',
338                        className: 'bgm-cyan'
339                    },
340                    {
341                        title: 'Long Event',
342                        start: '2014-06-07',
343                        end: '2014-06-10',
344                        className: 'bgm-orange'
345                    },
346                    {
347                        id: 999,
348                        title: 'Repeat',
349                        start: '2014-06-09',
350                        className: 'bgm-lightgreen'
351                    },
352                    {
353                        id: 999,
354                        title: 'Repeat',
355                        start: '2014-06-16',
356                        className: 'bgm-lightblue'
357                    },
358                    {
359                        title: 'Meet',
360                        start: '2014-06-12',
361                        end: '2014-06-12',
362                        className: 'bgm-green'
363                    },
364                    {
365                        title: 'Lunch',
366                        start: '2014-06-12',
367                        className: 'bgm-cyan'
368                    },
369                    {
370                        title: 'Birthday',
371                        start: '2014-06-13',
372                        className: 'bgm-amber'
373                    },
374                    {
375                        title: 'Google',
376                        url: 'http://google.com/',
377                        start: '2014-06-28',
378                        className: 'bgm-amber'
379                    }
380                ]
381            });
382        })();
383    }*/
384
385    /*
386     * Weather Widget
387     */
388    /*if ($('#weather-widget')[0]) {
389        $.simpleWeather({
390            location: 'Austin, TX',
391            woeid: '',
392            unit: 'f',
393            success: function(weather) {
394                html = '<div class="weather-status">'+weather.temp+'&deg;'+weather.units.temp+'</div>';
395                html += '<ul class="weather-info"><li>'+weather.city+', '+weather.region+'</li>';
396                html += '<li class="currently">'+weather.currently+'</li></ul>';
397                html += '<div class="weather-icon wi-'+weather.code+'"></div>';
398                html += '<div class="dash-widget-footer"><div class="weather-list tomorrow">';
399                html += '<span class="weather-list-icon wi-'+weather.forecast[2].code+'"></span><span>'+weather.forecast[1].high+'/'+weather.forecast[1].low+'</span><span>'+weather.forecast[1].text+'</span>';
400                html += '</div>';
401                html += '<div class="weather-list after-tomorrow">';
402                html += '<span class="weather-list-icon wi-'+weather.forecast[2].code+'"></span><span>'+weather.forecast[2].high+'/'+weather.forecast[2].low+'</span><span>'+weather.forecast[2].text+'</span>';
403                html += '</div></div>';
404                $("#weather-widget").html(html);
405            },
406            error: function(error) {
407                $("#weather-widget").html('<p>'+error+'</p>');
408            }
409        });
410    }*/
411
412    /*
413     * Todo Add new item
414     */
415    if ($('#todo-lists')[0]) {
416    	//Add Todo Item
417    	$('body').on('click', '#add-tl-item .add-new-item', function(){
418    	    $(this).parent().addClass('toggled');
419    	});
420
421            //Dismiss
422            $('body').on('click', '.add-tl-actions > a', function(e){
423                e.preventDefault();
424                var x = $(this).closest('#add-tl-item');
425                var y = $(this).data('tl-action');
426
427                if (y == "dismiss") {
428                    x.find('textarea').val('');
429                    x.removeClass('toggled');
430                }
431
432                if (y == "save") {
433                    x.find('textarea').val('');
434                    x.removeClass('toggled');
435                }
436    	});
437    }
438
439    /*
440     * Auto Hight Textarea
441     */
442    if ($('.auto-size')[0]) {
443	   autosize($('.auto-size'));
444    }
445
446    /*
447    * Profile Menu
448    */
449    $('body').on('click', '.profile-menu > a', function(e){
450        e.preventDefault();
451        $(this).parent().toggleClass('toggled');
452	    $(this).next().slideToggle(200);
453    });
454
455    /*
456     * Text Feild
457     */
458
459    //Add blue animated border and remove with condition when focu
459s and blur
460    if($('.fg-line')[0]) {
461        $('body').on('focus', '.fg-line .form-control', function(){
462            $(this).closest('.fg-line').addClass('fg-toggled');
463        })
464
465        $('body').on('blur', '.form-control', function(){
466            var p = $(this).closest('.form-group, .input-group');
467            var i = p.find('.form-control').val();
468
469            if (p.hasClass('fg-float')) {
470                if (i.length == 0) {
471                    $(this).closest('.fg-line').removeClass('fg-toggled');
472                }
473            }
474            else {
475                $(this).closest('.fg-line').removeClass('fg-toggled');
476            }
477        });
478    }
479
480    //Add blue border for pre-valued fg-flot text feilds
481    if($('.fg-float')[0]) {
482        $('.fg-float .form-control').each(function(){
483            var i = $(this).val();
484
485            if (!i.length == 0) {
486                $(this).closest('.fg-line').addClass('fg-toggled');
487            }
488
489        });
490    }
491
492    /*
493     * Audio and Video // invalidat in 10.3.2020 - da erori cu INVIX InternetCorp!
494     */
495    /*if($('audio, video')[0]) {
496        $('video,audio').mediaelementplayer();
497    }*/
498
499    /*
500     * Tag Select
501     */
502    if($('.chosen')[0]) {
503        $('.chosen').chosen({
504            width: '100%',
505            allow_single_deselect: true
506        });
507    }
508
509    /*
510     * Input Slider
511     */
512    //Basic
513    if($('.input-slider')[0]) {
514        $('.input-slider').each(function(){
515            var isStart = $(this).data('is-start');
516
517            $(this).noUiSlider({
518                start: isStart,
519                range: {
520                    'min': 0,
521                    'max': 100,
522                }
523            });
524        });
525    }
526
527    //Range slider
528    if($('.input-slider-range')[0]) {
529	$('.input-slider-range').noUiSlider({
530	    start: [30, 60],
531	    range: {
532		    'min': 0,
533		    'max': 100
534	    },
535	    connect: true
536	});
537    }
538
539    //Range slider with value
540    if($('.input-slider-values')[0]) {
541	$('.input-slider-values').noUiSlider({
542	    start: [ 45, 80 ],
543	    connect: true,
544	    direction: 'rtl',
545	    behaviour: 'tap-drag',
546	    range: {
547		    'min': 0,
548		    'max': 100
549	    }
550	});
551
552	$('.input-slider-values').Link('lower').to($('#value-lower'));
553        $('.input-slider-values').Link('upper').to($('#value-upper'), 'html');
554    }
555
556    /*
557     * Input Mask
558     */
559    if ($('input-mask')[0]) {
560        $('.input-mask').mask();
561    }
562
563    /*
564     * Color Picker
565     */
566    if ($('.color-picker')[0]) {
567	    $('.color-picker').each(function(){
568            var colorOutput = $(this).closest('.cp-container').find('.cp-value');
569            $(this).farbtastic(colorOutput);
570        });
571    }
572
573    /*
574     * HTML Editor
575     */
576    if ($('.html-editor')[0]) {
577	   $('.html-editor').summernote({
578            height: 300,
579            toolbar: [
580                ['style', ['bold', 'italic', 'underline', 'clear']]
581            ]
582        });
583    }
584
585    if($('.html-editor-click')[0]) {
586        //Edit
587        $('body').on('click', '.hec-button', function(airModeCrt){
588            $('.html-editor-click').summernote({
589                height: 300,
590                toolbar: [
591                    ['style', ['bold', 'italic', 'clear']]
592                ],
593                airMode: true,
594                popover: {
595                    air: [
596                      ['font', ['bold', 'italic', 'clear']]
597                    ]
598                },
599                disableDragAndDrop: true,
600                focus: true
601            });
602
603            $('.hec-top-label').toggleClass('hidden');
604            $('.hec-save').toggleClass('hidden');
605            $('.hec-button').toggleClass('hidden');
606            $('.hec-cancel').toggleClass('hidden');
607            if ($('#MaiDeparte')) $('#MaiDeparte').toggleClass('hidden'); 
608        })
609
610        //Save
611        $('body').on('click', '.hec-save', function(){
612            $('.html-editor-click').summernote('code');
613            $('.html-editor-click').summernote('destroy');
614            $('.hec-save').toggleClass('hidden');
615            $('.hec-button').toggleClass('hidden');
616            $('.hec-top-label').toggleClass('hidden');
617            $('.hec-cancel').toggleClass('hidden');
618            notify('Modificările au fost memorate!', 'success');
619            //alert($('.html-editor-click').summernote('code'));
620            if ($('#MaiDeparte')) $('#MaiDeparte').toggleClass('hidden'); 
621        });
622
623        //Save
624        $('body').on('click', '.hec-cancel', function(){
625            //$('.html-editor-click').code();
626            $('.html-editor-click').summernote('undo');
627            $('.html-editor-click').summernote('destroy');
628            $('.hec-save').toggleClass('hidden');
629            $('.hec-button').toggleClass('hidden');
630            $('.hec-top-label').toggleClass('hidden');
631            $('.hec-cancel').toggleClass('hidden');
632            notify('Modificările NU s-au salvat!', 'warning');
633        });
634
635    }
636
637    //Air Mode
638    if($('.html-editor-airmod')[0]) {
639        $('.html-editor-airmod').summernote({
640            airMode: true
641        });
642    }
643
644    //Fara Toolbar // nu funct bine 
645    if($('.html-editor-FaraToolBar')[0]) {
646        $('.html-editor-FaraToolBar').summernote({
647            toolbar: false,
648            airMode: false
649        });
650    }
651
652
653    /*
654     * Date Time Picker
655     */
656
657    //Date Time Picker
658    if ($('.date-time-picker')[0]) {
659	   $('.date-time-picker').datetimepicker();
660    }
661
662    //Time
663    if ($('.time-picker')[0]) {
664    	$('.time-picker').datetimepicker({
665    	    format: 'LT'
666    	});
667    }
668
669    //Date
670    if ($('.date-picker')[0]) {
671    	$('.date-picker').datetimepicker({
672    	    format: 'DD/MM/YYYY'
673    	});
674    }
675
676    /*
677     * Form Wizard
678     */
679
680    if ($('.form-wizard-basic')[0]) {
681    	$('.form-wizard-basic').bootstrapWizard({
682    	    tabClass: 'fw-nav',
683            'nextSelector': '.next',
684            'previousSelector': '.previous'
685    	});
686    }
687
688    /*
689     * Bootstrap Growl - Notifications popups
690     */
691    function notify(message, type){
692        $.growl({
693            message: message
694        },{
695            type: type,
696            allow_dismiss: false,
697            label: 'Cancel',
698            className: 'btn-xs btn-inverse',
699            placement: {
700                from: 'top',
701                align: 'right'
702            },
703            delay: 2500,
704            animate: {
705                    enter: 'animated bounceIn',
706                    exit: 'animated bounceOut'
707            },
708            offset: {
709                x: 20,
710                y: 85
711            }
712        });
713    };
714
715    /*
716     * Waves Animation
717     */
718    /*(function(){
719         Waves.attach('.btn:not(.btn-icon):not(.btn-float)');
720         Waves.attach('.btn-icon, .btn-float', ['waves-circle', 'waves-float']);
721        Waves.init();
722    })();*/
723
724    /*
725     * Lightbox
726     */
727    if ($('.lightbox')[0]) {
728        $('.lightbox').lightGallery({
729            enableTouch: true
730        });
731    }
732
733    /*
734     * Link prevent
735     */
736    $('body').on('click', '.a-prevent', function(e){
737        e.preventDefault();
738    });
739
740    /*
741     * Collaspe Fix
742     */
743    if ($('.collapse')[0]) {
744
745        //Add active class for opened items
746        $('.collapse').on('show.bs.collapse', function (e) {
747            $(this).closest('.panel').find('.panel-heading').addClass('active');
748        });
749
750        $('.collapse').on('hide.bs.collapse', function (e) {
751            $(this).closest('.panel').find('.panel-heading').removeClass('active');
752        });
753
754        //Add active class for pre opened items
755        $('.collapse.in').each(function(){
756            $(this).closest('.panel').find('.panel-heading').addClass('active');
757        });
758    }
759
760    /*
761     * Tooltips
762     */
763    if ($('[data-toggle="tooltip"]')[0]) {
764        $('[data-toggle="tooltip"]').tooltip();
765    }
766
767    /*
768     * Popover
769     */
770    if ($('[data-toggle="popover"]')[0]) {
771        $('[data-toggle="popover"]').popover();
772    }
773
774    /*
775     * Message
776     */
777
778    //Actions
779    if ($('.on-select')[0]) {
780        var checkboxes = '.lv-avatar-content input:checkbox';
781        var actions = $('.on-select').closest('.lv-actions');
782
783        $('body').on('click', checkboxes, function() {
784            if ($(checkboxes+':checked')[0]) {
785                actions.addClass('toggled');
786            }
787            else {
788                actions.removeClass('toggled');
789            }
790        });
791    }
792
793    if($('#ms-menu-trigger')[0]) {
794        $('body').on('click', '#ms-menu-trigger', function(e){
795            e.preventDefault();
796            $(this).toggleClass('open');
797            $('.ms-menu').toggleClass('toggled');
798        });
799    }
800
801    /*
802     * Login
803     */
804    if ($('.login-content')[0]) {
805        //Add class to HTML. This is used to center align the logn box
806        $('html').addClass('login-content');
807
808        $('body').on('click', '.login-navigation > li', function(){
809            var z = $(this).data('block');
810            var t = $(this).closest('.lc-block');
811
812            t.removeClass('toggled');
813
814            setTimeout(function(){
815                $(z).addClass('toggled');
816            });
817
818        })
819    }
820
821    /*
822     * Fullscreen Browsing
823     */
824    if ($('[data-action="fullscreen"]')[0]) {
825	var fs = $("[data-action='fullscreen']");
826	fs.on('click', function(e) {
827	    e.preventDefault();
828
829	    //Launch
830	    function launchIntoFullscreen(element) {
831
832		if(element.requestFullscreen) {
833		    element.requestFullscreen();
834		} else if(element.mozRequestFullScreen) {
835		    element.mozRequestFullScreen();
836		} else if(element.webkitRequestFullscreen) {
837		    element.webkitRequestFullscreen();
838		} else if(element.msRequestFullscreen) {
839		    element.msRequestFullscreen();
840		}
841	    }
842
843	    //Exit
844	    function exitFullscreen() {
845
846		if(document.exitFullscreen) {
847		    document.exitFullscreen();
848		} else if(document.mozCancelFullScreen) {
849		    document.mozCancelFullScreen();
850		} else if(document.webkitExitFullscreen) {
851		    document.webkitExitFullscreen();
852		}
853	    }
854
855	    launchIntoFullscreen(document.documentElement);
856	    fs.closest('.dropdown').removeClass('open');
857	});
858    }
859
860    /*
861     * Clear Local Storage
862     */
863    if ($('[data-action="clear-localstorage"]')[0]) {
864        var cls = $('[data-action="clear-localstorage"]');
865
866        cls.on('click', function(e) {
867            e.preventDefault();
868
869            swal({
870                title: "Are you sure?",
871                text: "All your saved localStorage values will be removed",
872                type: "warning",
873                showCancelButton: true,
874                confirmButtonColor: "#DD6B55",
875                confirmButtonText: "Yes, delete it!",
876                closeOnConfirm: false
877            }, function(){
878                localStorage.clear();
879                swal("Done!", "localStorage is cleared", "success");
880            });
881        });
882    }
883
884    /*
885     * Profile Edit Toggle
886     */
887    if ($('[data-pmb-action]')[0]) {
888        $('body').on('click', '[data-pmb-action]', function(e){
889            e.preventDefault();
890            var d = $(this).data('pmb-action');
891
892            if (d === "edit") {
893                $(this).closest('.pmb-block').toggleClass('toggled');
894            }
895
896            if (d === "reset") {
897                $(this).closest('.pmb-block').removeClass('toggled');
898            }
899
900
901        });
902    }
903
904    /*
905     * IE 9 Placeholder
906     */
907    if($('html').hasClass('ie9')) {
908        $('input, textarea').placeholder({
909            customClass: 'ie9-placeholder'
910        });
911    }
912
913
914    /*
915     * Listview Search
916     */
917    if ($('.lvh-search-trigger')[0]) {
918
919
920        $('body').on('click', '.lvh-search-trigger', function(e){
921            e.preventDefault();
922            x = $(this).closest('.lv-header-alt').find('.lvh-search');
923
924            x.fadeIn(300);
925            x.find('.lvhs-input').focus();
926        });
927
928        //Close Search
929        $('body').on('click', '.lvh-search-close', function(){
930            x.fadeOut(300);
931            setTimeout(function(){
932                x.find('.lvhs-input').val('');
933            }, 350);
934        })
935    }
936
937
938    /*
939     * Print
940     */
941    if ($('[data-action="print"]')[0]) {
942        $('body').on('click', '[data-action="print"]', function(e){
943            e.preventDefault();
944
945            window.print();
946        })
947    }
948
949    /*
950     * Typeahead Auto Complete
951     */
952     if($('.typeahead')[0]) {
953
954          var statesArray = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
955            'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',
956            'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',
957            'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minne
957sota',
958            'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',
959            'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',
960            'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',
961            'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
962            'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'
963          ];
964        var states = new Bloodhound({
965            datumTokenizer: Bloodhound.tokenizers.whitespace,
966            queryTokenizer: Bloodhound.tokenizers.whitespace,
967            local: statesArray
968        });
969
970        $('.typeahead').typeahead({
971            hint: true,
972            highlight: true,
973            minLength: 1
974        },
975        {
976          name: 'states',
977          source: states
978        });
979    }
980
981
982    /*
983     * Wall
984     */
985    if ($('.wcc-toggle')[0]) {
986        var z = '<div class="wcc-inner">' +
987                    '<textarea class="wcci-text auto-size" placeholder="Write Something..."></textarea>' +
988                '</div>' +
989                '<div class="m-t-15">' +
990                    '<button class="btn btn-sm btn-primary">Post</button>' +
991                    '<button class="btn btn-sm btn-link wcc-cencel">Cancel</button>' +
992                '</div>'
993
994
995        $('body').on('click', '.wcc-toggle', function() {
996            $(this).parent().html(z);
997            autosize($('.auto-size')); //Reload Auto size textarea
998        });
999
1000        //Cancel
1001        $('body').on('click', '.wcc-cencel', function(e) {
1002            e.preventDefault();
1003
1004            $(this).closest('.wc-comment').find('.wcc-inner').addClass('wcc-toggle').html('Write Something...')
1005        });
1006
1007    }
1008
1009    /*
1010     * Skin Change
1011     */
1012    $('body').on('click', '[data-skin]', function() {
1013        var currentSkin = $('[data-current-skin]').data('current-skin');
1014        var skin = $(this).data('skin');
1015
1016        $('[data-current-skin]').attr('data-current-skin', skin)
1017
1018    });
1019
1020});
1021
1022function functions_ShowHelp(helpID, Title) {
1023   var htmlWait9 = '<img src="/images/loading_spinner_200.gif" border="0">';
1024   BootstrapDialog.show({
1025            title: Title,
1026            type: BootstrapDialog.TYPE_INFO,
1027            message: htmlWait9, 
1028            message: $('<div></div>').load('/help9.php?id='+helpID+'&fA=1'),
1029            buttons: [{
1030                label: 'Închide',
1031                action: function(dialogItself){
1032                    dialogItself.close();
1033                }
1034            }]
1035        });
1036}
1037
1038function functions_ExplainAnything_ByScript(ScriptAndParam, Title) {
1039   var htmlWait9 = '<img src="/images/loading_spinner_200.gif" border="0">';
1040   BootstrapDialog.show({
1041            title: Title,
1042            type: BootstrapDialog.TYPE_INFO,
1043            message: htmlWait9, 
1044            message: $('<div></div>').load(ScriptAndParam),
1045            buttons: [{
1046                label: 'Închide',
1047                action: function(dialogItself){
1048                    dialogItself.close();
1049                }
1050            }]
1051        });
1052}
1053
1054
1055function functions_notify9(message, type, secs){
1056    $.growl({
1057        message: message
1058    },{
1059        type: type, allow_dismiss: false, label: 'Cancel', className: 'btn-xs btn-inverse',  placement: {from: 'top', align: 'right'},
1060        delay: secs+1000,
1061        animate: {enter: 'animated bounceIn', exit: 'animated bounceOut'},
1062        offset: {x: 20,y: 85}
1063    });
1064};
1065
1066
1067function functions_ConsoleLogObs(obj9, objNumeInCLar){
1068    str = JSON.stringify(obj9);
1069    str = JSON.stringify(obj9, null, 4); // (Optional) beautiful indented output.
1070    console.log('obj: '+objNumeInCLar+'=' + str); // Logs output to dev tools console.                */
1071}
1072
1073function functions_ConsoleLogObs9(objNumeInCLar, obj9){
1074    str = JSON.stringify(obj9);
1075    str = JSON.stringify(obj9, null, 4); // (Optional) beautiful indented output.
1076    console.log('obj: '+objNumeInCLar+'=' + str); // Logs output to dev tools console.                */
1077}
1078
1079function functions_HtmlToText(Html){
1080      var div = document.createElement('div');
1081      div.innerHTML = Html;
1082      var Text = div.textContent || div.innerText || ''; 
1083      $(div).remove();
1084      return Text;
1085}

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.