// javascript for warnings and errors message are now in footer.tpl

This commit is contained in:
mMarinetti
2011-11-16 13:03:02 +00:00
parent 4e10ecb364
commit 06ece67433
2 changed files with 39 additions and 37 deletions
+35 -2
View File
@@ -89,8 +89,41 @@
}
});
}); // end bind
});
// if count errors
$('#hideError').live('click', function(e)
{
e.preventDefault();
$('.error').hide('slow', function (){
$('.error').remove();
});
return false;
});
// if count warnings
$('#linkSeeMore').live('click', function(e){
e.preventDefault();
$('#seeMore').show('slow');
$(this).hide();
$('#linkHide').show();
return false;
});
$('#linkHide').live('click', function(e){
e.preventDefault();
$('#seeMore').hide('slow');
$(this).hide();
$('#linkSeeMore').show();
return false;
});
$('#hideWarn').live('click', function(e){
e.preventDefault();
$('.warn').hide('slow', function (){
$('.warn').remove();
});
return false;
});
});
</script>
</body>
</html>
+4 -35
View File
@@ -31,20 +31,11 @@
{/if}
{if count($errors)} {* @todo what is ??? AND $this->_includeContainer *}
<script type="text/javascript">
$(document).ready(function()
{
$('#hideError').unbind('click').click(function()
{
$('.error').hide('slow', function (){
$('.error').remove();
});
return false;
});
});
</script>
<div class="error">
<span style="float:right"><a id="hideError" href=""><img alt="X" src="../img/admin/close.png" /></a></span><img src="../img/admin/error2.png" />
<span style="float:right">
<a id="hideError" href="#"><img alt="X" src="../img/admin/close.png" /></a>
</span>
<img src="../img/admin/error2.png" />
{if count($errors) == 1}
{$errors[0]}
{else}
@@ -76,28 +67,6 @@
{/if}
{if count($warnings)}
<script type="text/javascript">
$(document).ready(function() {
$('#linkSeeMore').unbind('click').click(function(){
$('#seeMore').show('slow');
$(this).hide();
$('#linkHide').show();
return false;
});
$('#linkHide').unbind('click').click(function(){
$('#seeMore').hide('slow');
$(this).hide();
$('#linkSeeMore').show();
return false;
});
$('#hideWarn').unbind('click').click(function(){
$('.warn').hide('slow', function (){
$('.warn').remove();
});
return false;
});
});
</script>
<div class="warn">
<span style="float:right">
<a id="hideWarn" href=""><img alt="X" src="../img/admin/close.png" /></a>