Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Untitled diff
Creado
hace 7 años
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
4 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
38 líneas
Copiar todo
22 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
52 líneas
Copiar todo
<?php
<?php
/**
/**
* @package Joomla.Plugin
* @package Joomla.Plugin
* @subpackage Fields.Travel
* @subpackage Fields.Travel
*
*
* @copyright Copyright (C) 2017 Elisa Foltyn.
* @copyright Copyright (C) 2017 Elisa Foltyn.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
*/
defined('_JEXEC') or die();
defined('_JEXEC') or die();
jimport('joomla.form.formfield');
jimport('joomla.form.formfield');
JFormHelper::loadFieldClass('text');
JFormHelper::loadFieldClass('text');
class JFormFieldTravel extends JFormFieldText {
class JFormFieldTravel extends JFormFieldText {
protected $type = 'Travel';
protected $type = 'Travel';
public function getInput()
public function getInput()
{
{
$doc = JFactory::getDocument();
$doc = JFactory::getDocument();
$doc->addScript('https://cdn.jsdelivr.net/npm/places.js@1.4.15', array(), array('defer' => 'defer'));
$doc->addScript('https://cdn.jsdelivr.net/npm/places.js@1.4.15', array(), array('defer' => 'defer'));
$doc->addScriptDeclaration('document.addEventListener("DOMContentLoaded", function(event) {
$doc->addScriptDeclaration('document.addEventListener("DOMContentLoaded", function(event) {
Copiar
Copiado
Copiar
Copiado
var
placesAutocomplete =
places
(
{
var
placesFunc = function(element) {
container:
document.querySelector(".address-input")
});
if (element.dataset.
places
_added)
{
});');
return;
}
element.dataset.places_added = "1";
places({
container:
element });
};
placesFunc(
document.querySelector(".address-input")
);
jQuery(".subform-repeatable").on("subform-row-add", function(event, row) {
jQuery(row).find(".address-input").each(function(i, element) {
placesFunc(element);
});
});
});');
$placeholder = JText::_('PLG_FIELDS_TRAVEL_DESTINATION');
$placeholder = JText::_('PLG_FIELDS_TRAVEL_DESTINATION');
$field = '<input name="' . $this->name . '" id="' . $this->id . '" class="address-input" placeholder="' . $placeholder . '">';
$field = '<input name="' . $this->name . '" id="' . $this->id . '" class="address-input" placeholder="' . $placeholder . '">';
return $field;
return $field;
}
}
}
}
Diferencias guardadas
Texto original
Abrir archivo
<?php /** * @package Joomla.Plugin * @subpackage Fields.Travel * * @copyright Copyright (C) 2017 Elisa Foltyn. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die(); jimport('joomla.form.formfield'); JFormHelper::loadFieldClass('text'); class JFormFieldTravel extends JFormFieldText { protected $type = 'Travel'; public function getInput() { $doc = JFactory::getDocument(); $doc->addScript('https://cdn.jsdelivr.net/npm/places.js@1.4.15', array(), array('defer' => 'defer')); $doc->addScriptDeclaration('document.addEventListener("DOMContentLoaded", function(event) { var placesAutocomplete = places({ container: document.querySelector(".address-input") }); });'); $placeholder = JText::_('PLG_FIELDS_TRAVEL_DESTINATION'); $field = '<input name="' . $this->name . '" id="' . $this->id . '" class="address-input" placeholder="' . $placeholder . '">'; return $field; } }
Texto modificado
Abrir archivo
<?php /** * @package Joomla.Plugin * @subpackage Fields.Travel * * @copyright Copyright (C) 2017 Elisa Foltyn. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die(); jimport('joomla.form.formfield'); JFormHelper::loadFieldClass('text'); class JFormFieldTravel extends JFormFieldText { protected $type = 'Travel'; public function getInput() { $doc = JFactory::getDocument(); $doc->addScript('https://cdn.jsdelivr.net/npm/places.js@1.4.15', array(), array('defer' => 'defer')); $doc->addScriptDeclaration('document.addEventListener("DOMContentLoaded", function(event) { var placesFunc = function(element) { if (element.dataset.places_added) { return; } element.dataset.places_added = "1"; places({ container: element }); }; placesFunc(document.querySelector(".address-input")); jQuery(".subform-repeatable").on("subform-row-add", function(event, row) { jQuery(row).find(".address-input").each(function(i, element) { placesFunc(element); }); }); });'); $placeholder = JText::_('PLG_FIELDS_TRAVEL_DESTINATION'); $field = '<input name="' . $this->name . '" id="' . $this->id . '" class="address-input" placeholder="' . $placeholder . '">'; return $field; } }
Encontrar la diferencia