Bugfix: the new endShowHide failed in Edge and mobile browsers

Cleanup bootstrap less files
This commit is contained in:
djmaze 2020-09-02 21:30:23 +02:00
parent 7135cc38fe
commit 0e8bf13d5d
32 changed files with 167 additions and 663 deletions

5
dev/External/ko.js vendored
View file

@ -33,11 +33,6 @@ ko.bindingHandlers.editor = {
}
};
ko.bindingHandlers.visibleAnimated = {
init: (element, fValueAccessor) => element.hidden = !ko.unwrap(fValueAccessor()),
update: (element, fValueAccessor) => element.hidden = !ko.unwrap(fValueAccessor())
};
ko.bindingHandlers.tooltip = {
init: (element, fValueAccessor) => {
const fValue = fValueAccessor(),

View file

@ -5,21 +5,19 @@ import { $htmlCL, VIEW_MODELS } from 'Common/Globals';
//import { bMobileDevice } from 'Common/Globals';
let currentScreen = null,
defaultScreenName = '';
defaultScreenName = '',
popupVisibilityNames = [];
const SCREENS = {},
qs = s => document.querySelector(s),
isNonEmptyArray = values => Array.isArray(values) && values.length,
popupVisibilityNames = ko.observableArray([]),
autofocus = dom => {
// if (!bMobileDevice) {
const af = dom.querySelector('[autofocus]');
af && af.focus();
};
export const popupVisibility = ko.computed(() => 0 < popupVisibilityNames().length);
export const popupVisibility = ko.computed(() => 0 < popupVisibilityNames.length);
export const ViewType = {
Popup: 'Popups',
@ -165,7 +163,7 @@ function buildViewModel(ViewModelClass, vmScreen) {
// show/hide popup/modal
const endShowHide = e => {
if (e.target === vmDom && 'background-color' === e.propertyName) {
if (e.target === vmDom) {
if (vmDom.classList.contains('show')) {
autofocus(vmDom);
vm.onShowWithDelay && vm.onShowWithDelay();
@ -178,19 +176,19 @@ function buildViewModel(ViewModelClass, vmScreen) {
vm.modalVisibility.subscribe(value => {
if (value) {
vmDom.style.zIndex = 3000 + popupVisibilityNames().length + 10;
vmDom.style.zIndex = 3000 + popupVisibilityNames.length + 10;
vmDom.hidden = false;
vm.storeAndSetKeyScope();
popupVisibilityNames.push(vm.viewModelName);
requestAnimationFrame(() => { // wait just before the next paint
document.body.offsetHeight; // force a reflow
vmDom.offsetHeight; // force a reflow
vmDom.classList.add('show'); // trigger the transitions
});
} else {
vm.onHide && vm.onHide();
vmDom.classList.remove('show');
vm.restoreKeyScope();
popupVisibilityNames.remove(vm.viewModelName);
popupVisibilityNames = popupVisibilityNames.filter(v=>v!==vm.viewModelName);
}
vmDom.setAttribute('aria-hidden', !value);
});
@ -419,8 +417,7 @@ export function startScreens(screensClasses) {
* @returns {void}
*/
export function setHash(hash, silence = false, replace = false) {
hash = '#' === hash.substr(0, 1) ? hash.substr(1) : hash;
hash = '/' === hash.substr(0, 1) ? hash.substr(1) : hash;
hash = hash.replace(/^[#/]+/, '');
const cmd = replace ? 'replaceHash' : 'setHash';
@ -509,15 +506,13 @@ function settingsMenuKeysHandler(items) {
if (event && index) {
while (index-- && !items[index].matches('.selected'));
if (handler && 'up' === handler.shortcut) {
index && --index;
index && --index;
} else if (index < items.length - 1) {
++index;
}
const resultHash = items[index].href;
if (resultHash) {
setHash(resultHash, false, true);
}
resultHash && setHash(resultHash, false, true);
}
}).throttle(200);
}

View file

@ -41,25 +41,25 @@ html.rl-started-trigger.no-mobile .b-login-content .loginFormWrapper {
}*/
#rl-loading {
.transition(opacity 0.5s linear);
transition: opacity 0.5s linear;
}
html.rl-started-delay {
#rl-left {
.transition(width 0.3s ease-out);
transition: width 0.3s ease-out;
}
#rl-right {
.transition(~'left 0.3s ease-out, right 0.3s ease-out');
transition: left 0.3s ease-out, right 0.3s ease-out;
}
#rl-sub-left, #rl-sub-left .messageList .inputSearch {
.transition(width 0.3s ease-out);
transition: width 0.3s ease-out;
}
#rl-sub-right {
.transition(left 0.3s ease-out);
transition: left 0.3s ease-out;
}
}
@ -77,7 +77,7 @@ html.no-mobile {
.alertError {
display: block;
opacity: 1;
.transition(opacity 0.5s linear);
transition: opacity 0.5s linear;
}
.alertError[hidden] {
opacity: 0;
@ -102,11 +102,11 @@ html.no-mobile {
}
&.no-mobile .b-login-content .loginFormWrapper {
.transition(all 0.3s ease-out);
transition: all 0.3s ease-out;
}
& .button-delete-transitions {
.transition(all 0.2s linear);
transition: all 0.2s linear;
}
& .b-folders .e-item .anim-action-class {
@ -114,31 +114,31 @@ html.no-mobile {
}
& .b-folders .btn.buttonContacts {
.transition(margin 0.3s linear);
transition: margin 0.3s linear;
}
& .b-folders .b-content.opacity-on-panel-disabled {
.transition(opacity 0.3s linear);
transition: opacity 0.3s linear;
}
& .messageList {
.messageListItem {
.transition(max-height 400ms ease);
transition: max-height 400ms ease;
}
.listDragOver {
.transition(all 400ms ease);
transition: all 400ms ease;
}
}
& .b-list-content {
.e-contact-item {
.transition(max-height 400ms ease);
transition: max-height 400ms ease;
}
}
& .modal.b-domain-content {
.modal-body {
.transition(left 500ms ease);
transition: left 500ms ease;
}
}

View file

@ -341,16 +341,7 @@
border-color: #999;
}
&::-webkit-input-placeholder {
color: #ddd;
}
&::-moz-placeholder {
color: #ddd;
}
&:-moz-placeholder {
color: #ddd;
}
&:-ms-input-placeholder {
&::placeholder {
color: #ddd;
}
}

View file

@ -30,8 +30,8 @@ html.rl-no-preview-pane {
background-color: #eee;
// #gradient > .vertical(#f4f4f4, #dfdfdf);
.border-bottom-right-radius(@rlMainBorderRadius);
.border-bottom-left-radius(@rlMainBorderRadius);
border-bottom-right-radius: @rlMainBorderRadius;
border-bottom-left-radius: @rlMainBorderRadius;
.e-quota {
display: inline-block;
@ -81,8 +81,8 @@ html.rl-no-preview-pane {
background-color: #eee;
// #gradient > .vertical(#f4f4f4, #dfdfdf);
.border-top-right-radius(@rlMainBorderRadius);
.border-top-left-radius(@rlMainBorderRadius);
border-top-right-radius: @rlMainBorderRadius;
border-top-left-radius: @rlMainBorderRadius;
.checkboxCkeckAll {
margin: 5px 0;
@ -242,7 +242,7 @@ html.rl-no-preview-pane {
display: block;
height: 1px;
background-color: #999;
.opacity(20);
opacity: 0.2;
}
.wrapper {
@ -560,7 +560,7 @@ html.rl-no-preview-pane {
.delimiter {
background-color: #398CF2;
.opacity(20);
opacity: 0.2;
}
+ .messageListItem .delimiter {

View file

@ -34,7 +34,7 @@ html.rl-no-preview-pane {
/*overflow: hidden;*/
border: @rlLowBorderSize solid @rlMainDarkColor;
.border-radius(@rlLowBorderRadius);
border-radius: @rlLowBorderRadius;
background-color: #fff;
@ -277,10 +277,10 @@ html.rl-no-preview-pane {
z-index: 2;
cursor: pointer;
border-radius: 5px;
.opacity(50);
opacity: 0.5;
&:hover {
.opacity(80);
opacity: 0.8;
border-color: #666;
background-color: #888;
color: #fff;

View file

@ -201,7 +201,7 @@ html {
height: 15px;
background-color: #ddd;
margin: 0 5px;
.box-shadow(0px 0px 3px rgba(0, 0, 0, 0.3));
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
border-radius: 100%;
display: inline-block;

View file

@ -60,7 +60,7 @@ button.close-custom {
}
.input-append input, .input-append select, .input-append .uneditable-input {
.border-radius(3px);
border-radius: 3px;
}
select {

View file

@ -17,8 +17,6 @@
.cke_top {
padding: 6px 4px 1px 6px !important;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-bottom: 1px solid #b6b6b6 !important;
background: #F0F0F0 !important;

View file

@ -113,7 +113,6 @@ html.glass {
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-transition-delay: 9999s;
-webkit-transition: color 9999s ease-out, background-color 9999s ease-out;
transition: color 9999s ease-out, background-color 9999s ease-out;
}
}

View file

@ -8,7 +8,7 @@
border-radius: 3px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
.transition(~"border linear .2s, box-shadow linear .2s");
transition: border linear .2s, box-shadow linear .2s;
&.inputosaurus-focused {
background-color: #fff;

View file

@ -24,7 +24,7 @@ class LoginAdminView extends AbstractViewNext {
this.mobile = !!Settings.appSettingsGet('mobile');
this.mobileDevice = !!Settings.appSettingsGet('mobileDevice');
this.hideSubmitButton = !!Settings.appSettingsGet('hideSubmitButton');
this.hideSubmitButton = Settings.appSettingsGet('hideSubmitButton') ? '' : null;
this.login = ko.observable('');
this.password = ko.observable('');

View file

@ -34,7 +34,7 @@ class LoginUserView extends AbstractViewNext {
constructor() {
super();
this.hideSubmitButton = !!Settings.appSettingsGet('hideSubmitButton');
this.hideSubmitButton = Settings.appSettingsGet('hideSubmitButton') ? '' : null;
this.welcome = ko.observable(!!Settings.settingsGet('UseLoginWelcomePage'));