Add files via upload

This commit is contained in:
seb1k 2024-10-03 13:21:07 +02:00 committed by GitHub
parent a431668044
commit 813996b3e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 132 additions and 43 deletions

96
styles/styles.min.css vendored
View file

@ -1,8 +1,3 @@
.tdattachmentslist, .tdzipdownload{
padding:0 !important;
}
html {
--font: #2c363a;
--font2:#737677;
@ -25,6 +20,15 @@ html.dark-mode {
}
.action-show .header{
justify-content: unset !important;
}
.tdattachmentslist, .tdzipdownload{
padding:0 !important;
}
.boxinformation {
background-color: rgba(55,190,255,.2);
}
@ -559,6 +563,7 @@ body {
left: 0 !important;
}
.attach_fullsizeM:before,
.zipdownloadicon:before,
#divscale_default:before,
#filtersetslist td.name:before,
@ -1115,6 +1120,51 @@ background-color: var(--backgroundbutton);
display: none;
}
#attach_fullsize{
width:100%;
height:20px;
cursor:pointer;
display:none;
}
#attach_fullsize:hover{
filter: brightness(1.5);
}
#attach_fullsize table td{
padding:0;
line-height:0;
}
.attach_fullsizeL{
display : inline-block;
height : 0;
width : 0;
border-top : 20px solid var(--backgroundhover);
border-left : 20px solid transparent;
}
.attach_fullsizeM{
text-align:center;
}
.attach_fullsizeM:before{
content: "\f0d7";
float:unset;
display:inline-block;
padding-top: 10px;
}
.attach_fullsizeR{
display : inline-block;
height : 0;
width : 0;
border-top : 20px solid var(--backgroundhover);
border-right : 20px solid transparent;
}
p.image-attachment {
position: relative;
border: 1px solid #ddd;
@ -2580,8 +2630,8 @@ html.touch .popover .listing li a:before {
margin: 0 !important;
}
.menu.toolbar a.selected {
color: #41b849;
.menu_bottom a.selected {
background-color: var(--backgroundhoverlight);
}
.menu.toolbar > .spacer {
@ -4266,7 +4316,6 @@ table.fixedcopy {
line-height: 24px;
}
.messagelist .flagged span.date{
padding-right: 20px;
}
@ -4278,7 +4327,7 @@ margin-right: 15px;
.messagelist td.subject span.date,
.messagelist td.subject span.size {
line-height: 1.9em;
line-height: 26px;
}
.messagelist td.subject span.fromto {
@ -4552,6 +4601,7 @@ html.layout-phone a.refresh {
max-height:100px;
overflow: auto;
list-style-type: none;
scrollbar-width: thin;
}
@ -4559,12 +4609,28 @@ html.layout-phone a.refresh {
position:absolute;
width:36px;
height:34px;
background-size: contain !important;
background-size: contain;
z-index:20;
left:4px;
top:4px;
background-color: var(--backgroundhover);
background-position: center;
background-repeat: no-repeat;
}
.attachmentslistics{
position:absolute;
width:36px;
height:100%;
right:0px;
top:0;
z-index:10;
background-color: var(--backgroundhoverlight);
}
.attachmentslistics:hover{
filter: brightness(30%);
}
.attachmentslist .dropdown{
display:none;
@ -4756,6 +4822,11 @@ vertical-align: middle !important;
display:none;
}
.showzipdownload td{
border-collapse: separate;
border-spacing: 10px;
}
.tdzipdownload:hover{
background-color: var(--backgroundhover);
}
@ -7213,11 +7284,6 @@ html.dark-mode .popupmenu .listing li > a:not(.disabled):hover {
}
html.dark-mode .menu.toolbar a.selected {
color: #41b849;
background: 0 0;
}
html.dark-mode .menu.toolbar .dropbutton a.dropdown:hover {
background-color: #425358;
}

View file

@ -20,7 +20,11 @@
<roundcube:if condition="!env:framed" />
<h2 id="aria-label-toolbar" class="voice"><roundcube:label name="arialabeltoolbar" /></h2>
<div class="header" role="toolbar" aria-labelledby="aria-label-toolbar">
<div class="header_back_back" style="width:58px;height:58px;padding-left: 12px;" onclick="UI.show_list();">
<a class="button icon back" href="#sidebar" style="font-size: 1.5em"></a>
</div>
<roundcube:include file="includes/top-right_menu.html" />
</div>
<roundcube:endif />
@ -88,6 +92,7 @@
<h2 id="aria-label-messageattachments" class="voice"><roundcube:label name="attachments" /></h2>
<table style='margin: 0 0 0.2rem;'><tr><td class="tdattachmentslist">
<roundcube:object name="messageAttachments" id="attachment-list" class="attachmentslist" />
<div id='attach_fullsize' onclick='attach_fullsize()'><table style='width:100%'><tr><td style='width:20px'><div class='attach_fullsizeL'></div></td><td class='attach_fullsizeM' style='background-color: var(--backgroundhover);line-height: 0'></td><td style='width:20px'><div class='attach_fullsizeR'></div></td></table></div>
</td><td class="tdzipdownload"><div class='zipdownloadicon'></div>
</td></tr>
</table>

72
ui.min.js vendored
View file

@ -283,32 +283,11 @@ if(rcmail.env.action=="preview")
rcmail.gui_object('dragmenu', this.id);
});
// Taskmenu items added by plugins do not use elastic classes (e.g help plugin)
// it's for larry skin compat. We'll assign 'selected' and icon-specific class.
$('#taskmenu > a').each(function() {
if (/button-([a-z]+)/.test(this.className)) {
var data, name = RegExp.$1,
button = find_button(this.id);
setTimeout(function() { $('.button-selected').addClass('selected'); }, 50);
if (button && (data = button.data)) {
if (data.sel) {
data.sel = data.sel.replace('button-selected', 'selected') + ' ' + name;
}
if (data.act) {
data.act += ' ' + name;
}
rcmail.buttons[button.command][button.index] = data;
rcmail.init_button(button.command, data);
}
$(this).addClass(name);
$('.button-inner', this).addClass('inner');
}
$(this).on('mouseover', function() { rcube_webmail.long_subject_title(this, 0, $('span.inner', this)); });
});
// Some plugins use 'listbutton' class, we'll replace it with 'button'
$('.listbutton').each(function() {
@ -5406,23 +5385,62 @@ $('.attachmentslist .image').each(function() {
var bkgurl = jQuery(this).find(".filename")[0].href
bkgurl +="&_embed=1&_mimeclass=image&_thumb=1"
jQuery(this).find(".filename").append( "<div class='attachmentslistthumnb' style='background: url("+bkgurl+");'></div>" );
jQuery(this).find(".filename").append( "<div class='attachmentslistthumnb' style='background-image: url("+bkgurl+");'></div>" );
})
// add button for ics
if(typeof rcube_calendar ==="function") // rcube_calendar exist ?
{
var hovertxt = $('#attachmentsavecal').text()
$('.attachmentslist .ics').each(function() {
jQuery(this).find(".filename").append( "<div class='attachmentslistics' title='"+hovertxt+"'onclick='click_add_calendar(event,this)'>Add<br>Cal</div>" );
})
}
if($('.zipdownload').length ) // zipdownload plugin
{
var zd = $('.zipdownload')[0]
$('.tdzipdownload').css( "display","table-cell")
$('.tdzipdownload').prop('title', zd.innerText);
$('.tdzipdownload').on( "click", function() { window.location = zd.href;} );
$('.attachmentslist').css( "marginRight", "6px" );
$('.tdattachmentslist').attr('style', 'padding-right: 6px !important');
$('.zipdownload').remove()
}
// force direct download on link
$('.attachmentslist .filename').off()
$('.attachmentslist .filename').removeAttr("onclick")
$('.attachmentslist .filename').attr('target','_blank');
$('.attachmentslist li:not(.pdf, .image) .filename').attr("download", "") // open image & pdf in browser, download everything else (bug for pdf is forced download :/)
// add button if more than 2 files
if($('.attachmentslist li').length > 2)
{
$('#attach_fullsize').show();
setTimeout(function() {$('#attach_fullsize').show();}, 100); // again because of a bug on small layout
}
}
function click_add_calendar(e,p)
{
var attachid = p.closest("li").id.replace('attach','');
rcmail.http_post('calendar/mailimportattach', {
_uid: rcmail.env.uid,
_mbox: rcmail.env.mailbox,
_part: attachid
}, rcmail.set_busy(true, 'itip.savingdata'));
e.preventDefault();
}
function attach_fullsize()
{
$('.attachmentslist').css('max-height','unset');
$('#attach_fullsize').hide();
}
function click_from_button(e)
{