Changeset 4043 in subversion


Ignore:
Timestamp:
Oct 6, 2010 2:48:19 AM (3 years ago)
Author:
alec
Message:
  • Improve tabs to fixed width and add tabs in identities info (#1486974)
Location:
trunk/roundcubemail
Files:
2 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r4041 r4043  
    2323- Fix keyboard doesn't work with autocomplete list with Chrome (#1487029) 
    2424- Fix handling of backslash as IMAP delimiter 
     25- Improve tabs to fixed width and add tabs in identities info (#1486974) 
    2526 
    2627RELEASE 0.4.1 
  • trunk/roundcubemail/skins/default/common.css

    r4032 r4043  
    699699} 
    700700 
     701.disabled 
     702{ 
     703  color: #999; 
     704} 
     705 
     706font.bold 
     707{ 
     708  font-weight: bold; 
     709} 
     710 
    701711 
    702712/***** onclick menu list *****/ 
     
    768778} 
    769779 
    770 .disabled 
    771 { 
    772   color: #999; 
    773 } 
    774  
    775 font.bold 
    776 { 
    777   font-weight: bold; 
    778 } 
     780 
     781/***** tabbed interface elements *****/ 
     782 
     783div.tabsbar, 
     784#tabsbar 
     785{ 
     786  position: absolute; 
     787  top: 50px; 
     788  left: 220px; 
     789  right: 20px; 
     790  height: 22px; 
     791  border-bottom: 1px solid #999999; 
     792  white-space: nowrap; 
     793} 
     794 
     795div.tabsbar 
     796{ 
     797  top: 35px; 
     798  left: 12px; 
     799  right: 12px; 
     800} 
     801 
     802span.tablink, 
     803span.tablink-selected 
     804{ 
     805  float: left; 
     806  height: 23px !important; 
     807  height: 22px; 
     808  overflow: hidden; 
     809  background: url(images/tabs-left.gif) top left no-repeat; 
     810} 
     811 
     812span.tablink 
     813{ 
     814  cursor: pointer; 
     815} 
     816 
     817span.tablink-selected 
     818{ 
     819  cursor: default; 
     820  background-position: 0px -23px; 
     821} 
     822 
     823span.tablink a, 
     824span.tablink-selected a 
     825{ 
     826  display: block; 
     827  padding: 5px 10px 0 5px; 
     828  margin-left: 5px; 
     829  height: 23px; 
     830  color: #555555; 
     831  max-width: 185px; 
     832  text-decoration: none; 
     833  overflow: hidden; 
     834  text-overflow: ellipsis; 
     835  -o-text-overflow: ellipsis; 
     836  background: url(images/tabs-right.gif) top right no-repeat; 
     837} 
     838 
     839span.tablink-selected a 
     840{ 
     841  cursor: inherit; 
     842  color: #000000; 
     843  background-position: right -23px; 
     844} 
     845 
     846fieldset.tabbed 
     847{ 
     848  margin-top: 22px; 
     849  padding-top: 12px; 
     850} 
     851 
  • trunk/roundcubemail/skins/default/functions.js

    r4032 r4043  
    2020{ 
    2121  $('tr.advanced').css('display', (visible ? (bw.ie ? 'block' : 'table-row') : 'none')); 
     22} 
     23 
     24// Fieldsets-to-tabs converter 
     25// Warning: don't place "caller" <script> inside page element (id) 
     26function rcube_init_tabs(id, current) 
     27{ 
     28  var content = document.getElementById(id), 
     29    fs = $('fieldset', content); 
     30 
     31  current = current ? current : 0; 
     32 
     33  // first hide not selected tabs 
     34  fs.each(function(idx) { if (idx != current) $(this).hide(); }); 
     35 
     36  // create tabs container 
     37  var tabs = $('<div>').addClass('tabsbar').appendTo($(content)); 
     38 
     39  // convert fildsets into tabs 
     40  fs.each(function(idx) { 
     41    var tab, a, elm = $(this), legend = $('legend', elm); 
     42 
     43    // create a tab 
     44    a   = $('<a>').text(legend.text()).attr('href', '#'); 
     45    tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'}) 
     46        .click(function() { return rcube_show_tab(id, idx); }) 
     47 
     48    // remove legend 
     49    legend.remove(); 
     50    // style fieldset 
     51    elm.addClass('tabbed'); 
     52    // style selected tab 
     53    if (idx == current) 
     54      tab.addClass('tablink-selected'); 
     55 
     56    // add the tab to container 
     57    tab.append(a).appendTo(tabs); 
     58  }); 
     59} 
     60 
     61function rcube_show_tab(id, index) 
     62{ 
     63  var content = document.getElementById(id), 
     64    fs = $('fieldset', content); 
     65 
     66  fs.each(function(idx) { 
     67    // Show/hide fieldset (tab content) 
     68    $(this)[index==idx ? 'show' : 'hide'](); 
     69    // Select/unselect tab 
     70    $('#tab'+idx).toggleClass('tablink-selected', idx==index); 
     71  }); 
    2272} 
    2373 
  • trunk/roundcubemail/skins/default/settings.css

    r3989 r4043  
    11/***** Roundcube|Mail settings task styles *****/ 
    2  
    3  
    4 #tabsbar 
    5 { 
    6   position: absolute; 
    7   top: 50px; 
    8   left: 220px; 
    9   right: 20px; 
    10   height: 22px; 
    11   border-bottom: 1px solid #999999; 
    12   white-space: nowrap; 
    13 } 
    14  
    15 span.tablink, 
    16 span.tablink-selected 
    17 { 
    18   float: left; 
    19   width: 100px; 
    20   height: 24px !important; 
    21   height: 22px; 
    22   overflow: hidden; 
    23   text-overflow: ellipsis; 
    24   background: url(images/tabs.gif) top left no-repeat; 
    25 } 
    26  
    27 span.tablink-selected 
    28 { 
    29   background-position: -102px 0; 
    30 } 
    31  
    32 span.tablink a, 
    33 span.tablink-selected a 
    34 { 
    35   display: block; 
    36   padding-left: 10px; 
    37   padding-top: 5px; 
    38   color: #555555; 
    39   text-decoration: none; 
    40 } 
    41  
    42 span.tablink-selected a 
    43 { 
    44   color: #000000; 
    45   cursor: default; 
    46 } 
    472 
    483#rcmfd_timezone 
  • trunk/roundcubemail/skins/default/templates/editidentity.html

    r3789 r4043  
    4242<div class="boxcontent"> 
    4343<roundcube:object name="identityform" size="40" textareacols="60" textarearows="6" /> 
    44  
    45 <p><br /> 
     44<p> 
    4645<roundcube:button command="delete" type="input" class="button" label="delete" condition="env:action=='edit-identity'" style="margin-right:0.5em" /> 
    4746<roundcube:button command="save" type="input" class="button mainaction" label="save" /> 
    4847</p> 
    4948</div> 
     49<script type="text/javascript">rcube_init_tabs('identity-details')</script> 
     50 
    5051</div> 
    5152 
Note: See TracChangeset for help on using the changeset viewer.