mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
Reduce JavaScript footprint
This commit is contained in:
parent
689126c57d
commit
b12852bd08
42 changed files with 240 additions and 426 deletions
|
|
@ -95,7 +95,7 @@ export class AbstractViewLeft extends AbstractView
|
|||
{
|
||||
constructor(templateID)
|
||||
{
|
||||
super(templateID, 'Left');
|
||||
super(templateID, 'left');
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
}
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ export class AbstractViewRight extends AbstractView
|
|||
{
|
||||
constructor(templateID)
|
||||
{
|
||||
super(templateID, 'Right');
|
||||
super(templateID, 'right');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ export class AbstractViewSettings
|
|||
|
||||
export class AbstractViewLogin extends AbstractView {
|
||||
constructor(templateID) {
|
||||
super(templateID, 'Content');
|
||||
super(templateID, 'content');
|
||||
this.formError = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ const
|
|||
const
|
||||
vm = new ViewModelClass(vmScreen),
|
||||
id = vm.viewModelTemplateID,
|
||||
position = vm.viewType || '',
|
||||
dialog = ViewTypePopup === position,
|
||||
vmPlace = position ? doc.getElementById('rl-' + position.toLowerCase()) : null;
|
||||
position = 'rl-' + vm.viewType,
|
||||
dialog = ViewTypePopup === vm.viewType,
|
||||
vmPlace = doc.getElementById(position);
|
||||
|
||||
ViewModelClass.__builded = true;
|
||||
ViewModelClass.__vm = vm;
|
||||
|
|
@ -44,10 +44,9 @@ const
|
|||
: '<div id="V-'+ id + '" hidden=""></div>');
|
||||
vmPlace.append(vmDom);
|
||||
|
||||
vm.viewModelDom = vmDom;
|
||||
ViewModelClass.__dom = vmDom;
|
||||
vm.viewModelDom = ViewModelClass.__dom = vmDom;
|
||||
|
||||
if (ViewTypePopup === position) {
|
||||
if (dialog) {
|
||||
vm.close = () => hideScreenPopup(ViewModelClass);
|
||||
|
||||
// Firefox < 98 / Safari < 15.4 HTMLDialogElement not defined
|
||||
|
|
@ -237,7 +236,7 @@ const
|
|||
|
||||
|
||||
export const
|
||||
ViewTypePopup = 'Popups',
|
||||
ViewTypePopup = 'popups',
|
||||
|
||||
/**
|
||||
* @param {Function} ViewModelClassToShow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue