+
{'Photo sizes'|@translate}
{foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}
{/if}
{if $image_derivative.SELECTED}
@@ -57,25 +46,14 @@ $(document).ready(function() {
{/foreach}
{footer_script}{literal}
-$(document).ready(function() {
- $("#derivativeSwitchBox").css({'top':0,'left':0});
- var derivativeSwitchBox_width = $("#derivativeSwitchBox").outerWidth(true);
- var derivativeSwitchBox_height = $("#derivativeSwitchBox").outerHeight(true);
-
- $("#derivativeSwitchLink").click(function() {
- $("#derivativeSwitchBox").toggle();
-
- if ($(this).offset().left + derivativeSwitchBox_width > $(window).width()) {
- $("#derivativeSwitchBox").css("left", $(window).width() - derivativeSwitchBox_width - 5);
- } else {
- $("#derivativeSwitchBox").css("left", $(this).offset().left);
- }
- $("#derivativeSwitchBox").css("top", $(this).offset().top + $(this).outerHeight(true));
- });
-
- $("#derivativeSwitchBox").bind("mouseleave", function() {
- $(this).hide();
- });
+$("#derivativeSwitchLink").click(function() {
+ var elt = $("#derivativeSwitchBox");
+ elt.css("left", Math.min( $(this).offset().left, $(window).width() - elt.outerWidth(true) - 5))
+ .css("top", $(this).offset().top + $(this).outerHeight(true))
+ .toggle();
+});
+$("#derivativeSwitchBox").on("mouseleave", function() {
+ $(this).hide();
});
{/literal}{/footer_script}
{/strip}
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index c0f44ffa4..5450dce85 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -35,31 +35,20 @@ function changeImgSrc(url,typeSave,typeMap)
document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
}
-$(document).ready(function() {
- $("#derivativeSwitchBox").css({'top':0,'left':0});
- var derivativeSwitchBox_width = $("#derivativeSwitchBox").outerWidth(true);
- var derivativeSwitchBox_height = $("#derivativeSwitchBox").outerHeight(true);
-
- $("#derivativeSwitchLink").click(function() {
- $("#derivativeSwitchBox").toggle();
-
- if ($(this).offset().left + derivativeSwitchBox_width > $(window).width()) {
- $("#derivativeSwitchBox").css("left", $(window).width() - derivativeSwitchBox_width - 5);
- } else {
- $("#derivativeSwitchBox").css("left", $(this).offset().left);
- }
- $("#derivativeSwitchBox").css("top", $(this).offset().top + $(this).outerHeight(true));
- });
-
- $("#derivativeSwitchBox").bind("mouseleave click", function() {
- $(this).hide();
- });
+$("#derivativeSwitchLink").click(function() {
+ var elt = $("#derivativeSwitchBox");
+ elt.css("left", Math.min( $(this).offset().left, $(window).width() - elt.outerWidth(true) - 5))
+ .css("top", $(this).offset().top + $(this).outerHeight(true))
+ .toggle();
+});
+$("#derivativeSwitchBox").on("mouseleave click", function() {
+ $(this).hide();
});
{/literal}{/footer_script}
{strip}
{'Photo sizes'|@translate}
-
+
{'Photo sizes'|@translate}
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>✔
@@ -209,7 +198,7 @@ y.callService(
{/if}
{if $display_info.categories and isset($related_categories)}
-
+
{'Albums'|@translate}
@@ -305,7 +294,7 @@ function togglePrivacyLevelBox()
{
elt.style.left = (ePos.offsetLeft)+"px";
elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
- elt.style.display="";
+ elt.style.display="block";
}
else
elt.style.display="none";
@@ -350,15 +339,15 @@ function togglePrivacyLevelBox()
{if isset($comment_add)}
{/if}
diff --git a/themes/default/theme.css b/themes/default/theme.css
index f04d37679..b6f03efc8 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -270,6 +270,7 @@ TD.calDayHead {
}
.commentElement {
+ border-radius: 5px;
margin: 5px;
padding: 2px 0 0 2px;
float: left;
@@ -366,8 +367,10 @@ TD.calDayHead {
padding: 0.5em 5px;
border-radius: 4px;
z-index: 100;
- text-align:left;
- position: absolute; /*left, right set through js*/
+ text-align:left;
+ display: none;
+ position: absolute;
+ left: 0; top: 0; /*left, right set through js*/
}
.switchBoxTitle {
@@ -528,9 +531,6 @@ FIELDSET {
overflow: hidden; /* <- makes Opera happy */
}
-.filter UL {
- margin: 0;
-}
.filter UL,
.filter LABEL {
display: block;
@@ -557,31 +557,19 @@ FIELDSET {
/*IE6 needs override because of > selector*/
.filter LABEL>INPUT,
-.filter LABEL>SELECT,
-.filter LABEL>SPAN,
-.filter LABEL>TEXTAREA {
+.filter LABEL>SELECT {
display: block;
margin: 0.5em 0;
}
.filter FIELDSET * LABEL>INPUT,
-.filter FIELDSET * LABEL>SELECT,
-.filter FIELDSET * LABEL>TEXTAREA,
-.filter SPAN>INPUT,
-.filter SPAN>SELECT,
-.filter SPAN>TEXTAREA {
+.filter FIELDSET * LABEL>SELECT {
display: inline;
vertical-align: top;
margin: 0 0.5em 0 0;
}
-
-
-.filter INPUT[type="submit"] {
- margin-top: 1em;
-}
-
.properties UL {
list-style-type: none;
margin: 0;
@@ -804,13 +792,9 @@ LEGEND {
#pictureCommentList { float: right; }
#commentAdd input[type="text"],
-#commentAdd textarea {
- max-width: 100%;
- width: 100%;
-}
-
-#pictureCommentList .commentElement {
- border-radius: 5px;
+#comments TEXTAREA {
+ max-width: 99%;
+ width: 99%;
}
.commentAuthor {
@@ -824,8 +808,10 @@ LEGEND {
#pictureCommentList .commentsOrder { float: left; margin-bottom: 5px;}
#pictureCommentList .navigationBar { float: right; margin-bottom: 5px;}
#pictureComments h4 { margin: 0;}
-#pictureComments form p { margin: 5px 0; text-align: left;}
-#pictureComments form p textarea { margin: 10px 0;}
+#comments FORM P {
+ margin: 5px 0; text-align: left;
+}
+
#pictureComments INPUT[type=submit] { margin: 0;}
/* image info table */
--
cgit v1.2.3