Sync with wind
This commit is contained in:
parent
2ec848686b
commit
e7a807c6c4
@ -90,9 +90,18 @@ $(document).ready(function() {
|
||||
$(this).css("top", 0).css("left", 0);
|
||||
// Remove the placeholder and hover class from the item
|
||||
$(this).removeClass("g-hover-item");
|
||||
$(this).gallery_valign();
|
||||
$("#g-place-holder").remove();
|
||||
}
|
||||
);
|
||||
|
||||
// Realign any thumbnails that change so that when we rotate a thumb it stays centered.
|
||||
$(".g-item").bind("gallery.change", function() {
|
||||
$(".g-item").each(function() {
|
||||
$(this).height($(this).find("img").height() + 2);
|
||||
});
|
||||
$(".g-item").equal_heights().gallery_valign();
|
||||
});
|
||||
}*/
|
||||
|
||||
// Photo/Item item view
|
||||
|
@ -4,5 +4,5 @@ version = 1
|
||||
author = "Romain LE DISEZ"
|
||||
site = 1
|
||||
admin = 0
|
||||
;wind commit = 3b05db2685d92ca538d7993c960b06ea32f3a8df
|
||||
;wind date = Wed Jun 23 11:16:56 2010 -0700
|
||||
;wind commit = 3a9bdebafda1807bb2294c041e655f6464841bf0
|
||||
;wind date = Tue Sep 21 21:38:32 2010 -0700
|
||||
|
@ -16,7 +16,9 @@
|
||||
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
|
||||
<?= $theme->thumb_top($child) ?>
|
||||
<a href="<?= $child->url() ?>">
|
||||
<? if ($child->has_thumb()): ?>
|
||||
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
|
||||
<? endif ?>
|
||||
</a>
|
||||
<?= $theme->thumb_bottom($child) ?>
|
||||
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
|
||||
@ -29,7 +31,7 @@
|
||||
<? endforeach ?>
|
||||
<? else: ?>
|
||||
<? if ($user->admin || access::can("add", $item)): ?>
|
||||
<? $addurl = url::site("flash_uploader/app/$item->id") ?>
|
||||
<? $addurl = url::site("uploader/index/$item->id") ?>
|
||||
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
|
||||
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
|
||||
<? else: ?>
|
||||
|
@ -23,13 +23,12 @@
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="<?= url::file("lib/images/favicon.ico") ?>" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?= url::file(module::get_var("gallery", "favicon_url")) ?>" type="image/x-icon" />
|
||||
<?= $theme->css("_DISABLED_yui/reset-fonts-grids.css") ?>
|
||||
<?= $theme->css("_DISABLED_superfish/css/superfish.css") ?>
|
||||
<?= $theme->css("_DISABLED_themeroller/ui.base.css") ?>
|
||||
<?= $theme->css("_DISABLED_gallery.common.css") ?>
|
||||
<?= $theme->css("screen.css") ?>
|
||||
<!--[if lt IE 8]>
|
||||
<!--[if lte IE 8]>
|
||||
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
|
||||
media="screen,print,projection" />
|
||||
<![endif]-->
|
||||
@ -90,17 +89,22 @@
|
||||
<? $i = 0 ?>
|
||||
<? foreach ($parents as $parent): ?>
|
||||
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
|
||||
<!-- Adding ?show=<id> causes Gallery3 to display the page
|
||||
containing that photo. For now, we just do it for
|
||||
the immediate parent so that when you go back up a
|
||||
level you're on the right page. -->
|
||||
<a href="<?= $parent->url($parent == $theme->item()->parent() ?
|
||||
"show={$theme->item()->id}" : null) ?>"><?= text::limit_chars(html::purify($parent->title), 15) ?></a>
|
||||
<? // Adding ?show=<id> causes Gallery3 to display the page
|
||||
// containing that photo. For now, we just do it for
|
||||
// the immediate parent so that when you go back up a
|
||||
// level you're on the right page. ?>
|
||||
<a href="<?= $parent->url($parent->id == $theme->item()->parent_id ?
|
||||
"show={$theme->item()->id}" : null) ?>">
|
||||
<? // limit the title length to something reasonable (defaults to 15) ?>
|
||||
<?= html::purify(text::limit_chars($parent->title,
|
||||
module::get_var("gallery", "visible_title_length"))) ?>
|
||||
</a>
|
||||
</li>
|
||||
<? $i++ ?>
|
||||
<? endforeach ?>
|
||||
<li class="g-active<? if ($i == 0) print " g-first" ?>">
|
||||
<?= text::limit_chars(html::purify($theme->item()->title), 15) ?>
|
||||
<?= html::purify(text::limit_chars($theme->item()->title,
|
||||
module::get_var("gallery", "visible_title_length"))) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
|
@ -4,10 +4,23 @@
|
||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
||||
$(".g-fullsize-link").click(function() {
|
||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
|
||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
||||
return false;
|
||||
});
|
||||
|
||||
// After the image is rotated or replaced we have to reload the image dimensions
|
||||
// so that the full size view isn't distorted.
|
||||
$("#g-photo").bind("gallery.change", function() {
|
||||
$.ajax({
|
||||
url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus) {
|
||||
full_dims = data.full;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<? endif ?>
|
||||
|
Reference in New Issue
Block a user