Two issues: sorting and preview pane

Emil Wojak emil at wojak.eu
Wed Feb 7 17:02:25 CET 2007


Hi!

There is a bug with sorting, which I described in more detail on the forum:
http://roundcubeforum.net/forum/index.php?topic=1207.msg5475#msg5475
Patch posted there too.

Second, I love the preview pane feature, but there are some minor issues I'd like corrected.
First of all, it would be nice, if the preview pane wasn't filled if it doesn't need to,
I mean, I don't wan't it to show a message if I:
a) select a single message by ctrl+clicking it - I know it works when having at least one message
   selected already, but I'm talking about a single selection
b) drag a message

It matters to me mostly because of my extremely slow connection (yes, modems still exist) :)
So here's a context patch, that accomplishes the above.
Best regards, and thanks for the great job.


--- list.js     2007-02-07 15:57:04.000000000 +0100
***************
*** 35,40 ****
--- 35,41 ----
    this.shiftkey = false;

    this.multiselect = false;
+   this.multi_selecting = false;
    this.draggable = false;
    this.keyboard = false;

***************
*** 304,309 ****
--- 305,311 ----
    {
      this.shift_start = id;
      this.highlight_row(id, false);
+     this.multi_selecting = false;
    }
    else
    {
***************
*** 327,332 ****
--- 329,335 ----
          this.highlight_row(id, false);
          break;
      }
+     this.multi_selecting = true;
    }

    // trigger event if selection changed

--- app.js      2007-02-07 15:59:28.000000000 +0100
***************
*** 125,135 ****
            this.message_list.addEventListener('dblclick', function(o){ pmsglist_dbl_click(o); });
            this.message_list.addEventListener('keypress', function(o){ pmsglist_keypress(o); });
            this.message_list.addEventListener('select', function(o){ p.msglist_select(o); });
!           this.message_list.addEventListener('dragstart', function(o){ p.drag_active = true; });
            this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; });

            this.message_list.init();
--- 125,135 ----
            this.message_list.addEventListener('dblclick', function(o){ pmsglist_dbl_click(o); });
            this.message_list.addEventListener('keypress', function(o){ pmsglist_keypress(o); });
            this.message_list.addEventListener('select', function(o){ p.msglist_select(o); });
!           this.message_list.addEventListener('dragstart', function(o){ p.drag_active = true; if (p.preview_timer) clearTimeout(p.preview_timer); });
            this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; });

            this.message_list.init();
***************
*** 1094,1100 ****
        }

      // start timer for message preview (wait for double click)
!     if (selected && this.env.contentframe)
        this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, this.dblclick_time + 10);
      else if (this.env.contentframe)
        this.show_messageframe(false);
--- 1088,1094 ----
        }

      // start timer for message preview (wait for double click)
!     if (selected && this.env.contentframe && !list.multi_selecting)
        this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, this.dblclick_time + 10);
      else if (this.env.contentframe)
        this.show_messageframe(false);

-- 
Emil Wojak <emil at wojak.eu>,
Politechnika Gdańska, Wydział ETI,
Chór Politechniki Gdańskiej,
Compuware Polska, Sp. z o.o.





More information about the Dev mailing list