Add a photo detail page.
This commit is contained in:
parent
5676a82322
commit
b3415f9e8d
@ -2,7 +2,7 @@
|
||||
<ul id="thumb-grid" class="ui-helper-clearfix">
|
||||
<? foreach ($resource->children as $child): ?>
|
||||
<li class="thumb-grid-cell" ref="<?= $child->path ?>">
|
||||
<a href="g3_client/show/<?= $child->path ?>">
|
||||
<a class="child-link" href="/g3_client/index.php/g3_client/detail">
|
||||
<? if ($child->has_thumb): ?>
|
||||
<img src="<?= $child->thumb_url ?>" title="<?= $child->title ?>" />
|
||||
<? else: ?>
|
||||
|
7
web_client/application/views/photo_detail.html.php
Normal file
7
web_client/application/views/photo_detail.html.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div id="photo">
|
||||
<img src="<?= $resource->resize_url ?>" title="<?= $resource->title ?>" />
|
||||
</div>
|
||||
<div id="photo-info">
|
||||
<h1><?= $resource->title ?></hi>
|
||||
</div>
|
@ -47,20 +47,42 @@
|
||||
$(parent).replaceWith(data);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".ui-icon-minus", obj).live("click", function (event) {
|
||||
$("~ ul", this).hide();
|
||||
$(this).removeClass("ui-icon-minus");
|
||||
$(this).addClass("ui-icon-plus");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#center a.child-link").live("click", function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var path = $(this).parent("li").attr("ref");
|
||||
var url = $(this).attr("href");
|
||||
|
||||
$.get("/g3_client/index.php/g3_client/detail", {path: path}, function(data, textStatus) {
|
||||
$("#center").html(data);
|
||||
var album = $("#album_tree [ref='" + path + "']");
|
||||
if (album.length > 0) {
|
||||
$(".ui-selected").removeClass("ui-selected");
|
||||
$(".tree-title", album).addClass("ui-selected");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".tree-title", obj).click(function (event) {
|
||||
$.get("/g3_client/index.php/g3_client/detail",
|
||||
{path: $(this).parent("li").attr("ref")},
|
||||
function(data, textStatus) {
|
||||
$.get("/g3_client/index.php/g3_client/detail",
|
||||
{path: $(this).parent("li").attr("ref")},
|
||||
function(data, textStatus) {
|
||||
$("#center").html(data);
|
||||
});
|
||||
});
|
||||
$(".ui-selected").removeClass("ui-selected");
|
||||
$(this).addClass("ui-selected");
|
||||
return false;
|
||||
});
|
||||
$("#album_tree [ref=''] .tree-title:first").addClass("ui-selected");
|
||||
};
|
||||
|
Reference in New Issue
Block a user