One Hat Cyber Team
Your IP :
216.73.216.14
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
ojs-nosc
/
lib
/
pkp
/
js
/
lib
/
jquery
/
plugins
/
Edit File:
jquery.pkp.js
/** * @defgroup js_lib_jquery_plugins */ /** * @file js/lib/jquery/plugins/jquery.pkp.js * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2000-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @ingroup js_lib_jquery_plugins * * @brief PKP jQuery extensions. */ (function($) { /** * Handler plug-in. * @this {jQuery} * @param {string} handlerName The handler to be instantiated * and attached to the target HTML element(s). * @param {Object=} options Parameters to be passed on * to the handler. * @return {jQueryObject} Selected HTML elements for chaining. */ $.fn.pkpHandler = function(handlerName, options) { // Go through all selected elements. this.each(function() { var $element = $(this); // Instantiate the handler and bind it // to the element. options = options || {}; var handler = $.pkp.classes.Helper.objectFactory( handlerName, [$element, options]); }); // Allow chaining. return this; }; /** * Re-implementation of jQuery's html() method * with a remote source. * @param {string} url the AJAX endpoint from which to * retrieve the HTML to be inserted. * @param {Object=} callback function to be called on ajax success. * @return {jQueryObject} Selected HTML elements for chaining. */ $.fn.pkpAjaxHtml = function(url, callback) { var $element = this.first(); // using $.ajax instead of .getJSON to handle failures. // .getJSON does not allow for an error callback // this changes with jQuery 1.5 $.ajax({ url: url, dataType: 'json', success: function(jsonData) { $element.find('#loading').hide(); if (jsonData.status === true) { // Replace the element content with // the remote content. if (jsonData.content) { $element.html(jsonData.content); } if (callback) { callback(); } } else { // Alert that the remote call failed. $element.trigger('ajaxHtmlError', jsonData.content); alert(jsonData.content); } }, error: function() { alert('Failed Ajax request or invalid JSON returned.'); } }); $element.html("<div id='loading' class='throbber'></div>"); return this; }; })(jQuery);
Simpan