-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default user setting documentation #126
Open
emchigesheva
wants to merge
8
commits into
Flexberry:master
Choose a base branch
from
emchigesheva:add-default-user-setting-documentation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
194d205
add user setting level
emchigesheva 86452fe
add user setting level
emchigesheva ef35534
Add default user setting information
emchigesheva 8e79fe1
add default user setting information
emchigesheva 918a353
add link to default user setting information
emchigesheva fd75050
add link to default user setting information
emchigesheva 10e118a
add link to default user setting info
emchigesheva 5c73136
add link to default user setting info
emchigesheva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,6 +204,23 @@ developerUserSettings: { «componentName»: { } } | |
|
||
При копировании настроек из пункта "Показать установки" строковые константы обрамляются в двойный кавычки ("). Так как текущий стандарт JSCS требует при описании объекта обрамления строковых констант в одинарные кавычки ('), то в режиме Copy/Paste более удобен второй вариант описания свойства «componentName» в виде строки. | ||
|
||
## Установка настроек по умолчанию для конкретных моделей | ||
Помимо возможности указать настройки по имени компонента, добавлена проверка наличия настроек по имени модели. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Пустая строка после заголовка There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Перефразировать |
||
Добавить настройки можно с помощью блюпринта `ember g default-user-setting «model-name» [options]`. | ||
По итогам генерации будет добавлен файл `/app/default-user-settings/<model-name>.js` | ||
```javascript | ||
export default class UserSetting { } | ||
|
||
UserSetting.DEFAULT = {}; | ||
``` | ||
в котором необходимо будет указать настройки порядка столбцов, ширины, сортировки и т.д. аналогично developerUserSettings, где «componentName» = DEFAULT. | ||
|
||
При выставлении параметра withIndexDefaultUserSetting к файлу с настройкой добавится файл `/app/default-user-settings/index.js`, импортирующий все настройки, и непосредственно его импорт в app.js. По умолчанию флаг снят, при генерации первой настройки следует выставить. Это позволит добавить корректный импорт настроек и в то же время избежать затирания существующих импортов настроек при дальнейших генерациях. | ||
|
||
{% include note.html content="Данные настройки имеют наименьший приоритет" %} | ||
|
||
{% include note.html content="На данный момент используются только для оторажения таблиц object-list-view. Следовательно можно применять на flexberry-groupedit, flexberry-objectlistview и flexberry-lookup" %} | ||
|
||
## Сортировка и указание ширины столбцов в интерфейсе отображаемой таблицы | ||
|
||
Пользователь имеет возможность задавать порядок сортировки и ширину столбцов непосредственно в интерфейсе отображаемой таблицы. | ||
|
@@ -219,7 +236,7 @@ developerUserSettings: { «componentName»: { } } | |
## Уровни пользовательских настроек | ||
|
||
Текущий режим настроек формируется на основе следующих уровней: | ||
|
||
* режим настройки для отображаемой модели (используется в object-list-view) | ||
* режим настройки заданный разработчиком; | ||
* режим настройки установленный пользователем в интерфейсе; | ||
* режим сортировки, заданный в параметраз URL страницы. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Перефразировать