Commit f675febb by Dányi Bence

one: jQuery gives wrong width (replaced with native dom methods)

parent 04b2c044
...@@ -64,11 +64,11 @@ $(function() { ...@@ -64,11 +64,11 @@ $(function() {
$('.quota .used').each(function() { $('.quota .used').each(function() {
var s = this; var s = this;
$(this).css('backgroundColor', function(w) { $(this).css('backgroundColor', function(w) {
return 'hsla(' + (120 - parseFloat(w) / 438 * 120).toFixed(0) + ',100%,50%,0.2)'; return 'hsla(' + (120 - parseFloat(w) / 100*120).toFixed(0) + ',100%,50%,0.2)';
}($(this).css('width'))); }($(this)[0].style.width));
if(parseInt($(this).css('width')) > 0) $(this).css('borderRight', function(w) { if(parseInt($(this).css('width')) > 0) $(this).css('borderRight', function(w) {
return '1px solid hsla(' + (120 - parseFloat(w) / 438 * 120).toFixed(0) + ',100%,30%,0.4)'; return '1px solid hsla(' + (120 - parseFloat(w) / 100 * 120).toFixed(0) + ',100%,30%,0.4)';
}($(this).css('width'))); }($(this)[0].style.width));
}); });
$('#new-folder').click(function() { $('#new-folder').click(function() {
$('#new-folder-form input')[0].focus(); $('#new-folder-form input')[0].focus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment