Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
Untitled diff
Creato
7 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
4 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
38 linee
Copia tutti
22 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
52 linee
Copia tutti
<?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) {
Copia
Copiato
Copia
Copiato
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;
}
}
}
}
Diff salvati
Testo originale
Apri file
<?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; } }
Testo modificato
Apri file
<?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; } }
Trovare la differenza