Changeset 4763 in subversion


Ignore:
Timestamp:
May 13, 2011 1:31:09 PM (2 years ago)
Author:
alec
Message:
  • Apply fixes from trunk (up to r4756)
Location:
branches/release-0.5
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/release-0.5/CHANGELOG

    r4729 r4763  
    22=========================== 
    33 
     4- Fix some CSS issues in Settings for Internet Explorer 
     5- Fixed handling of folder with name "0" in folder selector 
     6- Fix bug where messages were deleted instead moved to trash folder after Shift key was used (#1487902) 
    47- Fix relative URLs handling according to a <base> in HTML (#1487889) 
    58- Fix handling of top-level domains with more than 5 chars or unicode chars (#1487883) 
  • branches/release-0.5/plugins/new_user_dialog/new_user_dialog.php

    r4301 r4763  
    6363        'type' => 'text', 
    6464        'name' => '_email', 
    65         'value' => idn_to_utf8($identity['email']), 
     65        'value' => rcube_idn_to_utf8($identity['email']), 
    6666        'disabled' => ($identities_level == 1 || $identities_level == 3) 
    6767      ))); 
     
    114114      $save_data['email'] = $identity['email']; 
    115115    else 
    116       $save_data['email'] = idn_to_ascii($save_data['email']); 
     116      $save_data['email'] = rcube_idn_to_ascii($save_data['email']); 
    117117 
    118118    // save data if not empty 
  • branches/release-0.5/plugins/new_user_dialog/package.xml

    r4301 r4763  
    1414                <active>yes</active> 
    1515        </lead> 
    16         <date>2010-12-02</date> 
    17         <time>12:00:00</time> 
     16        <date>2011-05-12</date> 
     17        <time>10:00</time> 
    1818        <version> 
    19                 <release>1.3</release> 
     19                <release>1.4</release> 
    2020                <api>1.0</api> 
    2121        </version> 
     
    2626        <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 
    2727        <notes> 
    28 - Added setting of focus on name input 
    29 - Added gl_ES translation 
     28- Fixed IDNA encoding/decoding of e-mail addresses (#1487909) 
    3029    </notes> 
    3130        <contents> 
     
    120119            </notes> 
    121120        </release> 
     121        <release> 
     122                <date>2010-12-02</date> 
     123                <time>12:00:00</time> 
     124                <version> 
     125                        <release>1.3</release> 
     126                        <api>1.0</api> 
     127                </version> 
     128                <stability> 
     129                        <release>stable</release> 
     130                        <api>stable</api> 
     131                </stability> 
     132                <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 
     133                <notes> 
     134- Added setting of focus on name input 
     135- Added gl_ES translation 
     136            </notes> 
     137        </release> 
    122138    </changelog> 
    123139</package> 
  • branches/release-0.5/program/include/main.inc

    r4568 r4763  
    12901290  global $RCMAIL; 
    12911291  static $a_mailboxes; 
    1292    
     1292 
    12931293  $attrib += array('maxlength' => 100, 'realnames' => false); 
    12941294 
    12951295  // add some labels to client 
    12961296  $RCMAIL->output->add_label('purgefolderconfirm', 'deletemessagesconfirm'); 
    1297    
     1297 
    12981298  $type = $attrib['type'] ? $attrib['type'] : 'ul'; 
    12991299  unset($attrib['type']); 
     
    13041304  // get mailbox list 
    13051305  $mbox_name = $RCMAIL->imap->get_mailbox_name(); 
    1306    
     1306 
    13071307  // build the folders tree 
    13081308  if (empty($a_mailboxes)) { 
     
    13191319  $hook = $RCMAIL->plugins->exec_hook('render_mailboxlist', array('list' => $a_mailboxes, 'delimiter' => $delimiter)); 
    13201320 
    1321   if ($type=='select') { 
     1321  if ($type == 'select') { 
    13221322    $select = new html_select($attrib); 
    1323      
     1323 
    13241324    // add no-selection option 
    13251325    if ($attrib['noselection']) 
    1326       $select->add(rcube_label($attrib['noselection']), '0'); 
    1327      
     1326      $select->add(rcube_label($attrib['noselection']), ''); 
     1327 
    13281328    rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); 
    13291329    $out = $select->show(); 
     
    13321332    $js_mailboxlist = array(); 
    13331333    $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($hook['list'], $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); 
    1334      
     1334 
    13351335    $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); 
    13361336    $RCMAIL->output->set_env('mailboxes', $js_mailboxlist); 
     
    13511351{ 
    13521352  global $RCMAIL; 
    1353    
     1353 
    13541354  $p += array('maxlength' => 100, 'realnames' => false); 
    13551355  $a_mailboxes = array(); 
     
    14241424    rcmail_build_folder_tree($arrFolders[$currentFolder]['folders'], $subFolders, $delm, $path.$delm); 
    14251425} 
    1426    
     1426 
    14271427 
    14281428/** 
     
    14341434{ 
    14351435  global $RCMAIL, $CONFIG; 
    1436    
     1436 
    14371437  $maxlength = intval($attrib['maxlength']); 
    14381438  $realnames = (bool)$attrib['realnames']; 
     
    14771477    else 
    14781478      $classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true); 
    1479        
     1479 
    14801480    $classes[] = $zebra_class; 
    1481      
     1481 
    14821482    if ($folder['id'] == $mbox_name) 
    14831483      $classes[] = 'selected'; 
     
    14851485    $collapsed = preg_match('/&'.rawurlencode($folder['id']).'&/', $RCMAIL->config->get('collapsed_folders')); 
    14861486    $unread = $msgcounts ? intval($msgcounts[$folder['id']]['UNSEEN']) : 0; 
    1487      
     1487 
    14881488    if ($folder['virtual']) 
    14891489      $classes[] = 'virtual'; 
     
    15091509        'onclick' => sprintf("%s.command('collapse-folder', '%s')", JS_OBJECT_NAME, $js_name) 
    15101510      ), '&nbsp;') : '')); 
    1511      
     1511 
    15121512    $jslist[$folder_id] = array('id' => $folder['id'], 'name' => $foldername, 'virtual' => $folder['virtual']); 
    1513      
     1513 
    15141514    if (!empty($folder['folders'])) { 
    15151515      $out .= html::tag('ul', array('style' => ($collapsed ? "display:none;" : null)), 
     
    15311531 */ 
    15321532function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0) 
    1533   { 
    1534   $idx = 0; 
     1533{ 
    15351534  $out = ''; 
    1536   foreach ($arrFolders as $key=>$folder) 
    1537     { 
     1535 
     1536  foreach ($arrFolders as $key=>$folder) { 
    15381537    if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id']))) 
    15391538      $foldername = rcube_label($folder_class); 
    1540     else 
    1541       { 
     1539    else { 
    15421540      $foldername = $folder['name']; 
    1543        
     1541 
    15441542      // shorten the folder name to a given length 
    15451543      if ($maxlength && $maxlength>1) 
    15461544        $foldername = abbreviate_string($foldername, $maxlength); 
    1547       } 
     1545    } 
    15481546 
    15491547    $select->add(str_repeat('&nbsp;', $nestLevel*4) . $foldername, $folder['id']); 
     
    15511549    if (!empty($folder['folders'])) 
    15521550      $out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $select, $realnames, $nestLevel+1); 
    1553  
    1554     $idx++; 
    1555     } 
     1551  } 
    15561552 
    15571553  return $out; 
    1558   } 
     1554} 
    15591555 
    15601556 
  • branches/release-0.5/program/include/rcube_imap.php

    r4643 r4763  
    35653565        } 
    35663566        else if ($this->get_capability('ANNOTATEMORE') || $this->get_capability('ANNOTATEMORE2')) { 
    3567             foreach ($entries as $entry => $value) { 
     3567            foreach ((array)$entries as $entry => $value) { 
    35683568                list($ent, $attr) = $this->md2annotate($entry); 
    35693569                $entries[$entry] = array($ent, $attr, $value); 
     
    35983598        } 
    35993599        else if ($this->get_capability('ANNOTATEMORE') || $this->get_capability('ANNOTATEMORE2')) { 
    3600             foreach ($entries as $idx => $entry) { 
     3600            foreach ((array)$entries as $idx => $entry) { 
    36013601                list($ent, $attr) = $this->md2annotate($entry); 
    36023602                $entries[$idx] = array($ent, $attr, NULL); 
     
    36273627 
    36283628        if ($this->get_capability('METADATA') ||  
    3629             !strlen(($mailbox) && $this->get_capability('METADATA-SERVER')) 
     3629            (!strlen($mailbox) && $this->get_capability('METADATA-SERVER')) 
    36303630        ) { 
    36313631            return $this->conn->getMetadata($mailbox, $entries, $options); 
     
    36363636 
    36373637            // Convert entry names 
    3638             foreach ($entries as $entry) { 
     3638            foreach ((array)$entries as $entry) { 
    36393639                list($ent, $attr) = $this->md2annotate($entry); 
    36403640                $queries[$attr][] = $ent; 
     
    36573657     * entry-attrib names for older ANNOTATEMORE version. 
    36583658     * 
    3659      * @param string Entry name 
     3659     * @param string $entry Entry name 
    36603660     * 
    36613661     * @return array Entry-attribute list, NULL if not supported (?) 
    36623662     */ 
    3663     private function md2annotate($name) 
     3663    private function md2annotate($entry) 
    36643664    { 
    36653665        if (substr($entry, 0, 7) == '/shared') { 
  • branches/release-0.5/program/include/rcube_template.php

    r4666 r4763  
    114114    } 
    115115 
    116  
    117116    /** 
    118117     * Set page title variable 
     
    122121        $this->pagetitle = $title; 
    123122    } 
    124  
    125123 
    126124    /** 
     
    143141        return $title; 
    144142    } 
    145  
    146143 
    147144    /** 
     
    227224    } 
    228225 
    229  
    230226    /** 
    231227     * Add a localized label to the client environment 
     
    241237        } 
    242238    } 
    243  
    244239 
    245240    /** 
     
    263258    } 
    264259 
    265  
    266260    /** 
    267261     * Delete all stored env variables and commands 
     
    283277    } 
    284278 
    285  
    286279    /** 
    287280     * Redirect to a certain url 
     
    296289        exit; 
    297290    } 
    298  
    299291 
    300292    /** 
     
    362354 
    363355    /** 
    364      * Parse a specific skin template and deliver to stdout 
    365      * 
    366      * Either returns nothing, or exists hard (exit();) 
     356     * Parse a specific skin template and deliver to stdout (or return) 
    367357     * 
    368358     * @param  string  Template name 
    369359     * @param  boolean Exit script 
    370      * @return void 
     360     * @param  boolean Don't write to stdout, return parsed content instead 
     361     * 
    371362     * @link   http://php.net/manual/en/function.exit.php 
    372363     */ 
    373     private function parse($name = 'main', $exit = true) 
     364    function parse($name = 'main', $exit = true, $write = true) 
    374365    { 
    375366        $skin_path = $this->config['skin_path']; 
     
    429420        $hook = $this->app->plugins->exec_hook("render_page", array('template' => $realname, 'content' => $output)); 
    430421 
    431         // add debug console 
    432         if ($this->config['debug_level'] & 8) { 
    433             $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;"> 
    434                 <a href="#toggle" onclick="con=$(\'#dbgconsole\');con[con.is(\':visible\')?\'hide\':\'show\']();return false">console</a> 
    435                 <textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:10px" spellcheck="false"></textarea></div>' 
    436             ); 
    437         } 
    438  
    439422        $output = $this->parse_with_globals($hook['content']); 
    440         $this->write(trim($output)); 
     423 
     424        if ($write) { 
     425            // add debug console 
     426            if ($this->config['debug_level'] & 8) { 
     427                $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;"> 
     428                    <a href="#toggle" onclick="con=$(\'#dbgconsole\');con[con.is(\':visible\')?\'hide\':\'show\']();return false">console</a> 
     429                    <textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:10px" spellcheck="false"></textarea></div>' 
     430                ); 
     431            } 
     432            $this->write(trim($output)); 
     433        } 
     434        else { 
     435            return $output; 
     436        } 
     437 
    441438        if ($exit) { 
    442439            exit; 
    443440        } 
    444441    } 
    445  
    446442 
    447443    /** 
  • branches/release-0.5/program/js/app.js

    r4729 r4763  
    648648      case 'delete': 
    649649        // mail task 
    650         if (this.task=='mail') 
     650        if (this.task == 'mail') 
    651651          this.delete_messages(); 
    652652        // addressbook task 
    653         else if (this.task=='addressbook') 
     653        else if (this.task == 'addressbook') 
    654654          this.delete_contacts(); 
    655655        // user settings task 
    656         else if (this.task=='settings') 
     656        else if (this.task == 'settings') 
    657657          this.delete_identity(); 
    658658        break; 
     
    13541354  this.doc_mouse_up = function(e) 
    13551355  { 
    1356     var model, list, li; 
    1357  
    1358     if (this.message_list) { 
    1359       if (!rcube_mouse_is_over(e, this.message_list.list.parentNode)) 
    1360         this.message_list.blur(); 
     1356    var model, list, li, id; 
     1357 
     1358    if (list = this.message_list) { 
     1359      if (!rcube_mouse_is_over(e, list.list.parentNode)) 
     1360        list.blur(); 
    13611361      else 
    1362         this.message_list.focus(); 
    1363       list = this.message_list; 
     1362        list.focus(); 
    13641363      model = this.env.mailboxes; 
    13651364    } 
    1366     else if (this.contact_list) { 
    1367       if (!rcube_mouse_is_over(e, this.contact_list.list.parentNode)) 
    1368         this.contact_list.blur(); 
     1365    else if (list = this.contact_list) { 
     1366      if (!rcube_mouse_is_over(e, list.list.parentNode)) 
     1367        list.blur(); 
    13691368      else 
    1370         this.contact_list.focus(); 
    1371       list = this.contact_list; 
     1369        list.focus(); 
    13721370      model = this.env.contactfolders; 
    13731371    } 
     
    13901388    // reset 'pressed' buttons 
    13911389    if (this.buttons_sel) { 
    1392       for (var id in this.buttons_sel) 
     1390      for (id in this.buttons_sel) 
    13931391        if (typeof id != 'function') 
    13941392          this.button_out(this.buttons_sel[id], id); 
     
    14891487    else if (list.key_pressed == 34) 
    14901488      this.command('nextpage'); 
    1491     else 
    1492       list.shiftkey = false; 
    14931489  }; 
    14941490 
     
    24162412  this.delete_messages = function() 
    24172413  { 
    2418     var selection = this.message_list ? $.merge([], this.message_list.get_selection()) : []; 
     2414    var uid, i, len, trash = this.env.trash_mailbox, 
     2415      list = this.message_list, 
     2416      selection = list ? $.merge([], list.get_selection()) : []; 
    24192417 
    24202418    // exit if no mailbox specified or if selection is empty 
     
    24232421 
    24242422    // also select childs of collapsed rows 
    2425     for (var uid, i=0, len=selection.length; i<len; i++) { 
     2423    for (i=0, len=selection.length; i<len; i++) { 
    24262424      uid = selection[i]; 
    2427       if (this.message_list.rows[uid].has_children && !this.message_list.rows[uid].expanded) 
    2428         this.message_list.select_childs(uid); 
     2425      if (list.rows[uid].has_children && !list.rows[uid].expanded) 
     2426        list.select_childs(uid); 
    24292427    } 
    24302428 
     
    24352433    } 
    24362434    // if there isn't a defined trash mailbox or we are in it 
    2437     else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox) 
     2435    // @TODO: we should check if defined trash mailbox exists 
     2436    else if (!trash || this.env.mailbox == trash) 
    24382437      this.permanently_remove_messages(); 
    24392438    // if there is a trash mailbox defined and we're not currently in it 
    24402439    else { 
    24412440      // if shift was pressed delete it immediately 
    2442       if (this.message_list && this.message_list.shiftkey) { 
     2441      if (list && list.shiftkey) { 
    24432442        if (confirm(this.get_label('deletemessagesconfirm'))) 
    24442443          this.permanently_remove_messages(); 
    24452444      } 
    24462445      else 
    2447         this.move_messages(this.env.trash_mailbox); 
     2446        this.move_messages(trash); 
    24482447    } 
    24492448 
  • branches/release-0.5/program/js/list.js

    r4666 r4763  
    102102{ 
    103103  // make references in internal array and set event handlers 
    104   if (row && String(row.id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i)) { 
     104  if (row && String(row.id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)) { 
    105105    var self = this, 
    106106      uid = RegExp.$1; 
     
    602602 
    603603    for (i=0, len=rows.length-1; i<len; i++) 
    604       if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
     604      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
    605605            return RegExp.$1; 
    606606  } 
     
    615615 
    616616    for (i=rows.length-1; i>=0; i--) 
    617       if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
     617      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
    618618        return RegExp.$1; 
    619619  } 
     
    989989      this.key_pressed = keyCode; 
    990990      this.triggerEvent('keypress'); 
     991      // reset shiftkey flag, we need it only for registered events 
     992      this.shiftkey = false; 
    991993 
    992994      if (this.key_pressed == this.BACKSPACE_KEY) 
  • branches/release-0.5/program/localization/pl_PL/labels.inc

    r4362 r4763  
    410410$labels['contactproperties'] = 'Właściwości'; 
    411411$labels['properties'] = 'Właściwości'; 
    412 $labels['folderproperties'] = 'WłĠ
    413 Å›ciwości folderu'; 
     412$labels['folderproperties'] = 'Właściwości folderu'; 
    414413$labels['parentfolder'] = 'Folder nadrzędny'; 
    415414$labels['location'] = 'PołoÅŒenie'; 
  • branches/release-0.5/skins/default/ie6hacks.css

    r4469 r4763  
    144144} 
    145145 
     146body.iframe .boxtitle 
     147{ 
     148  position: absolute; 
     149} 
     150 
     151#subscription-table 
     152{ 
     153  width: auto; 
     154} 
  • branches/release-0.5/skins/default/iehacks.css

    r4539 r4763  
    118118} 
    119119 
    120 #subscription-table 
    121 { 
    122   width: auto; 
    123 } 
    124  
    125120#messagelist 
    126121{ 
     
    182177 
    183178#contacts-box, 
    184 #prefs-box 
     179#prefs-box, 
     180#folder-box 
    185181{ 
    186182  width: expression((parseInt(this.parentNode.offsetWidth)-555)+'px'); 
     183  overflow: hidden; 
    187184} 
    188185 
  • branches/release-0.5/skins/default/mail.css

    r4509 r4763  
    150150} 
    151151 
    152 #messagetoolbar select.mboxlist option[value="0"] 
     152#messagetoolbar select.mboxlist option[value=""] 
    153153{ 
    154154  padding-left: 2px; 
Note: See TracChangeset for help on using the changeset viewer.