Cleanup user-select

This commit is contained in:
djmaze 2021-12-28 14:48:20 +01:00
parent 997dc87305
commit 2a01d8c991
19 changed files with 8 additions and 23 deletions

View file

@ -12,7 +12,6 @@ class AbstractView {
this.viewModelTemplateID = templateID;
this.viewType = type;
this.viewModelDom = null;
this.viewNoUserSelect = false;
this.keyScope = {
scope: Scope.None,

View file

@ -47,10 +47,6 @@ const
vm.viewModelDom = vmDom;
ViewModelClass.__dom = vmDom;
if (vm.viewNoUserSelect) {
vmDom.classList.add('g-ui-user-select-none');
}
if (ViewType.Popup === position) {
vm.cancelCommand = vm.closeCommand = createCommand(() => hideScreenPopup(ViewModelClass));

View file

@ -2,7 +2,7 @@ import ko from 'ko';
import { pString } from 'Common/Utils';
import { settings } from 'Common/Links';
import { elementById } from 'Common/Globals';
import { createElement, elementById } from 'Common/Globals';
import { AbstractScreen } from 'Knoin/AbstractScreen';
@ -33,9 +33,10 @@ export class AbstractSettingsScreen extends AbstractScreen {
} else {
const vmPlace = elementById('rl-settings-subscreen');
if (vmPlace) {
viewModelDom = Element.fromHTML('<div id="V-Settings-'
+ (RoutedSettingsViewModel.name.replace(/(User|Admin)Settings/,''))
+ '" class="g-ui-user-select-none" hidden=""></div>');
viewModelDom = createElement('div',{
id: 'V-Settings-' + RoutedSettingsViewModel.name.replace(/(User|Admin)Settings/,''),
hidden: ''
})
vmPlace.append(viewModelDom);
settingsScreen = new RoutedSettingsViewModel();

View file

@ -1,5 +1,7 @@
#V-Settings-Config {
user-select: text;
em {
display: block;
}

View file

@ -1,4 +1,5 @@
#rl-settings-subscreen,
.g-ui-user-select-none {
user-select: none;
-webkit-touch-callout: none;

View file

@ -8,7 +8,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class AccountPopupView extends AbstractViewPopup {
constructor() {
super('Account');
this.viewNoUserSelect = true;
this.addObservables({
isNew: true,

View file

@ -6,7 +6,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class AddOpenPgpKeyPopupView extends AbstractViewPopup {
constructor() {
super('AddOpenPgpKey');
this.viewNoUserSelect = true;
this.addObservables({
key: '',

View file

@ -11,7 +11,6 @@ import { FolderUserStore } from 'Stores/User/Folder';
class AdvancedSearchPopupView extends AbstractViewPopup {
constructor() {
super('AdvancedSearch');
this.viewNoUserSelect = true;
this.addObservables({
from: '',

View file

@ -7,7 +7,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class AskPopupView extends AbstractViewPopup {
constructor() {
super('Ask');
this.viewNoUserSelect = true;
this.addObservables({
askDesc: '',

View file

@ -18,7 +18,6 @@ const KEY_NAME_SUBSTR = -8,
class ComposeOpenPgpPopupView extends AbstractViewPopup {
constructor() {
super('ComposeOpenPgp');
this.viewNoUserSelect = true;
this.publicKeysOptionsCaption = i18nPGP('ADD_A_PUBLICK_KEY');
this.privateKeysOptionsCaption = i18nPGP('SELECT_A_PRIVATE_KEY');

View file

@ -30,7 +30,6 @@ const domainToParams = oDomain => ({
class DomainPopupView extends AbstractViewPopup {
constructor() {
super('Domain');
this.viewNoUserSelect = true;
this.addObservables(this.getDefaults());
this.addObservables({

View file

@ -16,7 +16,6 @@ import { folderListOptionsBuilder } from 'Common/UtilsUser';
class FilterPopupView extends AbstractViewPopup {
constructor() {
super('Filter');
this.viewNoUserSelect = true;
this.addObservables({
isNew: true,

View file

@ -11,7 +11,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class FolderClearPopupView extends AbstractViewPopup {
constructor() {
super('FolderClear');
this.viewNoUserSelect = true;
this.addObservables({
selectedFolder: null,

View file

@ -19,7 +19,6 @@ import { FolderModel } from 'Model/FolderCollection';
class FolderCreatePopupView extends AbstractViewPopup {
constructor() {
super('FolderCreate');
this.viewNoUserSelect = true;
this.addObservables({
folderName: '',

View file

@ -13,7 +13,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class FolderSystemPopupView extends AbstractViewPopup {
constructor() {
super('FolderSystem');
this.viewNoUserSelect = true;
this.sChooseOnText = '';
this.sUnuseText = '';

View file

@ -7,7 +7,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class LanguagesPopupView extends AbstractViewPopup {
constructor() {
super('Languages');
this.viewNoUserSelect = true;
this.fLang = null;
this.userLanguage = ko.observable('');

View file

@ -9,7 +9,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class MessageOpenPgpPopupView extends AbstractViewPopup {
constructor() {
super('MessageOpenPgp');
this.viewNoUserSelect = true;
this.addObservables({
notification: '',

View file

@ -8,7 +8,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
class NewOpenPgpKeyPopupView extends AbstractViewPopup {
constructor() {
super('NewOpenPgpKey');
this.viewNoUserSelect = true;
this.addObservables({
email: '',

View file

@ -16,7 +16,6 @@ import { FilterPopupView } from 'View/Popup/Filter';
class SieveScriptPopupView extends AbstractViewPopup {
constructor() {
super('SieveScript');
this.viewNoUserSelect = true;
addObservablesTo(this, {
saveError: false,