Victor Benincasa
2013-04-18 ef3f1dfca9c59b67965382e99648bbb120908ed0
skins/larry/ui.js
@@ -38,6 +38,7 @@
  this.init_tabs = init_tabs;
  this.show_about = show_about;
  this.show_popup = show_popup;
  this.add_popup = add_popup;
  this.set_searchmod = set_searchmod;
  this.show_uploadform = show_uploadform;
  this.show_header_row = show_header_row;
@@ -95,7 +96,7 @@
      if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
        rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); });
        rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); });
        $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false });
        $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(); return false });
        // add menu link for each attachment
        $('#attachment-list > li').each(function() {
@@ -430,13 +431,25 @@
  /**
   * Register a popup menu
   */
  function add_popup(popup, config)
  {
    var obj = popups[popup] = $('#'+popup);
    obj.appendTo(document.body);  // move it to top for proper absolute positioning
    if (obj.length)
      popupconfig[popup] = $.extend(popupconfig[popup] || {}, config || {});
  }
  /**
   * Trigger for popup menus
   */
  function show_popup(popup, show, config)
  {
    // auto-register menu object
    if (config || !popupconfig[popup])
      popupconfig[popup] = $.extend(popupconfig[popup] || {}, config);
      add_popup(popup, config);
    var visible = show_popupmenu(popup, show),
      config = popupconfig[popup];
@@ -561,7 +574,7 @@
  /**
   * Switch between short and full headers display in message preview
   */
  function toggle_preview_headers(button)
  function toggle_preview_headers()
  {
    $('#preview-shortheaders').toggle();
    var full = $('#preview-allheaders').toggle(),