Your IP : 216.73.217.68


Current Path : /home/w/u/e/wuectly/www/03cbe/
Upload File :
Current File : /home/w/u/e/wuectly/www/03cbe/none.tar

js/none.min.js000060400000001654152455717140007254 0ustar00!function(i,e,o){e.jInsertEditorText=function(e,t){i.editors.instances[t].replaceSelection(e)},o.addEventListener("DOMContentLoaded",function(){for(var e=o.querySelectorAll(".js-editor-none"),t=0,n=e.length;t<n;t++)i.editors.instances[e[t].childNodes[0].id]={id:e[t].childNodes[0].id,element:e[t].childNodes[0],getValue:function(){return this.element.value},setValue:function(e){return this.element.value=e},getSelection:function(){return e=this.element,o.selection?(e.focus(),o.selection.createRange()):e.selectionStart||0===e.selectionStart?e.value.substring(e.selectionStart,e.selectionEnd):e.value;var e},replaceSelection:function(e){return t=this.element,n=e,void(o.selection?(t.focus(),o.selection.createRange().text=n):t.selectionStart||0===t.selectionStart?t.value=t.value.substring(0,t.selectionStart)+n+t.value.substring(t.selectionEnd,t.value.length):t.value+=n);var t,n},onSave:function(){return""}}})}(Joomla,window,document);
js/none.js000060400000003732152455717140006471 0ustar00/**
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * Editor None
 */
;(function(Joomla, window, document){

	function insertAtCursor(myField, myValue) {
		if (document.selection) {
			// IE support
			myField.focus();
			var sel = document.selection.createRange();
			sel.text = myValue;
		} else if (myField.selectionStart || myField.selectionStart === 0) {
			// MOZILLA/NETSCAPE support
			myField.value = myField.value.substring(0, myField.selectionStart)
				+ myValue
				+ myField.value.substring(myField.selectionEnd, myField.value.length);
		} else {
			myField.value += myValue;
		}
	}

	function getSelection(myField) {
		if (document.selection) {
			// IE support
			myField.focus();
			return document.selection.createRange();
		} else if (myField.selectionStart || myField.selectionStart === 0) {
			// MOZILLA/NETSCAPE support
			return myField.value.substring(myField.selectionStart, myField.selectionEnd);
		} else {
			return myField.value;
		}
	}

	// @deprecated 4.0 Use directly Joomla.editors.instances[editor].replaceSelection(text);
	window.jInsertEditorText = function(text, editor) {
		Joomla.editors.instances[editor].replaceSelection(text);
	};

	document.addEventListener('DOMContentLoaded', function() {
		var editors = document.querySelectorAll('.js-editor-none');

		for(var i = 0, l = editors.length; i < l; i++) {
			/** Register Editor */
			Joomla.editors.instances[editors[i].childNodes[0].id] = {
				'id': editors[i].childNodes[0].id,
				'element':  editors[i].childNodes[0],
				'getValue': function () { return this.element.value; },
				'setValue': function (text) { return this.element.value = text; },
				'getSelection': function () { return getSelection(this.element); },
				'replaceSelection': function (text) { return insertAtCursor(this.element, text); },
				'onSave': function() { return ''; }
			};
		}
	});
}(Joomla, window, document));
none.xml000060400000001370152456114660006234 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors" method="upgrade">
	<name>plg_editors_none</name>
	<version>3.0.0</version>
	<creationDate>September 2005</creationDate>
	<author>Joomla! Project</author>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<description>PLG_NONE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="none">none.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors_none.ini</language>
		<language tag="en-GB">en-GB.plg_editors_none.sys.ini</language>
	</languages>
</extension>
none.php000060400000007565152456114660006237 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors.none
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Plain Textarea Editor Plugin
 *
 * @since  1.5
 */
class PlgEditorNone extends JPlugin
{
	/**
	 * Method to handle the onInitEditor event.
	 *  - Initialises the Editor
	 *
	 * @return  void
	 *
	 * @since 1.5
	 */
	public function onInit()
	{
		JHtml::_('script', 'editors/none/none.min.js', array('version' => 'auto', 'relative' => true));
	}

	/**
	 * Copy editor content to form field.
	 *
	 * Not applicable in this editor.
	 *
	 * @param   string  $editor  the editor id
	 *
	 * @return  void
	 *
	 * @deprecated 4.0 Use directly the returned code
	 */
	public function onSave($editor)
	{
	}

	/**
	 * Get the editor content.
	 *
	 * @param   string  $id  The id of the editor field.
	 *
	 * @return  string
	 *
	 * @deprecated 4.0 Use directly the returned code
	 */
	public function onGetContent($id)
	{
		return 'Joomla.editors.instances[' . json_encode($id) . '].getValue();';
	}

	/**
	 * Set the editor content.
	 *
	 * @param   string  $id    The id of the editor field.
	 * @param   string  $html  The content to set.
	 *
	 * @return  string
	 *
	 * @deprecated 4.0 Use directly the returned code
	 */
	public function onSetContent($id, $html)
	{
		return 'Joomla.editors.instances[' . json_encode($id) . '].setValue(' . json_encode($html) . ');';
	}

	/**
	 * Inserts html code into the editor
	 *
	 * @param   string  $id  The id of the editor field
	 *
	 * @return  void
	 *
	 * @deprecated 4.0
	 */
	public function onGetInsertMethod($id)
	{
	}

	/**
	 * Display the editor area.
	 *
	 * @param   string   $name     The control name.
	 * @param   string   $content  The contents of the text area.
	 * @param   string   $width    The width of the text area (px or %).
	 * @param   string   $height   The height of the text area (px or %).
	 * @param   integer  $col      The number of columns for the textarea.
	 * @param   integer  $row      The number of rows for the textarea.
	 * @param   boolean  $buttons  True and the editor buttons will be displayed.
	 * @param   string   $id       An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
	 * @param   string   $asset    The object asset
	 * @param   object   $author   The author.
	 * @param   array    $params   Associative array of editor parameters.
	 *
	 * @return  string
	 */
	public function onDisplay($name, $content, $width, $height, $col, $row, $buttons = true,
		$id = null, $asset = null, $author = null, $params = array())
	{
		if (empty($id))
		{
			$id = $name;
		}

		// Only add "px" to width and height if they are not given as a percentage
		if (is_numeric($width))
		{
			$width .= 'px';
		}

		if (is_numeric($height))
		{
			$height .= 'px';
		}

		$readonly = !empty($params['readonly']) ? ' readonly disabled' : '';

		$editor = '<div class="js-editor-none">'
			. '<textarea name="' . $name . '" id="' . $id . '" cols="' . $col . '" rows="' . $row
			. '" style="width: ' . $width . '; height: ' . $height . ';"' . $readonly . '>' . $content . '</textarea>'
			. $this->_displayButtons($id, $buttons, $asset, $author)
			. '</div>';

		return $editor;
	}

	/**
	 * Displays the editor buttons.
	 *
	 * @param   string  $name     The control name.
	 * @param   mixed   $buttons  [array with button objects | boolean true to display buttons]
	 * @param   string  $asset    The object asset
	 * @param   object  $author   The author.
	 *
	 * @return  void|string HTML
	 */
	public function _displayButtons($name, $buttons, $asset, $author)
	{
		if (is_array($buttons) || (is_bool($buttons) && $buttons))
		{
			$buttons = $this->_subject->getButtons($name, $buttons, $asset, $author);

			return JLayoutHelper::render('joomla.editors.buttons', $buttons);
		}
	}
}