diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-08-14 22:09:06 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-08-14 22:09:06 +0400 |
commit | d81e75e645303cecee4fb037e269903653f4400b (patch) | |
tree | 4d7d4ca8e30621e9691b08dfaa7a8b9c4c53634f /plugins/CoreHome/templates/sites_selection.tpl | |
parent | 23c5db1fa75f95ff20c14931820e7e7ce050c686 (diff) |
Diffstat (limited to 'plugins/CoreHome/templates/sites_selection.tpl')
-rw-r--r-- | plugins/CoreHome/templates/sites_selection.tpl | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/plugins/CoreHome/templates/sites_selection.tpl b/plugins/CoreHome/templates/sites_selection.tpl index 57287a35bd..753ed724f4 100644 --- a/plugins/CoreHome/templates/sites_selection.tpl +++ b/plugins/CoreHome/templates/sites_selection.tpl @@ -1,9 +1,28 @@ -<span id="sitesSelection">Site <select name="idSite" onchange='javascript:this.form.submit()'> - <optgroup label="Sites"> - {foreach from=$sites item=info} - <option label="{$info.name}" value="{$info.idsite}" {if $idSite==$info.idsite} selected="selected"{/if}>{$info.name}</option> - {/foreach} - </optgroup> -</select> -{hiddenurl idSite=null} +<span id="sitesSelectionWrapper" > + <span id="selectedSiteName" style="display:none">{$siteName}</span> + <span id="sitesSelection" style="position:absolute">Site + <form action="{url idSite=null}" method="get"> + <select name="idSite"> + {foreach from=$sites item=info} + <option value="{$info.idsite}" {if $idSite==$info.idsite} selected="selected"{/if}>{$info.name}</option> + {/foreach} + </select> + {hiddenurl idSite=null} + <input type="submit" value="go"/> + </form> + </span> + + {literal}<script language="javascript"> + $(document).ready(function() { + var extraPadding = 0; + // if there is only one website, we dont show the arrows image, so no need to add the extra padding + if( $('#sitesSelection').find('option').size() > 1) + { + extraPadding = 21; + } + var widthSitesSelection = $("#selectedSiteName").width() + 4 + extraPadding; + $("#sitesSelectionWrapper").css('padding-right', widthSitesSelection); + $("#sitesSelection").fdd2div({CssClassName:"formDiv"}); + });</script> + {/literal} </span>
\ No newline at end of file |