aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/picture_comment.inc.php7
-rw-r--r--themes/dark/theme.css6
-rw-r--r--themes/default/template/index.tpl16
-rw-r--r--themes/default/template/picture.tpl24
-rw-r--r--themes/default/theme.css14
5 files changed, 30 insertions, 37 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index d46e72fb9..2e5c0d518 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -240,11 +240,16 @@ SELECT
if ($show_add_comment_form)
{
$key = get_ephemeral_key(3, $page['image_id']);
+ $content = '';
+ if ('reject'===@$comment_action)
+ {
+ $content = htmlspecialchars( stripslashes($comm['content']) );
+ }
$template->assign('comment_add',
array(
'F_ACTION' => $url_self,
'KEY' => $key,
- 'CONTENT' => null,
+ 'CONTENT' => $content,
'SHOW_AUTHOR' => !is_classic_user()
));
}
diff --git a/themes/dark/theme.css b/themes/dark/theme.css
index aba4fb2a1..99fa6c26a 100644
--- a/themes/dark/theme.css
+++ b/themes/dark/theme.css
@@ -39,7 +39,7 @@ BODY, H3, #imageToolBar A:hover {
}
FIELDSET, INPUT, SELECT, TEXTAREA,
-.content .thumbnailCategory ,
+.thumbnailCategory ,
.content .commentElement ,
.thumbnails .wrap2 {
border: 1px solid gray;
@@ -47,8 +47,8 @@ FIELDSET, INPUT, SELECT, TEXTAREA,
.thumbnails .wrap2:hover,
-.content .thumbnailCategories .thumbnailCategory:hover,
-.content .commentsList .commentElement:hover{
+.thumbnailCategory:hover,
+.content .commentElement:hover{
border-color: yellow; /* thumbnails border color when mouse cursor is over it */
}
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 {