HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/compelsupport/wp-content/themes/compel/assets/pages/jquery.rating.init.js
/**
 * Theme: Metrica - Responsive Bootstrap 4 Admin Dashboard
 * Author: Mannatthemes
 * Rating Js
 */

$(function() {
  function ratingEnable() {
      $('#example-1to10').barrating('show', {
          theme: 'bars-1to10'
      });

      $('#example-movie').barrating('show', {
          theme: 'bars-movie'
      });

      $('#example-movie').barrating('set', 'Mediocre');

      $('#example-square').barrating('show', {
          theme: 'bars-square',
          showValues: true,
          showSelectedRating: false
      });

      $('#example-pill').barrating('show', {
          theme: 'bars-pill',
          initialRating: 'A',
          showValues: true,
          showSelectedRating: false,
          allowEmpty: true,
          emptyValue: '-- no rating selected --',
          onSelect: function(value, text) {
              alert('Selected rating: ' + value);
          }
      });

      $('#example-reversed').barrating('show', {
          theme: 'bars-reversed',
          showSelectedRating: true,
          reverse: true
      });

      $('#example-horizontal').barrating('show', {
          theme: 'bars-horizontal',
          reverse: true,
          hoverState: false
      });

      $('#example-fontawesome').barrating({
          theme: 'fontawesome-stars',
          showSelectedRating: false
      });

      $('#example-css').barrating({
          theme: 'css-stars',
          showSelectedRating: false
      });


      var currentRating = $('#example-fontawesome-o').data('current-rating');

      $('.stars-example-fontawesome-o .current-rating')
          .find('span')
          .html(currentRating);

      $('.stars-example-fontawesome-o .clear-rating').on('click', function(event) {
          event.preventDefault();

          $('#example-fontawesome-o')
              .barrating('clear');
      });

      $('#example-fontawesome-o').barrating({
          theme: 'fontawesome-stars-o',
          showSelectedRating: false,
          initialRating: currentRating,
          onSelect: function(value, text) {
              if (!value) {
                  $('#example-fontawesome-o')
                      .barrating('clear');
              } else {
                  $('.stars-example-fontawesome-o .current-rating')
                      .addClass('hidden');

                  $('.stars-example-fontawesome-o .your-rating')
                      .removeClass('hidden')
                      .find('span')
                      .html(value);
              }
          },
          onClear: function(value, text) {
              $('.stars-example-fontawesome-o')
                  .find('.current-rating')
                  .removeClass('hidden')
                  .end()
                  .find('.your-rating')
                  .addClass('hidden');
          }
      });
  }

  function ratingDisable() {
      $('select').barrating('destroy');
  }

  $('.rating-enable').click(function(event) {
      event.preventDefault();

      ratingEnable();

      $(this).addClass('deactivated');
      $('.rating-disable').removeClass('deactivated');
  });

  $('.rating-disable').click(function(event) {
      event.preventDefault();

      ratingDisable();

      $(this).addClass('deactivated');
      $('.rating-enable').removeClass('deactivated');
  });

  ratingEnable();
});