HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/erp.nhatnamsst.com/storage/framework/views/313cdf85b503e4b712f98751be4e5885.php
<?php $__env->startSection('content'); ?>
    <h1>Modal Mode</h1>

    <p>The modal mode is similar to <a href="<?php echo e(route('ckfinder_examples', ['example' => 'popups'])); ?>">popup</a>. The difference is that popups are opened using a separate browser window while in modal mode CKFinder is opened inside a modal container that is appended to current page document.</p>

    <div class="modal-example">
        <button id="ckfinder-modal" class="button-a button-a-background" style="float: left">Open Modal</button>
        <div id="output" style="float: left;font-size: 0.8em;line-height: 1.4em;margin: 3px 7px;">
			<span id="file-name"></span>
			<br>
			<span id="file-url"></span>
		</div>
    </div>
    <div style="clear: both"></div>

    <h2>Multiple Modals</h2>

    <p>In some cases you may need more than one modal to handle multiple places that require selecting a file.
        Below you can find an example that fills each of the inputs with the URL of the selected file.</p>

    <input id="ckfinder-input-1" type="text" style="width:60%">
    <button id="ckfinder-modal-1" class="button-a button-a-background">Browse Server</button>

    <div style="height: 5px"></div>

    <input id="ckfinder-input-2" type="text" style="width:60%">
    <button id="ckfinder-modal-2" class="button-a button-a-background">Browse Server</button>

    <pre class="prettyprint"><code>var button1 = document.getElementById( 'ckfinder-popup-1' );
var button2 = document.getElementById( 'ckfinder-popup-2' );

button1.onclick = function() {
	selectFileWithCKFinder( 'ckfinder-input-1' );
};
button2.onclick = function() {
	selectFileWithCKFinder( 'ckfinder-input-2' );
};

function selectFileWithCKFinder( elementId ) {
	CKFinder.modal( {
		chooseFiles: true,
		width: 800,
		height: 600,
		onInit: function( finder ) {
			finder.on( 'files:choose', function( evt ) {
				var file = evt.data.files.first();
				var output = document.getElementById( elementId );
				output.value = file.getUrl();
			} );

			finder.on( 'file:choose:resizedImage', function( evt ) {
				var output = document.getElementById( elementId );
				output.value = evt.data.resizedUrl;
			} );
		}
	} );
}
</code></pre>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script>
		var button = document.getElementById( 'ckfinder-modal' );

		button.onclick = function() {
			CKFinder.modal( {
				chooseFiles: true,
				width: 800,
				height: 600,
				onInit: function( finder ) {
					finder.on( 'files:choose', function( evt ) {
						var file = evt.data.files.first();
						var outputFileName = document.getElementById( 'file-name' );
						var outputFileUrl = document.getElementById( 'file-url' );
						outputFileName.innerText = 'Selected: ' + file.get( 'name' );
						outputFileUrl.innerText = 'URL: ' + file.getUrl();
					} );

					finder.on( 'file:choose:resizedImage', function( evt ) {
						var outputFileName = document.getElementById( 'file-name' );
						var outputFileUrl = document.getElementById( 'file-url' );
						outputFileName.innerText = 'Selected resized image: ' + evt.data.file.get( 'name' );
						outputFileUrl.innerText = 'URL: ' + evt.data.resizedUrl;
					} );
				}
			} );
		};

		var button1 = document.getElementById( 'ckfinder-modal-1' );
		var button2 = document.getElementById( 'ckfinder-modal-2' );

		button1.onclick = function() {
			selectFileWithCKFinder( 'ckfinder-input-1' );
		};
		button2.onclick = function() {
			selectFileWithCKFinder( 'ckfinder-input-2' );
		};

		function selectFileWithCKFinder( elementId ) {
			CKFinder.modal( {
				chooseFiles: true,
				width: 800,
				height: 600,
				onInit: function( finder ) {
					finder.on( 'files:choose', function( evt ) {
						var file = evt.data.files.first();
						var output = document.getElementById( elementId );
						output.value = file.getUrl();
					} );

					finder.on( 'file:choose:resizedImage', function( evt ) {
						var output = document.getElementById( elementId );
						output.value = evt.data.resizedUrl;
					} );
				}
			} );
		}
    </script>
    <script src="//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('ckfinder::samples/layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /www/wwwroot/erp.nhatnamsst.com/vendor/ckfinder/ckfinder-laravel-package/views/samples/modals.blade.php ENDPATH**/ ?>