toggle mobile on all themes; Frost updates

This commit is contained in:
Zach Prezkuta 2012-09-29 17:47:47 -06:00
parent ebabd25717
commit cee50502d3
17 changed files with 84 additions and 33 deletions

View file

@ -350,6 +350,8 @@ if(! class_exists('App')) {
public $plugins;
public $apps = array();
public $identities;
public $is_mobile;
public $is_tablet;
public $nav_sel;
@ -491,6 +493,14 @@ if(! class_exists('App')) {
if($this->pager['start'] < 0)
$this->pager['start'] = 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) {
@ -1288,14 +1298,14 @@ if(! function_exists('get_birthdays')) {
$a = get_app();
$o = '';
if(! local_user())
if(! local_user() || $a->is_mobile || $a->is_tablet)
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
// $mobile_detect = new Mobile_Detect();
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
// if($is_mobile)
// return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');
@ -1373,15 +1383,15 @@ if(! function_exists('get_events')) {
$a = get_app();
if(! local_user())
if(! local_user() || $a->is_mobile || $a->is_tablet)
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
// $mobile_detect = new Mobile_Detect();
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
// if($is_mobile)
// return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');
@ -1507,8 +1517,9 @@ if(! function_exists('current_theme')) {
$a = get_app();
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
// $mobile_detect = new Mobile_Detect();
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
$is_mobile = $a->is_mobile || $a->is_tablet;
if($is_mobile) {
if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {

View file

@ -366,6 +366,19 @@ if($a->module != 'install') {
$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;
$profile = $a->profile;

View file

@ -519,7 +519,7 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.type-text{background-position:-60px 0px;}
.type-unkn{background-position:-80px 0;}
.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;}
#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;}

View file

@ -519,7 +519,7 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.type-text{background-position:-60px 0px;}
.type-unkn{background-position:-80px 0;}
.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;}
#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;}

View file

@ -245,8 +245,9 @@ section {
/* footer */
footer {
display: none;
text-align: right;
padding-bottom: 1em;
padding-right: 3em;
}
.birthday-today, .event-today {

View file

@ -10,6 +10,8 @@ Photo album display?
- Get "add contact" back on contacts page
- Allow creating a new private message
- Admin: access to more pages than summary?
- Find a way to show embedded videos at the normal size for tablets that can handle it

View file

@ -21,9 +21,7 @@
<section><?php if(x($page,'content')) echo $page['content']; ?>
</section>
</div>
<footer>
<a href="<?php echo $a->get_baseurl() ?>/toggle_mobile?off=1&address=<?php echo curPageURL() ?>">toggle mobile</a>
</footer>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
<?php } else { ?>
<div class='main-container'>
@ -36,10 +34,7 @@
</div>
<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']; ?>
<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>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
<!-- </div>-->
</div>
<?php } ?>

View file

@ -185,7 +185,7 @@
var eSysmsg = $j(data).find('sysmsgs');
eSysmsg.children("notice").each(function(){
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(){
text = $j(this).text();

File diff suppressed because one or more lines are too long

View file

@ -1402,6 +1402,13 @@ input#dfrn-url {
line-height: 23px;
}
.wall-item-body iframe {
display: block;
clear: both;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
.wall-item-body code {
width: 260px;
overflow: hidden;

View file

@ -4,7 +4,7 @@
* Name: Frost--mobile version
* 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).
* Version: Version 0.2.12
* Version: Version 0.2.13
* Author: Zach P <techcity@f.shmuz.in>
* Maintainer: Zach P <techcity@f.shmuz.in>
*/

View file

@ -21,6 +21,7 @@
<section><?php if(x($page,'content')) echo $page['content']; ?>
</section>
</div>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
<?php } else { ?>
<div class='main-container'>

View file

@ -178,11 +178,11 @@
var eSysmsg = $j(data).find('sysmsgs');
eSysmsg.children("notice").each(function(){
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(){
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

View file

@ -135,3 +135,9 @@ div.section-wrapper {
text-align: left;
font-size: 12px;
}
footer {
text-align: center;
padding-top: 3em;
padding-bottom: 1em;
}

View file

@ -354,8 +354,8 @@ section {
/* footer */
footer {
display: none;
text-align: center;
padding-bottom: 1em;
}
.birthday-today, .event-today {
@ -620,6 +620,10 @@ input#dfrn-url {
clear: both;
}
#croppa {
max-width: 510px;
}
.intro-wrapper {
margin-top: 20px;
}
@ -1351,6 +1355,13 @@ input#dfrn-url {
line-height: 18px;
}
.wall-item-body iframe {
display: block;
clear: both;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
.wall-item-tools {
clear: both;
/* background-image: url("head.jpg");
@ -3193,7 +3204,7 @@ aside input[type='text'] {
display: block;
margin-left: 50px;
color: #666666;
clear: left;
}
.field .onoff {
@ -3291,6 +3302,10 @@ aside input[type='text'] {
#adminpage table tr:hover { background-color: #bbc7d7; }
#adminpage .selectall { text-align: right; }
#adminpage .screenshot img {
max-width: 550px;
}
/*
* UPDATE
*/

View file

@ -4,7 +4,7 @@
* Name: Frost
* 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).
* Version: Version 0.2.10
* Version: Version 0.2.11
* Author: Zach P <techcity@f.shmuz.in>
* Maintainer: Zach P <techcity@f.shmuz.in>
*/