summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authornetbit <netbit@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-04 08:16:20 +0000
committernetbit <netbit@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-04 08:16:20 +0000
commit610b28b62304e018f3f6bf1251467c034a945ca2 (patch)
treee356552f8df442379758a5fa396f2e29a764f88a /roundcubemail/program/js
parentecd9a2e81a30dd1f844dd64fe6ade33c54c3e73a (diff)
- 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 git-svn-id: https://svn.roundcube.net/trunk@3015 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 016162fdf..879c9aa15 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -1631,7 +1631,7 @@ function rcube_webmail()
add_url += '&_search='+this.env.search_request;
// set page=1 if changeing to another mailbox
- if (!page && this.env.mailbox != mbox)
+ if (!page && this.env.mailbox != mbox)
{
page = 1;
this.env.current_page = page;
@@ -2176,7 +2176,10 @@ function rcube_webmail()
var list = this.gui_objects.attachmentlist.getElementsByTagName("li");
for (i=0;i<list.length;i++)
if (!String(list[i].id).match(/^rcmfile/))
+ {
+ alert(this.get_label('notuploadedwarning'));
return false;
+ }
}
// display localized warning for missing subject
@@ -2484,10 +2487,12 @@ function rcube_webmail()
// hide upload form
this.show_attachment_form(false);
- // display upload indicator
+ // display upload indicator and cancel button
var content = this.get_label('uploading');
if (this.env.loadingicon)
content = '<img src="'+this.env.loadingicon+'" alt="" />'+content;
+ if (this.env.cancelicon)
+ 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;
this.add2attachment_list(ts, content);
}
@@ -2535,6 +2540,16 @@ function rcube_webmail()
return true;
};
+ this.cancel_attachment_upload = function(name, frame_name)
+ {
+ if (!name || !frame_name)
+ return false;
+
+ this.remove_from_attachment_list(name);
+ $("iframe[name='"+frame_name+"']").remove();
+ return false;
+ };
+
// send remote request to add a new contact
this.add_contact = function(value)
{