aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/template')
-rw-r--r--themes/default/template/index.tpl24
1 files changed, 10 insertions, 14 deletions
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
index 5f0853071..3f1570544 100644
--- a/themes/default/template/index.tpl
+++ b/themes/default/template/index.tpl
@@ -7,7 +7,7 @@
<li>{strip}<a href="javascript:toggleSortOrderBox()" id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
<span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
</a>
- <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()">
+ <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;if(e.parentNode!=this&amp;&amp;e!=this)toggleSortOrderBox()">
{'Sort order'|@translate}:
{foreach from=$image_orders item=image_order}<br>
{if $image_order.SELECTED}
@@ -18,15 +18,13 @@
{/foreach}
</div>
{footer_script}{literal}
-function toggleSortOrderBox()
-{
+function toggleSortOrderBox() {
var elt = document.getElementById("sortOrderBox"),
ePos = document.getElementById("sortOrderLink");
- if (elt.style.display==="none")
- {
+ if (elt.style.display==="none") {
elt.style.position = "absolute";
- elt.style.left = (ePos.offsetLeft) + "px";
- elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
+ elt.style.left = ePos.offsetLeft+"px";
+ elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
elt.style.display="";
}
else
@@ -40,7 +38,7 @@ function toggleSortOrderBox()
<li>{strip}<a href="javascript:toggleImageDerivativesBox()" id="derivativeChooseLink" title="{'Photo Sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo Sizes'|@translate}</span>
</a>
- <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()">
+ <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;if(e.parentNode!=this&amp;&amp;e!=this)toggleImageDerivativesBox()">
{foreach from=$image_derivatives item=image_derivative name=deriv_loop}{if !$smarty.foreach.deriv_loop.first}<br>{/if}
{if $image_derivative.SELECTED}
<span>{$image_derivative.DISPLAY}</span>
@@ -50,15 +48,13 @@ function toggleSortOrderBox()
{/foreach}
</div>
{footer_script}{literal}
-function toggleImageDerivativesBox()
-{
+function toggleImageDerivativesBox() {
var elt = document.getElementById("derivativeSwitchBox"),
ePos = document.getElementById("derivativeChooseLink");
- if (elt.style.display==="none")
- {
+ if (elt.style.display==="none") {
elt.style.position = "absolute";
- elt.style.left = (ePos.offsetLeft) + "px";
- elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
+ elt.style.left = ePos.offsetLeft+"px";
+ elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
elt.style.display="";
}
else