git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6961 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-11-23 11:41:36 +00:00
parent b53dded298
commit be661b7b53
5 changed files with 36 additions and 2 deletions

View file

@ -11,7 +11,12 @@
var $content = null; var $content = null;
function isFromSmartPhone() { function isFromSmartPhone() {
return Context::get('smartphone') || preg_match('/(iPod|iPhone|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']); if(Context::get('full_browse') || $_COOKIE["FullBrowse"])
{
return false;
}
return Context::get('smartphone') || preg_match('/(iPod|iPhone|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']);
} }
function haveSmartphoneModule($module) { function haveSmartphoneModule($module) {

View file

@ -3,7 +3,16 @@
if(Context::get('module')=='admin') return; if(Context::get('module')=='admin') return;
require_once(_XE_PATH_.'addons/smartphone/classes/smartphone.class.php'); if($called_position == "before_module_init")
{
require(_XE_PATH_.'addons/smartphone/classes/smartphone.class.php');
if(Context::get('full_browse'))
{
setcookie("FullBrowse", 1);
}
}
if(!smartphoneXE::isFromSmartPhone()) return; if(!smartphoneXE::isFromSmartPhone()) return;
if($called_position == 'after_module_proc' ) { if($called_position == 'after_module_proc' ) {

View file

@ -10,6 +10,7 @@
</div> </div>
<div class="smartPhoneToolBar"> <div class="smartPhoneToolBar">
<div class="buttons">
<!--@if($parent_url)--> <!--@if($parent_url)-->
<a href="{$parent_url}"><img src="./images/btnTop.png" class="smartPhoneBtn" alt="Top" /></a> <a href="{$parent_url}"><img src="./images/btnTop.png" class="smartPhoneBtn" alt="Top" /></a>
<!--@end--> <!--@end-->
@ -18,4 +19,8 @@
<!--@if($next_url)--><a href="{$next_url}"><img src="./images/btnNext.png" class="smartPhoneBtn" alt="Next" /></a><!--@end--> <!--@if($next_url)--><a href="{$next_url}"><img src="./images/btnNext.png" class="smartPhoneBtn" alt="Next" /></a><!--@end-->
<a href="#" onclick="showXEMenu();"><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>
<div class="rightbuttons">
<a href="#" onclick="setFullBrowse();" class="button blue"><span>Full</span></a>
</div>
</div> </div>

View file

@ -22,6 +22,16 @@ body {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.smartPhoneToolBar .buttons
{
float: left;
}
.smartPhoneToolBar .rightbuttons
{
float: right; margin-right:5px; margin-top:5px;
}
.smartPhoneTitleBar h1 { .smartPhoneTitleBar h1 {
white-space:nowrap; white-space:nowrap;
overflow: hidden; overflow: hidden;
@ -187,3 +197,4 @@ body {
letter-spacing:0px; letter-spacing:0px;
} }

View file

@ -1,5 +1,9 @@
var xeSmartMenu = null; var xeSmartMenu = null;
var xeSmartUpperMenu = null; var xeSmartUpperMenu = null;
function setFullBrowse() {
location.href = current_url.setQuery('full_browse',1);
}
function showXEMenu() { function showXEMenu() {
if(!xeSmartMenu) { if(!xeSmartMenu) {