Fixed weird RTL bug.
This commit is contained in:
parent
7a2fa7badf
commit
0ec53f5234
@ -105,7 +105,7 @@ $.Jcrop = function(obj,opt)
|
|||||||
// Initialize some jQuery objects {{{
|
// Initialize some jQuery objects {{{
|
||||||
|
|
||||||
var $origimg = $(obj);
|
var $origimg = $(obj);
|
||||||
var $img = $origimg.clone().removeAttr('id').css({ position: 'absolute' });
|
var $img = $origimg.clone().removeAttr('id').css({ position: 'static' });
|
||||||
|
|
||||||
$img.width($origimg.width());
|
$img.width($origimg.width());
|
||||||
$img.height($origimg.height());
|
$img.height($origimg.height());
|
||||||
|
@ -6,20 +6,20 @@
|
|||||||
|
|
||||||
.jcrop-vline, .jcrop-hline
|
.jcrop-vline, .jcrop-hline
|
||||||
{
|
{
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: white url('<?= url::file("modules/tagfaces/images/Jcrop.gif") ?>') top left repeat;
|
background: white url('<?= url::file("modules/tagfaces/images/Jcrop.gif") ?>') top left repeat;
|
||||||
}
|
}
|
||||||
.jcrop-vline { height: 100%; width: 1px !important; }
|
.jcrop-vline { height: 100%; width: 1px !important; }
|
||||||
.jcrop-hline { width: 100%; height: 1px !important; }
|
.jcrop-hline { width: 100%; height: 1px !important; }
|
||||||
.jcrop-handle {
|
.jcrop-handle {
|
||||||
font-size: 1px;
|
font-size: 1px;
|
||||||
width: 7px !important;
|
width: 7px !important;
|
||||||
height: 7px !important;
|
height: 7px !important;
|
||||||
border: 1px #eee solid;
|
border: 1px #eee solid;
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
*width: 9px;
|
*width: 9px;
|
||||||
*height: 9px;
|
*height: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jcrop-tracker { width: 100%; height: 100%; }
|
.jcrop-tracker { width: 100%; height: 100%; }
|
||||||
@ -27,14 +27,14 @@
|
|||||||
.custom .jcrop-vline,
|
.custom .jcrop-vline,
|
||||||
.custom .jcrop-hline
|
.custom .jcrop-hline
|
||||||
{
|
{
|
||||||
background: yellow;
|
background: yellow;
|
||||||
}
|
}
|
||||||
.custom .jcrop-handle
|
.custom .jcrop-handle
|
||||||
{
|
{
|
||||||
border-color: black;
|
border-color: black;
|
||||||
background-color: #C7BB00;
|
background-color: #C7BB00;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -60,30 +60,42 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="g-album-header">
|
|
||||||
<div id="g-album-header-buttons">
|
|
||||||
<?= $theme->dynamic_top() ?>
|
|
||||||
</div>
|
|
||||||
<h1><?= html::clean($title) ?></h1>
|
|
||||||
</div>
|
|
||||||
<p><?=t("Use the mouse to select a face on the image below."); ?></p>
|
|
||||||
|
|
||||||
<fieldset>
|
<?= html::script("modules/tagfaces/js/jquery.Jcrop.js") ?>
|
||||||
<div id="g-item">
|
|
||||||
<div id="g-info">
|
<script language="Javascript">
|
||||||
<h2><?= html::purify($item->title) ?></h2>
|
// Remember to invoke within jQuery(window).load(...)
|
||||||
</div>
|
// If you don't, Jcrop may not initialize properly
|
||||||
<div id="g-photo">
|
jQuery(document).ready(function(){
|
||||||
<?= $item->resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize")) ?>
|
jQuery('#g-select-photo-id-<?=$item->id ?>').Jcrop({
|
||||||
</div>
|
onChange: showCoords,
|
||||||
|
onSelect: showCoords
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Our simple event handler, called from onChange and onSelect
|
||||||
|
// event handlers, as per the Jcrop invocation above
|
||||||
|
function showCoords(c) {
|
||||||
|
jQuery('#x1').val(c.x);
|
||||||
|
jQuery('#y1').val(c.y);
|
||||||
|
jQuery('#x2').val(c.x2);
|
||||||
|
jQuery('#y2').val(c.y2);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="g-select-item">
|
||||||
|
<?= $theme->dynamic_top() ?>
|
||||||
|
<div id="g-select-photo" align="center">
|
||||||
|
<h1><?= html::clean($title) ?></h1>
|
||||||
|
<p><?=t("Use the mouse to select a face on the image below."); ?></p>
|
||||||
|
<?= $item->resize_img(array("id" => "g-select-photo-id-{$item->id}", "class" => "g-select-resize", "style" => "position: fixed;")) ?>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#face_title {
|
#face_title {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#face_description {
|
#face_description {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user