-
Notifications
You must be signed in to change notification settings - Fork 588
Fix issue #517: Menusheet (Menu Sheet) broken in Chrome #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
06afb6a
4869ca3
c487f99
8416ddc
f1286d7
c9c6ced
c6ad11a
bb2af07
babd1d7
1f50d40
6459d13
42f6e9c
0075567
e0202e2
4bf0433
4b84668
51483ca
23a0000
5b3e785
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
(function() { | ||
if ($.jQT) { | ||
$.jQT.addExtension(function(jQT) { | ||
$.fn.makeFloaty = function(options) { | ||
var settings; | ||
settings = $.extend({}, { | ||
align: 'top', | ||
spacing: 20, | ||
time: '.3s' | ||
}, options); | ||
if (settings.align !== 'top') { | ||
settings.align = 'bottom'; | ||
} | ||
return this.each(function() { | ||
var $el; | ||
$el = $(this); | ||
$el.css({ | ||
'transition': 'top ' + settings.time + ' ease-in-out', | ||
'display': 'block', | ||
'min-height': '0 !important' | ||
}).data('settings', settings); | ||
$(document).scroll(function() { | ||
if ($el.data('floatyVisible')) { | ||
return $el.scrollFloaty(); | ||
} | ||
}); | ||
return $el.scrollFloaty(); | ||
}); | ||
}; | ||
$.fn.scrollFloaty = function() { | ||
return this.each(function() { | ||
var $el, newY, settings, wHeight; | ||
$el = $(this); | ||
settings = $el.data('settings'); | ||
wHeight = $('html').attr('clientHeight'); | ||
newY = window.pageYOffset + (settings.align === 'top' ? settings.spacing : wHeight - settings.spacing - $el.get(0).offsetHeight); | ||
return $el.css('top', newY).data('floatyVisible', true); | ||
}); | ||
}; | ||
$.fn.hideFloaty = function() { | ||
return this.each(function() { | ||
var $el, oh; | ||
$el = $(this); | ||
oh = $el.get(0).offsetHeight; | ||
return $el.css('top', -oh - 10).data('floatyVisible', false); | ||
}); | ||
}; | ||
return $.fn.toggleFloaty = function() { | ||
return this.each(function() { | ||
var $el; | ||
$el = $(this); | ||
if ($el.data('floatyVisible')) { | ||
return $el.hideFloaty(); | ||
} else { | ||
return $el.scrollFloaty(); | ||
} | ||
}); | ||
}; | ||
}); | ||
} | ||
|
||
}).call(this); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
/* @group Menu Sheet */ | ||
|
||
#jqt > div.menusheet { | ||
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; | ||
box-sizing: border-box; | ||
height: 100%; | ||
width: 260px; | ||
} | ||
|
||
#jqt.black-translucent > div.menusheet { | ||
padding-top: 20px; | ||
} | ||
|
||
#jqt.menuopened { | ||
width: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
#jqt > .transition { | ||
-webkit-transition-property: translate3d, opacity, background-color; | ||
transition-property: translate3d, opacity, background-color; | ||
-webkit-transition-duration: 250ms; | ||
-webkit-transition-fill-mode: both; | ||
transition-duration: 250ms; | ||
transition-fill-mode: both; | ||
-webkit-transition-timing-function: ease-in-out; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @illucent, please revert this change, and do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reverted and removed -webkit-* prefix to make it more compatible |
||
transition-timing-function: ease-in-out; | ||
} | ||
|
||
#jqt.menuopened > .current { | ||
-webkit-transform: translate3d(260px, 0, 0) rotate(0) scale(1); | ||
-webkit-box-shadow: -3px 0px 3px rgba(63, 63, 63, 0.5); | ||
transform: translate3d(260px, 0, 0) rotate(0) scale(1); | ||
box-shadow: -3px 0px 3px rgba(63, 63, 63, 0.5); | ||
-webkit-transform-origin: 50% 50% 50%; | ||
transform-origin: 50% 50% 50%; | ||
-webkit-transform-style: flat; | ||
transform-style: flat; | ||
border-left: 0.5px solid rgba(127, 127, 127, 0.01); | ||
z-index: 20; | ||
} | ||
|
@@ -38,8 +48,13 @@ | |
} | ||
|
||
#jqt.menuopened > .menusheet.current { | ||
-webkit-transform: translate3d(0, 0, 0) rotate(0) scale(1); | ||
-webkit-box-shadow: none; | ||
-webkit-transform: translate3d(0, 0, 0) rotate(0) scale(1); | ||
transform: translate3d(0, 0, 0) rotate(0) scale(1); | ||
box-shadow: none; | ||
-webkit-transform-origin: 50% 50% 50%; | ||
transform-origin: 50% 50% 50%; | ||
-webkit-transform-style: flat; | ||
transform-style: flat; | ||
border-left: none; | ||
z-index: 0; | ||
} | ||
|
@@ -61,7 +76,8 @@ | |
padding-bottom: 10px; | ||
border-top: 1px solid #333; | ||
background-color: rgba(0, 0, 0, 0.25); | ||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(160, 168, 172, 0.75)), color-stop(0.08, rgba(112, 120, 128, 0.5)), color-stop(0.08, rgba(96, 102, 114, 0.5)), to(rgba(96, 102, 114, 0.5))); | ||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(160, 168, 172, 0.75)), color-stop(0.08, rgba(112, 120, 128, 0.5)), color-stop(0.08, rgba(96, 102, 114, 0.5)), to(rgba(96, 102, 114, 0.5))); /* FF3.6+ */ | ||
background: -ms-linear-gradient(top, #A0A8AC 75%, #707880 50%, #606672 50%, #606672 50%); /* IE10+ */ | ||
} | ||
|
||
/* @end */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@illucent, it should not be removed. The menu is not designed to be fully opened.
Please remove the changes to css.