Skip to content

Commit

Permalink
added language data for button compare-name to com_content
Browse files Browse the repository at this point in the history
  • Loading branch information
lavipr committed Aug 31, 2017
1 parent a2a03aa commit 2eb9911
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
16 changes: 6 additions & 10 deletions administrator/components/com_content/tmpl/article/showdiff.php
Expand Up @@ -17,20 +17,15 @@
JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt IE 9');
JHtml::_('script', 'com_content/admin-article-showdiff.min.js', array('version' => 'auto', 'relative' => true));


JHtml::_('script', 'vendor/diff/diff.js', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'com_contenthistory/jquery.pretty-text-diff.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'com_content/admin-article-showdiff.js', array('version' => 'auto', 'relative' => true));

//$path = JURI::root(true) . "/media/com_content/js/admin-article-showdiff.js";
//$path2 = JURI::root(true) . "/media/com_contenthistory/js/diff_match_patch.js";

$document = JFactory::getDocument();
$this->eName = JFactory::getApplication()->input->getCmd('e_name', '');
$this->eName = preg_replace('#[^A-Z0-9\-\_\[\]]#i', '', $this->eName);

$document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
$document->setTitle(JText::_('COM_CONTENT_SHOWDIFF_DOC_TITLE'));

$input = JFactory::getApplication()->input;

Expand Down Expand Up @@ -59,25 +54,26 @@
<!-- These Buttons toogle the shown text between one including HTML-Tags and one that doesn´t -->
<div>
<button class="diff-header btn hasTooltip"
title="<?php echo JText::_('COM_CONTENTHISTORY_BUTTON_COMPARE_HTML_DESC'); ?>"
title="<?php JText::_('COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_HTML_DESC'); ?>"
onclick="jQuery('.diff_html, .diffhtml-header').show(); jQuery('.diff_text, .diff-header').hide()">

<span class="icon-wrench" aria-hidden="true"></span>
<?php echo JText::_('COM_CONTENTHISTORY_BUTTON_COMPARE_HTML'); ?>
<?php echo JText::_('COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_HTML'); ?>
</button>
<button class="diffhtml-header btn hasTooltip"
title="<?php echo JText::_('COM_CONTENTHISTORY_BUTTON_COMPARE_TEXT_DESC'); ?>"
title="<?php echo JText::_('COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_TEXT_DESC'); ?>"
onclick="jQuery('.diff_html, .diffhtml-header').hide(); jQuery('.diff_text, .diff-header').show()"
style="display:none">
<span class="icon-pencil"
aria-hidden="true"></span> <?php echo JText::_('COM_CONTENTHISTORY_BUTTON_COMPARE_TEXT'); ?></button>
aria-hidden="true"></span> <?php echo JText::_('COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_TEXT'); ?></button>
</div>

<div id="diff_area" class="container-popup" style="height: auto">
<?php
if (count($dbObject) > 1)
{
$object = ContenthistoryHelper::decodeFields($dbObject[$previousVersion]->version_data);

if ($object->fulltext != null)
{
echo $object->introtext . '<hr id="system-readmore" />' . $object->fulltext;
Expand Down
5 changes: 5 additions & 0 deletions administrator/language/en-GB/en-GB.com_content.ini
Expand Up @@ -150,6 +150,11 @@ COM_CONTENT_URL_FIELD_B_BROWSERNAV_LABEL="URL B Target Window"
COM_CONTENT_URL_FIELD_C_BROWSERNAV_LABEL="URL C Target Window"
COM_CONTENT_WARNING_PROVIDE_VALID_NAME="Please provide a valid, non-blank title."
COM_CONTENT_XML_DESCRIPTION="Article management component."
COM_CONTENT_SHOWDIFF_DOC_TITLE="Compare"
COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_HTML_DESC="Displays the changes as HTML-Code"
COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_HTML="Display HTML-Code"
COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_TEXT_DESC="Displays the changes as HTML-Code"
COM_CONTENT_SHOWDIFF_BUTTON_COMPARE_TEXT="Display text"

JGLOBAL_NO_ITEM_SELECTED="No articles selected"
JLIB_APPLICATION_ERROR_BATCH_CANNOT_CREATE="You are not allowed to create new articles in this category."
Expand Down
Expand Up @@ -5,6 +5,4 @@

PLG_EDITORS-XTD_SHOWDIFF="Button - Compare"
PLG_EDITORSXTD_SHOWDIFF_BUTTON_SHOWDIFF="Compare"
PLG_EDITORSXTD_SHOWDIFF_XML_DESCRIPTION="Provides a button to show differences between versions within a new window"
COM_CONTENTHISTORY_BUTTON_COMPARE_HTML_DESC = "Displays the changes as HTML-Code"
COM_CONTENTHISTORY_BUTTON_COMPARE_TEXT_DESC = "Displays the changes as text."
PLG_EDITORSXTD_SHOWDIFF_XML_DESCRIPTION="Provides a button to show differences between versions within a new window"

0 comments on commit 2eb9911

Please sign in to comment.