thomascube
2011-08-13 a02cfa9b085fc875fc55f57029a8e5846771ed5e
skins/default/functions.js
@@ -26,7 +26,11 @@
function rcube_init_tabs(id, current)
{
  var content = document.getElementById(id),
    fs = $('fieldset', content);
    // get fieldsets of the higher-level (skip nested fieldsets)
    fs = $('fieldset', content).not('fieldset > fieldset');
  if (!fs.length)
    return;
  current = current ? current : 0;
@@ -38,12 +42,14 @@
  // convert fildsets into tabs
  fs.each(function(idx) {
    var tab, a, elm = $(this), legend = $('legend', elm);
    var tab, a, elm = $(this),
      // get first legend element
      legend = $(elm).children('legend');
    // create a tab
    a   = $('<a>').text(legend.text()).attr('href', '#');
    tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'})
        .click(function() { return rcube_show_tab(id, idx); })
        .click(function() { rcube_show_tab(id, idx); return false })
    // remove legend
    legend.remove();
@@ -61,7 +67,7 @@
function rcube_show_tab(id, index)
{
  var content = document.getElementById(id),
    fs = $('fieldset', content);
    fs = $('fieldset', content).not('fieldset > fieldset');
  fs.each(function(idx) {
    // Show/hide fieldset (tab content)
@@ -347,7 +353,7 @@
/* Message composing */
init_compose_form: function()
{
  var f, field, fields = ['cc', 'bcc', 'replyto', 'mailreplyto', 'mailfollowupto'],
  var f, field, fields = ['cc', 'bcc', 'replyto', 'followupto'],
    div = document.getElementById('compose-div'),
    headers_div = document.getElementById('compose-headers-div');