diff --git a/themes/default/fix-ie5-ie6.css b/themes/default/fix-ie5-ie6.css
index 7d5442095..4c2f7e96e 100644
--- a/themes/default/fix-ie5-ie6.css
+++ b/themes/default/fix-ie5-ie6.css
@@ -69,5 +69,4 @@ H1, #theHeader {
.imageInfo {display:block; line-height:16px;}
.imageInfo dt {display:block; text-align:left; font-weight:bold; padding-right:0.5em;}
.imageInfo dd {display:block; text-align:left; font-weight:normal;}
-.relSwitchBox {position:static;}
#imageInfos dd { margin: 0 0 5px 20px;}
\ No newline at end of file
diff --git a/themes/default/fix-ie7.css b/themes/default/fix-ie7.css
index 479f39f7a..fb77bfcc2 100644
--- a/themes/default/fix-ie7.css
+++ b/themes/default/fix-ie7.css
@@ -26,5 +26,4 @@
.imageInfo {display:block; line-height:16px;}
.imageInfo dt {display:block; text-align:left; font-weight:bold; padding-right:0.5em;}
.imageInfo dd {display:block; text-align:left; font-weight:normal;}
-.relSwitchBox {position:static;}
#imageInfos dd { margin: 0 0 5px 20px;}
\ No newline at end of file
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index 9db8e3f83..0759d14d4 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -271,51 +271,38 @@ y.callService(
{/if}
{if $display_info.privacy_level and isset($available_permission_levels)}
-
-
{'Who can see this photo?'|@translate}
+
+
{'Who can see this photo?'|@translate}
+
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
-{footer_script require='jquery'}
-{literal}function setPrivacyLevel(rootUrl, id, level)
-{
-var y = new PwgWS(rootUrl);
-y.callService(
- "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
+{footer_script require='jquery'}{strip}
+function setPrivacyLevel(id, level){
+(new PwgWS('{$ROOT_URL}')).callService(
+ "pwg.images.setPrivacyLevel", { image_id:id, level:level},
{
method: "POST",
onFailure: function(num, text) { alert(num + " " + text); },
onSuccess: function(result) {
jQuery('#privacyLevelBox .switchCheck').css('visibility','hidden');
- jQuery('#levelCheck'+level).css('visibility','visible');
+ jQuery('#switchLevel'+level).prev('.switchCheck').css('visibility','visible');
+ jQuery('#privacyLevelLink').text(jQuery('#switchLevel'+level).text());
}
}
);
}
-function togglePrivacyLevelBox()
-{
- var elt = document.getElementById("privacyLevelBox"),
- ePos = document.getElementById("privacyLevelLink");
- if (elt.style.display == "none")
- {
- elt.style.left = (ePos.offsetLeft)+"px";
- elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
- elt.style.display="block";
- }
- else
- elt.style.display="none";
-}
-{/literal}
-{/footer_script}
-
-
+(SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox");
+{/strip}{/footer_script}
+
{foreach from=$available_permission_levels item=label key=level}
-
✔
-
{$label}
+
✔
+
{$label}
{/foreach}
-
-
+
{/if}
{/strip}
diff --git a/themes/default/theme.css b/themes/default/theme.css
index e2b74d6d0..e1fcfe4af 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -378,10 +378,6 @@ TD.calDayCellFull, TD.calDayCellEmpty {
margin-bottom:5px;
}
-.relSwitchBox {
- position: relative;
-}
-
#theImage {
text-align: center;
}