Skip to content

Commit

Permalink
refs #1604 : bugfix : swipe UI did not work. Reverse flip animation …
Browse files Browse the repository at this point in the history
…added.
  • Loading branch information
inureyes committed Feb 24, 2012
1 parent 8620f9c commit f95b24b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/view/iphoneView.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,19 @@ function printMobileRemoteImageFilename($filename) {
function printMobileListNavigation($paging,$postfix) {
$script = '';
$context = Model_Context::getInstance();
$pageId = $context->getProperty('suri.page');
$itemsView = '<div data-role="navbar" data-theme="c">'.CRLF;
$itemsView .= '<ul>'.CRLF;
if(isset($paging['prev'])){
$itemsView .= '<li><a data-role="button" data-theme="d" data-icon="arrow-l" href="' .$context->getProperty('uri.blog') . '/'.$postfix.'?page=' . $paging['prev'] . '" class="previous">'._textf('%1 페이지',$paging['prev']) . '</a></li>'.CRLF;
$script .= '$("#blog_posts_'.$suri['page'].'").swiperight(function() {$.mobile.changePage("'.$context->getProperty('uri.blog').'/'.$postfix.'?page='.$paging['prev'].'",{reverse: true});});';
$script .= '$("#blog_posts_'.$pageId.'").swiperight(function() {$.mobile.changePage("'.$context->getProperty('uri.blog').'/'.$postfix.'?page='.$paging['prev'].'",{reverse: true});});';
}
/*if ($suri['page'] > 1 && $suri['page'] != $paging['pages']) {
$itemsView .= '<li>'._textf('%1 페이지',$suri['page']) . '</li>'.CRLF;
}*/
if (isset($paging['next'])) {
$itemsView .= '<li><a data-role="button" data-theme="d" data-icon="arrow-r" href="' .$context->getProperty('uri.blog') . '/'.$postfix.'?page=' . $paging['next'] . '" class="next">'._textf('%1 페이지',$paging['next']) . '</a></li>'.CRLF;
$script .= '$("#blog_posts_'.$suri['page'].'").swipeleft(function() {$.mobile.changePage("'.$context->getProperty('uri.blog').'/'.$postfix.'?page='.$paging['next'].'");});';
$script .= '$("#blog_posts_'.$pageId.'").swipeleft(function() {$.mobile.changePage("'.$context->getProperty('uri.blog').'/'.$postfix.'?page='.$paging['next'].'");});';
}
$itemsView .= '</ul>'.CRLF;
$itemsView .= '</div>'.CRLF;
Expand All @@ -452,7 +453,7 @@ function printMobileNavigation($entry, $jumpToComment = true, $jumpToTrackback =
<?php
if (isset($paging['prev'])) {
?>
<li><a data-role="button" data-theme="d" data-icon="arrow-l" href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['prefix'].$paging['prev'];?>" accesskey="1"><?php echo _text('이전 페이지');?></a></li>
<li><a data-role="button" data-theme="d" data-icon="arrow-l" data-transition="reverse slide" href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['prefix'].$paging['prev'];?>" accesskey="1"><?php echo _text('이전 페이지');?></a></li>
<?php
}
if (!isset($paging)) {
Expand All @@ -479,7 +480,7 @@ function printMobileNavigation($entry, $jumpToComment = true, $jumpToTrackback =
}
if (isset($paging['next'])) {
?>
<li><a data-role="button" data-theme="d" data-icon="arrow-r" href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['prefix'].$paging['next'];?>" accesskey="2"><?php echo _text('다음 페이지');?></a></li>
<li><a data-role="button" data-theme="d" data-icon="arrow-r" data-transition="slide" href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['prefix'].$paging['next'];?>" accesskey="2"><?php echo _text('다음 페이지');?></a></li>
<?php
}
?>
Expand Down

0 comments on commit f95b24b

Please sign in to comment.