Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');

JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'language.cancel' || document.formvalidator.isValid(document.id('language-form')))

JFactory::getDocument()->addScriptDeclaration('
Joomla.submitbutton = function(task)
{
Joomla.submitform(task, document.getElementById('language-form'));
if (task == "language.cancel" || document.formvalidator.isValid(document.getElementById("language-form")))
{
Joomla.submitform(task, document.getElementById("language-form"));
}
}
}
</script>
');
?>

<form action="<?php echo JRoute::_('index.php?option=com_languages&layout=edit&lang_id='.(int) $this->item->lang_id); ?>" method="post" name="adminForm" id="language-form" class="form-validate form-horizontal">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,25 @@
}

$sortFields = $this->getSortFields();
?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $listOrder; ?>')
{
dirn = 'asc';
}
else

JFactory::getDocument()->addScriptDeclaration('
Joomla.orderTable = function()
{
dirn = direction.options[direction.selectedIndex].value;
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != "' . $listOrder . '")
{
dirn = "asc";
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, "");
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
');
?>

<form action="<?php echo JRoute::_('index.php?option=com_languages&view=languages'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
Expand Down
36 changes: 18 additions & 18 deletions administrator/components/com_languages/views/override/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidation');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');
?>
<script type="text/javascript">
window.addEvent('domready', function()
{
document.id('jform_searchstring').addEvent('focus', function()

$expired = ($this->state->get("cache_expired") == 1 ) ? '1' : '';

JFactory::getDocument()->addScriptDeclaration('
document.getElementById("jform_searchstring").addEvent("focus", function() {
if (!Joomla.overrider.states.refreshed)
{
if (!Joomla.overrider.states.refreshed)
var expired = "' . $expired . '";
if (expired)
{
<?php if ($this->state->get('cache_expired')) : ?>
Joomla.overrider.refreshCache();
Joomla.overrider.states.refreshed = true;
<?php endif; ?>
}
this.removeClass('invalid');
});
}
this.removeClass("invalid");
});
Joomla.submitbutton = function(task)
{
if (task == 'override.cancel' || document.formvalidator.isValid(document.id('override-form')))
{
Joomla.submitform(task, document.getElementById('override-form'));
Joomla.submitbutton = function(task) {
if (task == "override.cancel" || document.formvalidator.isValid(document.getElementById("override-form")))
{
Joomla.submitform(task, document.getElementById("override-form"));
}
}
}
</script>
');
?>

<form action="<?php echo JRoute::_('index.php?option=com_languages&id='.$this->item->key); ?>" method="post" name="adminForm" id="override-form" class="form-validate form-horizontal">
<div class="row-fluid">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

JHtml::_('behavior.core');

$script = array();
$script[] = " jQuery(document).ready(function() {";
$script[] = " jQuery('#showmods').on('click', function(e) {";
$script[] = " jQuery('.table tr.no').toggle();";
$script[] = " });";
$script[] = " })";
JFactory::getDocument()->addScriptDeclaration("
jQuery(document).ready(function() {
jQuery('#showmods').on('click', function(e) {
jQuery('.table tr.no').toggle();
});
})
");

// Add the script to the document head.
JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
?>

<div class="control-group">
Expand Down