aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/js/redbasic.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-25 14:40:31 -0700
committerzotlabs <mike@macgirvin.com>2017-03-25 14:40:31 -0700
commite5e0a6b31f7870a46766c1e8ff87886fdb14b6de (patch)
tree7035d84f2edbc6b6efa435527ffdc3cd38b8027a /view/theme/redbasic/js/redbasic.js
parent5c63f7dd58c5b3b88efcc47120c791f92527f720 (diff)
parent2115eb26a7fd2ca937286bd4e98ab74c7d6e9525 (diff)
downloadvolse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.tar.gz
volse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.tar.bz2
volse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r--view/theme/redbasic/js/redbasic.js41
1 files changed, 15 insertions, 26 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 81a95c68b..14b977b80 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -16,14 +16,21 @@ $(document).ready(function() {
}
$('#css3-calc').remove(); // Remove the test element
+
+
if($(window).width() > 767) {
$('#left_aside_wrapper').stick_in_parent({
- offset_top: $('nav').outerHeight(true),
+ offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_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() {
@@ -41,29 +48,14 @@ $(document).ready(function() {
}
});
- if($('#left_aside_wrapper').length && $('#left_aside_wrapper').html().length === 0) {
- $('#expand-aside').hide();
- }
-
- $('#expand-tabs').click(function() {
- if(!$('#tabs-collapse-1').hasClass('in')){
- $('html, body').animate({ scrollTop: 0 }, 'slow');
+ $('.usermenu').click(function() {
+ if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){
+ $('#navbar-collapse-1, #navbar-collapse-2').removeClass('show');
}
- $('#expand-tabs-icon').toggleClass('fa-arrow-circle-down').toggleClass('fa-arrow-circle-up');
});
- $('.usermenu-head').click(function() {
- if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('in')){
- $('#navbar-collapse-1, #navbar-collapse-2').removeClass('in');
- }
- });
-
- if($('#tabs-collapse-1').length === 0) {
- $('#expand-tabs').hide();
- }
-
$("input[data-role=cat-tagsinput]").tagsinput({
- tagClass: 'label label-primary'
+ tagClass: 'badge badge-pill badge-warning'
});
var doctitle = document.title;
@@ -81,17 +73,14 @@ $(document).ready(function() {
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
- $('main').css({'transition': 'none'}).addClass('fullscreen');
- $('header, nav, aside, #fullscreen-btn').hide();
- $('#tabs-collapse-1').css({'visibility': 'hidden'});
+ $('main').addClass('fullscreen');
+ $('header, nav, aside, #fullscreen-btn').attr('style','display:none !important');
$('#inline-btn').show();
}
else {
$('main').removeClass('fullscreen');
$('header, nav, aside, #fullscreen-btn').show();
- $('#tabs-collapse-1').css({'visibility': ''});
$('#inline-btn').hide();
- $('main').css({'transition': ''});
$(document.body).trigger("sticky_kit:recalc");
}
}
@@ -109,7 +98,7 @@ function toggleAside() {
$('main').addClass('region_1-on')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({
- offset_top: $('nav').outerHeight(true) - 10,
+ offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_aside_spacer'
});