Merge pull request #493 from fermionic/toggle-mobile-all-themes
Toggle mobile all themes
This commit is contained in:
commit
a620d5d9f3
35
boot.php
35
boot.php
|
@ -350,6 +350,8 @@ if(! class_exists('App')) {
|
||||||
public $plugins;
|
public $plugins;
|
||||||
public $apps = array();
|
public $apps = array();
|
||||||
public $identities;
|
public $identities;
|
||||||
|
public $is_mobile;
|
||||||
|
public $is_tablet;
|
||||||
|
|
||||||
public $nav_sel;
|
public $nav_sel;
|
||||||
|
|
||||||
|
@ -491,6 +493,14 @@ if(! class_exists('App')) {
|
||||||
if($this->pager['start'] < 0)
|
if($this->pager['start'] < 0)
|
||||||
$this->pager['start'] = 0;
|
$this->pager['start'] = 0;
|
||||||
$this->pager['total'] = 0;
|
$this->pager['total'] = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detect mobile devices
|
||||||
|
*/
|
||||||
|
|
||||||
|
$mobile_detect = new Mobile_Detect();
|
||||||
|
$this->is_mobile = $mobile_detect->isMobile();
|
||||||
|
$this->is_tablet = $mobile_detect->isTablet();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_baseurl($ssl = false) {
|
function get_baseurl($ssl = false) {
|
||||||
|
@ -1288,14 +1298,14 @@ if(! function_exists('get_birthdays')) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user() || $a->is_mobile || $a->is_tablet)
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
$mobile_detect = new Mobile_Detect();
|
// $mobile_detect = new Mobile_Detect();
|
||||||
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
||||||
|
|
||||||
if($is_mobile)
|
// if($is_mobile)
|
||||||
return $o;
|
// return $o;
|
||||||
|
|
||||||
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
||||||
$bd_short = t('F d');
|
$bd_short = t('F d');
|
||||||
|
@ -1373,15 +1383,15 @@ if(! function_exists('get_events')) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user() || $a->is_mobile || $a->is_tablet)
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
|
||||||
$mobile_detect = new Mobile_Detect();
|
// $mobile_detect = new Mobile_Detect();
|
||||||
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
||||||
|
|
||||||
if($is_mobile)
|
// if($is_mobile)
|
||||||
return $o;
|
// return $o;
|
||||||
|
|
||||||
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
||||||
$bd_short = t('F d');
|
$bd_short = t('F d');
|
||||||
|
@ -1507,8 +1517,9 @@ if(! function_exists('current_theme')) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$mobile_detect = new Mobile_Detect();
|
// $mobile_detect = new Mobile_Detect();
|
||||||
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
||||||
|
$is_mobile = $a->is_mobile || $a->is_tablet;
|
||||||
|
|
||||||
if($is_mobile) {
|
if($is_mobile) {
|
||||||
if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
|
if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
|
||||||
|
|
13
index.php
13
index.php
|
@ -366,6 +366,19 @@ if($a->module != 'install') {
|
||||||
|
|
||||||
$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => current_theme_url()));
|
$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => current_theme_url()));
|
||||||
|
|
||||||
|
if($a->is_mobile || $a->is_tablet) {
|
||||||
|
if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
|
||||||
|
$link = $a->get_baseurl() . '/toggle_mobile?address=' . curPageURL();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$link = $a->get_baseurl() . '/toggle_mobile?off=1&address=' . curPageURL();
|
||||||
|
}
|
||||||
|
$a->page['footer'] = replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
|
||||||
|
'$toggle_link' => $link,
|
||||||
|
'$toggle_text' => t('toggle mobile')
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
$page = $a->page;
|
$page = $a->page;
|
||||||
$profile = $a->profile;
|
$profile = $a->profile;
|
||||||
|
|
||||||
|
|
|
@ -519,7 +519,7 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
|
||||||
.type-text{background-position:-60px 0px;}
|
.type-text{background-position:-60px 0px;}
|
||||||
.type-unkn{background-position:-80px 0;}
|
.type-unkn{background-position:-80px 0;}
|
||||||
.cc-license{margin-top:100px;font-size:0.7em;}
|
.cc-license{margin-top:100px;font-size:0.7em;}
|
||||||
footer{display:block;clear:both;}
|
footer{display:block;clear:both;text-align:center;}
|
||||||
#sectionfooter{margin:1em 0 1em 0;}
|
#sectionfooter{margin:1em 0 1em 0;}
|
||||||
#profile-jot-text{height:20px;color:#eeeecc;background:#2e2f2e;border:1px solid #eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:99.5%;}
|
#profile-jot-text{height:20px;color:#eeeecc;background:#2e2f2e;border:1px solid #eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:99.5%;}
|
||||||
#photo-edit-perms-select,#photos-upload-permissions-wrapper,#profile-jot-acl-wrapper{display:block !important;background:#2e2f2e;color:#eeeecc;}
|
#photo-edit-perms-select,#photos-upload-permissions-wrapper,#profile-jot-acl-wrapper{display:block !important;background:#2e2f2e;color:#eeeecc;}
|
||||||
|
|
|
@ -519,7 +519,7 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
|
||||||
.type-text{background-position:-60px 0px;}
|
.type-text{background-position:-60px 0px;}
|
||||||
.type-unkn{background-position:-80px 0;}
|
.type-unkn{background-position:-80px 0;}
|
||||||
.cc-license{margin-top:100px;font-size:0.7em;}
|
.cc-license{margin-top:100px;font-size:0.7em;}
|
||||||
footer{display:block;clear:both;}
|
footer{display:block;clear:both;text-align:center;}
|
||||||
#sectionfooter{margin:1em 0 1em 0;}
|
#sectionfooter{margin:1em 0 1em 0;}
|
||||||
#profile-jot-text{height:20px;color:#666666;background:#cccccc;border:1px solid #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:99.5%;}
|
#profile-jot-text{height:20px;color:#666666;background:#cccccc;border:1px solid #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:99.5%;}
|
||||||
#photo-edit-perms-select,#photos-upload-permissions-wrapper,#profile-jot-acl-wrapper{display:block !important;background:#eeeeec;color:#111111;}
|
#photo-edit-perms-select,#photos-upload-permissions-wrapper,#profile-jot-acl-wrapper{display:block !important;background:#eeeeec;color:#111111;}
|
||||||
|
|
|
@ -245,8 +245,9 @@ section {
|
||||||
|
|
||||||
/* footer */
|
/* footer */
|
||||||
footer {
|
footer {
|
||||||
display: none;
|
text-align: right;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
padding-right: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.birthday-today, .event-today {
|
.birthday-today, .event-today {
|
||||||
|
|
|
@ -10,6 +10,8 @@ Photo album display?
|
||||||
|
|
||||||
- Get "add contact" back on contacts page
|
- Get "add contact" back on contacts page
|
||||||
|
|
||||||
|
- Allow creating a new private message
|
||||||
|
|
||||||
- Admin: access to more pages than summary?
|
- Admin: access to more pages than summary?
|
||||||
|
|
||||||
- Find a way to show embedded videos at the normal size for tablets that can handle it
|
- Find a way to show embedded videos at the normal size for tablets that can handle it
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
<section><?php if(x($page,'content')) echo $page['content']; ?>
|
<section><?php if(x($page,'content')) echo $page['content']; ?>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
|
||||||
<a href="<?php echo $a->get_baseurl() ?>/toggle_mobile?off=1&address=<?php echo curPageURL() ?>">toggle mobile</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class='main-container'>
|
<div class='main-container'>
|
||||||
|
@ -36,10 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
|
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
|
||||||
<?php if( ($a->module === 'contacts') && x($page,'aside')) echo $page['aside']; ?>
|
<?php if( ($a->module === 'contacts') && x($page,'aside')) echo $page['aside']; ?>
|
||||||
<footer>
|
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
|
||||||
<a href="<?php echo $a->get_baseurl() ?>/toggle_mobile?off=1&address=<?php echo curPageURL() ?>">toggle mobile</a>
|
|
||||||
<?php if(x($page,'footer')) echo $page['footer']; ?>
|
|
||||||
</footer>
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
var eSysmsg = $j(data).find('sysmsgs');
|
var eSysmsg = $j(data).find('sysmsgs');
|
||||||
eSysmsg.children("notice").each(function(){
|
eSysmsg.children("notice").each(function(){
|
||||||
text = $j(this).text();
|
text = $j(this).text();
|
||||||
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 1500 });
|
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 1000 });
|
||||||
});
|
});
|
||||||
eSysmsg.children("info").each(function(){
|
eSysmsg.children("info").each(function(){
|
||||||
text = $j(this).text();
|
text = $j(this).text();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1402,6 +1402,13 @@ input#dfrn-url {
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-body iframe {
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
margin-top: 1.5em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-body code {
|
.wall-item-body code {
|
||||||
width: 260px;
|
width: 260px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Name: Frost--mobile version
|
* Name: Frost--mobile version
|
||||||
* Description: Like frosted glass
|
* Description: Like frosted glass
|
||||||
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
|
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
|
||||||
* Version: Version 0.2.12
|
* Version: Version 0.2.13
|
||||||
* Author: Zach P <techcity@f.shmuz.in>
|
* Author: Zach P <techcity@f.shmuz.in>
|
||||||
* Maintainer: Zach P <techcity@f.shmuz.in>
|
* Maintainer: Zach P <techcity@f.shmuz.in>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<section><?php if(x($page,'content')) echo $page['content']; ?>
|
<section><?php if(x($page,'content')) echo $page['content']; ?>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class='main-container'>
|
<div class='main-container'>
|
||||||
|
|
|
@ -178,11 +178,11 @@
|
||||||
var eSysmsg = $j(data).find('sysmsgs');
|
var eSysmsg = $j(data).find('sysmsgs');
|
||||||
eSysmsg.children("notice").each(function(){
|
eSysmsg.children("notice").each(function(){
|
||||||
text = $j(this).text();
|
text = $j(this).text();
|
||||||
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 2000 }); // originally: sticky: true,
|
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 3000 }); // originally: sticky: true,
|
||||||
});
|
});
|
||||||
eSysmsg.children("info").each(function(){
|
eSysmsg.children("info").each(function(){
|
||||||
text = $j(this).text();
|
text = $j(this).text();
|
||||||
$j.jGrowl(text, { sticky: false, theme: 'info', life: 1500 });
|
$j.jGrowl(text, { sticky: false, theme: 'info', life: 1000 });
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -135,3 +135,9 @@ div.section-wrapper {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 3em;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
|
@ -354,8 +354,8 @@ section {
|
||||||
|
|
||||||
/* footer */
|
/* footer */
|
||||||
footer {
|
footer {
|
||||||
display: none;
|
text-align: center;
|
||||||
|
padding-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.birthday-today, .event-today {
|
.birthday-today, .event-today {
|
||||||
|
@ -620,6 +620,10 @@ input#dfrn-url {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#croppa {
|
||||||
|
max-width: 510px;
|
||||||
|
}
|
||||||
|
|
||||||
.intro-wrapper {
|
.intro-wrapper {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -1351,6 +1355,13 @@ input#dfrn-url {
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-body iframe {
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
margin-top: 1.5em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-tools {
|
.wall-item-tools {
|
||||||
clear: both;
|
clear: both;
|
||||||
/* background-image: url("head.jpg");
|
/* background-image: url("head.jpg");
|
||||||
|
@ -3193,7 +3204,7 @@ aside input[type='text'] {
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.field .onoff {
|
.field .onoff {
|
||||||
|
@ -3291,6 +3302,10 @@ aside input[type='text'] {
|
||||||
#adminpage table tr:hover { background-color: #bbc7d7; }
|
#adminpage table tr:hover { background-color: #bbc7d7; }
|
||||||
#adminpage .selectall { text-align: right; }
|
#adminpage .selectall { text-align: right; }
|
||||||
|
|
||||||
|
#adminpage .screenshot img {
|
||||||
|
max-width: 550px;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UPDATE
|
* UPDATE
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Name: Frost
|
* Name: Frost
|
||||||
* Description: Like frosted glass
|
* Description: Like frosted glass
|
||||||
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
|
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
|
||||||
* Version: Version 0.2.10
|
* Version: Version 0.2.11
|
||||||
* Author: Zach P <techcity@f.shmuz.in>
|
* Author: Zach P <techcity@f.shmuz.in>
|
||||||
* Maintainer: Zach P <techcity@f.shmuz.in>
|
* Maintainer: Zach P <techcity@f.shmuz.in>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<a id="toggle_mobile_link" href="$toggle_link">$toggle_text</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user