浏览代码

HUE-941 [core] Fix compatibility problems with IE8+

Fixed infinite loop in jHueTableScroller
Changed size of select on Beeswax and Catalog
Corrected CSS class for navbar highlight
Enrico Berti 12 年之前
父节点
当前提交
f536121

+ 1 - 1
apps/beeswax/src/beeswax/forms.py

@@ -128,7 +128,7 @@ class HQLForm(forms.Form):
                            label='',
                            choices=(('default', 'default'),),
                            initial=0,
-                           widget=forms.widgets.Select(attrs={'class': 'span6'}))
+                           widget=forms.widgets.Select(attrs={'class': 'input-medium'}))
 
 
 class FunctionForm(forms.Form):

+ 1 - 1
apps/catalog/src/catalog/forms.py

@@ -35,7 +35,7 @@ class DbForm(forms.Form):
                            label='',
                            choices=(('default', 'default'),),
                            initial=0,
-                           widget=forms.widgets.Select(attrs={'class': 'span6'}))
+                           widget=forms.widgets.Select(attrs={'class': 'input-medium'}))
 
   def __init__(self, *args, **kwargs):
     databases = kwargs.pop('databases')

+ 1 - 0
desktop/core/static/css/hue2.css

@@ -121,6 +121,7 @@
 }
 .navbar .nav .active > a, .navbar .nav .active > a:hover {
     background-color: rgba(0, 0, 0, 0.5);
+    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#103951', endColorstr='#103951'); /* IE */
     color: #FFFFFF;
     text-decoration: none;
 }

+ 8 - 1
desktop/core/static/js/Source/jHue/jquery.tablescroller.js

@@ -52,10 +52,17 @@
     if (disableScrollingTable == null || disableScrollingTable != true) {
       resizeScrollingTable(_this.element);
       var _resizeTimeout = -1;
+      var winWidth = $(window).width();
+      var winHeight = $(window).height();
       $(window).resize(function () {
         window.clearTimeout(_resizeTimeout);
         _resizeTimeout = window.setTimeout(function(){
-          resizeScrollingTable(_this.element);
+          // prevents endless loop in IE8
+          if (winWidth != $(window).width() || winHeight != $(window).height()) {
+            resizeScrollingTable(_this.element);
+            winWidth = $(window).width();
+            winHeight = $(window).height();
+          }
         }, 400);
       });
     }