thomascube
2012-02-25 14a3f2813acf25c07e1ee861b564f826fe83fe20
Make popups disapear when clicking on an iframe; adapt IE hacks (#1488354)

3 files modified
54 ■■■■■ changed files
skins/larry/ie7hacks.css 4 ●●●● patch | view | raw | blame | history
skins/larry/iehacks.css 2 ●●● patch | view | raw | blame | history
skins/larry/ui.js 48 ●●●●● patch | view | raw | blame | history
skins/larry/ie7hacks.css
@@ -61,6 +61,10 @@
    width: 140px;
}
.dropbutton .dropbuttontip {
    right: 0;
}
#threadselectmenu li a {
    width: 160px;
}
skins/larry/iehacks.css
@@ -128,7 +128,7 @@
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#82acb5', endColorstr='#6a939f', GradientType=0);
}
#mailboxlist li.mailbox.selected .unreadcount {
#mailboxlist li.mailbox.selected > a .unreadcount {
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#005d76', endColorstr='#004558', GradientType=0);
}
skins/larry/ui.js
@@ -173,7 +173,37 @@
    // turn a group of fieldsets into tabs
    $('.tabbed').each(function(idx, elem){ init_tabs(elem); })
    $(document.body).bind('mouseup', function(e){
    $(document.body).bind('mouseup', body_mouseup)
    .bind('keyup', function(e){
      if (e.keyCode == 27) {
        for (var id in popups) {
          if (popups[id].is(':visible'))
            show_popup(id, false);
        }
      }
    });
    $('iframe').load(function(e){
      // this = iframe
      var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
      $(doc).mouseup(body_mouseup);
    })
    .contents().mouseup(body_mouseup);
    $(window).resize(function(e) {
      // check target due to bugs in jquery
      // http://bugs.jqueryui.com/ticket/7514
      // http://bugs.jquery.com/ticket/9841
      if (e.target == window) resize();
    });
  }
  /**
   * Handler for mouse-up events on the document body.
   * This will close all open popup menus
   */
  function body_mouseup(e)
  {
      var config, obj, target = e.target;
      for (var id in popups) {
        obj = popups[id];
@@ -188,22 +218,6 @@
          window.setTimeout(function(){ show_popupmenu(myid, false) }, 10);
        }
      }
    })
    .bind('keyup', function(e){
      if (e.keyCode == 27) {
        for (var id in popups) {
          if (popups[id].is(':visible'))
            show_popup(id, false);
        }
      }
    });
    $(window).resize(function(e) {
      // check target due to bugs in jquery
      // http://bugs.jqueryui.com/ticket/7514
      // http://bugs.jquery.com/ticket/9841
      if (e.target == window) resize();
    });
  }
  /**