mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup user-select
This commit is contained in:
parent
997dc87305
commit
2a01d8c991
19 changed files with 8 additions and 23 deletions
|
|
@ -12,7 +12,6 @@ class AbstractView {
|
||||||
this.viewModelTemplateID = templateID;
|
this.viewModelTemplateID = templateID;
|
||||||
this.viewType = type;
|
this.viewType = type;
|
||||||
this.viewModelDom = null;
|
this.viewModelDom = null;
|
||||||
this.viewNoUserSelect = false;
|
|
||||||
|
|
||||||
this.keyScope = {
|
this.keyScope = {
|
||||||
scope: Scope.None,
|
scope: Scope.None,
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,6 @@ const
|
||||||
vm.viewModelDom = vmDom;
|
vm.viewModelDom = vmDom;
|
||||||
ViewModelClass.__dom = vmDom;
|
ViewModelClass.__dom = vmDom;
|
||||||
|
|
||||||
if (vm.viewNoUserSelect) {
|
|
||||||
vmDom.classList.add('g-ui-user-select-none');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ViewType.Popup === position) {
|
if (ViewType.Popup === position) {
|
||||||
vm.cancelCommand = vm.closeCommand = createCommand(() => hideScreenPopup(ViewModelClass));
|
vm.cancelCommand = vm.closeCommand = createCommand(() => hideScreenPopup(ViewModelClass));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
||||||
|
|
||||||
import { pString } from 'Common/Utils';
|
import { pString } from 'Common/Utils';
|
||||||
import { settings } from 'Common/Links';
|
import { settings } from 'Common/Links';
|
||||||
import { elementById } from 'Common/Globals';
|
import { createElement, elementById } from 'Common/Globals';
|
||||||
|
|
||||||
import { AbstractScreen } from 'Knoin/AbstractScreen';
|
import { AbstractScreen } from 'Knoin/AbstractScreen';
|
||||||
|
|
||||||
|
|
@ -33,9 +33,10 @@ export class AbstractSettingsScreen extends AbstractScreen {
|
||||||
} else {
|
} else {
|
||||||
const vmPlace = elementById('rl-settings-subscreen');
|
const vmPlace = elementById('rl-settings-subscreen');
|
||||||
if (vmPlace) {
|
if (vmPlace) {
|
||||||
viewModelDom = Element.fromHTML('<div id="V-Settings-'
|
viewModelDom = createElement('div',{
|
||||||
+ (RoutedSettingsViewModel.name.replace(/(User|Admin)Settings/,''))
|
id: 'V-Settings-' + RoutedSettingsViewModel.name.replace(/(User|Admin)Settings/,''),
|
||||||
+ '" class="g-ui-user-select-none" hidden=""></div>');
|
hidden: ''
|
||||||
|
})
|
||||||
vmPlace.append(viewModelDom);
|
vmPlace.append(viewModelDom);
|
||||||
|
|
||||||
settingsScreen = new RoutedSettingsViewModel();
|
settingsScreen = new RoutedSettingsViewModel();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
#V-Settings-Config {
|
#V-Settings-Config {
|
||||||
|
user-select: text;
|
||||||
|
|
||||||
em {
|
em {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
#rl-settings-subscreen,
|
||||||
.g-ui-user-select-none {
|
.g-ui-user-select-none {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class AccountPopupView extends AbstractViewPopup {
|
class AccountPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('Account');
|
super('Account');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
isNew: true,
|
isNew: true,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class AddOpenPgpKeyPopupView extends AbstractViewPopup {
|
class AddOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('AddOpenPgpKey');
|
super('AddOpenPgpKey');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
key: '',
|
key: '',
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { FolderUserStore } from 'Stores/User/Folder';
|
||||||
class AdvancedSearchPopupView extends AbstractViewPopup {
|
class AdvancedSearchPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('AdvancedSearch');
|
super('AdvancedSearch');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
from: '',
|
from: '',
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class AskPopupView extends AbstractViewPopup {
|
class AskPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('Ask');
|
super('Ask');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
askDesc: '',
|
askDesc: '',
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ const KEY_NAME_SUBSTR = -8,
|
||||||
class ComposeOpenPgpPopupView extends AbstractViewPopup {
|
class ComposeOpenPgpPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('ComposeOpenPgp');
|
super('ComposeOpenPgp');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.publicKeysOptionsCaption = i18nPGP('ADD_A_PUBLICK_KEY');
|
this.publicKeysOptionsCaption = i18nPGP('ADD_A_PUBLICK_KEY');
|
||||||
this.privateKeysOptionsCaption = i18nPGP('SELECT_A_PRIVATE_KEY');
|
this.privateKeysOptionsCaption = i18nPGP('SELECT_A_PRIVATE_KEY');
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const domainToParams = oDomain => ({
|
||||||
class DomainPopupView extends AbstractViewPopup {
|
class DomainPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('Domain');
|
super('Domain');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables(this.getDefaults());
|
this.addObservables(this.getDefaults());
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import { folderListOptionsBuilder } from 'Common/UtilsUser';
|
||||||
class FilterPopupView extends AbstractViewPopup {
|
class FilterPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('Filter');
|
super('Filter');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
isNew: true,
|
isNew: true,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class FolderClearPopupView extends AbstractViewPopup {
|
class FolderClearPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('FolderClear');
|
super('FolderClear');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
selectedFolder: null,
|
selectedFolder: null,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import { FolderModel } from 'Model/FolderCollection';
|
||||||
class FolderCreatePopupView extends AbstractViewPopup {
|
class FolderCreatePopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('FolderCreate');
|
super('FolderCreate');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
folderName: '',
|
folderName: '',
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class FolderSystemPopupView extends AbstractViewPopup {
|
class FolderSystemPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('FolderSystem');
|
super('FolderSystem');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.sChooseOnText = '';
|
this.sChooseOnText = '';
|
||||||
this.sUnuseText = '';
|
this.sUnuseText = '';
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class LanguagesPopupView extends AbstractViewPopup {
|
class LanguagesPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('Languages');
|
super('Languages');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.fLang = null;
|
this.fLang = null;
|
||||||
this.userLanguage = ko.observable('');
|
this.userLanguage = ko.observable('');
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class MessageOpenPgpPopupView extends AbstractViewPopup {
|
class MessageOpenPgpPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('MessageOpenPgp');
|
super('MessageOpenPgp');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
notification: '',
|
notification: '',
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
class NewOpenPgpKeyPopupView extends AbstractViewPopup {
|
class NewOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('NewOpenPgpKey');
|
super('NewOpenPgpKey');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
email: '',
|
email: '',
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import { FilterPopupView } from 'View/Popup/Filter';
|
||||||
class SieveScriptPopupView extends AbstractViewPopup {
|
class SieveScriptPopupView extends AbstractViewPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('SieveScript');
|
super('SieveScript');
|
||||||
this.viewNoUserSelect = true;
|
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
saveError: false,
|
saveError: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue