aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/js/redbasic.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-17 18:14:47 -0800
committerfriendica <info@friendica.com>2015-02-17 18:14:47 -0800
commit8c717f910acd0131bd4e0a31bbe47e6f03acffe9 (patch)
tree1500e4ec673075257ed3ac07db8a8d4f7491bd8a /view/theme/redbasic/js/redbasic.js
parent33e406d7fc74c1701ed4bb1d2a2b2a1bb330683f (diff)
parent0bedf3e5d28ef75a992da6d30b79d93220b8b1fb (diff)
downloadvolse-hubzilla-8c717f910acd0131bd4e0a31bbe47e6f03acffe9.tar.gz
volse-hubzilla-8c717f910acd0131bd4e0a31bbe47e6f03acffe9.tar.bz2
volse-hubzilla-8c717f910acd0131bd4e0a31bbe47e6f03acffe9.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r--view/theme/redbasic/js/redbasic.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 53ee45648..3db67dc87 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -1,9 +1,18 @@
$(document).ready(function() {
-if($(window).width() < 767) {
- $('main').css('width', $(window).width() + 231 );
+// CSS3 calc() fallback (for unsupported browsers)
+$('body').append('<div id="css3-calc" style="width: 10px; width: calc(10px + 10px); display: none;"></div>');
+if( $('#css3-calc').width() == 10) {
+ $(window).resize(function() {
+ if($(window).width() < 767) {
+ $('main').css('width', $(window).width() + 231 );
+ } else {
+ $('main').css('width', '100%' );
+ }
+ });
}
+$('#css3-calc').remove(); // Remove the test element
$('#expand-aside').click(function() {
$('#expand-aside-icon').toggleClass('icon-circle-arrow-right').toggleClass('icon-circle-arrow-left');