mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
smartphone 애드온을 아이폰/옴니아에 맞게 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6290 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1da5dfaeb3
commit
59084f558a
4 changed files with 59 additions and 61 deletions
|
|
@ -19,6 +19,7 @@
|
|||
}
|
||||
|
||||
function smartphoneXE($oModule, $module_info, $output) {
|
||||
|
||||
$this->oModule = $oModule;
|
||||
$this->module_info = $module_info;
|
||||
|
||||
|
|
@ -74,6 +75,12 @@
|
|||
}
|
||||
|
||||
function procSmartPhone() {
|
||||
if(preg_match('/(iPopd|iPhone)/',$_SERVER['HTTP_USER_AGENT'])) {
|
||||
Context::addHtmlHeader('<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>');
|
||||
} else if(preg_match('/PPC/',$_SERVER['HTTP_USER_AGENT'])) {
|
||||
Context::addHtmlHeader('<meta name="viewport" content="width=240; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>');
|
||||
}
|
||||
|
||||
if(is_a($this->output, 'Object') || is_subclass_of($this->output, 'Object')) {
|
||||
$this->setContent($this->output->getMessage());
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
<!--%import("./smartphone.js")-->
|
||||
|
||||
<div class="smartPhoneTitleBar">
|
||||
<h1>{Context::getBrowserTitle()}</h1>
|
||||
<h1><a href="#" onclick="showXEMenu(); return false;">{Context::getBrowserTitle()}</a></h1>
|
||||
</div>
|
||||
|
||||
{$smart_content}
|
||||
<div class="smartPhoneContentArea">
|
||||
{$smart_content}
|
||||
</div>
|
||||
|
||||
<div class="smartPhoneToolBar">
|
||||
<!--@if($parent_url)-->
|
||||
|
|
@ -15,5 +17,5 @@
|
|||
<!--@if($prev_url)--><a href="{$prev_url}"><img src="./images/btnPrev.png" class="smartPhoneBtn" alt="Prev" /></a><!--@end-->
|
||||
<!--@if($next_url)--><a href="{$next_url}"><img src="./images/btnNext.png" class="smartPhoneBtn" alt="Next" /></a><!--@end-->
|
||||
|
||||
<a href="#" onclick="showXEMenu();return false;"><img src="./images/btnMenu.png" class="smartPhoneBtn" alt="Menu" /></a>
|
||||
<a href="#" onclick="showXEMenu();"><img src="./images/btnMenu.png" class="smartPhoneBtn" alt="Menu" /></a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ body {
|
|||
height: 43px;
|
||||
overflow:hidden;
|
||||
background:#485567 url(./images/titlebar.png) repeat-x left top;
|
||||
margin-bottom:20px;
|
||||
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
|
@ -26,29 +25,26 @@ body {
|
|||
.smartPhoneTitleBar h1 {
|
||||
white-space:nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
color: #FFFFFF;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding:8px 10px;
|
||||
margin:0;
|
||||
|
||||
text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.smartPhoneTitleBar h1 a {
|
||||
text-decoration:none;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.smartPhoneContent {
|
||||
position:absolute;
|
||||
top:55px;
|
||||
bottom:55px;
|
||||
left:10px;
|
||||
right:10px;
|
||||
z-index:450;
|
||||
overflow-x:hidden;
|
||||
overflow-y:auto;
|
||||
border: 1px solid #999999;
|
||||
padding: 20px;
|
||||
background-color:#fff;
|
||||
margin:10px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-webkit-border-radius: 8px;
|
||||
|
|
@ -62,11 +58,7 @@ body {
|
|||
height: 43px;
|
||||
overflow:hidden;
|
||||
background:#485567 url(./images/titlebar.png) repeat-x left top;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
white-space:nowrap;
|
||||
text-align:center;
|
||||
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
|
|
@ -79,16 +71,40 @@ body {
|
|||
border:0;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info {
|
||||
font-size:13px;
|
||||
padding-bottom:10px;
|
||||
border-bottom:1px solid #444;
|
||||
overflow:hidden;
|
||||
*zoom:1;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info .author {
|
||||
font-weight:bold;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info .date {
|
||||
font-size:11px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.link {
|
||||
margin-top:10px;
|
||||
border-top:1px solid #444;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.link a {
|
||||
display:block;
|
||||
padding:5px 0;
|
||||
font-size:13px;
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.smartPhoneList {
|
||||
position:absolute;
|
||||
overflow-x:hidden;
|
||||
overflow-y:auto;
|
||||
background-color:#fff;
|
||||
z-index:500;
|
||||
left:0;
|
||||
right:0;
|
||||
top:43px;
|
||||
bottom:43px;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
|
@ -99,14 +115,13 @@ body {
|
|||
left:0;
|
||||
right:0;
|
||||
top:43px;
|
||||
bottom:43px;
|
||||
}
|
||||
|
||||
.smartPhoneList li {
|
||||
list-style:none;
|
||||
font-size:18px;
|
||||
font-weight:bold;
|
||||
padding:10px;
|
||||
padding:10px 20px 10px 10px;
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
|
||||
|
|
@ -141,39 +156,10 @@ body {
|
|||
color:#fff;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info {
|
||||
font-size:13px;
|
||||
padding-bottom:10px;
|
||||
border-bottom:1px solid #444;
|
||||
overflow:hidden;
|
||||
*zoom:1;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info .author {
|
||||
font-weight:bold;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.info .date {
|
||||
font-size:11px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.link {
|
||||
margin-top:10px;
|
||||
border-top:1px solid #444;
|
||||
}
|
||||
|
||||
.smartPhoneContent div.link a {
|
||||
display:block;
|
||||
padding:5px 0;
|
||||
font-size:13px;
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.smartPhoneList li a {
|
||||
background:transparent url(./images/listArrow.png) no-repeat scroll right center;
|
||||
padding-right:30px;
|
||||
}
|
||||
|
||||
.smartPhoneList li.noArrow a {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ function showXEMenu() {
|
|||
|
||||
xeSmartMenu = jQuery('<div>')
|
||||
.attr("className","smartPhoneList")
|
||||
.css('display','none');
|
||||
.css('display','none')
|
||||
.css('backgroundColor','#fff');
|
||||
|
||||
jQuery(document.body).append(xeSmartMenu);
|
||||
|
||||
|
|
@ -14,9 +15,10 @@ function showXEMenu() {
|
|||
if(w>jQuery(document).width()) {
|
||||
this.css({left:0,right:0,display:'block'});
|
||||
this.width('');
|
||||
jQuery('.smartPhoneContentArea').css("display","none");
|
||||
} else {
|
||||
this.width(w);
|
||||
var o = parseInt(jQuery(document).width/w,10)/10;
|
||||
var o = parseInt(jQuery(document).width/w,10)/5;
|
||||
if(o>1) o = 1;
|
||||
setTimeout(function() { xeSmartMenu.slideIn(step+1); }, 50);
|
||||
}
|
||||
|
|
@ -27,8 +29,9 @@ function showXEMenu() {
|
|||
|
||||
if(l>jQuery('.smartPhoneContent').width()) {
|
||||
this.css({display:'none','left':''});
|
||||
jQuery('.smartPhoneContentArea').css("display","block");
|
||||
} else {
|
||||
var o = parseInt(jQuery(document).width/l,10)/10;
|
||||
var o = parseInt(jQuery(document).width/l,10)/5;
|
||||
if(o<0) o = 0;
|
||||
this.css('left',l+'px');
|
||||
setTimeout(function() { xeSmartMenu.slideOut(step+1); }, 50);
|
||||
|
|
@ -39,7 +42,7 @@ function showXEMenu() {
|
|||
if(xeSmartMenu.css('display')=='none' && typeof(xeMenus)!='undefined') {
|
||||
var menu = findSmartNode(xeMenus);
|
||||
if(!menu) menu = xeMenus;
|
||||
var html = '<ul><li><a href="'+request_uri.setQuery('smartphone','true')+'">Top page</a></li>';
|
||||
var html = '<ul><li><a href="'+request_uri.setQuery('smartphone','true')+'">goto homepage</a></li>';
|
||||
for(var text in menu) {
|
||||
if(!text) continue;
|
||||
var url = menu[text].url;
|
||||
|
|
@ -65,8 +68,8 @@ function showXEMenu() {
|
|||
width:'1px',
|
||||
right:'0',
|
||||
top:'43px',
|
||||
bottom:'43px',
|
||||
display:'block',
|
||||
position:'absolute',
|
||||
padding:0
|
||||
});
|
||||
xeSmartMenu.slideIn(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue