Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
This commit is contained in:
commit
d636ff586d
@ -8,7 +8,7 @@ class Bookmarks extends \Zotlabs\Web\Controller {
|
||||
if(! local_channel())
|
||||
return;
|
||||
|
||||
nav_set_selected(t('View Bookmarks'));
|
||||
nav_set_selected('View Bookmarks');
|
||||
|
||||
$item_id = intval($_REQUEST['item']);
|
||||
$burl = trim($_REQUEST['burl']);
|
||||
|
@ -824,7 +824,7 @@ class Cdav extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
if(argv(1) === 'calendar') {
|
||||
nav_set_selected(t('CalDAV'));
|
||||
nav_set_selected('CalDAV');
|
||||
$caldavBackend = new \Sabre\CalDAV\Backend\PDO($pdo);
|
||||
$calendars = $caldavBackend->getCalendarsForUser($principalUri);
|
||||
}
|
||||
@ -1025,7 +1025,7 @@ class Cdav extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
||||
if(argv(1) === 'addressbook') {
|
||||
nav_set_selected(t('CardDAV'));
|
||||
nav_set_selected('CardDAV');
|
||||
$carddavBackend = new \Sabre\CardDAV\Backend\PDO($pdo);
|
||||
$addressbooks = $carddavBackend->getAddressBooksForUser($principalUri);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
else {
|
||||
if(\App::$profile['profile_uid'] == local_channel()) {
|
||||
nav_set_selected(t('Channel Home'));
|
||||
nav_set_selected('Channel Home');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class Chat extends \Zotlabs\Web\Controller {
|
||||
|
||||
if(local_channel()) {
|
||||
$channel = \App::get_channel();
|
||||
nav_set_selected(t('My Chatrooms'));
|
||||
nav_set_selected('My Chatrooms');
|
||||
}
|
||||
|
||||
$ob = \App::get_observer();
|
||||
|
@ -30,7 +30,7 @@ class Connections extends \Zotlabs\Web\Controller {
|
||||
return login();
|
||||
}
|
||||
|
||||
nav_set_selected(t('Connections'));
|
||||
nav_set_selected('Connections');
|
||||
|
||||
$blocked = false;
|
||||
$hidden = false;
|
||||
|
@ -77,7 +77,7 @@ class Directory extends \Zotlabs\Web\Controller {
|
||||
$pubforums = get_directory_setting($observer, 'pubforums');
|
||||
|
||||
$o = '';
|
||||
nav_set_selected(t('Directory'));
|
||||
nav_set_selected('Directory');
|
||||
|
||||
if(x($_POST,'search'))
|
||||
$search = notags(trim($_POST['search']));
|
||||
|
@ -272,7 +272,7 @@ class Events extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Events'));
|
||||
nav_set_selected('Events');
|
||||
|
||||
if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) {
|
||||
$r = q("update event set dismissed = 1 where id = %d and uid = %d",
|
||||
|
@ -15,7 +15,7 @@ require_once('include/help.php');
|
||||
class Help extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
nav_set_selected(t('Help'));
|
||||
nav_set_selected('Help');
|
||||
|
||||
if($_REQUEST['search']) {
|
||||
$o .= '<div id="help-content" class="generic-content-wrapper">';
|
||||
|
@ -95,7 +95,7 @@ class Invite extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Invite'));
|
||||
nav_set_selected('Invite');
|
||||
|
||||
$tpl = get_markup_template('invite.tpl');
|
||||
$invonly = false;
|
||||
|
@ -5,7 +5,7 @@ namespace Zotlabs\Module;
|
||||
class Lang extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
nav_set_selected(t('Language'));
|
||||
nav_set_selected('Language');
|
||||
return lang_selector();
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
function get() {
|
||||
|
||||
$o = '';
|
||||
nav_set_selected(t('Mail'));
|
||||
nav_set_selected('Mail');
|
||||
|
||||
if(! local_channel()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
|
@ -117,7 +117,7 @@ class Mood extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Mood'));
|
||||
nav_set_selected('Mood');
|
||||
|
||||
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
|
||||
|
||||
|
@ -154,7 +154,7 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
));
|
||||
}
|
||||
|
||||
nav_set_selected(t('Activity'));
|
||||
nav_set_selected('Grid');
|
||||
|
||||
$channel_acl = array(
|
||||
'allow_cid' => $channel['channel_allow_cid'],
|
||||
|
@ -555,7 +555,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
$sql_extra = permissions_sql($owner_uid,get_observer_hash(),'photo');
|
||||
$sql_attach = permissions_sql($owner_uid,get_observer_hash(),'attach');
|
||||
|
||||
nav_set_selected(t('Photos'));
|
||||
nav_set_selected('Photos');
|
||||
|
||||
$o = "";
|
||||
|
||||
|
@ -150,7 +150,7 @@ class Poke extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Poke'));
|
||||
nav_set_selected('Poke');
|
||||
|
||||
$name = '';
|
||||
$id = '';
|
||||
|
@ -8,7 +8,7 @@ class Probe extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
|
||||
nav_set_selected(t('Remote Diagnostics'));
|
||||
nav_set_selected('Remote Diagnostics');
|
||||
|
||||
$o .= '<h3>Probe Diagnostic</h3>';
|
||||
|
||||
|
@ -61,7 +61,7 @@ class Rpost extends \Zotlabs\Web\Controller {
|
||||
return login();
|
||||
}
|
||||
|
||||
nav_set_selected(t('Post'));
|
||||
nav_set_selected('Post');
|
||||
|
||||
// If we have saved rpost session variables, but nothing in the current $_REQUEST, recover the saved variables
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
if($load)
|
||||
$_SESSION['loadtime'] = datetime_convert();
|
||||
|
||||
nav_set_selected(t('Search'));
|
||||
nav_set_selected('Search');
|
||||
|
||||
require_once("include/bbcode.php");
|
||||
require_once('include/security.php');
|
||||
|
@ -29,7 +29,7 @@ class Suggest extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Suggest Channels'));
|
||||
nav_set_selected('Suggest Channels');
|
||||
|
||||
$_SESSION['return_url'] = z_root() . '/' . \App::$cmd;
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Webpages extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
nav_set_selected(t('Webpages'));
|
||||
nav_set_selected('Webpages');
|
||||
|
||||
$which = argv(1);
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
|
||||
$wiki_owner = true;
|
||||
|
||||
nav_set_selected(t('Wiki'));
|
||||
nav_set_selected('Wiki');
|
||||
|
||||
// Obtain the default permission settings of the channel
|
||||
$owner_acl = array(
|
||||
|
@ -244,7 +244,7 @@ class Browser extends DAV\Browser\Plugin {
|
||||
|
||||
$a = false;
|
||||
|
||||
nav_set_selected(t('Files'));
|
||||
nav_set_selected('Files');
|
||||
|
||||
\App::$page['content'] = $html;
|
||||
load_pdl();
|
||||
|
@ -103,12 +103,12 @@ EOT;
|
||||
$nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
|
||||
|
||||
// user menu
|
||||
$nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['active'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
|
||||
$nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['name'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
|
||||
|
||||
if(feature_enabled(local_channel(),'multi_profiles'))
|
||||
$nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
|
||||
$nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
|
||||
else
|
||||
$nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
|
||||
$nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
|
||||
|
||||
}
|
||||
else {
|
||||
@ -233,6 +233,15 @@ EOT;
|
||||
// turned off until somebody discovers this and figures out a good location for it.
|
||||
$powered_by = '';
|
||||
|
||||
$active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1",
|
||||
intval($channel['channel_id']),
|
||||
dbesc(\App::$nav_sel['raw_name'])
|
||||
);
|
||||
|
||||
if($active_app) {
|
||||
$url = $active_app[0]['app_url'];
|
||||
}
|
||||
|
||||
//app bin
|
||||
if($is_owner) {
|
||||
if(get_pconfig(local_channel(), 'system','initial_import_system_apps') === false) {
|
||||
@ -258,7 +267,7 @@ EOT;
|
||||
$syslist = Zlib\Apps::app_order(local_channel(),$syslist);
|
||||
|
||||
foreach($syslist as $app) {
|
||||
if(\App::$nav_sel['active'] == $app['name'])
|
||||
if(\App::$nav_sel['name'] == $app['name'])
|
||||
$app['active'] = true;
|
||||
|
||||
if($is_owner) {
|
||||
@ -297,7 +306,7 @@ EOT;
|
||||
'$userinfo' => $x['usermenu'],
|
||||
'$localuser' => local_channel(),
|
||||
'$is_owner' => $is_owner,
|
||||
'$sel' => App::$nav_sel,
|
||||
'$sel' => App::$nav_sel,
|
||||
'$powered_by' => $powered_by,
|
||||
'$help' => t('@name, #tag, ?doc, content'),
|
||||
'$pleasewait' => t('Please wait...'),
|
||||
@ -309,7 +318,7 @@ EOT;
|
||||
'$addapps' => t('Add Apps'),
|
||||
'$orderapps' => t('Arrange Apps'),
|
||||
'$sysapps_toggle' => t('Toggle System Apps'),
|
||||
'$loc' => $myident
|
||||
'$url' => $url
|
||||
));
|
||||
|
||||
if(x($_SESSION, 'reload_avatar') && $observer) {
|
||||
@ -332,7 +341,10 @@ EOT;
|
||||
*
|
||||
*/
|
||||
function nav_set_selected($item){
|
||||
App::$nav_sel['active'] = $item;
|
||||
App::$nav_sel['raw_name'] = $item;
|
||||
$item = ['name' => $item];
|
||||
Zlib\Apps::translate_system_apps($item);
|
||||
App::$nav_sel['name'] = $item['name'];
|
||||
}
|
||||
|
||||
|
||||
|
@ -445,10 +445,10 @@ function NavUpdate() {
|
||||
updateCountsOnly = false;
|
||||
|
||||
if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) {
|
||||
$('#notifications-btn').css('opacity', 1);
|
||||
$('#notifications-btn, #notifications-btn-1').css('opacity', 1);
|
||||
}
|
||||
else {
|
||||
$('#notifications-btn').css('opacity', 0.5);
|
||||
$('#notifications-btn, #notifications-btn-1').css('opacity', 0.5);
|
||||
$('#navbar-collapse-1').removeClass('show');
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div id="page-footer"></div>
|
||||
<div id="pause"></div>
|
||||
</section>
|
||||
<aside id="region_3" class="d-none d-xl-table-cell"><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></aside>
|
||||
<aside id="region_3" class="d-none d-xl-table-cell"><div id="right_aside_spacer"><div id="right_aside_wrapper"><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></div></div></aside>
|
||||
</main>
|
||||
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
|
||||
</body>
|
||||
|
@ -161,6 +161,10 @@ nav {
|
||||
filter:alpha(opacity=$nav_percent_min_opacity);
|
||||
}
|
||||
|
||||
#nav-app-link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#powered-by {
|
||||
font-size: 0.5rem;
|
||||
position: absolute;
|
||||
|
@ -22,13 +22,13 @@ $(document).ready(function() {
|
||||
parent: 'main',
|
||||
spacer: '#left_aside_spacer'
|
||||
});
|
||||
$('#right_aside_wrapper').stick_in_parent({
|
||||
offset_top: parseInt($('#region_3').css('padding-top')),
|
||||
parent: 'main',
|
||||
spacer: '#right_aside_spacer'
|
||||
});
|
||||
}
|
||||
|
||||
if(($(window).width() < 767) && ($('#left_aside_wrapper .widget, #left_aside_wrapper .vcard').length > 0))
|
||||
$('#expand-aside').show();
|
||||
else
|
||||
$('#expand-aside').hide();
|
||||
|
||||
$('#expand-aside').on('click', toggleAside);
|
||||
|
||||
$('section').on('click', function() {
|
||||
@ -64,8 +64,14 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
var notifications_parent = $('#notifications')[0].parentElement.id;
|
||||
$('#notifications-btn-1').click(function() {
|
||||
$('#region_3').toggleClass('fs');
|
||||
if($('#notifications').hasClass('fs'))
|
||||
$('#notifications').prependTo('#' + notifications_parent);
|
||||
else
|
||||
$('#notifications').prependTo('body');
|
||||
|
||||
$('#notifications').toggleClass('fs');
|
||||
if($('#navbar-collapse-2').hasClass('show')){
|
||||
$('#navbar-collapse-2').removeClass('show');
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
<a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a>
|
||||
{{/foreach}}
|
||||
{{if $nav.manage}}
|
||||
<a class="dropdown-item{{if $sel.active == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
|
||||
<a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
|
||||
{{/if}}
|
||||
{{if $nav.channels}}
|
||||
{{foreach $nav.channels as $chan}}
|
||||
@ -34,11 +34,11 @@
|
||||
{{/if}}
|
||||
{{if $nav.settings}}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item{{if $sel.active == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a>
|
||||
<a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a>
|
||||
{{/if}}
|
||||
{{if $nav.admin}}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item{{if $sel.active == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a>
|
||||
<a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a>
|
||||
{{/if}}
|
||||
{{if $nav.logout}}
|
||||
<div class="dropdown-divider"></div>
|
||||
@ -53,6 +53,9 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="navbar-nav mr-auto">
|
||||
<div><a id="nav-app-link" href="{{$url}}" class="nav-link">{{$sel.name}}</a></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="navbar-toggler-right">
|
||||
{{if $nav.help.6}}
|
||||
@ -60,7 +63,7 @@
|
||||
<i class="fa fa-question-circle"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
|
||||
<button id="expand-aside" type="button" class="d-md-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
|
||||
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
|
||||
</button>
|
||||
{{if ! $experimental_notif}}
|
||||
@ -212,9 +215,7 @@
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div class="navbar-nav mr-auto">
|
||||
<div class="text-white">{{$sel.active}}</div>
|
||||
</div>
|
||||
<div class="navbar-text mr-auto d-none d-xl-flex"></div>
|
||||
{{/if}}
|
||||
<div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div>
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
<style>
|
||||
#notifications {
|
||||
position: fixed;
|
||||
top: 4.5rem;
|
||||
width: 266px;
|
||||
padding: 0 .5rem;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
max-height: 50vh;
|
||||
max-height: 70vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@ -19,30 +12,25 @@
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
display: block !important;
|
||||
padding: 4.5rem .5rem 0 .5rem;
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100vh;
|
||||
z-index: 1020;
|
||||
}
|
||||
|
||||
.fs #notifications {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
top: 0px;
|
||||
z-index: 1030;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="nav-notifications-template" rel="template">
|
||||
<a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
|
||||
<img class="menu-img-3" data-src="{1}">
|
||||
<span class="contactname">{2}</span>
|
||||
<span class="dropdown-sub-text">{3}<br>{4}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="notifications" class="navbar-nav" data-children=".nav-item">
|
||||
<div id="nav-notifications-template" rel="template">
|
||||
<a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
|
||||
<img class="menu-img-3" data-src="{1}">
|
||||
<span class="contactname">{2}</span>
|
||||
<span class="dropdown-sub-text">{3}<br>{4}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{foreach $notifications as $notification}}
|
||||
<div class="collapse {{$notification.type}}-button">
|
||||
<a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu">
|
||||
|
Reference in New Issue
Block a user