Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make images sticky by default #904

Open
wants to merge 6 commits into
base: Development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions collections/editor/includes/imagetab.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function verifyImgRemapForm(f){
</div>
<div>
<b><?php echo $LANG['SOURCE_WEBPAGE']; ?>:</b>
<a href="<?php echo htmlspecialchars($imgArr['sourceurl'], HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<a href="<?php echo htmlspecialchars($imgArr['sourceurl'] ?? '', HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<?php
$sourceUrlDisplay = $imgArr['sourceurl'];
if($sourceUrlDisplay && strlen($sourceUrlDisplay) > 60) $sourceUrlDisplay = '...'.substr($sourceUrlDisplay,-60);
Expand All @@ -255,7 +255,7 @@ function verifyImgRemapForm(f){
</div>
<div>
<b><?php echo $LANG['WEB_URL']; ?>: </b>
<a href="<?php echo htmlspecialchars($imgArr["url"], HTML_SPECIAL_CHARS_FLAGS); ?>" title="<?php echo htmlspecialchars($imgArr["url"], HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<a href="<?php echo htmlspecialchars($imgArr["url"] ?? '', HTML_SPECIAL_CHARS_FLAGS); ?>" title="<?php echo htmlspecialchars($imgArr["url"], HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<?php
$urlDisplay = $imgArr["url"];
if(strlen($urlDisplay) > 60) $urlDisplay = '...'.substr($urlDisplay,-60);
Expand All @@ -265,7 +265,7 @@ function verifyImgRemapForm(f){
</div>
<div>
<b><?php echo $LANG['LARGE_IMG_URL']; ?>: </b>
<a href="<?php echo htmlspecialchars($imgArr["origurl"], HTML_SPECIAL_CHARS_FLAGS); ?>" title="<?php echo htmlspecialchars($imgArr["origurl"], HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<a href="<?php echo htmlspecialchars($imgArr["origurl"] ?? '', HTML_SPECIAL_CHARS_FLAGS); ?>" title="<?php echo htmlspecialchars($imgArr["origurl"], HTML_SPECIAL_CHARS_FLAGS); ?>" target="_blank">
<?php
$origUrlDisplay = $imgArr["origurl"];
if(strlen($origUrlDisplay) > 60) $origUrlDisplay = '...'.substr($origUrlDisplay,-60);
Expand Down
14 changes: 11 additions & 3 deletions collections/editor/includes/imgprocessor.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<?php
if($LANG_TAG != 'en' && file_exists($SERVER_ROOT.'/content/lang/collections/editor/includes/imgprocessor.'.$LANG_TAG.'.php')) include_once($SERVER_ROOT.'/content/lang/collections/editor/includes/imgprocessor.'.$LANG_TAG.'.php');
else include_once($SERVER_ROOT.'/content/lang/collections/editor/includes/imgprocessor.en.php');
include_once($SERVER_ROOT.'/includes/head.php');
?>

<script>

$(document).ready(function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to do this without jQuery?
Also, the left attribute stil doesn't seem to be quite enough on my screen.

var pos = $("#labelProcDiv").position();
var posLeft = pos.left - $(window).scrollLeft();
$("#labelProcFieldset").css('left', posLeft);
});

$(function() {
$( "#zoomInfoDialog" ).dialog({
autoOpen: false,
Expand Down Expand Up @@ -57,7 +65,7 @@ function anchorImgPanel(){
.ocr-box button{ margin: 5px; }
</style>
<div id="labelProcDiv" style="width:100%;height:1050px;position:relative">
<fieldset id="labelProcFieldset" style="height:95%;background-color:white;">
<fieldset id="labelProcFieldset" class="fieldset-sticky">
<legend><b><?php echo $LANG['LABEL_PROCESSING']; ?></b></legend>
<div id="labelHeaderDiv" style="margin-top:-10px;height:15px;position:relative">
<div style="float:left;margin-top:3px;margin-right:15px"><a id="zoomInfoDiv" href="#"><?php echo $LANG['ZOOM']; ?></a></div>
Expand All @@ -66,8 +74,8 @@ function anchorImgPanel(){
</div>
<div style="float:left;margin-right:15px">
<div id="draggableImgDiv" style="float:left" title="<?php echo $LANG['MAKE_DRAGGABLE']; ?>"><a href="#" onclick="draggableImgPanel()"><img src="../../images/draggable.png" style="width:1.3em" /></a></div>
<div id="floatImgDiv" style="float:left;margin-left:10px" title="<?php echo $LANG['ALLOW_REMAIN_ACTIVE']; ?>"><a href="#" onclick="floatImgPanel()"><img src="../../images/floatdown.png" style="width:1.3em" /></a></div>
<div id="anchorImgDiv" style="float:left;margin-left:10px;display:none" title="<?php echo $LANG['ANCHOR_IMG']; ?>"><a href="#" onclick="anchorImgPanel()"><img src="../../images/anchor.png" style="width:1.3em" /></a></div>
<div id="floatImgDiv" style="float:left;margin-left:10px;display:none" title="<?php echo $LANG['ALLOW_REMAIN_ACTIVE']; ?>"><a href="#" onclick="floatImgPanel()"><img src="../../images/floatdown.png" style="width:1.3em" /></a></div>
<div id="anchorImgDiv" style="float:left;margin-left:10px" title="<?php echo $LANG['ANCHOR_IMG']; ?>"><a href="#" onclick="anchorImgPanel()"><img src="../../images/anchor.png" style="width:1.3em" /></a></div>
</div>
<div style="float:left;;padding-right:10px;margin:2px 20px 0px 0px;"><?php echo $LANG['ROTATE']; ?>: <a href="#" onclick="rotateImage(-90)">&nbsp;L&nbsp;</a> &lt;&gt; <a href="#" onclick="rotateImage(90)">&nbsp;R&nbsp;</a></div>
<div style="float:right;padding:0px 3px;margin:0px 3px;"><input id="imgreslg" name="resradio" type="radio" onchange="changeImgRes('lg')" /><?php echo $LANG['HIGH_RES']; ?>.</div>
Expand Down
2 changes: 1 addition & 1 deletion collections/editor/occurrenceeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ function requestImage(){
<div id="footprintWktDiv">
<?php echo $LANG['FOOT_PRINT_WKT']; ?>
<br/>
<div style="float:right;margin-top:-2px;margin-left:2px;" id="googleDiv" onclick="openMappingPolyAid();" title="<?php echo $LANG['GOOGLE_MAPS']; ?>">
<div style="float:right;margin-top:-2px;margin-left:2px;" id="googleDiv" onclick="openMappingPolyAid();" title="<?php echo $LANG['MAP']; ?>">
<img src="../../images/world.png" />
</div>
<textarea name="footprintwkt" id="footprintwkt" onchange="footPrintWktChanged(this)" style="height:40px;resize:vertical;" ><?php echo array_key_exists('footprintwkt',$occArr)?$occArr['footprintwkt']:''; ?></textarea>
Expand Down
1 change: 1 addition & 0 deletions content/lang/collections/editor/occurrenceeditor.en.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,5 @@
$LANG['ERROR_UNABLE_INSERT'] = 'ERROR: unable to INSERT text fragment';
$LANG['ERROR_UNABLE_UPDATE'] = 'ERROR: unable to UPDATE text fragment';
$LANG['ERROR_UNABLE_DELETE'] = 'ERROR: unable DELETE text fragment';
$LANG['MAP'] = 'Map';
?>
2 changes: 1 addition & 1 deletion content/lang/collections/editor/occurrenceeditor.es.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@
$LANG['ERROR_UNABLE_INSERT'] = 'ERROR: unable to INSERT text fragment';
$LANG['ERROR_UNABLE_UPDATE'] = 'ERROR: unable to UPDATE text fragment';
$LANG['ERROR_UNABLE_DELETE'] = 'ERROR: unable DELETE text fragment';

$LANG['MAP'] = 'Mapa';
?>
2 changes: 1 addition & 1 deletion content/lang/collections/editor/occurrenceeditor.fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@
$LANG['ERROR_UNABLE_INSERT'] = "ERREUR: impossible d'INSÉRER un fragment de texte";
$LANG['ERROR_UNABLE_UPDATE'] = 'ERREUR: impossible de mettre à jour le fragment de texte';
$LANG['ERROR_UNABLE_DELETE'] = 'ERREUR: impossible de supprimer le fragment de texte';

$LANG['MAP'] = 'Carte';
?>
8 changes: 8 additions & 0 deletions css/v202209/symbiota/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -935,3 +935,11 @@ button.no-margin-left,
div.no-margin-left {
margin-left: 0;
}

.fieldset-sticky {
position: fixed;
top: 1.25rem;
height:95%;
background-color:white;
left: 53.75rem;
}