mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 03:09:55 +09:00
planet의 글 번호로 접속시 해당 글의 날짜로 이동하고 name을 이용해 스크롤 되어 있도록 개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5214 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7992a7e888
commit
7e908a0d2f
2 changed files with 20 additions and 3 deletions
|
|
@ -179,10 +179,20 @@
|
|||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
|
||||
// 글 고유 링크가 있으면 처리
|
||||
if(Context::get('document_srl')) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument(Context::get('document_srl'));
|
||||
}
|
||||
|
||||
// 플래닛의 기본 단위인 날짜를 미리 계산 (지정된 일자의 이전/다음날도 미리 계산하여 세팅)
|
||||
$last_date = $this->planet->getContentLastDay();
|
||||
$date = Context::get('date');
|
||||
if(!$date || $date > $last_date) $date = $last_date;
|
||||
if($oDocument && $oDocument->isExists()) {
|
||||
$date = $oDocument->getRegdate('Ymd');
|
||||
} else {
|
||||
$last_date = $this->planet->getContentLastDay();
|
||||
$date = Context::get('date');
|
||||
if(!$date || $date > $last_date) $date = $last_date;
|
||||
}
|
||||
Context::set('date', $date);
|
||||
Context::set('prev_date', $this->planet->getPrevDate($date));
|
||||
Context::set('next_date', $this->planet->getNextDate($date));
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
|
||||
<!--@foreach($content_list as $no => $item)-->
|
||||
<a name="document_{$item->document_srl}"></a>
|
||||
<div id="commentBody:{$item->get('document_srl')}" class="commentBody <!--@if($planet->getMid() == $item->getPlanetMid())-->myPlanet<!--@end-->">
|
||||
<!--// Original Text -->
|
||||
<div class="comment">
|
||||
|
|
@ -100,3 +101,9 @@
|
|||
</div>
|
||||
<!--@end-->
|
||||
<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>
|
||||
|
||||
<!--@if($document_srl)-->
|
||||
<script type="text/javascript">
|
||||
xAddEventListener(window,'load', function() { try { location.href=location.href.replace(/#(.+)$/,'')+"#document_"+{$document_srl}; } catch(e) { } } );
|
||||
</script>
|
||||
<!--@end-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue