diff options
Diffstat (limited to 'phpBB/styles/prosilver')
| -rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 37 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/memberlist_body.html | 11 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/memberlist_search.html | 3 |
3 files changed, 42 insertions, 9 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 995b4b0ab7..527a064fa9 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -434,6 +434,43 @@ function apply_onkeypress_event() } /** +* Toggle a section's visibility status +*/ +function toggle_section(link, panel_id, expand_text, collapse_text) +{ + if (jquery_present) + { + var panel = jQuery('#' + panel_id); + if (panel.is(':visible')) + { + jQuery(link).text(expand_text); + panel.slideUp('fast'); + } + else + { + jQuery(link).text(collapse_text); + panel.slideDown('fast'); + } + } + else + { + var panel = document.getElementById(panel_id); + if (panel.style.display == 'none') + { + link.innerHTML = collapse_text; + panel.style.display = ''; + } + else + { + link.innerHTML = expand_text; + panel.style.display = 'none'; + } + } + + return false; +} + +/** * Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;) */ var jquery_present = typeof jQuery == 'function'; diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 4ba0c5cb2a..023c0e1e4e 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -3,13 +3,11 @@ <!-- INCLUDE memberlist_search.html --> <form method="post" id="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user); return false"> -<!-- ELSEIF S_SEARCH_USER --> - <!-- INCLUDE overall_header.html --> - <!-- INCLUDE memberlist_search.html --> - <form method="post" action="{S_MODE_ACTION}"> - <!-- ELSE --> <!-- INCLUDE overall_header.html --> + <div class="panel" id="memberlist_search"<!-- IF not S_SEARCH_USER --> style="display: none;"<!-- ENDIF -->> + <!-- INCLUDE memberlist_search.html --> + </div> <form method="post" action="{S_MODE_ACTION}"> <!-- ENDIF --> @@ -32,8 +30,7 @@ <ul class="linklist"> <li> - - <!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a> • <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}">{L_HIDE_MEMBER_SEARCH}</a> • <!-- ENDIF --> + <!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}" onclick="return toggle_section(this, 'memberlist_search', '{LA_FIND_USERNAME}', '{LA_HIDE_MEMBER_SEARCH}')">{L_FIND_USERNAME}</a> • <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}" onclick="return toggle_section(this, 'memberlist_search', '{LA_FIND_USERNAME}', '{LA_HIDE_MEMBER_SEARCH}')">{L_HIDE_MEMBER_SEARCH}</a> • <!-- ENDIF --> <strong style="font-size: 0.95em;"> <!-- BEGIN first_char --> <a href="{first_char.U_SORT}">{first_char.DESC}</a> diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 1ef8710817..ad8fb83fe4 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -37,9 +37,8 @@ function insert_single(user) } // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script> <!-- ENDIF --> - +<!-- INCLUDEJS template/forum_fn.js --> <h2 class="solo">{L_FIND_USERNAME}</h2> <form method="post" action="{S_MODE_ACTION}" id="search_memberlist"> |
