add settings sections and add contacts; other tweaks and fixes

This commit is contained in:
Zach Prezkuta 2012-09-07 12:17:03 -06:00
parent 5c0f0df59a
commit 63d02d98c5
17 changed files with 113 additions and 51 deletions

View file

@ -28,28 +28,35 @@ function contacts_init(&$a) {
if($contact_id) { if($contact_id) {
$a->data['contact'] = $r[0]; $a->data['contact'] = $r[0];
$o .= '<div class="vcard">'; $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array(
$o .= '<div class="fn">' . $a->data['contact']['name'] . '</div>'; '$name' => $a->data['contact']['name'],
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->data['contact']['photo'] . '" alt="' . $a->data['contact']['name'] . '" /></div>'; '$photo' => $a->data['contact']['photo']
$o .= '</div>'; ));
$a->page['aside'] .= $o; $follow_widget = '';
}
else {
$vcard_widget = '';
$follow_widget = follow_widget();
} }
else
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= group_side('contacts','group',false,0,$contact_id); $groups_widget .= group_side('contacts','group',false,0,$contact_id);
$findpeople_widget .= findpeople_widget();
$networks_widget .= networks_widget('contacts',$_GET['nets']);
$a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
'$vcard_widget' => $vcard_widget,
'$follow_widget' => $follow_widget,
'$groups_widget' => $groups_widget,
'$findpeople_widget' => $findpeople_widget,
'$networks_widget' => $networks_widget
));
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
$base = $a->get_baseurl(); $base = $a->get_baseurl();
$tpl = get_markup_template("contacts-head.tpl"); $tpl = get_markup_template("contacts-head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array( $a->page['htmlhead'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$base' => $base '$base' => $base
)); ));
$tpl = get_markup_template("contacts-end.tpl"); $tpl = get_markup_template("contacts-end.tpl");
$a->page['end'] .= replace_macros($tpl,array( $a->page['end'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),

View file

@ -770,8 +770,8 @@ function settings_content(&$a) {
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$uid' => local_user(), '$uid' => local_user(),
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'), '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
'$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''), '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')), '$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),

View file

@ -0,0 +1,6 @@
$vcard_widget
$follow_widget
$groups_widget
$findpeople_widget
$networks_widget

View file

@ -1,7 +1,7 @@
<script>$(function(){ previewTheme($("#id_$field.0")[0]); });</script> <script>$(function(){ previewTheme($("#id_$field.0")[0]); });</script>
<div class='field select'> <div class='field select'>
<label for='id_$field.0'>$field.1</label> <label for='id_$field.0'>$field.1</label>
<select name='$field.0' id='id_$field.0' {{ if $field.5=='preview' }}onchange="previewTheme(this);"{{ endif }} > <select name='$field.0' id='id_$field.0' {{ if $field.5 }}onchange="previewTheme(this);"{{ endif }} >
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }} {{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
</select> </select>
<span class='field_help'>$field.3</span> <span class='field_help'>$field.3</span>

View file

@ -11,6 +11,11 @@
<div id="contact-edit-drop-link-end"></div> <div id="contact-edit-drop-link-end"></div>
<div class="vcard">
<div class="fn">$name</div>
<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="$photo" alt="$name" /></div>
</div>
<div id="contact-edit-nav-wrapper" > <div id="contact-edit-nav-wrapper" >
<div id="contact-edit-links"> <div id="contact-edit-links">

View file

@ -0,0 +1,2 @@
$follow_widget

View file

@ -24,16 +24,17 @@
<?php } else { ?> <?php } else { ?>
<div class='main-container'> <div class='main-container'>
<div class='main-content-container'> <!-- <div class='main-content-container'>-->
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<div class='section-wrapper'> <div class='section-wrapper'>
<?php if( ($a->module === 'settings') && x($page,'aside')) echo $page['aside']; ?>
<section><?php if(x($page,'content')) echo $page['content']; ?> <section><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div> <div id="page-footer"></div>
</section> </section>
</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']; ?>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer> <footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</div> <!-- </div>-->
</div> </div>
<?php } ?> <?php } ?>
<?php if(x($page,'end')) echo $page['end']; ?> <?php if(x($page,'end')) echo $page['end']; ?>

View file

@ -1,7 +1,7 @@
<div class='field select'> <div class='field select'>
<label for='id_$field.0'>$field.1</label> <label for='id_$field.0'>$field.1</label>
<select name='$field.0' id='id_$field.0' {{ if $field.5=='preview' }}onchange="previewTheme(this);"{{ endif }} > <select name='$field.0' id='id_$field.0' {{ if $field.5 }}onchange="previewTheme(this);"{{ endif }} >
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }} {{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
</select> </select>
<span class='field_help'>$field.3</span> <span class='field_help'>$field.3</span>

View file

@ -0,0 +1,11 @@
<div class="widget{{ if $class }} $class{{ endif }}">
<!-- {{if $title}}<h3>$title</h3>{{endif}}-->
{{if $desc}}<div class="desc">$desc</div>{{endif}}
<ul class="tabs">
{{ for $items as $item }}
<li class="tool"><a href="$item.url" class="tab {{ if $item.selected }}selected{{ endif }}">$item.label</a></li>
{{ endfor }}
</ul>
</div>

View file

@ -684,7 +684,7 @@ Array.prototype.remove = function(item) {
function previewTheme(elm) { function previewTheme(elm) {
theme = $j(elm).val(); theme = $j(elm).val();
$j.getJSON('pretheme?f=&theme=' + theme,function(data) { $j.getJSON('pretheme?f=&theme=' + theme,function(data) {
$j('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>'); $j('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div>');
}); });
} }

File diff suppressed because one or more lines are too long

View file

@ -54,7 +54,7 @@ img { border :0px; }
background: url(login-bg.gif) no-repeat; background: url(login-bg.gif) no-repeat;
background-position: 0 50%; background-position: 0 50%;
padding-left: 18px; padding-left: 18px;
width: 252px; width: 212px;
margin-left: 20px; margin-left: 20px;
} }
.openid:hover { .openid:hover {
@ -288,9 +288,8 @@ div.main-container {
/* aside */ /* aside */
aside { /*aside {
/* display: block;*/ display: block;
display: none;
min-height: 112px; min-height: 112px;
width: 250px; width: 250px;
@ -299,9 +298,7 @@ aside {
margin: 1em 0px 0px 0px; margin: 1em 0px 0px 0px;
position: absolute; position: absolute;
}*/
/* float:left;*/
}
#dfrn-request-link { #dfrn-request-link {
display: block; display: block;
@ -409,7 +406,15 @@ footer {
} }
#theme-preview { #theme-preview {
margin: 15px 0 15px 150px; margin: 15px 0 15px 15px;
}
#theme-version {
display: block;
font-weight: bold;
}
#theme-credits {
margin-top: 15px;
margin-bottom: 15px;
} }
/* from default */ /* from default */
@ -486,11 +491,11 @@ footer {
} }
.settings-widget .selected { .settings-widget .selected {
padding: 3px; /* padding: 3px;
/* -moz-border-radius: 3px;*/ -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
border: 1px solid #CCCCCC; border: 1px solid #CCCCCC;*/
background: #F8F8F8; background: #F8F8F8;
font-weight: bold; font-weight: bold;
} }
@ -1017,7 +1022,11 @@ input#dfrn-url {
margin-bottom: 20px; margin-bottom: 20px;
} }
.settings-widget ul { #id_theme,
#id_mobile_theme {
width: 280px;
}
/*.settings-widget ul {
list-style-type: none; list-style-type: none;
padding: 0px; padding: 0px;
} }
@ -1025,7 +1034,7 @@ input#dfrn-url {
.settings-widget li { .settings-widget li {
margin-left: 24px; margin-left: 24px;
margin-bottom: 8px; margin-bottom: 8px;
} }*/
#gender-select, #marital-select, #sexual-select { #gender-select, #marital-select, #sexual-select {
@ -1037,6 +1046,11 @@ input#dfrn-url {
float: left; float: left;
} }
#contacts-search-submit {
font-size: 18px;
padding: 5px 10px;
}
#contacts-display-wrapper { #contacts-display-wrapper {
padding-left: 35px; padding-left: 35px;
} }
@ -1053,7 +1067,7 @@ input#dfrn-url {
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
width: 95px; width: 95px;
height: 170px; height: 200px;
} }
#contacts-search-end { #contacts-search-end {
margin-bottom: 10px; margin-bottom: 10px;
@ -2408,7 +2422,9 @@ a.mail-list-link {
margin-top: 5px; margin-top: 5px;
} }
#side-follow-submit, #side-peoplefind-submit { #side-follow-submit, #side-peoplefind-submit {
margin-top: 15px; font-size: 18px;
padding: 5px 10px;
margin: 10px 0px 10px 10px;
} }
#side-match-link { #side-match-link {
@ -2421,7 +2437,7 @@ aside input[type='text'] {
.widget { .widget {
border: 1px solid #DDDDDD; border: 1px solid #DDDDDD;
padding: 8px; padding: 18px;
margin-top: 5px; margin-top: 5px;
/* -moz-border-radius:5px;*/ /* -moz-border-radius:5px;*/
-webkit-border-radius:5px; -webkit-border-radius:5px;
@ -3336,7 +3352,7 @@ aside input[type='text'] {
margin-bottom: 10px; margin-bottom: 10px;
padding-bottom: 10px; padding-bottom: 10px;
overflow: auto; overflow: auto;
width: 100% /* width: 100%*/
} }
.field label { .field label {
@ -3347,9 +3363,13 @@ aside input[type='text'] {
.field input, .field input,
.field textarea { .field textarea {
width: 270px; width: 230px;
margin-left: 20px; margin-left: 20px;
} }
.field input[type=checkbox],
.field input[type=radio] {
width: auto;
}
.field textarea { height: 100px; } .field textarea { height: 100px; }
.field_help { .field_help {
display: block; display: block;

View file

@ -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.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>
*/ */

View file

@ -1,7 +1,7 @@
<div class='field select'> <div class='field select'>
<label for='id_$field.0'>$field.1</label> <label for='id_$field.0'>$field.1</label>
<select name='$field.0' id='id_$field.0' {{ if $field.5=='preview' }}onchange="previewTheme(this);"{{ endif }} > <select name='$field.0' id='id_$field.0' {{ if $field.5 }}onchange="previewTheme(this);"{{ endif }} >
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }} {{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
</select> </select>
<span class='field_help'>$field.3</span> <span class='field_help'>$field.3</span>

View file

@ -375,6 +375,14 @@ div.wall-item-content-wrapper.shiny {
#theme-preview { #theme-preview {
margin: 15px 0 15px 150px; margin: 15px 0 15px 150px;
} }
#theme-version {
display: block;
font-weight: bold;
}
#theme-credits {
margin-top: 15px;
margin-bottom: 15px;
}
/* from default */ /* from default */
#jot-perms-icon, #jot-perms-icon,
@ -3167,6 +3175,10 @@ aside input[type='text'] {
.field textarea { .field textarea {
width: 400px; width: 400px;
} }
.field input[type=checkbox],
.field input[type=radio] {
width: auto;
}
.field textarea { height: 100px; } .field textarea { height: 100px; }
.field_help { .field_help {
display: block; display: block;
@ -3823,11 +3835,4 @@ ul.notifications-menu-popup {
width: 130px; width: 130px;
} }
#theme-version {
display: block;
font-weight: bold;
}
#theme-credits {
margin-top: 15px;
margin-bottom: 15px;
}

View file

@ -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.8 * Version: Version 0.2.9
* 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>
*/ */

5
view/vcard-widget.tpl Normal file
View file

@ -0,0 +1,5 @@
<div class="vcard">
<div class="fn">$name</div>
<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="$photo" alt="$name" /></div>
</div>