Give the UI a little love after all the backend mods
This commit is contained in:
parent
2b95ce9f07
commit
ceeb4db6e3
@ -13,6 +13,25 @@ function nav(&$a) {
|
||||
if(!(x($a->page,'nav')))
|
||||
$a->page['nav'] = '';
|
||||
|
||||
$base = $a->get_baseurl($ssl_state);
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
var a;
|
||||
a = $("#nav-search-text").autocomplete({
|
||||
serviceUrl: '$base/acl',
|
||||
minChars: 2,
|
||||
width: 250,
|
||||
});
|
||||
a.setOptions({ params: { type: 'x' }});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
EOT;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Placeholder div for popup panel
|
||||
*/
|
||||
@ -53,6 +72,7 @@ function nav(&$a) {
|
||||
// user menu
|
||||
$nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('Status'), "", t('Your posts and conversations'));
|
||||
$nav['usermenu'][] = Array('profile/' . $channel['channel_address']. '?tab=profile', t('Profile'), "", t('Your profile page'));
|
||||
|
||||
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'));
|
||||
$nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events'));
|
||||
|
||||
@ -153,8 +173,8 @@ function nav(&$a) {
|
||||
$banner = get_config('system','banner');
|
||||
|
||||
if($banner === false)
|
||||
$banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/fred-32.png" alt="logo" /></a>';
|
||||
|
||||
// $banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/fred-32.png" alt="logo" /></a>';
|
||||
$banner = '';
|
||||
|
||||
$tpl = get_markup_template('nav.tpl');
|
||||
|
||||
|
@ -384,12 +384,14 @@ if($a->is_mobile || $a->is_tablet) {
|
||||
else {
|
||||
$link = $a->get_baseurl() . '/toggle_mobile?off=1&address=' . curPageURL();
|
||||
}
|
||||
$a->page['footer'] = replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
|
||||
$a->page['footer'] .= replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
|
||||
'$toggle_link' => $link,
|
||||
'$toggle_text' => t('toggle mobile')
|
||||
));
|
||||
}
|
||||
|
||||
$a->page['footer'] .= '<div id="powered-by">' . t("Friendica Red") . '</div>';
|
||||
|
||||
$page = $a->page;
|
||||
$profile = $a->profile;
|
||||
|
||||
|
@ -45,7 +45,6 @@ function abook_init(&$a) {
|
||||
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
|
21
mod/acl.php
21
mod/acl.php
@ -4,8 +4,6 @@
|
||||
require_once("include/acl_selectors.php");
|
||||
|
||||
function acl_init(&$a){
|
||||
if(!local_user())
|
||||
return "";
|
||||
|
||||
|
||||
$start = (x($_REQUEST,'start')?$_REQUEST['start']:0);
|
||||
@ -22,12 +20,19 @@ function acl_init(&$a){
|
||||
$search = $_REQUEST['query'];
|
||||
}
|
||||
|
||||
logger("acl: $search");
|
||||
|
||||
if(! (local_user() || $type == 'x'))
|
||||
return "";
|
||||
|
||||
|
||||
|
||||
if ($search!=""){
|
||||
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
|
||||
$sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
|
||||
$sql_extra3 = "AND ( xchan_name like '%%" . dbesc($search) . "%%' )";
|
||||
} else {
|
||||
$sql_extra = $sql_extra2 = "";
|
||||
$sql_extra = $sql_extra2 = $sql_extra3 = "";
|
||||
}
|
||||
|
||||
// count groups and contacts
|
||||
@ -142,11 +147,19 @@ function acl_init(&$a){
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
elseif($type == 'x') {
|
||||
$r = q("SELECT xchan_name as id, xchan_name as name, xchan_photo_s as micro, xchan_profile as url from xchan
|
||||
where 1
|
||||
$sql_extra3
|
||||
ORDER BY `xchan_name` ASC ",
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
else
|
||||
$r = array();
|
||||
|
||||
|
||||
if($type == 'm' || $type == 'a') {
|
||||
if($type == 'm' || $type == 'a' || $type == 'x') {
|
||||
$x = array();
|
||||
$x['query'] = $search;
|
||||
$x['photos'] = array();
|
||||
|
@ -45,7 +45,6 @@ function contacts_init(&$a) {
|
||||
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
|
@ -18,7 +18,6 @@ function message_init(&$a) {
|
||||
));
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
|
@ -102,8 +102,6 @@ function network_init(&$a) {
|
||||
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
|
@ -156,7 +156,6 @@ function poke_content(&$a) {
|
||||
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
|
@ -127,7 +127,7 @@ function profile_content(&$a, $update = 0) {
|
||||
if(x($_GET,'tab'))
|
||||
$tab = notags(trim($_GET['tab']));
|
||||
|
||||
$o.=profile_tabs($a, $is_owner, $a->profile['nickname']);
|
||||
// $o.=profile_tabs($a, $is_owner, $a->profile['nickname']);
|
||||
|
||||
|
||||
if($tab === 'profile') {
|
||||
|
@ -1 +1 @@
|
||||
2012-10-23.116
|
||||
2012-10-24.117
|
||||
|
@ -17,6 +17,7 @@ head_add_js('js/fk.autocomplete.js');
|
||||
head_add_js('library/fancybox/jquery.fancybox-1.3.4.pack.js');
|
||||
head_add_js('library/jquery.timeago.js');
|
||||
head_add_js('library/jquery.divgrow/jquery.divgrow-1.3.1.js');
|
||||
head_add_js('library/jquery_ac/friendica.complete.js');
|
||||
head_add_js('library/tiptip/jquery.tipTip.minified.js');
|
||||
head_add_js('library/jgrowl/jquery.jgrowl_minimized.js');
|
||||
head_add_js('library/tinymce/jscripts/tiny_mce/tiny_mce_src.js');
|
||||
|
@ -243,7 +243,16 @@ nav #nav-link-wrapper .nav-link {
|
||||
footer {
|
||||
text-align: right;
|
||||
padding-bottom: 1em;
|
||||
padding-right: 3em;
|
||||
padding-right: 3em;
|
||||
}
|
||||
|
||||
#powered-by {
|
||||
position: fixed;
|
||||
bottom: 1px;
|
||||
left: 15px;
|
||||
opacity: 0.3;
|
||||
filter:alpha(opacity=30);
|
||||
|
||||
}
|
||||
|
||||
.birthday-today, .event-today {
|
||||
@ -2366,6 +2375,24 @@ aside input[type='text'] {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
#nav-searchbar {
|
||||
float: right;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
#nav-search-text:hover {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
#nav-search-text {
|
||||
border-radius: 14px;
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
|
||||
#nav-user-linkmenu img {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.location-label, .gender-label, .marital-label, .homepage-label {
|
||||
float: left;
|
||||
text-align: right;
|
||||
@ -3362,7 +3389,7 @@ nav .nav-menu {
|
||||
border-bottom: 3px solid #888888;
|
||||
}
|
||||
nav .nav-menu.selected {
|
||||
border-bottom: 3px solid #FF8888;
|
||||
border-bottom: 4px solid #000000;
|
||||
}
|
||||
nav .nav-notify {
|
||||
display: none;
|
||||
@ -3520,8 +3547,8 @@ ul.menu-popup {
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
z-index: 100000;
|
||||
top: 90px;
|
||||
left: 400px;
|
||||
/* top: 90px; */
|
||||
/* left: 400px; */
|
||||
}
|
||||
#nav-notifications-menu {
|
||||
width: 320px;
|
||||
|
@ -54,29 +54,23 @@
|
||||
|
||||
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
|
||||
<ul id="nav-site-menu" class="menu-popup">
|
||||
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
|
||||
|
||||
{{ if $nav.settings }}<li><a class="$nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
|
||||
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
|
||||
{{ if $nav.profiles }}<li><a class="$nav.profiles.2" href="$nav.profiles.0" title="$nav.profiles.3">$nav.profiles.1</a></li>{{ endif }}
|
||||
|
||||
{{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
|
||||
|
||||
{{ if $nav.logout }}<li><a class="menu-sep $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a></li>{{ endif }}
|
||||
{{ if $nav.login }}<li><a class="$nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a><li>{{ endif }}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
{{ if $nav.help }}
|
||||
<li id="nav-help-link" class="nav-menu $sel.help">
|
||||
<a class="$nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a>
|
||||
</li>
|
||||
{{ endif }}
|
||||
|
||||
<li id="nav-search-link" class="nav-menu $sel.search">
|
||||
<a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a>
|
||||
</li>
|
||||
<li id="nav-directory-link" class="nav-menu $sel.directory">
|
||||
<a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a>
|
||||
</li>
|
||||
|
||||
{{ if $nav.apps }}
|
||||
<li id="nav-apps-link" class="nav-menu $sel.apps">
|
||||
<a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a>
|
||||
@ -87,8 +81,19 @@
|
||||
</ul>
|
||||
</li>
|
||||
{{ endif }}
|
||||
|
||||
<li id="nav-searchbar">
|
||||
<form method="get" action="search">
|
||||
<input id="nav-search-text" type="text" value="" placeholder="$nav.search.1" name="search" title="$nav.search.3" onclick="this.submit();" />
|
||||
</form>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
<ul id="nav-notifications-template" style="display:none;" rel="template">
|
||||
<li><a href="{0}"><img src="{1}">{2} <span class="notif-when">{3}</span></a></li>
|
||||
|
Reference in New Issue
Block a user