aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--themes/default/template/index.tpl16
-rw-r--r--themes/default/template/picture.tpl24
-rw-r--r--themes/default/theme.css14
3 files changed, 21 insertions, 33 deletions
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
index a78281aa5..34fa425a8 100644
--- a/themes/default/template/index.tpl
+++ b/themes/default/template/index.tpl
@@ -7,13 +7,13 @@
<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" class="switchBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
+ <div id="sortOrderBox" class="switchBox" style="display:none" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
<div class="switchBoxTitle">{'Sort order'|@translate}</div>
{foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
{if $image_order.SELECTED}
- <span class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_order.DISPLAY}</span>
+ <span>&#x2714; </span>{$image_order.DISPLAY}
{else}
- <a href="{$image_order.URL}" class="switchUnselected" rel="nofollow">{$image_order.DISPLAY}</a>
+ <span style="visibility:hidden">&#x2714; </span><a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
{/if}
{/foreach}
</div>
@@ -22,7 +22,6 @@ function toggleSortOrderBox(forceHide) {
var elt = document.getElementById("sortOrderBox"),
ePos = document.getElementById("sortOrderLink");
if (!forceHide && elt.style.display==="none") {
- elt.style.position = "absolute";
elt.style.left = ePos.offsetLeft+"px";
elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
elt.style.display="";
@@ -38,13 +37,13 @@ function toggleSortOrderBox(forceHide) {
<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" class="switchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
+ <div id="derivativeSwitchBox" class="switchBox" style="display:none" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
{foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
{if $image_derivative.SELECTED}
- <span class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_derivative.DISPLAY}</span>
+ <span>&#x2714; </span>{$image_derivative.DISPLAY}
{else}
- <a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
+ <span style="visibility:hidden">&#x2714; </span><a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
{/if}
{/foreach}
</div>
@@ -53,8 +52,7 @@ function toggleImageDerivativesBox(forceHide) {
var elt = document.getElementById("derivativeSwitchBox"),
ePos = document.getElementById("derivativeChooseLink");
if (!forceHide && elt.style.display==="none") {
- elt.style.position = "absolute";
- elt.style.left = ePos.offsetLeft+"px";
+ elt.style.left = (ePos.offsetLeft-25)+"px";
elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
elt.style.display="";
}
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index ee4ec5f85..17b2c7750 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -19,7 +19,7 @@
<div class="actionButtons">
{if count($current.unique_derivatives)>1}
-{footer_script}{literal}
+{footer_script require='jquery'}{literal}
function changeImgSrc(url,typeSave,typeMap)
{
var theImg = document.getElementById("theMainImage");
@@ -29,11 +29,9 @@ function changeImgSrc(url,typeSave,typeMap)
theImg.src = url;
theImg.useMap = "#map"+typeMap;
}
- jQuery('.derivativeChecked').hide();
- jQuery('#derivativeChecked'+typeSave).show();
- jQuery('#derivativeSiwtchBox .switchSelected').addClass('switchUnselected').removeClass('switchSelected');
- jQuery('#derivativeName'+typeSave).addClass('switchSelected').removeClass('switchUnselected');
- document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
+ jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
+ jQuery('#derivativeChecked'+typeSave).css('visibility','visible');
+ document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
}
function toggleDerivativeSwitchBox()
@@ -42,7 +40,6 @@ function toggleDerivativeSwitchBox()
ePos = document.getElementById("derivativeSwitchLink");
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.display="";
@@ -50,17 +47,18 @@ function toggleDerivativeSwitchBox()
else
elt.style.display="none";
}
+jQuery("#derivativeSwitchBox").on('mouseleave click', function() {
+ this.style.display="none";
+}
+);
{/literal}{/footer_script}
{strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" 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" class="switchBox" onclick="toggleDerivativeSwitchBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e.parentNode.parentNode==this||e==this||toggleDerivativeSwitchBox()">
+<div id="derivativeSwitchBox" class="switchBox" style="display:none">
<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
-<span class="derivativeChecked switchCheck"
- id="derivativeChecked{$derivative_type}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714; </span>
-<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"
- id="derivativeName{$derivative_type}"
- class="{if $derivative->get_type() == $current.selected_derivative->get_type()}switchSelected{else}switchUnselected{/if}">
+<span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
+<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">
{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
</a><br>
{/foreach}
diff --git a/themes/default/theme.css b/themes/default/theme.css
index 448ae1cdd..e21756ca5 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -288,14 +288,6 @@ TD.calDayHead {
/*width: inherit;*/
}
-.commentElement .description H3 {
- text-align: left;
- background: transparent;
- margin: 0;
- padding: 0.1em;
- font-size: 120%;
-}
-
.commentElement .description P {
margin: 0;
}
@@ -382,10 +374,11 @@ TD.calDayHead {
#imageToolBar .pwg-button {width:42px;}
.switchBox {
- padding: 0.5em 10px;
+ padding: 0.5em 5px;
border-radius: 4px;
z-index: 100;
- text-align:left;
+ text-align: left;
+ position: absolute; /*left, right set through js*/
}
.switchBoxTitle {
@@ -397,7 +390,6 @@ TD.calDayHead {
#theImage {
clear: left;
text-align: center;
- position: relative; /*so that the drivative switch link is positioned relative to us*/
}
#imageInfos {