diff options
Diffstat (limited to 'skins/larry')
-rw-r--r-- | skins/larry/mail.css | 7 | ||||
-rw-r--r-- | skins/larry/ui.js | 26 |
2 files changed, 32 insertions, 1 deletions
diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 464082237..efee660d5 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1110,5 +1110,12 @@ div.message-part blockquote blockquote blockquote { border-bottom: 1px solid #ddd; } +#uploadform a.iconlink { + margin-left: 1em; + text-indent: -1000px; +} +#uploadform form div { + margin: 4px 0; +} diff --git a/skins/larry/ui.js b/skins/larry/ui.js index c24915eef..8038aa78e 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -532,6 +532,17 @@ function rcube_mail_ui() $dialog.dialog('close'); return; } + + // add icons to clone file input field + if (rcmail.env.action = 'compose' && !$dialog.data('extended')) { + $('<a>') + .addClass('iconlink add') + .attr('href', '#add') + .html('Add') + .appendTo($('input[type="file"]', $dialog).parent()) + .click(add_uploadfile); + $dialog.data('extended', true); + } $dialog.dialog({ modal: true, @@ -543,14 +554,27 @@ function rcube_mail_ui() catch(e){ } // ignore errors $dialog.dialog('destroy').hide(); + $('div.addline', $dialog).remove(); }, width: 480 }).show(); if (!document.all) - $('input[type=file]', $dialog).click(); + $('input[type=file]', $dialog).first().click(); + } + + function add_uploadfile(e) + { + var div = $(this).parent(); + var clone = div.clone().addClass('addline').insertAfter(div); + clone.children('.iconlink').click(add_uploadfile); + clone.children('input').val(''); + + if (!document.all) + $('input[type=file]', clone).click(); } + /** * */ |