diff --git a/images/widgets/common/diagram/image-delete.svg b/images/widgets/common/diagram/image-delete.svg index 7e2d578d33b1..5888cf4ba924 100644 --- a/images/widgets/common/diagram/image-delete.svg +++ b/images/widgets/common/diagram/image-delete.svg @@ -4,7 +4,7 @@ - + diff --git a/images/widgets/common/diagram/image-edit.svg b/images/widgets/common/diagram/image-edit.svg index 5cb85c8d71d6..47f01f897003 100644 --- a/images/widgets/common/diagram/image-edit.svg +++ b/images/widgets/common/diagram/image-edit.svg @@ -4,6 +4,6 @@ - + diff --git a/images/widgets/common/diagram/image-insert.svg b/images/widgets/common/diagram/image-insert.svg index c80069434f4d..74d2982cc0f1 100644 --- a/images/widgets/common/diagram/image-insert.svg +++ b/images/widgets/common/diagram/image-insert.svg @@ -4,6 +4,6 @@ - + diff --git a/js/core/class.js b/js/core/class.js index 1332b37713e4..dd977787dfc8 100644 --- a/js/core/class.js +++ b/js/core/class.js @@ -80,13 +80,24 @@ var include = function() { }; var subclassOf = function(parentClass) { - if(this.parent === parentClass) { - return true; - } - if(!this.parent || !this.parent.subclassOf) { - return false; + const hasParentProperty = Object.prototype.hasOwnProperty.bind(this)("parent"); + const isES6Class = !hasParentProperty && this.parent; + + if(isES6Class) { + const baseClass = Object.getPrototypeOf(this); + + return baseClass === parentClass || baseClass.subclassOf(parentClass); + } else { + if(this.parent === parentClass) { + return true; + } + + if(!this.parent || !this.parent.subclassOf) { + return false; + } + + return this.parent.subclassOf(parentClass); } - return this.parent.subclassOf(parentClass); }; var abstract = function() { diff --git a/js/exporter/file_saver.js b/js/exporter/file_saver.js index d05055b4e5bf..165b24e38596 100644 --- a/js/exporter/file_saver.js +++ b/js/exporter/file_saver.js @@ -101,26 +101,24 @@ exports.fileSaver = { }, _saveBlobAs: function(fileName, format, data) { - var that = this; - - that._blobSaved = false; + this._blobSaved = false; if(typeUtils.isDefined(navigator.msSaveOrOpenBlob)) { navigator.msSaveOrOpenBlob(data, fileName); - that._blobSaved = true; + this._blobSaved = true; } else if(typeUtils.isDefined(window.WinJS)) { - that._winJSBlobSave(data, fileName, format); - that._blobSaved = true; + this._winJSBlobSave(data, fileName, format); + this._blobSaved = true; } else { var URL = window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL; if(typeUtils.isDefined(URL)) { var objectURL = URL.createObjectURL(data); - var downloadLink = that._linkDownloader(fileName, objectURL); + var downloadLink = this._linkDownloader(fileName, objectURL); setTimeout(() => { URL.revokeObjectURL(objectURL); - that._objectUrlRevoked = true; + this._objectUrlRevoked = true; }, this._revokeObjectURLTimeout); this._click(downloadLink); diff --git a/js/localization/messages/de.json b/js/localization/messages/de.json index 37d0a729588a..79ddccaa8ffc 100644 --- a/js/localization/messages/de.json +++ b/js/localization/messages/de.json @@ -264,84 +264,8 @@ "dxFileManager-errorDirectoryExistsFormat": "Ordner {0} existiert bereits.", "dxFileManager-errorFileExistsFormat": "Datei {0} existiert bereits.", "dxFileManager-errorFileNotFoundFormat": "Datei {0} wurde nicht gefunden.", - "dxFileManager-errorDirectoryNotFoundFormat": "TODO", - "dxFileManager-errorWrongFileExtension": "TODO", - "dxFileManager-errorMaxFileSizeExceeded": "TODO", - "dxFileManager-errorInvalidSymbols": "TODO", "dxFileManager-errorDefault": "Unbekannter Fehler", - "dxFileManager-commandCreate": "TODO", - "dxFileManager-commandRename": "TODO", - "dxFileManager-commandMove": "TODO", - "dxFileManager-commandCopy": "TODO", - "dxFileManager-commandDelete": "TODO", - "dxFileManager-commandDownload": "TODO", - "dxFileManager-commandUpload": "TODO", - "dxFileManager-commandRefresh": "TODO", - "dxFileManager-commandThumbnails": "TODO", - "dxFileManager-commandDetails": "TODO", - "dxFileManager-commandClear": "TODO", - - "dxFileManager-dialogDirectoryChooserTitle": "TODO", - "dxFileManager-dialogDirectoryChooserButtonText": "TODO", - "dxFileManager-dialogRenameItemTitle": "TODO", - "dxFileManager-dialogRenameItemButtonText": "TODO", - "dxFileManager-dialogCreateDirectoryTitle": "TODO", - "dxFileManager-dialogCreateDirectoryButtonText": "TODO", - - "dxFileManager-editingCreateSingleItemProcessingMessage": "TODO", - "dxFileManager-editingCreateSingleItemSuccessMessage": "TODO", - "dxFileManager-editingCreateSingleItemErrorMessage": "TODO", - "dxFileManager-editingCreateCommonErrorMessage": "TODO", - - "dxFileManager-editingRenameSingleItemProcessingMessage": "TODO", - "dxFileManager-editingRenameSingleItemSuccessMessage": "TODO", - "dxFileManager-editingRenameSingleItemErrorMessage": "TODO", - "dxFileManager-editingRenameCommonErrorMessage": "TODO", - - "dxFileManager-editingDeleteSingleItemProcessingMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingDeleteSingleItemSuccessMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingDeleteSingleItemErrorMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingDeleteCommonErrorMessage": "TODO", - - "dxFileManager-editingMoveSingleItemProcessingMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingMoveSingleItemSuccessMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingMoveSingleItemErrorMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingMoveCommonErrorMessage": "TODO", - - "dxFileManager-editingCopySingleItemProcessingMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingCopySingleItemSuccessMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingCopySingleItemErrorMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingCopyCommonErrorMessage": "TODO", - - "dxFileManager-editingUploadSingleItemProcessingMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingUploadSingleItemSuccessMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingUploadSingleItemErrorMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingUploadCanceledMessage": "TODO", - - "dxFileManager-listDetailsColumnCaptionName": "TODO", - "dxFileManager-listDetailsColumnCaptionDateModified": "TODO", - "dxFileManager-listDetailsColumnCaptionFileSize": "TODO", - - "dxFileManager-listThumbnailsTooltipTextSize": "TODO", - "dxFileManager-listThumbnailsTooltipTextDateModified": "TODO", - - "dxFileManager-notificationProgressPanelTitle": "TODO", - "dxFileManager-notificationProgressPanelEmptyListText": "TODO", - "dxFileManager-notificationProgressPanelOperationCanceled": "TODO", - "dxDiagram-categoryGeneral": "Allgemein", "dxDiagram-categoryFlowchart": "Flussdiagramm", "dxDiagram-categoryOrgChart": "Organisationsdiagramm", diff --git a/js/localization/messages/en.json b/js/localization/messages/en.json index 158e60fd4b3c..ecf33b987f7b 100644 --- a/js/localization/messages/en.json +++ b/js/localization/messages/en.json @@ -302,77 +302,77 @@ "dxFileManager-errorInvalidSymbols": "This name contains invalid characters.", "dxFileManager-errorDefault": "Unspecified error.", - "dxFileManager-commandCreate": "New directory", - "dxFileManager-commandRename": "Rename", - "dxFileManager-commandMove": "Move", - "dxFileManager-commandCopy": "Copy", - "dxFileManager-commandDelete": "Delete", - "dxFileManager-commandDownload": "Download", - "dxFileManager-commandUpload": "Upload files", - "dxFileManager-commandRefresh": "Refresh", - "dxFileManager-commandThumbnails": "Thumbnails View", - "dxFileManager-commandDetails": "Details View", - "dxFileManager-commandClear": "Clear selection", - - "dxFileManager-dialogDirectoryChooserTitle": "Select Destination Directory", - "dxFileManager-dialogDirectoryChooserButtonText": "Select", - "dxFileManager-dialogRenameItemTitle": "Rename", - "dxFileManager-dialogRenameItemButtonText": "Save", - "dxFileManager-dialogCreateDirectoryTitle": "New directory", - "dxFileManager-dialogCreateDirectoryButtonText": "Create", - - "dxFileManager-editingCreateSingleItemProcessingMessage": "Creating a directory inside {0}", - "dxFileManager-editingCreateSingleItemSuccessMessage": "Created a directory inside {0}", - "dxFileManager-editingCreateSingleItemErrorMessage": "Directory wasn't created", - "dxFileManager-editingCreateCommonErrorMessage": "Directory wasn't created", - - "dxFileManager-editingRenameSingleItemProcessingMessage": "Renaming an item inside {0}", - "dxFileManager-editingRenameSingleItemSuccessMessage": "Renamed an item inside {0}", - "dxFileManager-editingRenameSingleItemErrorMessage": "Item wasn't renamed", - "dxFileManager-editingRenameCommonErrorMessage": "Item wasn't renamed", - - "dxFileManager-editingDeleteSingleItemProcessingMessage": "Deleting an item from {0}", - "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "Deleting {0} items from {1}", - "dxFileManager-editingDeleteSingleItemSuccessMessage": "Deleted an item from {0}", - "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "Deleted {0} items from {1}", - "dxFileManager-editingDeleteSingleItemErrorMessage": "Item wasn't deleted", - "dxFileManager-editingDeleteMultipleItemsErrorMessage": "{0} items weren't deleted", - "dxFileManager-editingDeleteCommonErrorMessage": "Some items weren't deleted", - - "dxFileManager-editingMoveSingleItemProcessingMessage": "Moving an item to {0}", - "dxFileManager-editingMoveMultipleItemsProcessingMessage": "Moving {0} items to {1}", - "dxFileManager-editingMoveSingleItemSuccessMessage": "Moved an item to {0}", - "dxFileManager-editingMoveMultipleItemsSuccessMessage": "Moved {0} items to {1}", - "dxFileManager-editingMoveSingleItemErrorMessage": "Item wasn't moved", - "dxFileManager-editingMoveMultipleItemsErrorMessage": "{0} items weren't moved", - "dxFileManager-editingMoveCommonErrorMessage": "Some items weren't moved", - - "dxFileManager-editingCopySingleItemProcessingMessage": "Copying an item to {0}", - "dxFileManager-editingCopyMultipleItemsProcessingMessage": "Copying {0} items to {1}", - "dxFileManager-editingCopySingleItemSuccessMessage": "Copied an item to {0}", - "dxFileManager-editingCopyMultipleItemsSuccessMessage": "Copied {0} items to {1}", - "dxFileManager-editingCopySingleItemErrorMessage": "Item wasn't copied", - "dxFileManager-editingCopyMultipleItemsErrorMessage": "{0} items weren't copied", - "dxFileManager-editingCopyCommonErrorMessage": "Some items weren't copied", - - "dxFileManager-editingUploadSingleItemProcessingMessage": "Uploading an item to {0}", - "dxFileManager-editingUploadMultipleItemsProcessingMessage": "Uploading {0} items to {1}", - "dxFileManager-editingUploadSingleItemSuccessMessage": "Uploaded an item to {0}", - "dxFileManager-editingUploadMultipleItemsSuccessMessage": "Uploaded {0} items to {1}", - "dxFileManager-editingUploadSingleItemErrorMessage": "Item wasn't uploaded", - "dxFileManager-editingUploadMultipleItemsErrorMessage": "{0} items weren't uploaded", - "dxFileManager-editingUploadCanceledMessage": "Canceled", - - "dxFileManager-listDetailsColumnCaptionName": "Name", - "dxFileManager-listDetailsColumnCaptionDateModified": "Date Modified", - "dxFileManager-listDetailsColumnCaptionFileSize": "File Size", - - "dxFileManager-listThumbnailsTooltipTextSize": "Size", - "dxFileManager-listThumbnailsTooltipTextDateModified": "Date Modified", - - "dxFileManager-notificationProgressPanelTitle": "Progress", - "dxFileManager-notificationProgressPanelEmptyListText": "No operations", - "dxFileManager-notificationProgressPanelOperationCanceled": "Canceled", + "dxFileManager-commandCreate": "New directory", + "dxFileManager-commandRename": "Rename", + "dxFileManager-commandMove": "Move", + "dxFileManager-commandCopy": "Copy", + "dxFileManager-commandDelete": "Delete", + "dxFileManager-commandDownload": "Download", + "dxFileManager-commandUpload": "Upload files", + "dxFileManager-commandRefresh": "Refresh", + "dxFileManager-commandThumbnails": "Thumbnails View", + "dxFileManager-commandDetails": "Details View", + "dxFileManager-commandClear": "Clear selection", + + "dxFileManager-dialogDirectoryChooserTitle": "Select Destination Directory", + "dxFileManager-dialogDirectoryChooserButtonText": "Select", + "dxFileManager-dialogRenameItemTitle": "Rename", + "dxFileManager-dialogRenameItemButtonText": "Save", + "dxFileManager-dialogCreateDirectoryTitle": "New directory", + "dxFileManager-dialogCreateDirectoryButtonText": "Create", + + "dxFileManager-editingCreateSingleItemProcessingMessage": "Creating a directory inside {0}", + "dxFileManager-editingCreateSingleItemSuccessMessage": "Created a directory inside {0}", + "dxFileManager-editingCreateSingleItemErrorMessage": "Directory wasn't created", + "dxFileManager-editingCreateCommonErrorMessage": "Directory wasn't created", + + "dxFileManager-editingRenameSingleItemProcessingMessage": "Renaming an item inside {0}", + "dxFileManager-editingRenameSingleItemSuccessMessage": "Renamed an item inside {0}", + "dxFileManager-editingRenameSingleItemErrorMessage": "Item wasn't renamed", + "dxFileManager-editingRenameCommonErrorMessage": "Item wasn't renamed", + + "dxFileManager-editingDeleteSingleItemProcessingMessage": "Deleting an item from {0}", + "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "Deleting {0} items from {1}", + "dxFileManager-editingDeleteSingleItemSuccessMessage": "Deleted an item from {0}", + "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "Deleted {0} items from {1}", + "dxFileManager-editingDeleteSingleItemErrorMessage": "Item wasn't deleted", + "dxFileManager-editingDeleteMultipleItemsErrorMessage": "{0} items weren't deleted", + "dxFileManager-editingDeleteCommonErrorMessage": "Some items weren't deleted", + + "dxFileManager-editingMoveSingleItemProcessingMessage": "Moving an item to {0}", + "dxFileManager-editingMoveMultipleItemsProcessingMessage": "Moving {0} items to {1}", + "dxFileManager-editingMoveSingleItemSuccessMessage": "Moved an item to {0}", + "dxFileManager-editingMoveMultipleItemsSuccessMessage": "Moved {0} items to {1}", + "dxFileManager-editingMoveSingleItemErrorMessage": "Item wasn't moved", + "dxFileManager-editingMoveMultipleItemsErrorMessage": "{0} items weren't moved", + "dxFileManager-editingMoveCommonErrorMessage": "Some items weren't moved", + + "dxFileManager-editingCopySingleItemProcessingMessage": "Copying an item to {0}", + "dxFileManager-editingCopyMultipleItemsProcessingMessage": "Copying {0} items to {1}", + "dxFileManager-editingCopySingleItemSuccessMessage": "Copied an item to {0}", + "dxFileManager-editingCopyMultipleItemsSuccessMessage": "Copied {0} items to {1}", + "dxFileManager-editingCopySingleItemErrorMessage": "Item wasn't copied", + "dxFileManager-editingCopyMultipleItemsErrorMessage": "{0} items weren't copied", + "dxFileManager-editingCopyCommonErrorMessage": "Some items weren't copied", + + "dxFileManager-editingUploadSingleItemProcessingMessage": "Uploading an item to {0}", + "dxFileManager-editingUploadMultipleItemsProcessingMessage": "Uploading {0} items to {1}", + "dxFileManager-editingUploadSingleItemSuccessMessage": "Uploaded an item to {0}", + "dxFileManager-editingUploadMultipleItemsSuccessMessage": "Uploaded {0} items to {1}", + "dxFileManager-editingUploadSingleItemErrorMessage": "Item wasn't uploaded", + "dxFileManager-editingUploadMultipleItemsErrorMessage": "{0} items weren't uploaded", + "dxFileManager-editingUploadCanceledMessage": "Canceled", + + "dxFileManager-listDetailsColumnCaptionName": "Name", + "dxFileManager-listDetailsColumnCaptionDateModified": "Date Modified", + "dxFileManager-listDetailsColumnCaptionFileSize": "File Size", + + "dxFileManager-listThumbnailsTooltipTextSize": "Size", + "dxFileManager-listThumbnailsTooltipTextDateModified": "Date Modified", + + "dxFileManager-notificationProgressPanelTitle": "Progress", + "dxFileManager-notificationProgressPanelEmptyListText": "No operations", + "dxFileManager-notificationProgressPanelOperationCanceled": "Canceled", "dxDiagram-categoryGeneral": "General", "dxDiagram-categoryFlowchart": "Flowchart", diff --git a/js/localization/messages/fr.json b/js/localization/messages/fr.json index 9ccd50dc0c2e..4d5d2551a799 100644 --- a/js/localization/messages/fr.json +++ b/js/localization/messages/fr.json @@ -303,16 +303,16 @@ "dxFileManager-errorDefault": "Erreur non spécifié.", "dxFileManager-commandCreate": "Nouveau répertoire", - "dxFileManager-commandRename": "Renommer", - "dxFileManager-commandMove": "Déplacer", - "dxFileManager-commandCopy": "Copier", - "dxFileManager-commandDelete": "Supprimer", - "dxFileManager-commandDownload": "Télécharger", - "dxFileManager-commandUpload": "Téléverser des fichiers", - "dxFileManager-commandRefresh": "Rafraîchir", - "dxFileManager-commandThumbnails": "Mode vignette", - "dxFileManager-commandDetails": "Mode détails", - "dxFileManager-commandClear": "Vider sélection", + "dxFileManager-commandRename": "Renommer", + "dxFileManager-commandMove": "Déplacer", + "dxFileManager-commandCopy": "Copier", + "dxFileManager-commandDelete": "Supprimer", + "dxFileManager-commandDownload": "Télécharger", + "dxFileManager-commandUpload": "Téléverser des fichiers", + "dxFileManager-commandRefresh": "Rafraîchir", + "dxFileManager-commandThumbnails": "Mode vignette", + "dxFileManager-commandDetails": "Mode détails", + "dxFileManager-commandClear": "Vider sélection", "dxFileManager-dialogDirectoryChooserTitle": "Sélectionner répertoire de destination", "dxFileManager-dialogDirectoryChooserButtonText": "Sélectionner", @@ -361,7 +361,7 @@ "dxFileManager-editingUploadMultipleItemsSuccessMessage": "{0} items téléversés vers {1}", "dxFileManager-editingUploadSingleItemErrorMessage": "Item non téléversé", "dxFileManager-editingUploadMultipleItemsErrorMessage": "{0} items non téléversés", - "dxFileManager-editingUploadCanceledMessage": "Annulé", + "dxFileManager-editingUploadCanceledMessage": "Annulé", "dxFileManager-listDetailsColumnCaptionName": "Nom", "dxFileManager-listDetailsColumnCaptionDateModified": "Date modifié", diff --git a/js/localization/messages/ja.json b/js/localization/messages/ja.json index c27b3fc735ee..c66f2bc76f57 100644 --- a/js/localization/messages/ja.json +++ b/js/localization/messages/ja.json @@ -264,84 +264,8 @@ "dxFileManager-errorDirectoryExistsFormat": "ディレクトリ {0} は既に存在します。", "dxFileManager-errorFileExistsFormat": "ファイル {0} は既に存在します。", "dxFileManager-errorFileNotFoundFormat": "ファイル {0} が見つかりません。", - "dxFileManager-errorDirectoryNotFoundFormat": "TODO", - "dxFileManager-errorWrongFileExtension": "TODO", - "dxFileManager-errorMaxFileSizeExceeded": "TODO", - "dxFileManager-errorInvalidSymbols": "TODO", "dxFileManager-errorDefault": "特定できないエラー", - "dxFileManager-commandCreate": "TODO", - "dxFileManager-commandRename": "TODO", - "dxFileManager-commandMove": "TODO", - "dxFileManager-commandCopy": "TODO", - "dxFileManager-commandDelete": "TODO", - "dxFileManager-commandDownload": "TODO", - "dxFileManager-commandUpload": "TODO", - "dxFileManager-commandRefresh": "TODO", - "dxFileManager-commandThumbnails": "TODO", - "dxFileManager-commandDetails": "TODO", - "dxFileManager-commandClear": "TODO", - - "dxFileManager-dialogDirectoryChooserTitle": "TODO", - "dxFileManager-dialogDirectoryChooserButtonText": "TODO", - "dxFileManager-dialogRenameItemTitle": "TODO", - "dxFileManager-dialogRenameItemButtonText": "TODO", - "dxFileManager-dialogCreateDirectoryTitle": "TODO", - "dxFileManager-dialogCreateDirectoryButtonText": "TODO", - - "dxFileManager-editingCreateSingleItemProcessingMessage": "TODO", - "dxFileManager-editingCreateSingleItemSuccessMessage": "TODO", - "dxFileManager-editingCreateSingleItemErrorMessage": "TODO", - "dxFileManager-editingCreateCommonErrorMessage": "TODO", - - "dxFileManager-editingRenameSingleItemProcessingMessage": "TODO", - "dxFileManager-editingRenameSingleItemSuccessMessage": "TODO", - "dxFileManager-editingRenameSingleItemErrorMessage": "TODO", - "dxFileManager-editingRenameCommonErrorMessage": "TODO", - - "dxFileManager-editingDeleteSingleItemProcessingMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingDeleteSingleItemSuccessMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingDeleteSingleItemErrorMessage": "TODO", - "dxFileManager-editingDeleteMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingDeleteCommonErrorMessage": "TODO", - - "dxFileManager-editingMoveSingleItemProcessingMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingMoveSingleItemSuccessMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingMoveSingleItemErrorMessage": "TODO", - "dxFileManager-editingMoveMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingMoveCommonErrorMessage": "TODO", - - "dxFileManager-editingCopySingleItemProcessingMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingCopySingleItemSuccessMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingCopySingleItemErrorMessage": "TODO", - "dxFileManager-editingCopyMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingCopyCommonErrorMessage": "TODO", - - "dxFileManager-editingUploadSingleItemProcessingMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsProcessingMessage": "TODO", - "dxFileManager-editingUploadSingleItemSuccessMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsSuccessMessage": "TODO", - "dxFileManager-editingUploadSingleItemErrorMessage": "TODO", - "dxFileManager-editingUploadMultipleItemsErrorMessage": "TODO", - "dxFileManager-editingUploadCanceledMessage": "TODO", - - "dxFileManager-listDetailsColumnCaptionName": "TODO", - "dxFileManager-listDetailsColumnCaptionDateModified": "TODO", - "dxFileManager-listDetailsColumnCaptionFileSize": "TODO", - - "dxFileManager-listThumbnailsTooltipTextSize": "TODO", - "dxFileManager-listThumbnailsTooltipTextDateModified": "TODO", - - "dxFileManager-notificationProgressPanelTitle": "TODO", - "dxFileManager-notificationProgressPanelEmptyListText": "TODO", - "dxFileManager-notificationProgressPanelOperationCanceled": "TODO", - "dxDiagram-categoryGeneral": "一般", "dxDiagram-categoryFlowchart": "フローチャート", "dxDiagram-categoryOrgChart": "組織のフロー・チャート", diff --git a/js/localization/messages/ru.json b/js/localization/messages/ru.json index 14bb8637eada..55c86e8b17ff 100644 --- a/js/localization/messages/ru.json +++ b/js/localization/messages/ru.json @@ -269,77 +269,77 @@ "dxFileManager-errorInvalidSymbols": "Введённое имя содержит недопустимые символы.", "dxFileManager-errorDefault": "Неизвестная ошибка", - "dxFileManager-commandCreate": "Новая папка", - "dxFileManager-commandRename": "Переименовать", - "dxFileManager-commandMove": "Переместить", - "dxFileManager-commandCopy": "Копировать", - "dxFileManager-commandDelete": "Удалить", - "dxFileManager-commandDownload": "Скачать", - "dxFileManager-commandUpload": "Загрузить файлы", - "dxFileManager-commandRefresh": "Обновить", - "dxFileManager-commandThumbnails": "Режим эксизов", - "dxFileManager-commandDetails": "Режим списка", - "dxFileManager-commandClear": "Очистить выделение", + "dxFileManager-commandCreate": "Новая папка", + "dxFileManager-commandRename": "Переименовать", + "dxFileManager-commandMove": "Переместить", + "dxFileManager-commandCopy": "Копировать", + "dxFileManager-commandDelete": "Удалить", + "dxFileManager-commandDownload": "Скачать", + "dxFileManager-commandUpload": "Загрузить файлы", + "dxFileManager-commandRefresh": "Обновить", + "dxFileManager-commandThumbnails": "Режим эксизов", + "dxFileManager-commandDetails": "Режим списка", + "dxFileManager-commandClear": "Очистить выделение", - "dxFileManager-dialogDirectoryChooserTitle": "Выберите папку назначения", - "dxFileManager-dialogDirectoryChooserButtonText": "Выбрать", - "dxFileManager-dialogRenameItemTitle": "Переименовать", - "dxFileManager-dialogRenameItemButtonText": "Сохранить", - "dxFileManager-dialogCreateDirectoryTitle": "Новая папка", - "dxFileManager-dialogCreateDirectoryButtonText": "Создать", + "dxFileManager-dialogDirectoryChooserTitle": "Выберите папку назначения", + "dxFileManager-dialogDirectoryChooserButtonText": "Выбрать", + "dxFileManager-dialogRenameItemTitle": "Переименовать", + "dxFileManager-dialogRenameItemButtonText": "Сохранить", + "dxFileManager-dialogCreateDirectoryTitle": "Новая папка", + "dxFileManager-dialogCreateDirectoryButtonText": "Создать", - "dxFileManager-editingCreateSingleItemProcessingMessage": "Создаётся папка в {0}", - "dxFileManager-editingCreateSingleItemSuccessMessage": "Создана папка в {0}", - "dxFileManager-editingCreateSingleItemErrorMessage": "Не удалось создать папку", - "dxFileManager-editingCreateCommonErrorMessage": "Не удалось создать папку", + "dxFileManager-editingCreateSingleItemProcessingMessage": "Создаётся папка в {0}", + "dxFileManager-editingCreateSingleItemSuccessMessage": "Создана папка в {0}", + "dxFileManager-editingCreateSingleItemErrorMessage": "Не удалось создать папку", + "dxFileManager-editingCreateCommonErrorMessage": "Не удалось создать папку", - "dxFileManager-editingRenameSingleItemProcessingMessage": "Переименовывается элемент в {0}", - "dxFileManager-editingRenameSingleItemSuccessMessage": "Переименован элемент в {0}", - "dxFileManager-editingRenameSingleItemErrorMessage": "Не удалось переименовать элемент", - "dxFileManager-editingRenameCommonErrorMessage": "Не удалось переименовать элемент", + "dxFileManager-editingRenameSingleItemProcessingMessage": "Переименовывается элемент в {0}", + "dxFileManager-editingRenameSingleItemSuccessMessage": "Переименован элемент в {0}", + "dxFileManager-editingRenameSingleItemErrorMessage": "Не удалось переименовать элемент", + "dxFileManager-editingRenameCommonErrorMessage": "Не удалось переименовать элемент", - "dxFileManager-editingDeleteSingleItemProcessingMessage": "Элемент удаляется из {0}", - "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "Удаление {0} элементов из {1}", - "dxFileManager-editingDeleteSingleItemSuccessMessage": "Элемент удалён из {0}", - "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "{0} элементов удалено из {1}", - "dxFileManager-editingDeleteSingleItemErrorMessage": "Не удалось удалить элемент", - "dxFileManager-editingDeleteMultipleItemsErrorMessage": "{0} элементов не были удалены", - "dxFileManager-editingDeleteCommonErrorMessage": "Некоторые элементы не были удалены", + "dxFileManager-editingDeleteSingleItemProcessingMessage": "Элемент удаляется из {0}", + "dxFileManager-editingDeleteMultipleItemsProcessingMessage": "Удаление {0} элементов из {1}", + "dxFileManager-editingDeleteSingleItemSuccessMessage": "Элемент удалён из {0}", + "dxFileManager-editingDeleteMultipleItemsSuccessMessage": "{0} элементов удалено из {1}", + "dxFileManager-editingDeleteSingleItemErrorMessage": "Не удалось удалить элемент", + "dxFileManager-editingDeleteMultipleItemsErrorMessage": "{0} элементов не были удалены", + "dxFileManager-editingDeleteCommonErrorMessage": "Некоторые элементы не были удалены", - "dxFileManager-editingMoveSingleItemProcessingMessage": "Элемент перемещается в {0}", - "dxFileManager-editingMoveMultipleItemsProcessingMessage": "Перемещение {0} элементов в {1}", - "dxFileManager-editingMoveSingleItemSuccessMessage": "Элемент перемещён в {0}", - "dxFileManager-editingMoveMultipleItemsSuccessMessage": "{0} элементов перемещено в {1}", - "dxFileManager-editingMoveSingleItemErrorMessage": "Не удалось переместить элемент", - "dxFileManager-editingMoveMultipleItemsErrorMessage": "{0} элементов не были перемещены", - "dxFileManager-editingMoveCommonErrorMessage": "Некоторые элементы не были перемещены", + "dxFileManager-editingMoveSingleItemProcessingMessage": "Элемент перемещается в {0}", + "dxFileManager-editingMoveMultipleItemsProcessingMessage": "Перемещение {0} элементов в {1}", + "dxFileManager-editingMoveSingleItemSuccessMessage": "Элемент перемещён в {0}", + "dxFileManager-editingMoveMultipleItemsSuccessMessage": "{0} элементов перемещено в {1}", + "dxFileManager-editingMoveSingleItemErrorMessage": "Не удалось переместить элемент", + "dxFileManager-editingMoveMultipleItemsErrorMessage": "{0} элементов не были перемещены", + "dxFileManager-editingMoveCommonErrorMessage": "Некоторые элементы не были перемещены", - "dxFileManager-editingCopySingleItemProcessingMessage": "Элемент копируется в {0}", - "dxFileManager-editingCopyMultipleItemsProcessingMessage": "Коипрование {0} элементов в {1}", - "dxFileManager-editingCopySingleItemSuccessMessage": "Элемент скопирован в {0}", - "dxFileManager-editingCopyMultipleItemsSuccessMessage": "{0} элементов скопировано в {1}", - "dxFileManager-editingCopySingleItemErrorMessage": "Не удалось скопировать элемент", - "dxFileManager-editingCopyMultipleItemsErrorMessage": "{0} элементов не были скопированы", - "dxFileManager-editingCopyCommonErrorMessage": "Некоторые элементы не были скопированы", + "dxFileManager-editingCopySingleItemProcessingMessage": "Элемент копируется в {0}", + "dxFileManager-editingCopyMultipleItemsProcessingMessage": "Коипрование {0} элементов в {1}", + "dxFileManager-editingCopySingleItemSuccessMessage": "Элемент скопирован в {0}", + "dxFileManager-editingCopyMultipleItemsSuccessMessage": "{0} элементов скопировано в {1}", + "dxFileManager-editingCopySingleItemErrorMessage": "Не удалось скопировать элемент", + "dxFileManager-editingCopyMultipleItemsErrorMessage": "{0} элементов не были скопированы", + "dxFileManager-editingCopyCommonErrorMessage": "Некоторые элементы не были скопированы", - "dxFileManager-editingUploadSingleItemProcessingMessage": "Элемент загружается в {0}", - "dxFileManager-editingUploadMultipleItemsProcessingMessage": "Загрузка {0} элементов в {1}", - "dxFileManager-editingUploadSingleItemSuccessMessage": "Элемент загружен в {0}", - "dxFileManager-editingUploadMultipleItemsSuccessMessage": "{0} элементов загружено в {1}", - "dxFileManager-editingUploadSingleItemErrorMessage": "Не удалось загрузить элемент", - "dxFileManager-editingUploadMultipleItemsErrorMessage": "{0} элементов не были загружены", - "dxFileManager-editingUploadCanceledMessage": "Отменено", + "dxFileManager-editingUploadSingleItemProcessingMessage": "Элемент загружается в {0}", + "dxFileManager-editingUploadMultipleItemsProcessingMessage": "Загрузка {0} элементов в {1}", + "dxFileManager-editingUploadSingleItemSuccessMessage": "Элемент загружен в {0}", + "dxFileManager-editingUploadMultipleItemsSuccessMessage": "{0} элементов загружено в {1}", + "dxFileManager-editingUploadSingleItemErrorMessage": "Не удалось загрузить элемент", + "dxFileManager-editingUploadMultipleItemsErrorMessage": "{0} элементов не были загружены", + "dxFileManager-editingUploadCanceledMessage": "Отменено", - "dxFileManager-listDetailsColumnCaptionName": "Название", - "dxFileManager-listDetailsColumnCaptionDateModified": "Дата изменения", - "dxFileManager-listDetailsColumnCaptionFileSize": "Размер файла", + "dxFileManager-listDetailsColumnCaptionName": "Название", + "dxFileManager-listDetailsColumnCaptionDateModified": "Дата изменения", + "dxFileManager-listDetailsColumnCaptionFileSize": "Размер файла", - "dxFileManager-listThumbnailsTooltipTextSize": "Размер", - "dxFileManager-listThumbnailsTooltipTextDateModified": "Дата изменения", + "dxFileManager-listThumbnailsTooltipTextSize": "Размер", + "dxFileManager-listThumbnailsTooltipTextDateModified": "Дата изменения", - "dxFileManager-notificationProgressPanelTitle": "Прогресс", - "dxFileManager-notificationProgressPanelEmptyListText": "Операции отсутствуют", - "dxFileManager-notificationProgressPanelOperationCanceled": "Отменено", + "dxFileManager-notificationProgressPanelTitle": "Прогресс", + "dxFileManager-notificationProgressPanelEmptyListText": "Операции отсутствуют", + "dxFileManager-notificationProgressPanelOperationCanceled": "Отменено", "dxDiagram-categoryGeneral": "Общие", "dxDiagram-categoryFlowchart": "Блок-схема", diff --git a/js/ui/draggable.js b/js/ui/draggable.js index 6338d681e3a8..5a7a3b787ab7 100644 --- a/js/ui/draggable.js +++ b/js/ui/draggable.js @@ -531,11 +531,9 @@ var Draggable = DOMComponentWithTemplate.inherit({ return this._$dragElement && this._$dragElement.hasClass(this._addWidgetPrefix(CLONE_CLASS)); }, - _getDragTemplateArgs: function($element) { - let container = this._getContainer(); - + _getDragTemplateArgs: function($element, $container) { return { - container: getPublicElement($(container)), + container: getPublicElement($container), model: { itemData: this.option("itemData"), itemElement: getPublicElement($element) @@ -546,17 +544,19 @@ var Draggable = DOMComponentWithTemplate.inherit({ _createDragElement: function($element) { let result = $element, clone = this.option("clone"), - container = this._getContainer(), + $container = this._getContainer(), template = this.option("dragTemplate"); if(template) { template = this._getTemplate(template); - result = $(template.render(this._getDragTemplateArgs($element))); + result = $("
").appendTo($container); + template.render(this._getDragTemplateArgs($element, result)); } else if(clone) { - result = $element.clone().css({ + result = $("
").appendTo($container); + $element.clone().css({ width: $element.css("width"), height: $element.css("height") - }).appendTo(container); + }).appendTo(result); } return result.toggleClass(this._addWidgetPrefix(CLONE_CLASS), result.get(0) !== $element.get(0)); diff --git a/js/ui/file_manager/ui.file_manager.js b/js/ui/file_manager/ui.file_manager.js index 9c79176984f1..4b11207edd82 100644 --- a/js/ui/file_manager/ui.file_manager.js +++ b/js/ui/file_manager/ui.file_manager.js @@ -368,16 +368,20 @@ class FileManager extends Widget { /** * @name dxFileManagerOptions.toolbar - * @type object + * @type dxFileManagerToolbar */ /** - * @name dxFileManagerOptions.toolbar.items + * @name dxFileManagerToolbar + * @type object + */ + /** + * @name dxFileManagerToolbar.items * @type Array * @default [ "showNavPane", "create", "upload", "refresh", { name: "separator", location: "after" }, "viewSwitcher" ] */ /** - * @name dxFileManagerOptions.toolbar.fileSelectionItems + * @name dxFileManagerToolbar.fileSelectionItems * @type Array * @default [ "download", "separator", "move", "copy", "rename", "separator", "delete", "refresh", "clear" ] */ @@ -416,11 +420,15 @@ class FileManager extends Widget { /** * @name dxFileManagerOptions.contextMenu - * @type object + * @type dxFileManagerContextMenu */ /** - * @name dxFileManagerOptions.contextMenu.items + * @name dxFileManagerContextMenu + * @type object + */ + /** + * @name dxFileManagerContextMenu.items * @type Array * @default [ "create", "upload", "rename", "move", "copy", "delete", "refresh", "download" ] */ diff --git a/js/ui/scheduler/tooltip_strategies/desktopTooltipStrategy.js b/js/ui/scheduler/tooltip_strategies/desktopTooltipStrategy.js index b16791a6eb55..2d0607a15b77 100644 --- a/js/ui/scheduler/tooltip_strategies/desktopTooltipStrategy.js +++ b/js/ui/scheduler/tooltip_strategies/desktopTooltipStrategy.js @@ -87,6 +87,8 @@ class TooltipManyAppointmentsBehavior extends TooltipBehaviorBase { event.data.itemElement = dragElement = this._createDragAppointment(itemData.data, itemData.data.settings); dragBehavior.initialPosition = translator.locate($(dragElement)); + translator.resetPosition($(dragElement)); + this.scheduler.hideAppointmentTooltip(); } } diff --git a/package.json b/package.json index 3073ade2a7ac..828a36633f8d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "types": "./bundles/dx.all.d.ts", "license": "SEE LICENSE IN README.md", "dependencies": { - "devexpress-diagram": "0.1.42", + "devexpress-diagram": "0.1.46", "devexpress-gantt": "0.0.24", "jszip": "^2.0.0 || ^3.0.0", "quill": "^1.3.7", diff --git a/styles/widgets/base/dataGrid.less b/styles/widgets/base/dataGrid.less index 2c07fea533d9..a91fbdf418d0 100644 --- a/styles/widgets/base/dataGrid.less +++ b/styles/widgets/base/dataGrid.less @@ -25,7 +25,7 @@ } } -.dx-sortable-dragging > .dx-gridbase-container > .dx-datagrid-rowsview { +.dx-sortable-dragging > div > .dx-gridbase-container > .dx-datagrid-rowsview { border-color: @datagrid-drag-header-border-color; } diff --git a/styles/widgets/base/sortable.less b/styles/widgets/base/sortable.less index 8a0a867a03b8..c8de464cb5d8 100644 --- a/styles/widgets/base/sortable.less +++ b/styles/widgets/base/sortable.less @@ -2,7 +2,7 @@ border-color: @base-accent; } -.dx-sortable-dragging { +.dx-sortable-dragging > * { border-color: fade(@base-accent, 50%); box-shadow: 0 1px 3px fade(#000, 10%), 0 6px 8px fade(#000, 20%); } diff --git a/styles/widgets/base/treeList.less b/styles/widgets/base/treeList.less index d5d12ac878e7..57cf18596b1e 100644 --- a/styles/widgets/base/treeList.less +++ b/styles/widgets/base/treeList.less @@ -25,7 +25,7 @@ } } -.dx-sortable-dragging > .dx-gridbase-container > .dx-treelist-rowsview { +.dx-sortable-dragging > div > .dx-gridbase-container > .dx-treelist-rowsview { border-color: @treelist-drag-header-border-color; } diff --git a/styles/widgets/common/diagram.less b/styles/widgets/common/diagram.less index 89cd31d2668f..16afd53c4e17 100644 --- a/styles/widgets/common/diagram.less +++ b/styles/widgets/common/diagram.less @@ -136,10 +136,11 @@ height: 64px; } -.dx-diagram-touchbar { +.dx-diagram-touchbar.dx-context-menu { .dx-menu-items-container { display: block; height: 100%; + padding: 0; } .dx-menu-items-container::after { @@ -153,16 +154,6 @@ float: left; } - .dx-menu-separator { - width: 1px; - height: 29px; - margin: 0 2px; - } - - .dx-menu-item .dx-menu-item-content { - padding: 5px 5px 6px; - } - .dx-menu-item.dx-menu-item-has-text.dx-menu-item-has-icon .dx-menu-item-content .dx-icon { margin: 0; } diff --git a/styles/widgets/generic/buttonGroup.generic.less b/styles/widgets/generic/buttonGroup.generic.less index 26a6da571c6b..1d9b3f099d7d 100644 --- a/styles/widgets/generic/buttonGroup.generic.less +++ b/styles/widgets/generic/buttonGroup.generic.less @@ -60,7 +60,76 @@ opacity: @button-disabled-icon-opacity; } } + } + + &.dx-button-mode-contained { + &.dx-button-normal { + &.dx-state-hover { + background-color: @button-normal-contained-bg-hover; + } + + &.dx-state-focused { + background-color: @button-normal-contained-bg-focused; + } + } + + &:not(.dx-item-selected) { + background-color: transparent; + + &.dx-button-default { + border-color: @button-default-border-color; + + &.dx-state-hover { + background-color: @button-default-outlined-bg-hover; + } + + &.dx-state-focused { + background-color: @button-default-outlined-bg-focused; + } + + &, + & .dx-icon { + color: @button-default-border-color; + } + } + &.dx-button-success { + border-color: @button-success-border-color; + + &.dx-state-hover { + background-color: @button-success-outlined-bg-hover; + } + + &.dx-state-focused { + background-color: @button-success-outlined-bg-focused; + } + + &, + & .dx-icon { + color: @button-success-border-color; + } + } + + &.dx-button-danger { + border-color: @button-danger-border-color; + + &.dx-state-hover { + background-color: @button-danger-outlined-bg-hover; + } + + &.dx-state-focused { + background-color: @button-danger-outlined-bg-focused; + } + + &, + & .dx-icon { + color: @button-danger-border-color; + } + } + } + } + + &.dx-button-mode-outlined { &.dx-state-hover { background-color: @button-normal-outlined-bg-hover; } @@ -141,70 +210,77 @@ } &.dx-item-selected { - background-color: @button-group-normal-selected-bg; - - &.dx-state-hover { - background-color: @button-group-normal-selected-bg-hover; - } - - &.dx-state-focused { - background-color: @button-group-normal-selected-bg-focused; - } - - &.dx-button-success { - background-color: @button-group-success-selected-bg; + &.dx-button-normal { + background-color: @button-group-normal-selected-bg; &.dx-state-hover { - background-color: @button-group-success-selected-bg-hover; + background-color: @button-group-normal-selected-bg-hover; } &.dx-state-focused { - background-color: @button-group-success-selected-bg-focused; + background-color: @button-group-normal-selected-bg-focused; + } + + &, + & .dx-icon { + color: @button-group-normal-selected-color; } } + } - &.dx-button-default { - background-color: @button-group-default-selected-bg; + &.dx-button-mode-outlined, + &.dx-button-mode-text { + &.dx-item-selected { + &.dx-button-success { + background-color: @button-group-success-selected-bg; - &.dx-state-hover { - background-color: @button-group-default-selected-bg-hover; - } + &.dx-state-hover { + background-color: @button-group-success-selected-bg-hover; + } - &.dx-state-focused { - background-color: @button-group-default-selected-bg-focused; + &.dx-state-focused { + background-color: @button-group-success-selected-bg-focused; + } } - } - &.dx-button-danger { - background-color: @button-group-danger-selected-bg; + &.dx-button-default { + background-color: @button-group-default-selected-bg; - &.dx-state-hover { - background-color: @button-group-danger-selected-bg-hover; - } + &.dx-state-hover { + background-color: @button-group-default-selected-bg-hover; + } - &.dx-state-focused { - background-color: @button-group-danger-selected-bg-focused; + &.dx-state-focused { + background-color: @button-group-default-selected-bg-focused; + } } - } - &.dx-button-normal, - &.dx-button-normal .dx-icon { - color: @button-group-normal-selected-color; - } + &.dx-button-danger { + background-color: @button-group-danger-selected-bg; - &.dx-button-success, - &.dx-button-success .dx-icon { - color: @button-group-success-selected-color; - } + &.dx-state-hover { + background-color: @button-group-danger-selected-bg-hover; + } - &.dx-button-default, - &.dx-button-default .dx-icon { - color: @button-group-default-selected-color; - } + &.dx-state-focused { + background-color: @button-group-danger-selected-bg-focused; + } + } + + &.dx-button-success, + &.dx-button-success .dx-icon { + color: @button-group-success-selected-color; + } - &.dx-button-danger, - &.dx-button-danger .dx-icon { - color: @button-group-danger-selected-color; + &.dx-button-default, + &.dx-button-default .dx-icon { + color: @button-group-default-selected-color; + } + + &.dx-button-danger, + &.dx-button-danger .dx-icon { + color: @button-group-danger-selected-color; + } } } } diff --git a/styles/widgets/generic/color-schemes/carmine/generic.carmine.less b/styles/widgets/generic/color-schemes/carmine/generic.carmine.less index 12ea7535e949..4ffc8d47944a 100644 --- a/styles/widgets/generic/color-schemes/carmine/generic.carmine.less +++ b/styles/widgets/generic/color-schemes/carmine/generic.carmine.less @@ -320,9 +320,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: darken(@button-default-bg, 20%); -@button-default-contained-bg-focused: darken(@button-default-bg, 25%); -@button-default-contained-bg-active: darken(@button-default-bg, 50%); +@button-default-contained-bg-hover: darken(@button-default-bg, 9%); +@button-default-contained-bg-focused: darken(@button-default-bg, 12%); +@button-default-contained-bg-active: darken(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -353,9 +353,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: darken(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: darken(@button-danger-bg, 25%); -@button-danger-contained-bg-active: darken(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: darken(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: darken(@button-danger-bg, 12%); +@button-danger-contained-bg-active: darken(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -386,9 +386,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: darken(@button-success-bg, 20%); -@button-success-contained-bg-focused: darken(@button-success-bg, 25%); -@button-success-contained-bg-active: darken(@button-success-bg, 50%); +@button-success-contained-bg-hover: darken(@button-success-bg, 9%); +@button-success-contained-bg-focused: darken(@button-success-bg, 12%); +@button-success-contained-bg-active: darken(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/contrast/generic.contrast.less b/styles/widgets/generic/color-schemes/contrast/generic.contrast.less index 7745471016a1..472a9ff39e4b 100644 --- a/styles/widgets/generic/color-schemes/contrast/generic.contrast.less +++ b/styles/widgets/generic/color-schemes/contrast/generic.contrast.less @@ -334,7 +334,6 @@ @button-group-danger-selected-bg-focused: @base-inverted-bg; @button-group-success-selected-bg-focused: @base-inverted-bg; - // Checkbox /** diff --git a/styles/widgets/generic/color-schemes/dark/generic.dark.less b/styles/widgets/generic/color-schemes/dark/generic.dark.less index 5bd694b47982..fee82c8b67a5 100644 --- a/styles/widgets/generic/color-schemes/dark/generic.dark.less +++ b/styles/widgets/generic/color-schemes/dark/generic.dark.less @@ -320,9 +320,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: lighten(@button-default-bg, 20%); -@button-default-contained-bg-focused: lighten(@button-default-bg, 25%); -@button-default-contained-bg-active: lighten(@button-default-bg, 50%); +@button-default-contained-bg-hover: lighten(@button-default-bg, 9%); +@button-default-contained-bg-focused: lighten(@button-default-bg, 12%); +@button-default-contained-bg-active: lighten(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -353,9 +353,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: lighten(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: lighten(@button-danger-bg, 25%); -@button-danger-contained-bg-active: lighten(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: lighten(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: lighten(@button-danger-bg, 12%); +@button-danger-contained-bg-active: lighten(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -386,9 +386,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: lighten(@button-success-bg, 20%); -@button-success-contained-bg-focused: lighten(@button-success-bg, 25%); -@button-success-contained-bg-active: lighten(@button-success-bg, 50%); +@button-success-contained-bg-hover: lighten(@button-success-bg, 9%); +@button-success-contained-bg-focused: lighten(@button-success-bg, 12%); +@button-success-contained-bg-active: lighten(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/darkmoon/generic.darkmoon.less b/styles/widgets/generic/color-schemes/darkmoon/generic.darkmoon.less index 3e1ff03235fc..313494097a0c 100644 --- a/styles/widgets/generic/color-schemes/darkmoon/generic.darkmoon.less +++ b/styles/widgets/generic/color-schemes/darkmoon/generic.darkmoon.less @@ -332,9 +332,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: lighten(@button-default-bg, 20%); -@button-default-contained-bg-focused: lighten(@button-default-bg, 25%); -@button-default-contained-bg-active: lighten(@button-default-bg, 50%); +@button-default-contained-bg-hover: lighten(@button-default-bg, 9%); +@button-default-contained-bg-focused: lighten(@button-default-bg, 12%); +@button-default-contained-bg-active: lighten(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -365,9 +365,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: lighten(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: lighten(@button-danger-bg, 25%); -@button-danger-contained-bg-active: lighten(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: lighten(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: lighten(@button-danger-bg, 12%); +@button-danger-contained-bg-active: lighten(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -398,9 +398,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: lighten(@button-success-bg, 20%); -@button-success-contained-bg-focused: lighten(@button-success-bg, 25%); -@button-success-contained-bg-active: lighten(@button-success-bg, 50%); +@button-success-contained-bg-hover: lighten(@button-success-bg, 9%); +@button-success-contained-bg-focused: lighten(@button-success-bg, 12%); +@button-success-contained-bg-active: lighten(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/darkviolet/generic.darkviolet.less b/styles/widgets/generic/color-schemes/darkviolet/generic.darkviolet.less index 2cfddb089e24..6bc7cb49a8f6 100644 --- a/styles/widgets/generic/color-schemes/darkviolet/generic.darkviolet.less +++ b/styles/widgets/generic/color-schemes/darkviolet/generic.darkviolet.less @@ -327,9 +327,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: lighten(@button-default-bg, 20%); -@button-default-contained-bg-focused: lighten(@button-default-bg, 25%); -@button-default-contained-bg-active: lighten(@button-default-bg, 50%); +@button-default-contained-bg-hover: lighten(@button-default-bg, 9%); +@button-default-contained-bg-focused: lighten(@button-default-bg, 12%); +@button-default-contained-bg-active: lighten(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -360,9 +360,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: lighten(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: lighten(@button-danger-bg, 25%); -@button-danger-contained-bg-active: lighten(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: lighten(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: lighten(@button-danger-bg, 12%); +@button-danger-contained-bg-active: lighten(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -393,9 +393,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: lighten(@button-success-bg, 20%); -@button-success-contained-bg-focused: lighten(@button-success-bg, 25%); -@button-success-contained-bg-active: lighten(@button-success-bg, 50%); +@button-success-contained-bg-hover: lighten(@button-success-bg, 9%); +@button-success-contained-bg-focused: lighten(@button-success-bg, 12%); +@button-success-contained-bg-active: lighten(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/greenmist/generic.greenmist.less b/styles/widgets/generic/color-schemes/greenmist/generic.greenmist.less index f9be6221ddc1..4c47fc1a53c8 100644 --- a/styles/widgets/generic/color-schemes/greenmist/generic.greenmist.less +++ b/styles/widgets/generic/color-schemes/greenmist/generic.greenmist.less @@ -324,9 +324,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: darken(@button-default-bg, 20%); -@button-default-contained-bg-focused: darken(@button-default-bg, 25%); -@button-default-contained-bg-active: darken(@button-default-bg, 50%); +@button-default-contained-bg-hover: darken(@button-default-bg, 9%); +@button-default-contained-bg-focused: darken(@button-default-bg, 12%); +@button-default-contained-bg-active: darken(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -357,9 +357,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: darken(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: darken(@button-danger-bg, 25%); -@button-danger-contained-bg-active: darken(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: darken(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: darken(@button-danger-bg, 12%); +@button-danger-contained-bg-active: darken(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -390,9 +390,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: darken(@button-success-bg, 20%); -@button-success-contained-bg-focused: darken(@button-success-bg, 25%); -@button-success-contained-bg-active: darken(@button-success-bg, 50%); +@button-success-contained-bg-hover: darken(@button-success-bg, 9%); +@button-success-contained-bg-focused: darken(@button-success-bg, 12%); +@button-success-contained-bg-active: darken(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/light/generic.light.less b/styles/widgets/generic/color-schemes/light/generic.light.less index 8651f6bfb239..c352de622f7f 100644 --- a/styles/widgets/generic/color-schemes/light/generic.light.less +++ b/styles/widgets/generic/color-schemes/light/generic.light.less @@ -320,9 +320,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: darken(@button-default-bg, 20%); -@button-default-contained-bg-focused: darken(@button-default-bg, 25%); -@button-default-contained-bg-active: darken(@button-default-bg, 50%); +@button-default-contained-bg-hover: darken(@button-default-bg, 9%); +@button-default-contained-bg-focused: darken(@button-default-bg, 12%); +@button-default-contained-bg-active: darken(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -353,9 +353,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: darken(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: darken(@button-danger-bg, 25%); -@button-danger-contained-bg-active: darken(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: darken(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: darken(@button-danger-bg, 12%); +@button-danger-contained-bg-active: darken(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -386,9 +386,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: darken(@button-success-bg, 20%); -@button-success-contained-bg-focused: darken(@button-success-bg, 25%); -@button-success-contained-bg-active: darken(@button-success-bg, 50%); +@button-success-contained-bg-hover: darken(@button-success-bg, 9%); +@button-success-contained-bg-focused: darken(@button-success-bg, 12%); +@button-success-contained-bg-active: darken(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/color-schemes/softblue/generic.softblue.less b/styles/widgets/generic/color-schemes/softblue/generic.softblue.less index 5fad5b475951..db533e6222e0 100644 --- a/styles/widgets/generic/color-schemes/softblue/generic.softblue.less +++ b/styles/widgets/generic/color-schemes/softblue/generic.softblue.less @@ -331,9 +331,9 @@ */ @button-default-border-color: darken(@base-accent, 5%); -@button-default-contained-bg-hover: darken(@button-default-bg, 20%); -@button-default-contained-bg-focused: darken(@button-default-bg, 25%); -@button-default-contained-bg-active: darken(@button-default-bg, 50%); +@button-default-contained-bg-hover: darken(@button-default-bg, 9%); +@button-default-contained-bg-focused: darken(@button-default-bg, 12%); +@button-default-contained-bg-active: darken(@button-default-bg, 23%); @button-default-outlined-bg-hover: fade(@button-default-border-color, 10%); @button-default-outlined-bg-focused: fade(@button-default-border-color, 10%); @@ -364,9 +364,9 @@ */ @button-danger-border-color: darken(@base-danger, 5%); -@button-danger-contained-bg-hover: darken(@button-danger-bg, 20%); -@button-danger-contained-bg-focused: darken(@button-danger-bg, 25%); -@button-danger-contained-bg-active: darken(@button-danger-bg, 50%); +@button-danger-contained-bg-hover: darken(@button-danger-bg, 9%); +@button-danger-contained-bg-focused: darken(@button-danger-bg, 12%); +@button-danger-contained-bg-active: darken(@button-danger-bg, 23%); @button-danger-outlined-bg-hover: fade(@button-danger-border-color, 10%); @button-danger-outlined-bg-focused: fade(@button-danger-border-color, 10%); @@ -397,9 +397,9 @@ */ @button-success-border-color: darken(@base-success, 5%); -@button-success-contained-bg-hover: darken(@button-success-bg, 20%); -@button-success-contained-bg-focused: darken(@button-success-bg, 25%); -@button-success-contained-bg-active: darken(@button-success-bg, 50%); +@button-success-contained-bg-hover: darken(@button-success-bg, 9%); +@button-success-contained-bg-focused: darken(@button-success-bg, 12%); +@button-success-contained-bg-active: darken(@button-success-bg, 23%); @button-success-outlined-bg-hover: fade(@button-success-border-color, 10%); @button-success-outlined-bg-focused: fade(@button-success-border-color, 10%); diff --git a/styles/widgets/generic/diagram.generic.less b/styles/widgets/generic/diagram.generic.less index 70c528aabf85..38e65f0cbe11 100644 --- a/styles/widgets/generic/diagram.generic.less +++ b/styles/widgets/generic/diagram.generic.less @@ -12,6 +12,7 @@ @GENERIC_DIAGRAM_TOOLBAR_ICON_SIZE: @GENERIC_BASE_ICON_SIZE; @DIAGRAM_TOOLBAR_COLORBUTTON_BORDER_WIDTH: 3px; +@DIAGRAM_TOUCHBAR_ITEM_PADDING: 5px; .dx-diagram { border-color: @diagram-border-color; @@ -162,4 +163,16 @@ } } +.dx-diagram-touchbar.dx-context-menu { + .dx-menu-item .dx-menu-item-content { + padding: @DIAGRAM_TOUCHBAR_ITEM_PADDING; + } + + .dx-menu-separator { + width: 1px; + height: @GENERIC_BASE_ICON_SIZE + @DIAGRAM_TOUCHBAR_ITEM_PADDING + @DIAGRAM_TOUCHBAR_ITEM_PADDING + 2; + margin: 0; + } +} + .diagram-icons-mixin(@base-icon-color, @menu-color, @GENERIC_DIAGRAM_TOOLBAR_ICON_SIZE); diff --git a/styles/widgets/ios7/diagram.ios7.less b/styles/widgets/ios7/diagram.ios7.less index ffb1b116e762..58855510430a 100644 --- a/styles/widgets/ios7/diagram.ios7.less +++ b/styles/widgets/ios7/diagram.ios7.less @@ -12,6 +12,7 @@ @IOS7_DIAGRAM_TOOLBAR_ICON_SIZE: 18px; @DIAGRAM_TOOLBAR_COLORBUTTON_BORDER_WIDTH: 3px; +@DIAGRAM_TOUCHBAR_ITEM_PADDING: 6px; .dx-diagram { .dx-diagram-toolbar-wrapper { @@ -36,4 +37,16 @@ } } +.dx-diagram-touchbar { + .dx-menu-item .dx-menu-item-content { + padding: @DIAGRAM_TOUCHBAR_ITEM_PADDING; + } + + .dx-menu-separator { + width: 1px; + height: @IOS7_DIAGRAM_TOOLBAR_ICON_SIZE + @DIAGRAM_TOUCHBAR_ITEM_PADDING + @DIAGRAM_TOUCHBAR_ITEM_PADDING + 2; + margin: 0; + } +} + .diagram-icons-mixin(@IOS7_BUTTON_TEXT, @IOS7_CONTEXT_MENU_TEXT_COLOR, @IOS7_DIAGRAM_TOOLBAR_ICON_SIZE); diff --git a/styles/widgets/material/button.material.less b/styles/widgets/material/button.material.less index bf1c1944f408..b17692c3a1c2 100644 --- a/styles/widgets/material/button.material.less +++ b/styles/widgets/material/button.material.less @@ -254,7 +254,7 @@ } &.dx-button-back { - .dx-button-flat-color-styling(@button-flat-color, @button-normal-text-hover-bg, @button-normal-text-focused-bg, @button-normal-text-active-bg); + .dx-button-flat-color-styling(@button-normal-color, @button-normal-text-hover-bg, @button-normal-text-focused-bg, @button-normal-text-active-bg); border-radius: 50%; .dx-button-onlyicon-sizing(); @@ -267,7 +267,7 @@ .dx-button-mode-text { - .dx-button-flat-color-styling(@button-flat-color, @button-normal-text-hover-bg, @button-normal-text-focused-bg, @button-normal-text-active-bg); + .dx-button-flat-color-styling(@button-normal-color, @button-normal-text-hover-bg, @button-normal-text-focused-bg, @button-normal-text-active-bg); &.dx-button-default { .dx-button-flat-color-styling(@button-default-bg, @button-default-text-hover-bg, @button-default-text-focused-bg, @button-default-text-active-bg); diff --git a/styles/widgets/material/buttonGroup.material.less b/styles/widgets/material/buttonGroup.material.less index f5d4034f2de7..002aa22f0eda 100644 --- a/styles/widgets/material/buttonGroup.material.less +++ b/styles/widgets/material/buttonGroup.material.less @@ -45,6 +45,7 @@ .dx-buttongroup-item { &.dx-button { + &.dx-button-mode-contained, &.dx-button-mode-outlined { &.dx-state-disabled { opacity: 1; @@ -53,7 +54,70 @@ opacity: @button-disabled-icon-opacity; } } + } + + &.dx-button-mode-contained { + &.dx-button-normal { + &.dx-state-focused { + background-color: @button-normal-focused-bg; + } + + &.dx-state-hover { + background-color: @button-normal-hover-bg; + } + } + + &:not(.dx-item-selected) { + background-color: @button-normal-bg; + + &.dx-button-success { + &.dx-state-focused { + background-color: @button-success-outlined-focused-bg; + } + + &.dx-state-hover { + background-color: @button-success-outlined-hover-bg; + } + + &, + & .dx-icon { + color: @button-success-bg; + } + } + &.dx-button-default { + &.dx-state-focused { + background-color: @button-default-outlined-focused-bg; + } + + &.dx-state-hover { + background-color: @button-default-outlined-hover-bg; + } + + &, + & .dx-icon { + color: @button-default-bg; + } + } + + &.dx-button-danger { + &.dx-state-focused { + background-color: @button-danger-outlined-focused-bg; + } + + &.dx-state-hover { + background-color: @button-danger-outlined-hover-bg; + } + + &, + & .dx-icon { + color: @button-danger-bg; + } + } + } + } + + &.dx-button-mode-outlined { &.dx-state-focused { background-color: @button-normal-outlined-focused-bg; } @@ -134,53 +198,76 @@ } &.dx-item-selected { - background-color: @button-group-normal-selected-bg; - color: @button-group-normal-selected-color; - - &.dx-state-focused { - background-color: @button-group-normal-selected-bg-focused; - } - - &.dx-state-hover { - background-color: @button-group-normal-selected-bg-hover; - } - - &.dx-button-success { - background-color: @button-group-success-selected-bg; - color: @button-group-success-selected-color; + &.dx-button-normal { + background-color: @button-group-normal-selected-bg; &.dx-state-focused { - background-color: @button-group-success-selected-bg-focused; + background-color: @button-group-normal-selected-bg-focused; } &.dx-state-hover { - background-color: @button-group-success-selected-bg-hover; + background-color: @button-group-normal-selected-bg-hover; } - } - - &.dx-button-default { - background-color: @button-group-default-selected-bg; - color: @button-group-default-selected-color; - &.dx-state-focused { - background-color: @button-group-default-selected-bg-focused; + &, + & .dx-icon { + color: @button-group-normal-selected-color; } + } + } - &.dx-state-hover { - background-color: @button-group-default-selected-bg-hover; + &.dx-button-mode-outlined, + &.dx-button-mode-text { + &.dx-item-selected { + &.dx-button-success { + background-color: @button-group-success-selected-bg; + + &.dx-state-focused { + background-color: @button-group-success-selected-bg-focused; + } + + &.dx-state-hover { + background-color: @button-group-success-selected-bg-hover; + } + + &, + & .dx-icon { + color: @button-group-success-selected-color; + } } - } - &.dx-button-danger { - background-color: @button-group-danger-selected-bg; - color: @button-group-danger-selected-color; + &.dx-button-default { + background-color: @button-group-default-selected-bg; - &.dx-state-focused { - background-color: @button-group-danger-selected-bg-focused; + &.dx-state-focused { + background-color: @button-group-default-selected-bg-focused; + } + + &.dx-state-hover { + background-color: @button-group-default-selected-bg-hover; + } + + &, + & .dx-icon { + color: @button-group-default-selected-color; + } } - &.dx-state-hover { - background-color: @button-group-danger-selected-bg-hover; + &.dx-button-danger { + background-color: @button-group-danger-selected-bg; + + &.dx-state-focused { + background-color: @button-group-danger-selected-bg-focused; + } + + &.dx-state-hover { + background-color: @button-group-danger-selected-bg-hover; + } + + &, + & .dx-icon { + color: @button-group-danger-selected-color; + } } } } diff --git a/styles/widgets/material/color-schemes/material.dark.less b/styles/widgets/material/color-schemes/material.dark.less index 2bf7576096bc..a1212cbf59ac 100644 --- a/styles/widgets/material/color-schemes/material.dark.less +++ b/styles/widgets/material/color-schemes/material.dark.less @@ -237,7 +237,7 @@ // Button -@button-icon-color: @base-text-color; +@button-icon-color: @base-icon-color; @button-inverted-icon-color: @base-inverted-icon-color; @button-border-radius: @base-border-radius; @@ -284,7 +284,7 @@ */ @button-normal-active-bg: lighten(@button-normal-bg, 30%); -@button-normal-icon-color: @button-icon-color; +@button-normal-icon-color: @button-normal-color; @button-normal-bg-inverted: lighten(@button-normal-bg, 100%); @@ -314,20 +314,20 @@ * @name 30. Hovered state background color * @type color */ -@button-default-hover-bg: lighten(@button-default-bg, 18%); +@button-default-hover-bg: lighten(@button-default-bg, 8.5%); /** * @name 40. Focused state background color * @type color */ -@button-default-focused-bg: lighten(@button-default-bg, 18%); +@button-default-focused-bg: lighten(@button-default-bg, 8.5%); /** * @name 60. Active state background color * @type color */ -@button-default-active-bg: lighten(@button-default-focused-bg, 40%); -@button-default-icon-color: @button-inverted-icon-color; +@button-default-active-bg: lighten(@button-default-focused-bg, 19.5%); +@button-default-icon-color: @button-default-color; @button-default-outlined-hover-bg: fade(@button-default-bg, 8%); @button-default-outlined-focused-bg: fade(@button-default-bg, 8%); @@ -355,20 +355,20 @@ * @name 40. Hovered state background color * @type color */ -@button-danger-hover-bg: lighten(@button-danger-bg, 18%); +@button-danger-hover-bg: lighten(@button-danger-bg, 8.5%); /** * @name 60. Focused state background color * @type color */ -@button-danger-focused-bg: lighten(@button-danger-bg, 18%); +@button-danger-focused-bg: lighten(@button-danger-bg, 8.5%); /** * @name 80. Active state background color * @type color */ -@button-danger-active-bg: lighten(@button-danger-bg, 40%); -@button-danger-icon-color: @button-inverted-icon-color; +@button-danger-active-bg: lighten(@button-danger-bg, 19.5%); +@button-danger-icon-color: @button-danger-color; @button-danger-outlined-hover-bg: fade(@button-danger-bg, 8%); @button-danger-outlined-focused-bg: fade(@button-danger-bg, 8%); @@ -396,20 +396,20 @@ * @name 40. Hovered state background color * @type color */ -@button-success-hover-bg: lighten(@button-success-bg, 18%); +@button-success-hover-bg: lighten(@button-success-bg, 8.5%); /** * @name 60. Focused state background color * @type color */ -@button-success-focused-bg: lighten(@button-success-bg, 18%); +@button-success-focused-bg: lighten(@button-success-bg, 8.5%); /** * @name 80. Active state background color * @type color */ -@button-success-active-bg: lighten(@button-success-bg, 40%); -@button-success-icon-color: @button-inverted-icon-color; +@button-success-active-bg: lighten(@button-success-bg, 19.5%); +@button-success-icon-color: @button-success-color; @button-success-outlined-hover-bg: fade(@button-success-bg, 8%); @button-success-outlined-focused-bg: fade(@button-success-bg, 8%); @@ -419,13 +419,6 @@ @button-success-text-focused-bg: fade(@button-success-bg, 8%); @button-success-text-active-bg: fade(@button-success-bg, 36%); -// Flat button - -/** -* @name 10. Text color -* @type color -*/ -@button-flat-color: @base-text-color; // ButtonGroup @@ -435,7 +428,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-normal-selected-color: @base-inverted-text-color; +@button-group-normal-selected-color: @base-text-color; /** * @name 20. Selected item background color @@ -452,7 +445,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-default-selected-color: @base-inverted-text-color; +@button-group-default-selected-color: @button-default-bg; /** * @name 20. Selected item background color @@ -469,7 +462,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-danger-selected-color: @base-inverted-text-color; +@button-group-danger-selected-color: @button-danger-bg; /** * @name 20. Selected item background color @@ -486,7 +479,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-success-selected-color: @base-inverted-text-color; +@button-group-success-selected-color: @button-success-bg; /** * @name 20. Selected item background color diff --git a/styles/widgets/material/color-schemes/material.light.less b/styles/widgets/material/color-schemes/material.light.less index cd9e0a21c392..a5a4a391d8d3 100644 --- a/styles/widgets/material/color-schemes/material.light.less +++ b/styles/widgets/material/color-schemes/material.light.less @@ -233,7 +233,7 @@ // Button -@button-icon-color: @base-text-color; +@button-icon-color: @base-icon-color; @button-inverted-icon-color: @base-inverted-icon-color; @button-border-radius: @base-border-radius; @button-disabled-background: rgba(0,0,0, 0.1); @@ -275,7 +275,7 @@ * @type color */ @button-normal-active-bg: darken(@button-normal-bg, 30%); -@button-normal-icon-color: @button-icon-color; +@button-normal-icon-color: @button-normal-color; @button-normal-bg-inverted: darken(@button-normal-bg, 100%); @@ -305,20 +305,20 @@ * @name 30. Hovered state background color * @type color */ -@button-default-hover-bg: darken(@button-default-bg, 18%); +@button-default-hover-bg: darken(@button-default-bg, 8.5%); /** * @name 40. Focused state background color * @type color */ -@button-default-focused-bg: darken(@button-default-bg, 18%); +@button-default-focused-bg: darken(@button-default-bg, 8.5%); /** * @name 50. Active state background color * @type color */ -@button-default-active-bg: darken(@button-default-bg, 40%); -@button-default-icon-color: @button-inverted-icon-color; +@button-default-active-bg: darken(@button-default-bg, 19.5%); +@button-default-icon-color: @button-default-color; @button-default-outlined-hover-bg: fade(@button-default-bg, 8%); @button-default-outlined-focused-bg: fade(@button-default-bg, 8%); @@ -346,20 +346,20 @@ * @name 30. Hovered state background color * @type color */ -@button-danger-hover-bg: darken(@button-danger-bg, 18%); +@button-danger-hover-bg: darken(@button-danger-bg, 8.5%); /** * @name 40. Focused state background color * @type color */ -@button-danger-focused-bg: darken(@button-danger-bg, 18%); +@button-danger-focused-bg: darken(@button-danger-bg, 8.5%); /** * @name 50. Active state background color * @type color */ -@button-danger-active-bg: darken(@button-danger-bg, 40%); -@button-danger-icon-color: @button-inverted-icon-color; +@button-danger-active-bg: darken(@button-danger-bg, 19.5%); +@button-danger-icon-color: @button-danger-color; @button-danger-outlined-hover-bg: fade(@button-danger-bg, 8%); @button-danger-outlined-focused-bg: fade(@button-danger-bg, 8%); @@ -387,20 +387,20 @@ * @name 30. Hovered state background color * @type color */ -@button-success-hover-bg: darken(@button-success-bg, 18%); +@button-success-hover-bg: darken(@button-success-bg, 8.5%); /** * @name 40. Focused state background color * @type color */ -@button-success-focused-bg: darken(@button-success-bg, 18%); +@button-success-focused-bg: darken(@button-success-bg, 8.5%); /** * @name 50. Active state background color * @type color */ -@button-success-active-bg: darken(@button-success-bg, 40%); -@button-success-icon-color: @button-inverted-icon-color; +@button-success-active-bg: darken(@button-success-bg, 19.5%); +@button-success-icon-color: @button-success-color; @button-success-outlined-hover-bg: fade(@button-success-bg, 8%); @button-success-outlined-focused-bg: fade(@button-success-bg, 8%); @@ -410,13 +410,6 @@ @button-success-text-focused-bg: fade(@button-success-bg, 8%); @button-success-text-active-bg: fade(@button-success-bg, 36%); -// Flat button - -/** -* @name 10. Text color -* @type color -*/ -@button-flat-color: @base-text-color; // ButtonGroup @@ -426,8 +419,14 @@ * @name 10. Selected item text color * @type color */ -@button-group-normal-selected-color: @base-inverted-text-color; +@button-group-normal-selected-color: @base-text-color; + +/** +* @name 20. Selected item background color +* @type color +*/ @button-group-normal-selected-bg: fade(darken(@button-normal-bg, 100%), 18%); + @button-group-normal-selected-bg-hover: fade(@button-group-normal-selected-bg, 12%); @button-group-normal-selected-bg-focused: fade(@button-group-normal-selected-bg, 12%); @@ -437,7 +436,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-default-selected-color: @base-inverted-text-color; +@button-group-default-selected-color: @button-default-bg; /** * @name 20. Selected item background color @@ -454,7 +453,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-danger-selected-color: @base-inverted-text-color; +@button-group-danger-selected-color: @button-danger-bg; /** * @name 20. Selected item background color @@ -471,7 +470,7 @@ * @name 10. Selected item text color * @type color */ -@button-group-success-selected-color: @base-inverted-text-color; +@button-group-success-selected-color: @button-success-bg; /** * @name 20. Selected item background color diff --git a/styles/widgets/material/diagram.material.less b/styles/widgets/material/diagram.material.less index 2e372338a980..f9a4cec5103a 100644 --- a/styles/widgets/material/diagram.material.less +++ b/styles/widgets/material/diagram.material.less @@ -13,6 +13,14 @@ @MATERIAL_DIAGRAM_TOOLBAR_ICON_SIZE: @MATERIAL_BASE_ICON_SIZE; @DIAGRAM_TOOLBAR_COLORBUTTON_BORDER_WIDTH: 3px; +.dx-size-default() { + @DIAGRAM_TOUCHBAR_ITEM_PADDING: 10px; +} + +.dx-size-compact() { + @DIAGRAM_TOUCHBAR_ITEM_PADDING: 7px; +} + .dx-diagram { border-color: @diagram-border-color; // stylelint-disable selector-class-pattern @@ -171,4 +179,16 @@ } } +.dx-diagram-touchbar { + .dx-menu-item .dx-menu-item-content { + padding: @DIAGRAM_TOUCHBAR_ITEM_PADDING; + } + + .dx-menu-separator { + width: 1px; + height: @MATERIAL_DIAGRAM_TOOLBAR_ICON_SIZE + @DIAGRAM_TOUCHBAR_ITEM_PADDING + @DIAGRAM_TOUCHBAR_ITEM_PADDING + 2; + margin: 0; + } +} + .diagram-icons-mixin(@base-text-color, @base-text-color, @MATERIAL_DIAGRAM_TOOLBAR_ICON_SIZE); diff --git a/testing/tests/DevExpress.core/class.tests.js b/testing/tests/DevExpress.core/class.tests.js index 131d29fbaaf1..8288dfcf9000 100644 --- a/testing/tests/DevExpress.core/class.tests.js +++ b/testing/tests/DevExpress.core/class.tests.js @@ -1,4 +1,4 @@ -var Class = require("core/class"); +import Class from "core/class"; QUnit.module("inheritance"); @@ -352,6 +352,22 @@ QUnit.test("static methods should be inherited", function(assert) { QUnit.module("API"); + +QUnit.test("subclassOf method for es6 inheritors", assert => { + const Base = Class.inherit({}); + + class ES6Inheritor extends Base {} + class ES6InheritorInheritor extends ES6Inheritor {} + + assert.ok(ES6Inheritor.subclassOf(Class)); + assert.ok(ES6Inheritor.subclassOf(Base)); + assert.notOk(ES6Inheritor.subclassOf(ES6Inheritor)); + assert.ok(ES6InheritorInheritor.subclassOf(Class)); + assert.ok(ES6InheritorInheritor.subclassOf(Base)); + assert.ok(ES6InheritorInheritor.subclassOf(ES6Inheritor)); + assert.notOk(ES6InheritorInheritor.subclassOf(ES6InheritorInheritor)); +}); + QUnit.test("subclassOf method", function(assert) { var A = Class.inherit({ }), B = A.inherit({ }), diff --git a/testing/tests/DevExpress.exporter/fileSaver.tests.js b/testing/tests/DevExpress.exporter/fileSaver.tests.js index caf95831314d..54fa28e7bb12 100644 --- a/testing/tests/DevExpress.exporter/fileSaver.tests.js +++ b/testing/tests/DevExpress.exporter/fileSaver.tests.js @@ -162,23 +162,30 @@ QUnit.test("No E1034 on iPad", function(assert) { assert.ok(true, "This test for iPad devices"); return; } - // arrange - var warningSend = null, - _devExpressLog = errors.log, - _linkDownloader = fileSaver._linkDownloader; - // act - fileSaver._linkDownloader = function() { return; }; - errors.log = function(errorCode) { warningSend = errorCode; return; }; + var done = assert.async(); + var warningSend = null; + var _devExpressLog = errors.log; + var _fileSaverClick = fileSaver._click; + var oldRevokeObjectURLTimeout = fileSaver._revokeObjectURLTimeout; - fileSaver.saveAs("test", "EXCEL", new Blob([], { type: "test/plain" })); + try { + fileSaver._click = () => { }; + fileSaver._revokeObjectURLTimeout = 100; - // assert - assert.ok(warningSend !== "E1034", "Warning E1034 wasn't sent"); + errors.log = function(errorCode) { warningSend = errorCode; return; }; - errors.log = _devExpressLog; - fileSaver._linkDownloader = _linkDownloader; + fileSaver.saveAs("test", "EXCEL", new Blob([], { type: "test/plain" })); + setTimeout(() => { + assert.ok(warningSend !== "E1034", "Warning E1034 wasn't sent"); + done(); + }, 150); + } finally { + errors.log = _devExpressLog; + fileSaver._click = _fileSaverClick; + fileSaver._revokeObjectURLTimeout = oldRevokeObjectURLTimeout; + } }); QUnit.test("Blob is saved via msSaveOrOpenBlob method", function(assert) { diff --git a/testing/tests/DevExpress.ui.widgets.dataGrid/rowDragging.tests.js b/testing/tests/DevExpress.ui.widgets.dataGrid/rowDragging.tests.js index 1132b7686503..d71b8a066289 100644 --- a/testing/tests/DevExpress.ui.widgets.dataGrid/rowDragging.tests.js +++ b/testing/tests/DevExpress.ui.widgets.dataGrid/rowDragging.tests.js @@ -109,7 +109,7 @@ QUnit.test("Dragging row", function(assert) { $placeholderElement = $("body").children(".dx-sortable-placeholder"); assert.strictEqual($draggableElement.length, 1, "there is dragging element"); assert.strictEqual($placeholderElement.length, 1, "placeholder"); - assert.ok($draggableElement.children().hasClass("dx-datagrid"), "dragging element is datagrid"); + assert.ok($draggableElement.children().children().hasClass("dx-datagrid"), "dragging element is datagrid"); assert.strictEqual($draggableElement.find(".dx-data-row").length, 1, "row count in dragging element"); }); @@ -463,7 +463,7 @@ QUnit.test("Dragging row when allowDropInsideItem is true", function(assert) { $placeholderElement = $("body").children(".dx-sortable-placeholder.dx-sortable-placeholder-inside"); assert.strictEqual($draggableElement.length, 1, "there is dragging element"); assert.strictEqual($placeholderElement.length, 1, "placeholder"); - assert.ok($draggableElement.children().hasClass("dx-datagrid"), "dragging element is datagrid"); + assert.ok($draggableElement.children().children().hasClass("dx-datagrid"), "dragging element is datagrid"); assert.strictEqual($draggableElement.find(".dx-data-row").length, 1, "row count in dragging element"); }); @@ -505,7 +505,7 @@ QUnit.test("Dragging row when the lookup column is specified with a remote sourc // assert $draggableElement = $("body").children(".dx-sortable-dragging"); - assert.ok($draggableElement.children().hasClass("dx-datagrid"), "dragging element is datagrid"); + assert.ok($draggableElement.children().children().hasClass("dx-datagrid"), "dragging element is datagrid"); assert.strictEqual($draggableElement.find(".dx-data-row").length, 1, "row count in dragging element"); clock.restore(); }); @@ -531,7 +531,7 @@ QUnit.test("Dragging row when there are fixed columns", function(assert) { $table = $draggableElement.find(".dx-datagrid-rowsview").children(":not(.dx-datagrid-content-fixed)").find("table"), $fixTable = $draggableElement.find(".dx-datagrid-rowsview").children(".dx-datagrid-content-fixed").find("table"); - assert.ok($draggableElement.children().hasClass("dx-datagrid"), "dragging element is datagrid"); + assert.ok($draggableElement.children().children().hasClass("dx-datagrid"), "dragging element is datagrid"); assert.strictEqual($table.find(".dx-data-row").length, 1, "row count in main table"); assert.strictEqual($table.find(".dx-data-row").children(".dx-pointer-events-none").length, 0, "main table hasn't transparent column"); assert.strictEqual($fixTable.find(".dx-data-row").length, 1, "row count in fixed table"); @@ -580,7 +580,7 @@ QUnit.test("Dragging row by the handle", function(assert) { $draggableElement = $("body").children(".dx-sortable-dragging"); assert.strictEqual($("body").children(".dx-sortable-placeholder").length, 1, "placeholder"); assert.strictEqual($draggableElement.length, 1, "there is dragging element"); - assert.ok($draggableElement.children().hasClass("dx-datagrid"), "dragging element is datagrid"); + assert.ok($draggableElement.children().children().hasClass("dx-datagrid"), "dragging element is datagrid"); assert.strictEqual($draggableElement.find(".dx-data-row").length, 1, "row count in dragging element"); }); diff --git a/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js b/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js index 7672b4c6e629..85ab1e895ee1 100644 --- a/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js +++ b/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js @@ -158,7 +158,7 @@ module("Drag and drop appointments", moduleConfig, () => { const getFakeAppointmentPosition = scheduler => { const fakeAppointment = scheduler.appointments.compact.getFakeAppointment(); - const position = getAbsolutePosition(fakeAppointment); + const position = getAbsolutePosition(fakeAppointment.parent()); return { left: position.left + fakeAppointment.width() / 2, diff --git a/testing/tests/DevExpress.ui.widgets.treeList/rowDragging.tests.js b/testing/tests/DevExpress.ui.widgets.treeList/rowDragging.tests.js index 504f0a248546..e63b534ef9c9 100644 --- a/testing/tests/DevExpress.ui.widgets.treeList/rowDragging.tests.js +++ b/testing/tests/DevExpress.ui.widgets.treeList/rowDragging.tests.js @@ -111,7 +111,7 @@ QUnit.test("Drag and drop node", function(assert) { assert.strictEqual($draggableElement.length, 1, "there is dragging element"); assert.strictEqual($placeholderElement.length, 1, "placeholder"); assert.notOk($placeholderElement.hasClass("dx-sortable-placeholder-inside"), "placeholder for dropping inward"); - assert.ok($draggableElement.hasClass("dx-treelist"), "dragging element is treelist"); + assert.ok($draggableElement.children().hasClass("dx-treelist"), "dragging element is treelist"); assert.strictEqual($draggableElement.find(".dx-data-row").length, 1, "row count in dragging element"); // act diff --git a/testing/tests/DevExpress.ui.widgets/draggable.tests.js b/testing/tests/DevExpress.ui.widgets/draggable.tests.js index 8d6bc27922c1..0c90cccbf6e0 100644 --- a/testing/tests/DevExpress.ui.widgets/draggable.tests.js +++ b/testing/tests/DevExpress.ui.widgets/draggable.tests.js @@ -948,14 +948,14 @@ QUnit.test("Clone an element when dragging", function(assert) { this.pointer.down().move(10, 10); // assert - $cloneElement = $("body").children("#draggable"); + $cloneElement = $("body").children(".dx-draggable-dragging").children("#draggable"); assert.strictEqual($cloneElement.length, 1, "cloned element"); - assert.ok($cloneElement.hasClass("dx-draggable-dragging"), "cloned element has dragging class"); + assert.ok($cloneElement.parent().hasClass("dx-draggable-dragging"), "parent of cloned element has dragging class"); assert.ok(this.$element.hasClass("dx-draggable-source"), "element has source class"); assert.notOk(this.$element.hasClass("dx-draggable-dragging"), "original element hasn't dragging class"); assert.notOk($cloneElement.hasClass("dx-draggable-source"), "cloned element hasn't source class"); - assert.ok($cloneElement.hasClass("dx-draggable-clone"), "cloned element has dragging class"); - assert.strictEqual($cloneElement.css("z-index"), "10000", "z-index of the cloned element"); + assert.ok($cloneElement.parent().hasClass("dx-draggable-clone"), "cloned element has dragging class"); + assert.strictEqual($cloneElement.parent().css("z-index"), "10000", "z-index of the cloned element"); this.checkPosition(10, 10, assert, $cloneElement); this.checkPosition(0, 0, assert); }); @@ -971,14 +971,14 @@ QUnit.test("Remove cloned element after the drop end", function(assert) { this.pointer.down().move(10, 10); // assert - $cloneElement = $("body").children("#draggable"); + $cloneElement = $("body").children(".dx-draggable-dragging").children("#draggable"); assert.strictEqual($cloneElement.length, 1, "there is a cloned element"); // act this.pointer.up(); // assert - $cloneElement = $("body").children("#draggable"); + $cloneElement = $("body").children(".dx-draggable-dragging").children("#draggable"); assert.strictEqual($cloneElement.length, 0, "there isn't a cloned element"); }); @@ -993,14 +993,14 @@ QUnit.test("Remove cloned element when disposing", function(assert) { this.pointer.down().move(10, 10); // assert - $cloneElement = $("body").children("#draggable"); + $cloneElement = $("body").children(".dx-draggable-dragging").children("#draggable"); assert.strictEqual($cloneElement.length, 1, "there is a cloned element"); // act this.draggableInstance.dispose(); // assert - $cloneElement = $("body").children("#draggable"); + $cloneElement = $("body").children(".dx-draggable-dragging").children("#draggable"); assert.strictEqual($cloneElement.length, 0, "there isn't a cloned element"); }); @@ -1019,7 +1019,7 @@ QUnit.test("The cloned element offset should be correct when the parent containe this.pointer.down().move(10, 10); // assert - this.checkPosition(310, 310, assert, $("body").children("#draggable")); + this.checkPosition(310, 310, assert, $("body").children(".dx-draggable-dragging").children("#draggable")); }); QUnit.test("The drag element offset should be correct when the parent container has offset", function(assert) { @@ -1052,8 +1052,8 @@ QUnit.test("Set container", function(assert) { this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#draggable").length, 0, "there isn't a cloned element"); - assert.strictEqual($("#other").children("#draggable").length, 1, "there is a cloned element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#other").children(".dx-draggable-dragging").children("#draggable").length, 1, "there is a cloned element"); }); QUnit.test("The drag element offset should be correct when the parent container has offset and the container is specified", function(assert) { @@ -1078,7 +1078,7 @@ QUnit.test("The drag element offset should be correct when the parent container this.pointer.down().move(10, 10); // assert - this.checkPosition(310, 310, assert, $("#other").children("#draggable")); + this.checkPosition(310, 310, assert, $("#other").children(".dx-draggable-dragging").children("#draggable")); }); QUnit.test("Remove element from the container after the drop end", function(assert) { @@ -1091,15 +1091,15 @@ QUnit.test("Remove element from the container after the drop end", function(asse this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#draggable").length, 0, "there isn't a cloned element"); - assert.strictEqual($("#other").children("#draggable").length, 1, "there is a cloned element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#other").children(".dx-draggable-dragging").children("#draggable").length, 1, "there is a cloned element"); // act this.pointer.up(); // assert - assert.strictEqual($("body").children("#draggable").length, 0, "there isn't a cloned element"); - assert.strictEqual($("#other").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#other").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); }); QUnit.test("Remove element from the container when disposing", function(assert) { @@ -1112,15 +1112,15 @@ QUnit.test("Remove element from the container when disposing", function(assert) this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#draggable").length, 0, "there isn't a cloned element"); - assert.strictEqual($("#other").children("#draggable").length, 1, "there is a cloned element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#other").children(".dx-draggable-dragging").children("#draggable").length, 1, "there is a cloned element"); // act this.draggableInstance.dispose(); // assert - assert.strictEqual($("body").children("#draggable").length, 0, "there isn't a cloned element"); - assert.strictEqual($("#other").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#other").children(".dx-draggable-dragging").children("#draggable").length, 0, "there isn't a cloned element"); }); @@ -1140,10 +1140,10 @@ QUnit.test("Set dragTemplate", function(assert) { this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#myDragElement").length, 1, "there is a drag element"); + assert.strictEqual($("body").children(".dx-draggable-dragging").children("#myDragElement").length, 1, "there is a drag element"); assert.strictEqual(template.callCount, 1, "template is called"); assert.deepEqual($(template.getCall(0).args[0].itemElement).get(0), this.$element.get(0), "args[0].itemElement"); - assert.deepEqual($(template.getCall(0).args[1]).get(0), $(viewPort.value()).get(0), "args[1] - container"); + assert.deepEqual($(template.getCall(0).args[1]).get(0), $(viewPort.value()).children(".dx-draggable-dragging").get(0), "args[1] - container"); }); QUnit.test("Remove my element after the drop end", function(assert) { @@ -1157,13 +1157,13 @@ QUnit.test("Remove my element after the drop end", function(assert) { this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#myDragElement").length, 1, "there is a cloned element"); + assert.strictEqual($("#myDragElement").length, 1, "there is a cloned element"); // act this.pointer.up(); // assert - assert.strictEqual($("body").children("#myDragElement").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#myDragElement").length, 0, "there isn't a cloned element"); }); QUnit.test("Remove my element when disposing", function(assert) { @@ -1177,13 +1177,13 @@ QUnit.test("Remove my element when disposing", function(assert) { this.pointer.down().move(10, 10); // assert - assert.strictEqual($("body").children("#myDragElement").length, 1, "there is a cloned element"); + assert.strictEqual($("#myDragElement").length, 1, "there is a cloned element"); // act this.draggableInstance.dispose(); // assert - assert.strictEqual($("body").children("#myDragElement").length, 0, "there isn't a cloned element"); + assert.strictEqual($("#myDragElement").length, 0, "there isn't a cloned element"); }); diff --git a/testing/tests/DevExpress.ui.widgets/listParts/editingUITests.js b/testing/tests/DevExpress.ui.widgets/listParts/editingUITests.js index 5e1fe9b0aae7..7be57210deaf 100644 --- a/testing/tests/DevExpress.ui.widgets/listParts/editingUITests.js +++ b/testing/tests/DevExpress.ui.widgets/listParts/editingUITests.js @@ -2679,10 +2679,10 @@ QUnit.test("ghost item should be moved by drag", (assert) => { this.clock.tick(); const $ghostItem = $list.find(toSelector(REOREDERING_ITEM_GHOST_CLASS)); - const startPosition = topTranslation($ghostItem); + const startPosition = topTranslation($ghostItem.parent()); pointer.drag(20); - assert.strictEqual(topTranslation($ghostItem), startPosition + 20, "ghost item was moved"); + assert.strictEqual(topTranslation($ghostItem.parent()), startPosition + 20, "ghost item was moved"); pointer.dragEnd(); }); diff --git a/testing/tests/DevExpress.ui.widgets/sortable.tests.js b/testing/tests/DevExpress.ui.widgets/sortable.tests.js index 3fbd32fc1b3f..a57298198276 100644 --- a/testing/tests/DevExpress.ui.widgets/sortable.tests.js +++ b/testing/tests/DevExpress.ui.widgets/sortable.tests.js @@ -127,7 +127,31 @@ QUnit.test("Drag template - check args", function(assert) { assert.strictEqual(dragTemplate.callCount, 1, "drag template is called"); assert.strictEqual($(dragTemplate.getCall(0).args[0].itemElement).get(0), items.get(0), "itemElement arg"); assert.strictEqual(dragTemplate.getCall(0).args[0].fromIndex, 0, "fromIndex arg"); - assert.strictEqual($(dragTemplate.getCall(0).args[1]).get(0), $("body").get(0), "second arg"); + assert.strictEqual($(dragTemplate.getCall(0).args[1]).get(0), $("body").children(".dx-sortable-dragging").get(0), "second arg"); +}); + +// T826089 +QUnit.test("Asynchronous drag template (React)", function(assert) { + // arrange + let $dragContainer; + + this.createSortable({ + dragTemplate: function(options, $container) { + $dragContainer = $container; + } + }); + + let $items = this.$element.children(); + + // act + pointerMock($items.eq(0)).start().down().move(10, 0); + $("
").addClass("my-drag-item").appendTo($dragContainer); + + // assert + let $sortableDragging = $("body").children(".dx-sortable-dragging"); + assert.strictEqual($sortableDragging.length, 1, "body contains dx-sortable-dragging"); + assert.strictEqual($sortableDragging.hasClass("dx-sortable-clone"), true, "dx-sortable-dragging has dx-sortable-clone class"); + assert.strictEqual($sortableDragging.children(".my-drag-item").length, 1, "dx-sortable-dragging contains my-drag-item"); }); QUnit.test("Default drag template", function(assert) { @@ -148,9 +172,9 @@ QUnit.test("Default drag template", function(assert) { assert.strictEqual($draggingElement.outerWidth(), $items.eq(0).outerWidth(), "width is correct"); assert.strictEqual($draggingElement.outerHeight(), $items.eq(0).outerHeight(), "height is correct"); assert.strictEqual($items.get(0).style.width, "", "width style does not exist in item"); - assert.strictEqual($draggingElement.get(0).style.width, "300px", "width style exists in dragging item"); + assert.strictEqual($draggingElement.children().get(0).style.width, "300px", "width style exists in dragging item"); assert.strictEqual($items.get(0).style.height, "", "height style does not exist in item"); - assert.strictEqual($draggingElement.get(0).style.height, "30px", "height style exists in dragging item"); + assert.strictEqual($draggingElement.children().get(0).style.height, "30px", "height style exists in dragging item"); }); QUnit.module("allowReordering", moduleConfig); diff --git a/ts/dx.all.d.ts b/ts/dx.all.d.ts index adf0ca52f076..1a09cbd40733 100644 --- a/ts/dx.all.d.ts +++ b/ts/dx.all.d.ts @@ -3493,7 +3493,7 @@ declare module DevExpress.ui { /** @name dxFileManager.Options.allowedFileExtensions */ allowedFileExtensions?: Array; /** @name dxFileManager.Options.contextMenu */ - contextMenu?: { items?: Array }; + contextMenu?: dxFileManagerContextMenu; /** @name dxFileManager.Options.currentPath */ currentPath?: string; /** @name dxFileManager.Options.customizeDetailColumns */ @@ -3515,7 +3515,7 @@ declare module DevExpress.ui { /** @name dxFileManager.Options.selectionMode */ selectionMode?: 'multiple' | 'single'; /** @name dxFileManager.Options.toolbar */ - toolbar?: { fileSelectionItems?: Array, items?: Array }; + toolbar?: dxFileManagerToolbar; /** @name dxFileManager.Options.upload */ upload?: { maxFileSize?: number }; } @@ -3530,6 +3530,11 @@ declare module DevExpress.ui { /** @name dxFileManager.refresh() */ refresh(): Promise & JQueryPromise; } + /** @name dxFileManagerContextMenu */ + export interface dxFileManagerContextMenu { + /** @name dxFileManagerContextMenu.items */ + items?: Array; + } /** @name dxFileManagerContextMenuItem */ export interface dxFileManagerContextMenuItem extends dxContextMenuItem { /** @name dxFileManagerContextMenuItem.items */ @@ -3539,6 +3544,13 @@ declare module DevExpress.ui { /** @name dxFileManagerContextMenuItem.visible */ visible?: boolean; } + /** @name dxFileManagerToolbar */ + export interface dxFileManagerToolbar { + /** @name dxFileManagerToolbar.fileSelectionItems */ + fileSelectionItems?: Array; + /** @name dxFileManagerToolbar.items */ + items?: Array; + } /** @name dxFileManagerToolbarItem */ export interface dxFileManagerToolbarItem extends dxToolbarItem { /** @name dxFileManagerToolbarItem.location */