From 63d02d98c5ea1767e3cfa20b1dec0cd5ab069bc0 Mon Sep 17 00:00:00 2001
From: Zach Prezkuta <fermion@gmx.com>
Date: Fri, 7 Sep 2012 12:17:03 -0600
Subject: [PATCH] add settings sections and add contacts; other tweaks and
 fixes

---
 mod/contacts.php                              | 33 ++++++-----
 mod/settings.php                              |  4 +-
 view/contacts-widget-sidebar.tpl              |  6 ++
 view/field_themeselect.tpl                    |  2 +-
 view/theme/frost-mobile/contact_edit.tpl      |  5 ++
 .../frost-mobile/contacts-widget-sidebar.tpl  |  2 +
 view/theme/frost-mobile/default.php           |  7 ++-
 view/theme/frost-mobile/field_themeselect.tpl |  2 +-
 .../frost-mobile/generic_links_widget.tpl     | 11 ++++
 view/theme/frost-mobile/js/main.js            |  2 +-
 view/theme/frost-mobile/js/main.min.js        |  2 +-
 view/theme/frost-mobile/style.css             | 56 +++++++++++++------
 view/theme/frost-mobile/theme.php             |  2 +-
 view/theme/frost/field_themeselect.tpl        |  2 +-
 view/theme/frost/style.css                    | 21 ++++---
 view/theme/frost/theme.php                    |  2 +-
 view/vcard-widget.tpl                         |  5 ++
 17 files changed, 113 insertions(+), 51 deletions(-)
 create mode 100644 view/contacts-widget-sidebar.tpl
 create mode 100644 view/theme/frost-mobile/contacts-widget-sidebar.tpl
 create mode 100644 view/theme/frost-mobile/generic_links_widget.tpl
 create mode 100644 view/vcard-widget.tpl

diff --git a/mod/contacts.php b/mod/contacts.php
index bdf4989893..8a36fa4cb6 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -28,28 +28,35 @@ function contacts_init(&$a) {
 
 	if($contact_id) {
 			$a->data['contact'] = $r[0];
-			$o .= '<div class="vcard">';
-			$o .= '<div class="fn">' . $a->data['contact']['name'] . '</div>';
-			$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>';
-			$o .= '</div>';
-			$a->page['aside'] .= $o;
-
+			$vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array(
+				'$name' => $a->data['contact']['name'],
+				'$photo' => $a->data['contact']['photo']
+			));
+			$follow_widget = '';
 	}	
-	else
-		$a->page['aside'] .= follow_widget();
-
-	$a->page['aside'] .= group_side('contacts','group',false,0,$contact_id);
+	else {
+		$vcard_widget = '';
+		$follow_widget = follow_widget();
+	}
 
-	$a->page['aside'] .= findpeople_widget();
+	$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'] .= networks_widget('contacts',$_GET['nets']);
 	$base = $a->get_baseurl();
-
 	$tpl = get_markup_template("contacts-head.tpl");
 	$a->page['htmlhead'] .= replace_macros($tpl,array(
 		'$baseurl' => $a->get_baseurl(true),
 		'$base' => $base
 	));
+
 	$tpl = get_markup_template("contacts-end.tpl");
 	$a->page['end'] .= replace_macros($tpl,array(
 		'$baseurl' => $a->get_baseurl(true),
diff --git a/mod/settings.php b/mod/settings.php
index a7b2791a92..fd2bb9e570 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -770,8 +770,8 @@ function settings_content(&$a) {
 			'$baseurl' => $a->get_baseurl(true),
 			'$uid' => local_user(),
 		
-			'$theme'	=> array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'),
-			'$mobile_theme'	=> array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''),
+			'$theme'	=> array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
+			'$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')),
 			'$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, ''),
diff --git a/view/contacts-widget-sidebar.tpl b/view/contacts-widget-sidebar.tpl
new file mode 100644
index 0000000000..c9450ce648
--- /dev/null
+++ b/view/contacts-widget-sidebar.tpl
@@ -0,0 +1,6 @@
+$vcard_widget
+$follow_widget
+$groups_widget
+$findpeople_widget
+$networks_widget
+
diff --git a/view/field_themeselect.tpl b/view/field_themeselect.tpl
index 1b3ede36c3..654c18d450 100644
--- a/view/field_themeselect.tpl
+++ b/view/field_themeselect.tpl
@@ -1,7 +1,7 @@
 	<script>$(function(){ previewTheme($("#id_$field.0")[0]); });</script>
 	<div class='field select'>
 		<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 }}
 		</select>
 		<span class='field_help'>$field.3</span>
diff --git a/view/theme/frost-mobile/contact_edit.tpl b/view/theme/frost-mobile/contact_edit.tpl
index 6dcb9a72b0..b87b3b651c 100644
--- a/view/theme/frost-mobile/contact_edit.tpl
+++ b/view/theme/frost-mobile/contact_edit.tpl
@@ -11,6 +11,11 @@
 
 	<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-links">
diff --git a/view/theme/frost-mobile/contacts-widget-sidebar.tpl b/view/theme/frost-mobile/contacts-widget-sidebar.tpl
new file mode 100644
index 0000000000..1c63f9eab2
--- /dev/null
+++ b/view/theme/frost-mobile/contacts-widget-sidebar.tpl
@@ -0,0 +1,2 @@
+$follow_widget
+
diff --git a/view/theme/frost-mobile/default.php b/view/theme/frost-mobile/default.php
index b7feae3716..d076c10f07 100644
--- a/view/theme/frost-mobile/default.php
+++ b/view/theme/frost-mobile/default.php
@@ -24,16 +24,17 @@
 
 	<?php } else { ?>
 	<div class='main-container'>
-		<div class='main-content-container'>
-		<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
+<!--		<div class='main-content-container'>-->
 		<div class='section-wrapper'>
+		<?php if( ($a->module === 'settings') && x($page,'aside')) echo $page['aside']; ?>
 		<section><?php if(x($page,'content')) echo $page['content']; ?>
 			<div id="page-footer"></div>
 		</section>
 		</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><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
-		</div>
+<!--		</div>-->
 	</div>
 	<?php } ?>
 	<?php if(x($page,'end')) echo $page['end']; ?>
diff --git a/view/theme/frost-mobile/field_themeselect.tpl b/view/theme/frost-mobile/field_themeselect.tpl
index 3aa973d47b..d8ddc2fc74 100644
--- a/view/theme/frost-mobile/field_themeselect.tpl
+++ b/view/theme/frost-mobile/field_themeselect.tpl
@@ -1,7 +1,7 @@
 
 	<div class='field select'>
 		<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 }}
 		</select>
 		<span class='field_help'>$field.3</span>
diff --git a/view/theme/frost-mobile/generic_links_widget.tpl b/view/theme/frost-mobile/generic_links_widget.tpl
new file mode 100644
index 0000000000..3783467215
--- /dev/null
+++ b/view/theme/frost-mobile/generic_links_widget.tpl
@@ -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>
diff --git a/view/theme/frost-mobile/js/main.js b/view/theme/frost-mobile/js/main.js
index 15add4d690..aaa69e7078 100644
--- a/view/theme/frost-mobile/js/main.js
+++ b/view/theme/frost-mobile/js/main.js
@@ -684,7 +684,7 @@ Array.prototype.remove = function(item) {
 function previewTheme(elm) {
 	theme = $j(elm).val();
 	$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>');
 	});
 
 }
diff --git a/view/theme/frost-mobile/js/main.min.js b/view/theme/frost-mobile/js/main.min.js
index 405a5173e1..95f99dce75 100644
--- a/view/theme/frost-mobile/js/main.min.js
+++ b/view/theme/frost-mobile/js/main.min.js
@@ -1 +1 @@
-function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&liking&&(liking=0,window.location.href=window.location.href),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");$j("#"+e).length==0&&profile_page==1?($j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this))):($j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+e).replaceWith($j(this))),prev=e}),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form  textarea").contact_autocomplete(baseurl+"/acl");var t=$j(".wall-item-body > img").not(function(){return this.complete}),n=t.length;n?t.load(function(){n--,n||collapseHeight()}):collapseHeight()})}function collapseHeight(){$j(".wall-item-body").each(function(){$j(this).height()>310&&($j(this).hasClass("divmore")||($j(this).divgrow({initialHeight:300,showBrackets:!1,speed:0}),$j(this).addClass("divmore")))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY)t.x=e.touches[0].pageX,t.y=e.touches[0].pageY;else if(e.touches[0].clientX||e.touches[0].clientY)t.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.touches[0].x||e.touches[0].y)t.touches[0].x=e.touches[0].x,t.touches[0].y=e.touches[0].y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n<r;n++)i[n]=e.charCodeAt(n).toString(16).replace(/^([\da-f])$/,"0$1");return i.join("")}function groupChangeMember(e,t,n){$j("body .fakelink").css("cursor","wait"),$j.get("group/"+e+"/"+t+"?t="+n,function(e){$j("#group-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function profChangeMember(e,t){$j("body .fakelink").css("cursor","wait"),$j.get("profperm/"+e+"/"+t,function(e){$j("#prof-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function contactgroupChangeMember(e,t){$j("body").css("cursor","wait"),$j.get("contactgroup/"+e+"/"+t,function(e){$j("body").css("cursor","auto")})}function checkboxhighlight(e){$j(e).is(":checked")?$j(e).addClass("checkeditem"):$j(e).removeClass("checkeditem")}function notifyMarkAll(){$j.get("notify/mark/all",function(e){timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,1e3)})}function fcFileBrowser(e,t,n,r){var i=baseurl+"/fbrowser/"+n+"/";return tinyMCE.activeEditor.windowManager.open({file:i,title:"File Browser",width:420,height:400,resizable:"yes",inline:"yes",close_previous:"no"},{window:r,input:e}),!1}function setupFieldRichtext(){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:"fieldRichtext",plugins:"bbcode,paste, inlinepopups",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,file_browser_callback:"fcFileBrowser"})}function previewTheme(e){theme=$j(e).val(),$j.getJSON("pretheme?f=&theme="+theme,function(e){$j("#theme-preview").html('<div id="theme-desc">'+e.desc+'</div><div id="theme-version">'+e.version+'</div><div id="theme-credits">'+e.credits+'</div><a href="'+e.img+'"><img src="'+e.img+'" width="320" height="240" alt="'+theme+'" /></a>')})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_menu.attr("id")=="nav-notifications-menu"&&$j("section").show(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),$j("img[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:(menu.css("display")=="none"?($j(this).parent().addClass("selected"),menu.show(),menu.attr("id")=="nav-notifications-menu"&&$j("section").hide(),last_popup_menu=menu,last_popup_button=$j(this).parent()):($j(this).parent().removeClass("selected"),menu.hide(),menu.attr("id")=="nav-notifications-menu"&&$j("section").show(),last_popup_menu=null,last_popup_button=null),!1)}),$j("html").click(function(t){e(t)});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("<div>").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("<div>").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format("<span class='contactname'>"+e.attr("name")+"</span>"),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:1500})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate()});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t<arguments.length;t++){var n=new RegExp("\\{"+t+"\\}","gi");e=e.replace(n,arguments[t])}return e},Array.prototype.remove=function(e){to=undefined,from=this.indexOf(e);var t=this.slice((to||from)+1||this.length);return this.length=from<0?this.length+from:from,this.push.apply(this,t)};
\ No newline at end of file
+function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&liking&&(liking=0,window.location.href=window.location.href),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");$j("#"+e).length==0&&profile_page==1?($j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this))):($j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+e).replaceWith($j(this))),prev=e}),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form  textarea").contact_autocomplete(baseurl+"/acl");var t=$j(".wall-item-body > img").not(function(){return this.complete}),n=t.length;n?t.load(function(){n--,n||collapseHeight()}):collapseHeight()})}function collapseHeight(){$j(".wall-item-body").each(function(){$j(this).height()>310&&($j(this).hasClass("divmore")||($j(this).divgrow({initialHeight:300,showBrackets:!1,speed:0}),$j(this).addClass("divmore")))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY)t.x=e.touches[0].pageX,t.y=e.touches[0].pageY;else if(e.touches[0].clientX||e.touches[0].clientY)t.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.touches[0].x||e.touches[0].y)t.touches[0].x=e.touches[0].x,t.touches[0].y=e.touches[0].y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n<r;n++)i[n]=e.charCodeAt(n).toString(16).replace(/^([\da-f])$/,"0$1");return i.join("")}function groupChangeMember(e,t,n){$j("body .fakelink").css("cursor","wait"),$j.get("group/"+e+"/"+t+"?t="+n,function(e){$j("#group-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function profChangeMember(e,t){$j("body .fakelink").css("cursor","wait"),$j.get("profperm/"+e+"/"+t,function(e){$j("#prof-update-wrapper").html(e),$j("body .fakelink").css("cursor","auto")})}function contactgroupChangeMember(e,t){$j("body").css("cursor","wait"),$j.get("contactgroup/"+e+"/"+t,function(e){$j("body").css("cursor","auto")})}function checkboxhighlight(e){$j(e).is(":checked")?$j(e).addClass("checkeditem"):$j(e).removeClass("checkeditem")}function notifyMarkAll(){$j.get("notify/mark/all",function(e){timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,1e3)})}function fcFileBrowser(e,t,n,r){var i=baseurl+"/fbrowser/"+n+"/";return tinyMCE.activeEditor.windowManager.open({file:i,title:"File Browser",width:420,height:400,resizable:"yes",inline:"yes",close_previous:"no"},{window:r,input:e}),!1}function setupFieldRichtext(){tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:"fieldRichtext",plugins:"bbcode,paste, inlinepopups",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,file_browser_callback:"fcFileBrowser"})}function previewTheme(e){theme=$j(e).val(),$j.getJSON("pretheme?f=&theme="+theme,function(e){$j("#theme-preview").html('<div id="theme-desc">'+e.desc+'</div><div id="theme-version">'+e.version+'</div><div id="theme-credits">'+e.credits+"</div>")})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_menu.attr("id")=="nav-notifications-menu"&&$j("section").show(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),$j("img[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:(menu.css("display")=="none"?($j(this).parent().addClass("selected"),menu.show(),menu.attr("id")=="nav-notifications-menu"&&$j("section").hide(),last_popup_menu=menu,last_popup_button=$j(this).parent()):($j(this).parent().removeClass("selected"),menu.hide(),menu.attr("id")=="nav-notifications-menu"&&$j("section").show(),last_popup_menu=null,last_popup_button=null),!1)}),$j("html").click(function(t){e(t)});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("<div>").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("<div>").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format("<span class='contactname'>"+e.attr("name")+"</span>"),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:1500})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate()});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t<arguments.length;t++){var n=new RegExp("\\{"+t+"\\}","gi");e=e.replace(n,arguments[t])}return e},Array.prototype.remove=function(e){to=undefined,from=this.indexOf(e);var t=this.slice((to||from)+1||this.length);return this.length=from<0?this.length+from:from,this.push.apply(this,t)};
\ No newline at end of file
diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css
index 7e3d47d341..ef08bcb3f1 100644
--- a/view/theme/frost-mobile/style.css
+++ b/view/theme/frost-mobile/style.css
@@ -54,7 +54,7 @@ img { border :0px; }
    background: url(login-bg.gif) no-repeat;
    background-position: 0 50%;
    padding-left: 18px;
-   width: 252px;
+   width: 212px;
    margin-left: 20px;
 }
 .openid:hover {
@@ -288,9 +288,8 @@ div.main-container {
 
 
 /* aside */
-aside {
-/*	display: block;*/
-	display: none;
+/*aside {
+	display: block;
 	min-height: 112px;
 
 	width: 250px;
@@ -299,9 +298,7 @@ aside {
 	margin: 1em 0px 0px 0px;
 
 	position: absolute;
-
-/*	float:left;*/
-}
+}*/
 
 #dfrn-request-link {
 	display: block;
@@ -409,7 +406,15 @@ footer {
 }
 
 #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 */
@@ -486,11 +491,11 @@ footer {
 }
 
 .settings-widget .selected {
-	padding: 3px;
-/*	-moz-border-radius: 3px;*/
+/*	padding: 3px;
+	-moz-border-radius: 3px;
 	-webkit-border-radius: 3px;
 	border-radius: 3px;	
-	border: 1px solid #CCCCCC;
+	border: 1px solid #CCCCCC;*/
 	background: #F8F8F8;
 	font-weight: bold;
 }
@@ -1017,7 +1022,11 @@ input#dfrn-url {
 	margin-bottom: 20px;
 }
 
-.settings-widget ul {
+#id_theme,
+#id_mobile_theme {
+	width: 280px;
+}
+/*.settings-widget ul {
 	list-style-type: none;
 	padding: 0px;
 }
@@ -1025,7 +1034,7 @@ input#dfrn-url {
 .settings-widget li {
 	margin-left: 24px;
 	margin-bottom: 8px;
-}
+}*/
 
 
 #gender-select, #marital-select, #sexual-select {
@@ -1037,6 +1046,11 @@ input#dfrn-url {
 	float: left;
 }
 
+#contacts-search-submit {
+	font-size: 18px;
+	padding: 5px 10px;
+}
+
 #contacts-display-wrapper {
 	padding-left: 35px;
 }
@@ -1053,7 +1067,7 @@ input#dfrn-url {
 	padding-left: 15px;
 	padding-right: 15px; 
 	width: 95px;
-	height: 170px;
+	height: 200px;
 }
 #contacts-search-end {
 	margin-bottom: 10px;
@@ -2408,7 +2422,9 @@ a.mail-list-link {
 	margin-top: 5px;
 }
 #side-follow-submit, #side-peoplefind-submit {
-	margin-top: 15px;
+	font-size: 18px;
+	padding: 5px 10px;
+	margin: 10px 0px 10px 10px;
 }
 
 #side-match-link {
@@ -2421,7 +2437,7 @@ aside input[type='text'] {
 
 .widget {
 	border: 1px solid #DDDDDD;
-	padding: 8px;
+	padding: 18px;
 	margin-top: 5px;
 /*	-moz-border-radius:5px;*/
 	-webkit-border-radius:5px;
@@ -3336,7 +3352,7 @@ aside input[type='text'] {
 	margin-bottom: 10px;
 	padding-bottom: 10px;
 	overflow: auto;
-	width: 100%
+/*	width: 100%*/
 }
 
 .field label {
@@ -3347,9 +3363,13 @@ aside input[type='text'] {
 
 .field input,
 .field textarea {
-	width: 270px;
+	width: 230px;
 	margin-left: 20px;
 }
+.field input[type=checkbox],
+.field input[type=radio] {
+	width: auto;
+}
 .field textarea { height: 100px; }
 .field_help {
 	display: block;
diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php
index 80cb79c20f..018c50a88a 100644
--- a/view/theme/frost-mobile/theme.php
+++ b/view/theme/frost-mobile/theme.php
@@ -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.10
+ * Version: Version 0.2.11
  * Author: Zach P <techcity@f.shmuz.in>
  * Maintainer: Zach P <techcity@f.shmuz.in>
  */
diff --git a/view/theme/frost/field_themeselect.tpl b/view/theme/frost/field_themeselect.tpl
index 3aa973d47b..d8ddc2fc74 100644
--- a/view/theme/frost/field_themeselect.tpl
+++ b/view/theme/frost/field_themeselect.tpl
@@ -1,7 +1,7 @@
 
 	<div class='field select'>
 		<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 }}
 		</select>
 		<span class='field_help'>$field.3</span>
diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css
index fa06ef7eda..bc0d57f0c2 100644
--- a/view/theme/frost/style.css
+++ b/view/theme/frost/style.css
@@ -375,6 +375,14 @@ div.wall-item-content-wrapper.shiny {
 #theme-preview {
 	margin: 15px 0 15px 150px;
 }
+#theme-version {
+	display: block;
+	font-weight: bold;
+}
+#theme-credits {
+	margin-top: 15px;
+	margin-bottom: 15px;
+}
 
 /* from default */
 #jot-perms-icon, 
@@ -3167,6 +3175,10 @@ aside input[type='text'] {
 .field textarea {
 	width: 400px;
 }
+.field input[type=checkbox],
+.field input[type=radio] {
+	width: auto;
+}
 .field textarea { height: 100px; }
 .field_help {
 	display: block;
@@ -3823,11 +3835,4 @@ ul.notifications-menu-popup {
 	width: 130px;
 }
 
-#theme-version {
-	display: block;
-	font-weight: bold;
-}
-#theme-credits {
-	margin-top: 15px;
-	margin-bottom: 15px;
-}
+
diff --git a/view/theme/frost/theme.php b/view/theme/frost/theme.php
index 795f69b714..7133c36e0e 100644
--- a/view/theme/frost/theme.php
+++ b/view/theme/frost/theme.php
@@ -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.8
+ * Version: Version 0.2.9
  * Author: Zach P <techcity@f.shmuz.in>
  * Maintainer: Zach P <techcity@f.shmuz.in>
  */
diff --git a/view/vcard-widget.tpl b/view/vcard-widget.tpl
new file mode 100644
index 0000000000..d00099adba
--- /dev/null
+++ b/view/vcard-widget.tpl
@@ -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>
+
-- 
2.39.5