mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 23:55:16 +00:00
Merge branch 'dev' of /home/macgirvin/z into dev
This commit is contained in:
commit
e0844d8719
3 changed files with 49 additions and 47 deletions
|
@ -25,6 +25,10 @@ let liveRecurse = 0;
|
||||||
let savedTitle = '';
|
let savedTitle = '';
|
||||||
let initialLoad = true;
|
let initialLoad = true;
|
||||||
let cached_data = [];
|
let cached_data = [];
|
||||||
|
let mode = '';
|
||||||
|
let update_url = '';
|
||||||
|
let update_mode = '';
|
||||||
|
let orgHeight = 0;
|
||||||
|
|
||||||
$.ajaxPrefilter(function( options, original_Options, jqXHR ) {
|
$.ajaxPrefilter(function( options, original_Options, jqXHR ) {
|
||||||
options.async = true;
|
options.async = true;
|
||||||
|
@ -898,7 +902,7 @@ function collapseHeight() {
|
||||||
let position = $(window).scrollTop();
|
let position = $(window).scrollTop();
|
||||||
|
|
||||||
$(".wall-item-content, .directory-collapse").each(function() {
|
$(".wall-item-content, .directory-collapse").each(function() {
|
||||||
let orgHeight = $(this).outerHeight(true);
|
orgHeight = $(this).outerHeight(true);
|
||||||
if(orgHeight > divmore_height) {
|
if(orgHeight > divmore_height) {
|
||||||
if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) {
|
if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) {
|
||||||
|
|
||||||
|
@ -981,6 +985,8 @@ function updateInit() {
|
||||||
|
|
||||||
function liveUpdate(notify_id) {
|
function liveUpdate(notify_id) {
|
||||||
|
|
||||||
|
let origHeight = 0;
|
||||||
|
|
||||||
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; }
|
||||||
|
@ -1003,8 +1009,6 @@ function liveUpdate(notify_id) {
|
||||||
|
|
||||||
in_progress = true;
|
in_progress = true;
|
||||||
|
|
||||||
let update_url;
|
|
||||||
let update_mode;
|
|
||||||
|
|
||||||
if(scroll_next) {
|
if(scroll_next) {
|
||||||
bParam_page = next_page;
|
bParam_page = next_page;
|
||||||
|
@ -1025,7 +1029,7 @@ function liveUpdate(notify_id) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
update_mode = 'update';
|
update_mode = 'update';
|
||||||
let orgHeight = $("#region_2").height();
|
origHeight = $("#region_2").height();
|
||||||
}
|
}
|
||||||
|
|
||||||
let dstart = new Date();
|
let dstart = new Date();
|
||||||
|
@ -1079,7 +1083,7 @@ function liveUpdate(notify_id) {
|
||||||
|
|
||||||
// adjust scroll position if new content was added above viewport
|
// adjust scroll position if new content was added above viewport
|
||||||
if(update_mode === 'update' && !justifiedGalleryActive) {
|
if(update_mode === 'update' && !justifiedGalleryActive) {
|
||||||
$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
|
$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - origHeight + contentHeightDiff);
|
||||||
}
|
}
|
||||||
|
|
||||||
in_progress = false;
|
in_progress = false;
|
||||||
|
@ -1107,8 +1111,6 @@ function pageUpdate() {
|
||||||
|
|
||||||
in_progress = true;
|
in_progress = true;
|
||||||
|
|
||||||
let update_url;
|
|
||||||
let update_mode;
|
|
||||||
|
|
||||||
if(scroll_next) {
|
if(scroll_next) {
|
||||||
bParam_page = next_page;
|
bParam_page = next_page;
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var bParam_cmd = "{{$baseurl}}/update/{{$pgtype}}";
|
let bParam_cmd = "{{$baseurl}}/update/{{$pgtype}}";
|
||||||
|
|
||||||
|
|
||||||
var bParam_uid = {{$uid}};
|
let bParam_uid = {{$uid}};
|
||||||
// lists can be either type string (virtual lists) or integer (normal accesslists)
|
// lists can be either type string (virtual lists) or integer (normal accesslists)
|
||||||
var bParam_gid = "{{$gid}}";
|
let bParam_gid = "{{$gid}}";
|
||||||
var bParam_cid = {{$cid}};
|
let bParam_cid = {{$cid}};
|
||||||
var bParam_cmin = {{$cmin}};
|
let bParam_cmin = {{$cmin}};
|
||||||
var bParam_cmax = {{$cmax}};
|
let bParam_cmax = {{$cmax}};
|
||||||
var bParam_star = {{$star}};
|
let bParam_star = {{$star}};
|
||||||
var bParam_liked = {{$liked}};
|
let bParam_liked = {{$liked}};
|
||||||
var bParam_conv = {{$conv}};
|
let bParam_conv = {{$conv}};
|
||||||
var bParam_spam = {{$spam}};
|
let bParam_spam = {{$spam}};
|
||||||
var bParam_new = {{$nouveau}};
|
let bParam_new = {{$nouveau}};
|
||||||
var bParam_page = {{$page}};
|
let bParam_page = {{$page}};
|
||||||
var bParam_wall = {{$wall}};
|
let bParam_wall = {{$wall}};
|
||||||
var bParam_draft = {{$draft}};
|
let bParam_draft = {{$draft}};
|
||||||
var bParam_list = {{$list}};
|
let bParam_list = {{$list}};
|
||||||
var bParam_fh = {{$fh}};
|
let bParam_fh = {{$fh}};
|
||||||
var bParam_dm = {{$dm}};
|
let bParam_dm = {{$dm}};
|
||||||
var bParam_static = {{$static}};
|
let bParam_static = {{$static}};
|
||||||
|
|
||||||
var bParam_search = "{{$search}}";
|
let bParam_search = "{{$search}}";
|
||||||
var bParam_xchan = "{{$xchan}}";
|
let bParam_xchan = "{{$xchan}}";
|
||||||
var bParam_order = "{{$order}}";
|
let bParam_order = "{{$order}}";
|
||||||
var bParam_file = "{{$file}}";
|
let bParam_file = "{{$file}}";
|
||||||
var bParam_cats = "{{$cats}}";
|
let bParam_cats = "{{$cats}}";
|
||||||
var bParam_tags = "{{$tags}}";
|
let bParam_tags = "{{$tags}}";
|
||||||
var bParam_dend = "{{$dend}}";
|
let bParam_dend = "{{$dend}}";
|
||||||
var bParam_dbegin = "{{$dbegin}}";
|
let bParam_dbegin = "{{$dbegin}}";
|
||||||
var bParam_mid = "{{$mid}}";
|
let bParam_mid = "{{$mid}}";
|
||||||
var bParam_verb = "{{$verb}}";
|
let bParam_verb = "{{$verb}}";
|
||||||
var bParam_net = "{{$net}}";
|
let bParam_net = "{{$net}}";
|
||||||
var bParam_pf = "{{$pf}}";
|
let bParam_pf = "{{$pf}}";
|
||||||
|
|
||||||
function buildCmd() {
|
function buildCmd() {
|
||||||
var udargs = ((page_load) ? "/load" : "");
|
let udargs = ((page_load) ? "/load" : "");
|
||||||
var bCmd = bParam_cmd + udargs + "?f=" ;
|
let bCmd = bParam_cmd + udargs + "?f=" ;
|
||||||
if(bParam_uid) bCmd = bCmd + "&p=" + bParam_uid;
|
if(bParam_uid) bCmd = bCmd + "&p=" + bParam_uid;
|
||||||
if(bParam_cmin != (-1)) bCmd = bCmd + "&cmin=" + bParam_cmin;
|
if(bParam_cmin != (-1)) bCmd = bCmd + "&cmin=" + bParam_cmin;
|
||||||
if(bParam_cmax != (-1)) bCmd = bCmd + "&cmax=" + bParam_cmax;
|
if(bParam_cmax != (-1)) bCmd = bCmd + "&cmax=" + bParam_cmax;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{if $notifications}}
|
{{if $notifications}}
|
||||||
<script>
|
<script>
|
||||||
var notifications_parent;
|
let notifications_parent = 0;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
|
notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
|
||||||
|
@ -31,10 +31,10 @@
|
||||||
|
|
||||||
{{if $module == 'display' || $module == 'hq' || $startpage == 'hq'}}
|
{{if $module == 'display' || $module == 'hq' || $startpage == 'hq'}}
|
||||||
$(document).on('click', '.notification', function(e) {
|
$(document).on('click', '.notification', function(e) {
|
||||||
var b64mid = $(this).data('b64mid');
|
let b64mid = $(this).data('b64mid');
|
||||||
var notify_id = $(this).data('notify_id');
|
let notify_id = $(this).data('notify_id');
|
||||||
var path = $(this)[0].pathname.substr(1,7);
|
let path = $(this)[0].pathname.substr(1,7);
|
||||||
var stateObj = { b64mid: b64mid };
|
let stateObj = { b64mid: b64mid };
|
||||||
|
|
||||||
if(b64mid === 'undefined' && notify_id === 'undefined')
|
if(b64mid === 'undefined' && notify_id === 'undefined')
|
||||||
return;
|
return;
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
$('#cn-{{$notification.type}}-input-clear').addClass('d-none');
|
$('#cn-{{$notification.type}}-input-clear').addClass('d-none');
|
||||||
});
|
});
|
||||||
$(document).on('input', '#cn-{{$notification.type}}-input', function(e) {
|
$(document).on('input', '#cn-{{$notification.type}}-input', function(e) {
|
||||||
var val = $('#cn-{{$notification.type}}-input').val().toString().toLowerCase();
|
let val = $('#cn-{{$notification.type}}-input').val().toString().toLowerCase();
|
||||||
|
|
||||||
if(val) {
|
if(val) {
|
||||||
$('#cn-{{$notification.type}}-only').addClass('active sticky-top');
|
$('#cn-{{$notification.type}}-only').addClass('active sticky-top');
|
||||||
|
@ -104,8 +104,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#nav-{{$notification.type}}-menu .notification").each(function(i, el){
|
$("#nav-{{$notification.type}}-menu .notification").each(function(i, el){
|
||||||
var cn = $(el).data('contact_name').toString().toLowerCase();
|
let cn = $(el).data('contact_name').toString().toLowerCase();
|
||||||
var ca = $(el).data('contact_addr').toString().toLowerCase();
|
let ca = $(el).data('contact_addr').toString().toLowerCase();
|
||||||
|
|
||||||
if(cn.indexOf(val) === -1 && ca.indexOf(val) === -1)
|
if(cn.indexOf(val) === -1 && ca.indexOf(val) === -1)
|
||||||
$(this).addClass('d-none');
|
$(this).addClass('d-none');
|
||||||
|
|
Loading…
Reference in a new issue