Server IP : 195.201.23.43 / Your IP : 13.59.210.36 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : 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, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/kdecoratie/public_html/media/com_finder/js/ |
Upload File : |
var FinderIndexer = function(){ var totalItems= null; var batchSize= null; var offset= null; var progress= null; var optimized= false; var path = 'index.php?option=com_finder&tmpl=component&format=json'; var initialize = function () { offset = 0; progress = 0; path = path + '&' + jQuery('#finder-indexer-token').attr('name') + '=1'; getRequest('indexer.start'); }; var getRequest= function (task) { jQuery.ajax({ type : "GET", url : path, data : 'task=' + task, dataType : 'json', success : handleResponse, error : handleFailure }); }; var handleResponse = function (json, resp) { try { if (json === null) { throw resp; } if (json.error) { throw json; } if (json.start) { totalItems = json.totalItems; } offset += json.batchOffset; updateProgress(json.header, json.message); if (offset < totalItems) { getRequest('indexer.batch'); } else if (!optimized) { optimized = true; getRequest('indexer.optimize'); } } catch (error) { jQuery('#progress').remove(); try { if (json.error) { jQuery('#finder-progress-header').text(json.header).addClass('finder-error'); jQuery('#finder-progress-message').html(json.message).addClass('finder-error'); } } catch (ignore) { if (error === '') { error = Joomla.JText._('COM_FINDER_NO_ERROR_RETURNED'); } jQuery('#finder-progress-header').text(Joomla.JText._('COM_FINDER_AN_ERROR_HAS_OCCURRED')).addClass('finder-error'); jQuery('#finder-progress-message').html(error).addClass('finder-error'); } } return true; }; var handleFailure= function (xhr) { json = (typeof xhr == 'object' && xhr.responseText) ? xhr.responseText : null; json = json ? jQuery.parseJSON(json) : null; jQuery('#progress').remove(); if (json) { json = json.responseText != null ? Json.evaluate(json.responseText, true) : json; } var header = json ? json.header : Joomla.JText._('COM_FINDER_AN_ERROR_HAS_OCCURRED'); var message = json ? json.message : Joomla.JText._('COM_FINDER_MESSAGE_RETURNED') + ' <br />' + json; jQuery('#finder-progress-header').text(header).addClass('finder-error'); jQuery('#finder-progress-message').html(message).addClass('finder-error'); }; var updateProgress = function (header, message) { progress = (offset / totalItems) * 100; jQuery('#finder-progress-header').text(header); jQuery('#finder-progress-message').html(message); if (progress < 100) { jQuery('#progress-bar').css('width', progress + '%').attr('aria-valuenow', progress); } else { jQuery('#progress-bar').removeClass('bar-success').addClass('bar-warning').attr('aria-valuemin', 100).attr('aria-valuemax', 200); jQuery('#progress-bar').css('width', progress + '%').attr('aria-valuenow', progress); } if (message == msg) { jQuery('#progress').remove(); window.parent.jQuery('#modal-archive', parent.document).modal('hide'); } }; initialize(); }; jQuery(function () { Indexer = new FinderIndexer(); if (typeof window.parent.SqueezeBox == 'object') { jQuery(window.parent.SqueezeBox).on('close', function () { window.parent.location.reload(true); }); } });Private