Changeset 76248c7 in github


Ignore:
Timestamp:
Apr 25, 2012 4:40:31 AM (13 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo
Children:
1257a8e6
Parents:
fbe7b71
Message:
  • Improved all headers viewer (mostly in Larry skin)
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    r390959b r76248c7  
    225225        this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list', 'forward', 
    226226          'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'download', 
    227           'print', 'load-attachment', 'load-headers', 'forward-attachment']; 
     227          'print', 'load-attachment', 'show-headers', 'hide-headers', 'forward-attachment']; 
    228228 
    229229        if (this.env.action == 'show' || this.env.action == 'preview') { 
     
    579579        else if (this.task == 'addressbook') 
    580580          this.list_contacts(props); 
    581         break; 
    582  
    583       case 'load-headers': 
    584         this.load_headers(obj); 
    585581        break; 
    586582 
     
    11101106        var func = command.replace(/-/g, '_'); 
    11111107        if (this[func] && typeof this[func] === 'function') { 
    1112           ret = this[func](props); 
     1108          ret = this[func](props, obj); 
    11131109        } 
    11141110        break; 
     
    58515847 
    58525848  // display all-headers row and fetch raw message headers 
    5853   this.load_headers = function(elem) 
     5849  this.show_headers = function(props, elem) 
    58545850  { 
    58555851    if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box || !this.env.uid) 
     
    58585854    $(elem).removeClass('show-headers').addClass('hide-headers'); 
    58595855    $(this.gui_objects.all_headers_row).show(); 
    5860     elem.onclick = function() { rcmail.hide_headers(elem); }; 
     5856    elem.onclick = function() { rcmail.command('hide-headers', '', elem); }; 
    58615857 
    58625858    // fetch headers only once 
     
    58685864 
    58695865  // hide all-headers row 
    5870   this.hide_headers = function(elem) 
     5866  this.hide_headers = function(props, elem) 
    58715867  { 
    58725868    if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box) 
     
    58755871    $(elem).removeClass('hide-headers').addClass('show-headers'); 
    58765872    $(this.gui_objects.all_headers_row).hide(); 
    5877     elem.onclick = function() { rcmail.load_headers(elem); }; 
     5873    elem.onclick = function() { rcmail.command('show-headers', '', elem); }; 
    58785874  }; 
    58795875 
  • program/steps/mail/func.inc

    r0c25968 r76248c7  
    987987  global $OUTPUT; 
    988988 
    989   $html = html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('load-headers','',this)"), ''); 
    990   $html .= html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), '')); 
     989  $html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), '')); 
     990  $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), ''); 
    991991 
    992992  $OUTPUT->add_gui_object('all_headers_row', 'all-headers'); 
  • skins/default/mail.css

    r3d5240b7 r76248c7  
    12871287#headers-source 
    12881288{ 
    1289   margin: 0 0 2px 0; 
     1289  margin: 2px 0; 
    12901290  padding: 0.5em; 
    12911291  height: 145px; 
     
    12931293  overflow: auto; 
    12941294  font-size: 11px; 
    1295   border: 1px solid #999999; 
     1295  border: 1px solid #CCC; 
    12961296  display: none; 
    12971297  text-align: left; 
  • skins/larry/mail.css

    rce216f0 r76248c7  
    735735} 
    736736 
    737 #full-headers { 
    738         position: relative; 
    739         color: #666; 
    740         text-align: center; 
    741         background-color: #f9f9f9; 
    742         background: -moz-linear-gradient(top, #eaeaea 0%, #e9e9e9 100%); 
    743         background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eaeaea), color-stop(100%,#e9e9e9)); 
    744         background: -o-linear-gradient(top, #eaeaea 0%, #e9e9e9 100%); 
    745         background: -ms-linear-gradient(top, #eaeaea 0%, #e9e9e9 100%); 
    746         background: linear-gradient(top, #eaeaea 0%, #e9e9e9 100%); 
    747 } 
    748  
    749737div.more-headers { 
    750738        cursor: pointer; 
     
    758746 
    759747#all-headers { 
    760         position: absolute; 
    761         top: 11px; 
    762         left: 10px; 
    763         right: 10px; 
     748    position: relative; 
     749        margin: 0 10px; 
     750        padding: 0; 
    764751        height: 180px; 
    765         z-index: 500; 
    766752        border: 1px solid #bbb; 
    767         border-top: 0; 
    768         border-radius: 0 0 4px 4px; 
    769         -webkit-box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6); 
    770         -moz-box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6); 
    771         box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6); 
     753        border-radius: 4px; 
    772754        background: #fff; 
    773         background: -moz-linear-gradient(top, #f0f0f0 0%, #fff 8%, #fff 100%); 
    774         background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f0f0), color-stop(8%,#fff), color-stop(100%,#fff)); 
    775         background: -o-linear-gradient(top, #f0f0f0 0%, #fff 8%, #fff 100%); 
    776         background: -ms-linear-gradient(top, #f0f0f0 0%, #fff 8%, #fff 100%); 
    777         background: linear-gradient(top,  #f0f0f0 0%, #fff 8%, #fff 100%); 
    778 } 
    779  
    780 #all-headers .ui-resizable-s { 
    781         bottom: -2px; 
    782755} 
    783756 
     
    785758        display: none; 
    786759        position: absolute; 
    787         top: 8px; 
     760        top: 0; 
    788761        left: 0; 
    789762        right: 0; 
    790         bottom: 8px; 
    791         padding: 0 10px; 
     763        bottom: 0; 
     764        padding: 2px 5px; 
    792765        overflow: auto; 
    793766        text-align: left; 
  • skins/larry/ui.js

    r4dbc961 r76248c7  
    7777      if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { 
    7878        layout_messageview(); 
    79         $("#all-headers").resizable({ handles: 's', minHeight: 50 }); 
     79        rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); }); 
     80        rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); }); 
    8081        $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false }); 
    8182      } 
     
    292293    $('#messagecontent').css('top', ($('#messageheader').outerHeight() + 10) + 'px'); 
    293294    $('#message-objects div a').addClass('button'); 
    294      
     295 
    295296    if (!$('#attachment-list li').length) { 
    296297      $('div.rightcol').hide(); 
Note: See TracChangeset for help on using the changeset viewer.