aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/js/redbasic.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r--view/theme/redbasic/js/redbasic.js34
1 files changed, 13 insertions, 21 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 81a95c68b..b522f8dd1 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;
@@ -109,7 +101,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'
});