diff --git a/admin-dev/themes/default/template/controllers/modules/tab_modules_list.tpl b/admin-dev/themes/default/template/controllers/modules/tab_modules_list.tpl index 14a1bfbfe..8a3903715 100644 --- a/admin-dev/themes/default/template/controllers/modules/tab_modules_list.tpl +++ b/admin-dev/themes/default/template/controllers/modules/tab_modules_list.tpl @@ -42,46 +42,57 @@ }); }); - $('#nav_tabs_modules_installed').click( function () { - $('#tab_modules_list_not_installed').hide(); - $('#tab_modules_list_installed').show(); - $(this).parent('li').addClass('active'); - $('#nav_tabs_modules_not_installed').parent('li').removeClass('active'); - return false; - }); - - $('#nav_tabs_modules_not_installed').click( function () { - $('#tab_modules_list_installed').hide(); - $('#tab_modules_list_not_installed').show(); - $(this).parent('li').addClass('active'); - $('#nav_tabs_modules_installed').parent('li').removeClass('active'); - return false; - }); + $('#nav_tabs_modules_installed').click(function () { showInstalledModules() }); + $('#nav_tabs_modules_not_installed').click(function () { showNotInstalledModules() }); + + {if count($tab_modules_list.installed)} + showInstalledModules(); + {else} + showNotInstalledModules(); + {/if} }); + + function showInstalledModules(element) + { + $('#tab_modules_list_not_installed').hide(); + $('#tab_modules_list_installed').show(); + $('#nav_tabs_modules_installed').parent('li').addClass('active'); + $('#nav_tabs_modules_not_installed').parent('li').removeClass('active'); + return false; + } + + function showNotInstalledModules(element) + { + $('#tab_modules_list_installed').hide(); + $('#tab_modules_list_not_installed').show(); + $(element).parent('li').addClass('active'); + $('#nav_tabs_modules_not_installed').parent('li').removeClass('active'); + return false; + }
- - {if count($tab_modules_list.installed)} - {foreach from=$tab_modules_list.installed item=module} - {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} - {/foreach} - {else} - - {/if} -
{l s='No modules available in this section.'}
- - {if count($tab_modules_list.not_installed)} - {foreach from=$tab_modules_list.not_installed item=module} - {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} - {/foreach} - {else} - - {/if} - + {if count($tab_modules_list.installed)} + + {foreach from=$tab_modules_list.installed item=module} + {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} + {/foreach} +
+ {/if} + {if count($tab_modules_list.not_installed)} + + {foreach from=$tab_modules_list.not_installed item=module} + {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} + {/foreach} + + {/if}
{/if}

{l s='More options'}

\ No newline at end of file