Changeset 3688 in subversion


Ignore:
Timestamp:
May 30, 2010 3:48:15 AM (3 years ago)
Author:
alec
Message:
  • 'threads' column made movable
Location:
trunk/roundcubemail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r3687 r3688  
    167167          this.message_list = new rcube_list_widget(this.gui_objects.messagelist, { 
    168168            multiselect:true, multiexpand:true, draggable:true, keyboard:true, 
    169             column_movable:this.env.col_movable, column_fixed:0, dblclick_time:this.dblclick_time 
     169            column_movable:this.env.col_movable, dblclick_time:this.dblclick_time 
    170170            }); 
    171171          this.message_list.row_init = function(o){ p.init_message_row(o); }; 
     
    16461646    tree += icon ? '<img id="msgicn'+uid+'" src="'+icon+'" alt="" class="msgicon" />' : ''; 
    16471647 
    1648     // first col is always there 
    1649     col.className = 'threads'; 
    1650     col.innerHTML = expando; 
    1651     row.appendChild(col); 
    1652  
    16531648    // build subject link  
    16541649    if (!bw.ie && cols.subject) { 
     
    16721667          html = '<img id="flaggedicn'+uid+'" src="'+this.env.unflaggedicon+'" class="flagicon" alt="" />'; 
    16731668      } 
     1669      else if (c == 'threads') 
     1670        html = expando; 
    16741671      else if (c == 'attachment') 
    16751672        html = flags.attachment && this.env.attachmenticon ? '<img src="'+this.env.attachmenticon+'" alt="" />' : '&nbsp;'; 
     
    17341731          delete cols[idx]; 
    17351732        } 
     1733        else if (name == 'threads') { 
     1734          delete oldcols[i]; 
     1735        } 
    17361736      } 
    17371737      for (i=0; i<cols.length; i++) 
     
    17391739          newcols[newcols.length] = cols[i]; 
    17401740 
    1741       if (newcols.join() != this.env.coltypes.join()) { 
     1741      if (newcols.join() != oldcols.join()) { 
    17421742        update = 1; 
    17431743        add_url += '&_cols=' + newcols.join(','); 
     
    45904590    for (n=0; thead && n<this.env.coltypes.length; n++) { 
    45914591      col = this.env.coltypes[n]; 
    4592       if ((cell = thead.rows[0].cells[n+1]) && (col=='from' || col=='to')) { 
     4592      if ((cell = thead.rows[0].cells[n]) && (col=='from' || col=='to')) { 
    45934593        // if we have links for sorting, it's a bit more complicated... 
    45944594        if (cell.firstChild && cell.firstChild.tagName.toLowerCase()=='a') { 
     
    46154615      this.set_env('subject_col', found); 
    46164616      if (this.message_list) 
    4617         this.message_list.subject_col = found+1; 
     4617        this.message_list.subject_col = found; 
    46184618    } 
    46194619    if ((found = $.inArray('flag', this.env.coltypes)) >= 0) 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r3686 r3688  
    171171      && (($f = array_search('from', $a_show_cols)) !== false) && array_search('to', $a_show_cols) === false) 
    172172    $a_show_cols[$f] = 'to'; 
     173 
     174  // make sure 'threads' column is present  
     175  if (!in_array('threads', $a_show_cols)) 
     176    array_unshift($a_show_cols, 'threads'); 
    173177 
    174178  $skin_path = $_SESSION['skin_path'] = $CONFIG['skin_path']; 
     
    239243    $a_show_cols[$f] = 'to'; 
    240244 
     245  // make sure 'threads' column is present  
     246  if (!in_array('threads', $a_show_cols)) 
     247    array_unshift($a_show_cols, 'threads'); 
     248 
    241249  $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL; 
    242250 
     
    246254    return; 
    247255 
    248   // remove 'attachment' and 'flag' columns, we don't need them here 
    249   if(($key = array_search('attachment', $a_show_cols)) !== FALSE) 
     256  // remove 'threads', 'attachment', 'flag' columns, we don't need them here 
     257  if (($key = array_search('attachment', $a_show_cols)) !== FALSE) 
    250258    unset($a_show_cols[$key]); 
    251   if(($key = array_search('flag', $a_show_cols)) !== FALSE) 
     259  if (($key = array_search('flag', $a_show_cols)) !== FALSE) 
     260    unset($a_show_cols[$key]); 
     261  if (($key = array_search('threads', $a_show_cols)) !== FALSE) 
    252262    unset($a_show_cols[$key]); 
    253263 
     
    346356    $list_menu = ''; 
    347357 
    348   $cells = array(array('className' => 'threads', 'html' => $list_menu)); 
     358  $cells = array(); 
    349359 
    350360  foreach ($a_show_cols as $col) { 
     
    356366      case 'attachment': 
    357367        $col_name = sprintf($image_tag, $skin_path, $attrib['attachmenticon'], ''); 
     368        break; 
     369      case 'threads': 
     370        $col_name = $list_menu; 
    358371        break; 
    359372      default: 
  • trunk/roundcubemail/skins/default/functions.js

    r3526 r3688  
    149149  if (typeof show == 'undefined') 
    150150    show = obj.is(':visible') ? false : true; 
    151    
     151 
    152152  var ref = rcube_find_object(refname); 
    153153  if (show && ref) { 
     
    215215  var ref = rcube_find_object('listmenulink'); 
    216216  if (show && ref) { 
    217     var pos = $(ref).offset(); 
     217    var pos = $(ref).offset(), 
     218      menuwidth = this.listmenu.width(), 
     219      pagewidth = $(document).width(); 
     220 
     221    if (pagewidth - pos.left < menuwidth && pos.left > menuwidth) 
     222      pos.left = pos.left - menuwidth; 
     223 
    218224    this.listmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); 
    219225    // set form values 
  • trunk/roundcubemail/skins/default/mail.css

    r3637 r3688  
    744744#messagelist tr td.flag 
    745745{ 
    746   width: 20px; 
    747   padding: 0px 1px 1px 1px; 
     746  width: 18px; 
     747  padding: 0px 1px 1px 3px; 
    748748} 
    749749 
     
    757757#messagelist tbody td img.msgicon 
    758758{ 
    759   margin-right: 2px; 
     759  margin: 0 2px; 
    760760} 
    761761 
     
    771771#messagelist tr td div.collapsed 
    772772{ 
    773   background: url(images/messageactions.png) 1px -91px no-repeat; 
     773  background: url(images/messageactions.png) -1px -91px no-repeat; 
    774774} 
    775775 
    776776#messagelist tr td div.expanded 
    777777{ 
    778   background: url(images/messageactions.png) 1px -109px no-repeat; 
     778  background: url(images/messageactions.png) -1px -109px no-repeat; 
    779779} 
    780780 
Note: See TracChangeset for help on using the changeset viewer.