diff options
9 files changed, 22 insertions, 89 deletions
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml index 7d80d38..2fbdabf 100644 --- a/application/modules/user/layouts/user.phtml +++ b/application/modules/user/layouts/user.phtml @@ -16,6 +16,7 @@ echo $this->headScript()."\n"; <script src='/media/js/jquery.min.js'></script> <script src='/media/js/jquery-ui.min.js'></script> <script src='/media/js/script.js'></script> +<script src='/media/js/user.js'></script> </head> <body> <div id='sidepannel'> diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index 3f89a92..4af8c0e 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -75,14 +75,3 @@ <?php echo $this->pagination; ?> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index c51a3ed..74d0666 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -114,15 +114,4 @@ </div> <?php echo $this->pagination; ?> - -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> + diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index cb55a91..99ddfc3 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -94,24 +94,3 @@ <?php echo $this->pagination; ?> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - $(this).find('.title').prepend("<span class='toggler'><img src='/media/img/right.png'></span> "); - $(this).find('.title').data('toggle','0'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - if($(this).data('toggle') == '0'){ - $(this).data('toggle','1'); - $(this).find('.toggler img').attr('src','/media/img/down.png') - } - else{ - $(this).data('toggle','0'); - $(this).find('.toggler img').attr('src','/media/img/right.png') - } - }); - } -}); -</script> diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index 0164985..c928216 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -118,14 +118,3 @@ <?php echo $this->pagination; ?> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml index a869c76..a1c0896 100644 --- a/application/modules/user/views/scripts/group/show.phtml +++ b/application/modules/user/views/scripts/group/show.phtml @@ -122,17 +122,7 @@ if($this->groupID) { </div> <?php endforeach ?> </div> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> + <?php echo $this->memberPagination; ?> <?php } diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 568654d..7d5a6cc 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -111,18 +111,6 @@ <?php echo $this->pagination; ?> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> - <?php if (isset($this->freeclients) && count($this->freeclients)>0): ?> <h2 style='margin-top:20px;'>Free clients</h2> <p style="text-align:right;"> diff --git a/application/modules/user/views/scripts/session/index.phtml b/application/modules/user/views/scripts/session/index.phtml index 412b113..c4225f3 100644 --- a/application/modules/user/views/scripts/session/index.phtml +++ b/application/modules/user/views/scripts/session/index.phtml @@ -47,14 +47,3 @@ <?php echo $this->pagination; ?> -<script> -$(document).ready(function(){ - if($('.element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - - $('.title').click(function(){ - $(this).siblings('.dispnone').toggle(); - }); - } -}); -</script> diff --git a/public/media/js/user.js b/public/media/js/user.js new file mode 100644 index 0000000..488ab45 --- /dev/null +++ b/public/media/js/user.js @@ -0,0 +1,19 @@ +$(document).ready(function(){ + if($('.listelement .element').find('.dispnone').length >= 1){ + $(this).find('.title').css('cursor','pointer'); + $(this).find('.title').prepend("<span class='toggler'><img src='/media/img/right.png'></span> "); + $(this).find('.title').data('toggle','0'); + + $('.listelement .title').click(function(){ + $(this).siblings('.dispnone').toggle(); + if($(this).data('toggle') == '0'){ + $(this).data('toggle','1'); + $(this).find('.toggler img').attr('src','/media/img/down.png') + } + else{ + $(this).data('toggle','0'); + $(this).find('.toggler img').attr('src','/media/img/right.png') + } + }); + } +}); |