HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
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,
Upload Files
File: /var/www/ilya/data/www/irkboard.ru/public/js/ips.help.js
/************************************************/
/* IPB3 Javascript								*/
/* -------------------------------------------- */
/* ips.help.js - Help File Javascript			*/
/* (c) IPS, Inc 2008							*/
/* -------------------------------------------- */
/* Author: Brandon Farber						*/
/************************************************/

var _help = window.IPBoard;

_help.prototype.help = {
	
	/**
	 * Initialization
	 * 
	 */
	init: function()
	{
		Debug.write("Initializing ips.help.js");
		
		document.observe("dom:loaded", function(){
			$$('li.helpRow a').each( function(elem){
				elem.observe('click', ipb.help.showHelpFile );
			});
		});
	},
	
	/**
	 * Shows a prompt allowing user to copy the URL
	 * 
	 * @var		{event}		e		The event
	 */
	showHelpFile: function(e)
	{
		if( $( Event.element(e) ).tagName != 'A' ){	return;	}

		Event.stop(e);
		
		if( Event.element(e).hasClassName( 'isOpen' ) )
		{
			Event.element(e).removeClassName( 'isOpen' );
			Event.element(e).up('.helpRow').down( '.openedText' ).hide();
			return;
		}
		
		if( Event.element(e).up('.helpRow').down( '.openedText' ) )
		{
			Event.element(e).addClassName( 'isOpen' );
			Event.element(e).up('.helpRow').down( '.openedText' ).show();
			return;
		}

		var url	= $( Event.element(e) ).readAttribute('href');
		url 	= url + '&xml=1';
		url 	= url.replace( /&/g, '&' );
		
		new Ajax.Request(	url,
							{
								method: 'get',
								onSuccess: function(t)
								{
									if( t.responseText == 'error' )
									{
										alert( ipb.lang['action_failed'] );
										return;
									}
									
									// Create a div and show the help text
									var text = new Element( 'div' ).update( t.responseText ).addClassName('openedText');
									$( Event.element(e) ).up('.helpRow').insert( { bottom: text } );
									Event.element(e).addClassName( 'isOpen' );
								}
							}
						);
		
		
	}

};

ipb.help.init();