Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
zotlabs 2017-11-09 18:36:40 -08:00
commit 71a30cd9a5
7 changed files with 35 additions and 3 deletions

View File

@ -11,6 +11,10 @@ class Cloud_tiles extends \Zotlabs\Web\Controller {
else else
$_SESSION['cloud_tiles'] = 1; $_SESSION['cloud_tiles'] = 1;
if(local_channel()) {
set_pconfig(local_channel(),'system','cloud_tiles',$_SESSION['cloud_tiles']);
}
goaway(z_root() . '/' . hex2bin(argv(1))); goaway(z_root() . '/' . hex2bin(argv(1)));
} }

View File

@ -494,7 +494,7 @@ class Wiki extends \Zotlabs\Web\Controller {
return; //not reached return; //not reached
} }
$wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], $arr['urlName']); $wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], urldecode($arr['urlName']));
if($wiki['resource_id']) { if($wiki['resource_id']) {

View File

@ -139,6 +139,7 @@ class Notifications {
} }
$o = replace_macros(get_markup_template('notifications_widget.tpl'), array( $o = replace_macros(get_markup_template('notifications_widget.tpl'), array(
'$module' => \App::$module,
'$notifications' => $notifications, '$notifications' => $notifications,
'$loading' => t('Loading...') '$loading' => t('Loading...')
)); ));

View File

@ -264,6 +264,7 @@ function change_channel($change_channel) {
App::set_channel($r[0]); App::set_channel($r[0]);
$_SESSION['theme'] = $r[0]['channel_theme']; $_SESSION['theme'] = $r[0]['channel_theme'];
$_SESSION['mobile_theme'] = get_pconfig(local_channel(),'system', 'mobile_theme'); $_SESSION['mobile_theme'] = get_pconfig(local_channel(),'system', 'mobile_theme');
$_SESSION['cloud_tiles'] = get_pconfig(local_channel(),'system', 'cloud_tiles');
date_default_timezone_set($r[0]['channel_timezone']); date_default_timezone_set($r[0]['channel_timezone']);
$ret = $r[0]; $ret = $r[0];
} }

View File

@ -750,6 +750,7 @@ function collapseHeight() {
} }
function liveUpdate() { function liveUpdate() {
if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */ if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */
if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; } if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
if(($('.comment-edit-text.expanded').length) || (in_progress)) { if(($('.comment-edit-text.expanded').length) || (in_progress)) {
@ -791,7 +792,6 @@ function liveUpdate() {
var orgHeight = $("#region_2").height(); var orgHeight = $("#region_2").height();
} }
var dstart = new Date(); var dstart = new Date();
console.log('LOADING data...'); console.log('LOADING data...');
$.get(update_url, function(data) { $.get(update_url, function(data) {

View File

@ -1,6 +1,8 @@
/** /**
* redbasic theme specific JavaScript * redbasic theme specific JavaScript
*/ */
var notifications_parent;
$(document).ready(function() { $(document).ready(function() {
// CSS3 calc() fallback (for unsupported browsers) // CSS3 calc() fallback (for unsupported browsers)
@ -82,7 +84,7 @@ $(document).ready(function() {
} }
}); });
var notifications_parent = $('#notifications_wrapper')[0].parentElement.id; notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
$('#notifications-btn').click(function() { $('#notifications-btn').click(function() {
if($('#notifications_wrapper').hasClass('fs')) if($('#notifications_wrapper').hasClass('fs'))
$('#notifications_wrapper').prependTo('#' + notifications_parent); $('#notifications_wrapper').prependTo('#' + notifications_parent);

View File

@ -26,6 +26,30 @@
} }
</style> </style>
{{if $module == 'display'}}
<script>
$(document).on('click', '.notification', function(e) {
var mid = $(this)[0].pathname.substr(9);
var path = $(this)[0].pathname.substr(1,7);
if(path === 'display' && mid) {
e.preventDefault();
e.stopPropagation();
$('.thread-wrapper').remove();
$(this).fadeOut();
bParam_mid = mid;
mode = 'replace';
page_load = true;
liveUpdate();
if($('#notifications_wrapper').hasClass('fs'))
$('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); //var notifications_parent is defined in redbasic.js
}
});
</script>
{{/if}}
{{if $notifications}} {{if $notifications}}
<div id="notifications_wrapper"> <div id="notifications_wrapper">
<div id="notifications" class="navbar-nav" data-children=".nav-item"> <div id="notifications" class="navbar-nav" data-children=".nav-item">