Remove unneeded jquery .ready()

This commit is contained in:
dgt41 2014-12-03 15:29:26 +02:00
parent ceed4b3be0
commit 0af2158525
2 changed files with 4 additions and 6 deletions

View File

@ -15,15 +15,14 @@ JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JFactory::getDocument()->addScriptDeclaration("
jQuery(document).ready(function() {
Joomla.submitbutton = function(task)
{
if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('weblink-form'))) {
" . $this->form->getField('description')->save() . "
Joomla.submitform(task, document.getElementById('weblink-form'));
}
}
});");
};
");
?>
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="weblink-form" class="form-validate">

View File

@ -29,7 +29,6 @@ if ($saveOrder)
$sortFields = $this->getSortFields();
JFactory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function() {
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
@ -44,8 +43,8 @@ jQuery(document).ready(function() {
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, "");
}
});');
};
');
?>
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&view=weblinks'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>