Add files via upload

This commit is contained in:
seb1k 2024-06-13 23:17:39 +02:00 committed by GitHub
parent 8176791872
commit 6d33f03279
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 181 additions and 45 deletions

32
styles/styles.min.css vendored
View file

@ -315,9 +315,9 @@ animation: spin 1.5s linear infinite;
.button-calendar:before { content: "\f073" !important;}
.backicon:before { content: "\f053";}
.backicon:before {content: "\f053";}
.iconrefresh:before { content: "\f021";}
.iconrefresh:before {content: "\f021";}
.sendicon:before{content: "\f1d8";}
@ -334,6 +334,25 @@ animation: spin 1.5s linear infinite;
.selecticon:before{content: "\f00c";}
.divscale_default:before{content: "\f31e";color:#e2e2e2;font-size:16px !important;padding-left:5px;}
html.layout-small .divscale_default{
transform: scale(1.4);
}
.divscale_default{
width:24px;
height:24px;
background-color:#424242;
position:absolute;
top:10px;
left:10px;
border-radius:5px;
cursor:pointer
}
.divscale_default:hover{
background-color:#888;
}
#folderlist-content .sidebar-menu{
color: var(--font);
@ -514,6 +533,7 @@ body {
left: 0 !important;
}
#divscale_default:before,
#filtersetslist td.name:before,
#filterslist td.name:before,
#identities-table td.mail:before,
@ -4214,7 +4234,7 @@ table.fixedcopy {
}
.messagelist td.subject span {
line-height: 1.7em;
line-height: 24px;
}
@ -4223,7 +4243,7 @@ padding-right: 20px;
}
.messagelist td.subject span.size {
padding-right: 15px;
margin-right: 15px;
}
@ -6730,6 +6750,7 @@ body.task-error-login #layout #layout-content > .header{
#message-header .header-content {
min-height: 4rem;
flex: 1;
max-width: 200px;
}
@ -7102,8 +7123,7 @@ html.dark-mode .listing tbody td a {
html.dark-mode .listing li,
html.dark-mode .listing li ul,
html.dark-mode .listing tbody td {
html.dark-mode .listing li ul {
border-bottom-color: #2c373a;
}

View file

@ -21,20 +21,4 @@
<p class="noscriptwarning"><roundcube:label name="noscriptwarning" /></p>
</noscript>
<roundcube:include file="includes/footer.html" />
<script>
var ts = $('.title')
var l1=ts[0]
var l2=ts[1]
l1.style.display="none"
l2.style.display="none"
rcmloginuser.placeholder=l1.innerText
rcmloginpwd.placeholder=l2.innerText
rcmloginsubmit.style.marginTop="16px"
</script>
<roundcube:include file="includes/footer.html" />

View file

@ -91,6 +91,7 @@
<div class="rightcol" role="region" aria-labelledby="aria-label-messagebody">
<h2 id="aria-label-messagebody" class="voice"><roundcube:label name="arialabelmessagebody" /></h2>
<roundcube:object name="messageObjects" id="message-objects" />
<div style="position:relative;z-index:1;"><div id="divscale_default" class="divscale_default z-depth-1" style='display:none' onclick="scale_default()"></div></div>
<roundcube:object name="messageBody" id="messagebody" headertableclass="headers-table" />
</div>
</div>

175
ui.min.js vendored
View file

@ -14,9 +14,9 @@
log = function() { return Function.prototype.bind.call(console.log, console);}();
warn = function() { return Function.prototype.bind.call(console.warn, console);}();
error = function() { return Function.prototype.bind.call(console.error, console);}();
log = function() { return Function.prototype.bind.call(console.log, console);}();
warn = function() { return Function.prototype.bind.call(console.warn, console);}();
error = function() { return Function.prototype.bind.call(console.error, console);}();
@ -712,7 +712,7 @@ if(rcmail.env.action=="preview")
}
}
})
// .addEventListener('managesieve.insertrow', function(o) { bootstrap_style(o.obj); })
.addEventListener('managesieve.insertrow', function(o) { bootstrap_style_elastic2022(o.obj); })
.addEventListener('add-recipient', function() { phone_confirmation('recipientsadded'); });
rcmail.init_pagejumper('.pagenav > input');
@ -741,6 +741,14 @@ if(rcmail.env.action=="preview")
status_callback();
}
*/
if($('a.button.enigma').length) //enigma plugin
{
$('a.button.enigma').remove()
$('#enigmamenu div.form-group').each(function() {
$('#compose-options').prepend(this)
});
}
}
// In compose/preview window we do not provide "Back" button, instead
@ -770,6 +778,33 @@ if(rcmail.env.action=="preview")
// bootstrap_style(p.container);
// });
}
else if (rcmail.env.task == 'login') {
if($('#ifplcontainer')) // plugin persistent login
setTimeout(function() {
ifplcontainer.remove() // remove ugly previous one
// and recreate it
var html = `
<tr class="form-group row">
<td class="title" style="display: none;">
<label for="rcmloginuser">Username</label>
</td>
<td class="input input-group input-group-lg">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="_ifpl" name="_ifpl" value="1">
<label class="custom-control-label" for="_ifpl">` + rcmail.gettext('ifpl_rememberme', 'persistent_login') + `</label>
</div>
</td>
</tr>
<tr id="ifpl-hint" class="form-group row" style="display: none;">
<td class="ifpl-hint" colspan="2">` + rcmail.gettext('ifpl_rememberme_hint', 'persistent_login') + `</td>
</tr>
`
$('#login-form table tbody').append(html);
})
}
rcmail.set_env({
thread_padding: '1.5rem',
@ -913,7 +948,7 @@ if(rcmail.env.action=="preview")
if (context != document) {
$(supported_controls, context).addClass('form-control');
$('[type=checkbox]', $('.propform', context)).addClass('form-check-input');
// $('[type=checkbox]', $('.propform', context)).addClass('form-check-input');
}
// The same for some other checkboxes
@ -934,6 +969,46 @@ if(rcmail.env.action=="preview")
$(this).addClass('box' + cl);
$('a', this).addClass('btn btn-primary btn-sm');
});
$('td.rowbuttons > a', context).addClass('btn');
// Make tables prettier
$('table:not(.table,.compact-table,.propform,.listing,.ui-datepicker-calendar)', context)
.filter(function() {
// exclude direct propform children and external content
return !$(this).parent().is('.propform')
&& !$(this).parents('#message-header,.message-htmlpart,.message-partheaders,.boxinformation,.raw-tables').length;
})
.each(function() {
// TODO: Consider implementing automatic setting of table-responsive on window resize
var table = $(this).addClass('table');
table.parent().addClass('table-responsive-sm');
table.find('thead').addClass('thead-default');
});
// Make logon form prettier
if (rcmail.env.task == 'login' && context == document) {
$('#rcmloginsubmit').addClass('btn-lg text-uppercase w-100');
$('#rcmloginoauth').addClass('btn btn-secondary btn-lg w-100');
$('#login-form table tr').each(function() {
var input = $('input,select', this),
label = $('label', this),
icon_name = input.data('icon'),
icon = $('<i>').attr('class', 'input-group-text icon ' + input.attr('name').replace('_', ''));
if (icon_name) {
icon.addClass(icon_name);
}
$(this).addClass('form-group row');
label.parent().css('display', 'none');
input.addClass(input.is('select') ? 'custom-select' : 'form-control')
.attr('placeholder', label.text())
.before($('<span class="input-group-prepend">').append(icon))
.parent().addClass('input-group input-group-lg');
});
}
}
function bootstrap_style(context)
@ -2056,14 +2131,6 @@ if(rcmail.env.action=="preview")
screen_resize_headers();
//for phone : back to normal
//document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0');
var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
if(is_firefox)
document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width, initial-scale=0.999, user-scalable=0');
else
document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width, initial-scale=1, user-scalable=0');
};
function hide_content()
@ -2120,8 +2187,6 @@ if(rcmail.env.action=="preview")
*/
function message_displayed(p)
{
//for phone : permit zoom
document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width');
if (p.type == 'loading' && $('.iframe-loader:visible').length) {
// hide original message object, we don't need two "loaders"
@ -4555,6 +4620,57 @@ if(UI.get_screen_mode()=="small" && document.getElementById("messagelist-content
instructionsReleaseToRefresh:'<i class="sebicon iconrefresh icon_pulltorefresh" style="font-size:24px"></i>'
});
}
if(document.getElementById("messagelist-content"))
{
document.getElementById("messagelist-content").addEventListener("wheel", (e) => {
scroll_mailbymail(e)
})
new ResizeObserver(resizemessagelist).observe(document.getElementById("messagelist-content"))
}
function resizemessagelist()
{
if(!document.getElementById("messagelist-content"))return // not loaded yet
var d=document.getElementById("messagelist-content")
var h = d.offsetHeight
if(!d.querySelector('.message'))return // not loaded yet
var trsize = d.querySelector('.message').offsetHeight
d.style.paddingBottom=h%trsize+"px"
}
function scroll_mailbymail(e)
{
e.preventDefault();
e.stopPropagation();
var mlc=document.getElementById("messagelist-content")
var scrollTop=mlc.scrollTop
//find first shown tr
var trs=messagelist.querySelectorAll('tr')
for(var i=1;i<trs.length;i++)
if(scrollTop<=trs[i].offsetTop)
break;
if(trs[i].offsetTop-scrollTop>15 && e.deltaY>0) i--;
if(e.deltaY>0)
i++
else
i--
if(i<0)i=0;
if(i>=trs.length)i=trs.length;
mlc.scrollTop=trs[i].offsetTop
}
function refresh_mail_anim()
{
@ -4919,7 +5035,6 @@ function colors_from_txt(txt)
if(!txt) return "AAA";
var lst_cols="DF71AE D45345 9877D5 6EB9C2 A47563 E1843B 62BF78 5196D5 EACF47";
//var lst_cols="F44336 E91E63 9C27B0 673AB7 3F51B5 2196F3 03A9F4 00BCD4 009688 4CAF50 8BC34A CDDC39 FFEB3B FFC107 FF9800 FF5722 795548 607D8B";
var tab = lst_cols.split(' ');
var n = 0;
@ -5050,27 +5165,31 @@ function autoscale_message_reset()
if(!use_autoscale) return;
delete document.body.dataset.originalscrollWidth
var divms = document.querySelector("#messagebody").style
divms.width=""
divms.height = ""
divms.transform=""
divms.transformOrigin="";
if($('#divscale_default').data("scale")=="no") // ask for no more autoscale
return
setTimeout(function() { autoscale_message() }, 0);
}
function autoscale_message()
{
var scroolmod = window.innerWidth-$(document).width()
if(scroolmod >= 0) // no, scrollbar, it fit
return
{
$('#divscale_default').css('display','none')
return
}
$('#divscale_default').css('display','inline-block')
var s = document.body.scrollWidth
var divms = document.querySelector("#messagebody").style
@ -5100,6 +5219,17 @@ var ratio = w/ow
divms.height = h * ratio +"px"
divms.transform="scale("+ratio+")"
divms.transformOrigin="0 0";
}
function scale_default(){
$('#divscale_default').css('display','none')
$('#divscale_default').data("scale","no")
autoscale_message_reset()
}
go_PWA()
@ -5177,4 +5307,5 @@ function plugin_switchIdent_addCbElastic2022($sw) {
}
return false;
}
}