Changeset 3015 in subversion


Ignore:
Timestamp:
Oct 4, 2009 4:16:20 AM (4 years ago)
Author:
netbit
Message:
  • Added an alert message when uploading still in progress and the user tries to send the message
  • Added the functionality to abort the upload process
  • Changed the loading icon background to transparent, so it can be used in other templates easily
Location:
trunk/roundcubemail
Files:
6 edited

Legend:

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

    r3013 r3015  
    16321632 
    16331633    // set page=1 if changeing to another mailbox 
    1634     if (!page  && this.env.mailbox != mbox) 
     1634    if (!page && this.env.mailbox != mbox) 
    16351635      { 
    16361636      page = 1; 
     
    21772177      for (i=0;i<list.length;i++) 
    21782178        if (!String(list[i].id).match(/^rcmfile/)) 
     2179          { 
     2180          alert(this.get_label('notuploadedwarning')); 
    21792181          return false; 
     2182          } 
    21802183    } 
    21812184     
     
    24852488      // hide upload form 
    24862489      this.show_attachment_form(false); 
    2487       // display upload indicator 
     2490      // display upload indicator and cancel button 
    24882491      var content = this.get_label('uploading'); 
    24892492      if (this.env.loadingicon) 
    24902493        content = '<img src="'+this.env.loadingicon+'" alt="" />'+content; 
     2494      if (this.env.cancelicon) 
     2495        content = '<a title="'+this.get_label('cancel')+'" onclick="return rcmail.cancel_attachment_upload(\''+ts+'\', \''+frame_name+'\');" href="#cancelupload"><img src="'+this.env.cancelicon+'" alt="" /></a>'+content; 
    24912496      this.add2attachment_list(ts, content); 
    24922497      } 
     
    25342539 
    25352540    return true; 
     2541    }; 
     2542 
     2543  this.cancel_attachment_upload = function(name, frame_name) 
     2544    { 
     2545    if (!name || !frame_name) 
     2546      return false; 
     2547 
     2548    this.remove_from_attachment_list(name); 
     2549    $("iframe[name='"+frame_name+"']").remove(); 
     2550    return false; 
    25362551    }; 
    25372552 
  • trunk/roundcubemail/program/localization/en_US/messages.inc

    r3011 r3015  
    7070$messages['nocontactsreturned'] = 'No contacts were found'; 
    7171$messages['nosearchname'] = 'Please enter a contact name or email address'; 
     72$messages['notuploadedwarning'] = 'Not all attachments have been uploaded yet. Please wait or cancel the upload.'; 
    7273$messages['searchsuccessful'] = '$nr messages found'; 
    7374$messages['searchnomatch'] = 'Search returned no matches'; 
  • trunk/roundcubemail/program/localization/pt_BR/messages.inc

    r2799 r3015  
    3333$messages['mailboxempty'] = 'A caixa de mensagens está vazia'; 
    3434$messages['loading'] = 'Carregando...'; 
     35$messages['uploading'] = 'Enviando anexo...'; 
    3536$messages['loadingdata'] = 'Carregando informações...'; 
    3637$messages['checkingmail'] = 'Verificando se há novas mensagens...'; 
     
    7374$messages['nocontactsreturned'] = 'Nenhum contato foi encontrado'; 
    7475$messages['nosearchname'] = 'Por favor, informe o nome do contado ou seu endereço de e-mail'; 
     76$messages['notuploadedwarning'] = 'Há anexos ainda não enviados. Aguarde ou cancele o envio.'; 
    7577$messages['searchsuccessful'] = '$nr mensagens encontradas'; 
    7678$messages['searchnomatch'] = 'A pesquisa não encontrou resultados'; 
  • trunk/roundcubemail/program/steps/mail/compose.inc

    r3011 r3015  
    9393 
    9494// add some labels to client 
    95 $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 
    96     'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 
    97     'converting', 'editorwarning', 'searching', 'uploading', 'fileuploaderror'); 
     95$OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'cancel', 
     96    'nobodywarning', 'notsentwarning', 'notuploadedwarning', 'savingmessage', 'sendingmessage',  
     97    'messagesaved', 'converting', 'editorwarning', 'searching', 'uploading', 'fileuploaderror'); 
    9898 
    9999// add config parameters to client script 
     
    810810  if ($attrib['deleteicon']) 
    811811    $_SESSION['compose']['deleteicon'] = $CONFIG['skin_path'] . $attrib['deleteicon']; 
     812  if ($attrib['cancelicon']) 
     813    $OUTPUT->set_env('cancelicon', $CONFIG['skin_path'] . $attrib['cancelicon']); 
    812814  if ($attrib['loadingicon']) 
    813815    $OUTPUT->set_env('loadingicon', $CONFIG['skin_path'] . $attrib['loadingicon']); 
  • trunk/roundcubemail/skins/default/templates/compose.html

    r3011 r3015  
    9494<div id="compose-attachments"> 
    9595<div id="attachment-title"><roundcube:label name="attachments" /></div> 
    96 <roundcube:object name="composeAttachmentList" deleteIcon="/images/icons/delete.png" loadingIcon="/images/display/loading_blue.gif" /> 
     96<roundcube:object name="composeAttachmentList" deleteIcon="/images/icons/delete.png" cancelIcon="/images/icons/delete.png" loadingIcon="/images/display/loading_blue.gif" /> 
    9797<p><roundcube:button command="add-attachment" imagePas="/images/buttons/add_pas.png" imageSel="/images/buttons/add_sel.png" imageAct="/images/buttons/add_act.png" width="23" height="18" title="addattachment" /></p> 
    9898</div> 
Note: See TracChangeset for help on using the changeset viewer.