ru.coon 2.8.66 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +317 -10
- package/package.json +1 -1
- package/src/Function.js +1 -1
- package/src/VisualLinker.js +610 -0
- package/src/VisualLinker.scss +219 -0
- package/src/app/Application.js +1 -0
- package/src/app/ApplicationSettings.js +49 -0
- package/src/app/Config.js +60 -0
- package/src/app/Router.js +37 -21
- package/src/app/viewPort/CVWrapperPanel.js +53 -0
- package/src/app/viewPort/CenterView.js +153 -46
- package/src/app/viewPort/CenterView.scss +151 -0
- package/src/app/viewPort/ComponentContextManager.js +24 -0
- package/src/app/viewPort/Main.js +4 -1
- package/src/app/viewPort/Routing.d2 +23 -0
- package/src/app/viewPort/TabHistory.js +81 -0
- package/src/common/ComponentFactory.js +167 -0
- package/src/common/button/DropdownContentButton.js +146 -0
- package/src/common/button/DropdownContentButton.scss +92 -0
- package/src/common/button/DropdownContentButtonController.js +60 -0
- package/src/common/component/formeditor/UiCustomFilterForm.scss +0 -1
- package/src/common/component/settings/modules/settingClosePageConfirmation.js +1 -3
- package/src/common/component/settings/modules/settingFavoritePanelShow.js +21 -0
- package/src/common/component/settings/modules/settingReportCalculator.js +22 -0
- package/src/common/component/settings/modules/settingShowNeedReloadMessage.js +1 -3
- package/src/common/component/settings/modules/settingwindowHolder.js +2 -3
- package/src/common/panel/WindowWrap.js +19 -11
- package/src/common/tree/BaseContextMenu.js +4 -3
- package/src/log.js +4 -5
- package/src/nav/AppNavCalcButton.js +23 -0
- package/src/nav/AppNavCalcButton.scss +6 -0
- package/src/nav/AppNavigationBar.js +1 -1
- package/src/nav/AppNavigationMenuController.js +2 -2
- package/src/nav/AppNavigationMenuMinimized.js +61 -0
- package/src/nav/AppNavigationPanel.js +115 -0
- package/src/nav/AppNavigationPanel.scss +178 -0
- package/src/nav/AppNavigationPanelController.js +386 -0
- package/src/nav/FavoriteCfg.js +18 -0
- package/src/nav/MenuEntity.js +23 -15
- package/src/nav/MenuFavoritesBar.js +100 -0
- package/src/nav/MenuFavoritesBar.scss +92 -0
- package/src/nav/editor/NavigateElementEditorView.js +2 -2
- package/src/nav/editor/workspace/NavWorkspaceListView.js +1 -4
- package/src/nav/menu/WorkspaceMenuViewMinimized.js +22 -0
- package/src/overrides/panel/TabPanel.js +36 -0
- package/src/overrides/panel/TabPanel.scss +65 -0
- package/src/report/component/ClearFiltersButton.js +4 -1
- package/src/report/component/CopyCellValueMenuItem.js +18 -0
- package/src/report/component/ReportFieldMap.js +274 -0
- package/src/report/component/ReportPanel.js +73 -44
- package/src/report/component/ReportPanel.scss +2 -2
- package/src/report/component/ReportTagLookup.js +59 -2
- package/src/report/component/calculator/ReportCalculatorController.js +266 -0
- package/src/report/component/calculator/ReportCalculatorField.js +47 -0
- package/src/report/component/calculator/ReportCalculatorHistoryPlugin.js +128 -0
- package/src/report/component/calculator/ReportCalculatorHistoryPlugin.scss +33 -0
- package/src/report/component/calculator/ReportCalculatorMenuItem.js +101 -0
- package/src/report/component/calculator/ReportCalculatorMenuItem.scss +41 -0
- package/src/report/component/calculator/ReportCalculatorPanel.js +363 -0
- package/src/report/component/calculator/ReportCalculatorPanel.scss +86 -0
- package/src/report/component/reportpanel/CopyReportPanelController.js +1 -1
- package/src/report/component/reportpanel/FilterPanel.js +13 -15
- package/src/report/component/reportpanel/FilterPanel.scss +5 -1
- package/src/report/component/reportpanel/FormFieldFocusPlugin.js +157 -0
- package/src/report/component/reportpanel/FormFieldFocusPlugin.scss +14 -0
- package/src/report/component/reportpanel/NorthPanel.js +16 -17
- package/src/report/component/reportpanel/NorthPanel.scss +1 -1
- package/src/report/component/reportpanel/ReportContextMenu.js +219 -0
- package/src/report/component/reportpanel/ReportGrid.js +1 -0
- package/src/report/component/reportpanel/ReportGrid.scss +4 -0
- package/src/report/component/settings/field/ReportFormFieldsGrid.js +2 -2
- package/src/report/component/settings/field/ReportFormFieldsGridController.js +2 -2
- package/src/report/component/settings/property/ReportPropertiesPanelController.js +1 -1
- package/src/report/component/settings/property/ReportPropertyDictionary.js +7 -0
- package/src/report/plugin/configPanel/AddFilterConditionPluginConfigPanel.js +34 -11
- package/src/report/plugin/configPanel/GridFiltersPluginConfigPanelFiltersGrid.js +3 -2
- package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.js +274 -255
- package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.scss +17 -0
- package/src/report/plugin/grid/AddFilterConditionPlugin.js +530 -87
- package/src/report/plugin/grid/CalculatorPlugin.js +90 -0
- package/src/report/plugin/grid/GridContextMenu.js +12 -10
- package/src/report/plugin/grid/GridRowCountPlugin.js +0 -1
- package/src/report/plugin/grid/GridToolbarButtonPlugin.js +11 -2
- package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +126 -89
- package/src/report/plugin/grid/ReportColumnStatePlugin.js +15 -3
- package/src/report/plugin/grid/SetSingleParameterPlugin.js +1 -1
- package/src/report/plugin/grid/ToolbarButtonPlugin.js +1 -1
- package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanel.js +55 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanelController.js +226 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterConfigMixin.js +138 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterFieldFactory.js +223 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.js +164 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.scss +21 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterMenu.js +29 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanel.js +53 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanelController.js +57 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.js +111 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.scss +83 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/SelectColumnPanel.js +102 -0
- package/src/report/selectionModels/MixedRowSelectionModel.js +36 -45
- package/src/report/toolbar/dropdown/ToolbarOverflowButton.js +16 -5
- package/src/report/toolbar/dropdown/ToolbarOverflowPanel.scss +26 -14
- package/src/report/toolbar/layout/ReportToolbarOverflow.js +5 -2
- package/src/ringBuffer.js +7 -3
- package/src/uielement/command/GetUIElementCommand.js +0 -1
- package/src/uielement/component/UiCPWrapper.js +26 -36
- package/src/uielement/component/UiCustomController.js +7 -0
- package/src/uielement/component/UiCustomPanel.js +46 -2
- package/src/uielement/component/settings/UiCustomPanelEditorController.js +35 -29
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.js +146 -33
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.scss +28 -0
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginGridController.js +366 -22
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginModel.js +1 -0
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanel.js +10 -4
- package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanelController.js +28 -30
- package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +203 -22
- package/src/uielement/plugin/configPanel/ExecuteFunctionPluginConfigPanelFormEditor.js +4 -36
- package/src/uielement/plugin/configPanel/FireEventPluginConfigPanelFormEditor.js +5 -36
- package/src/uielement/plugin/configPanel/MethodChainPluginConfigPanelFormEditor.js +4 -36
- package/src/uielement/plugin/configPanel/OpenPanelPluginConfigPanelFormEditor.js +2 -38
- package/src/uielement/plugin/configPanel/PrintPdfPluginConfigPanelFormEditor.js +2 -35
- package/src/uielement/plugin/configPanel/UiCPPluginFormPanel.js +54 -0
- package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +28 -18
- package/src/userSettings.js +1 -0
- package/src/util/ContextManager.js +109 -0
- package/src/util.js +96 -15
- package/src/version.js +1 -1
- package/src/app/viewPort/CenterViewController.js +0 -158
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Компонент DropdownContentButton представляет собой кнопку,
|
|
3
|
+
* при активации которой появляется модальное окно, визуально связанное с кнопкой общими границами и бэкграундом.
|
|
4
|
+
* При инициализации компонента в качестве конфига можно передавать как параметры для самой кнопки,
|
|
5
|
+
* так и конфигурационные параметры для всплывающей панели (в стиле 'camelCase' с префиксом panel: 'panelItems')
|
|
6
|
+
* Параметры конфига компонента:
|
|
7
|
+
* Все валидные параметры для компонентов класса Ext.button.Button
|
|
8
|
+
* Все валидные параметры для компонентов класса Ext.panel.Panel:
|
|
9
|
+
* * должны начинать с префикса 'panel' в стиле 'camelCase',
|
|
10
|
+
* * параметры будут перенесены в конфиг дочерней панели без префикса, пример:
|
|
11
|
+
* * panelWidth: 500 -> width: 500
|
|
12
|
+
* alignment: выравнивание модального окна относительно кнопки.
|
|
13
|
+
* * Принимает строку (пример: 'br'), в которой:
|
|
14
|
+
* * первая буква ('b'/'t') - вертикальное позиционирование контента относительно кнопки (bottom/top)
|
|
15
|
+
* * вторая буква ('r'/'l'/'f') - по какой из горизонтальных сторон кнопки выравнивается контент (left / right), либо 'f' - full-screen mode
|
|
16
|
+
* verticalOffset: размер отступа между кнопкой и контентной частью
|
|
17
|
+
* roundCorners: true | false - добавляет скругление углов при соединении элементов
|
|
18
|
+
* bgColor: цвет фона кнопки и контент-части;
|
|
19
|
+
* borderColor: цвет общей рамки;
|
|
20
|
+
* outerBgColor: цвет фона внешнего окружения
|
|
21
|
+
*/
|
|
22
|
+
Ext.define('Coon.common.button.DropdownContentButton', {
|
|
23
|
+
extend: 'Ext.button.Button',
|
|
24
|
+
xtype: 'DropdownContentButton',
|
|
25
|
+
|
|
26
|
+
requires: [
|
|
27
|
+
'Coon.util.VisualLinker'
|
|
28
|
+
],
|
|
29
|
+
|
|
30
|
+
cls: 'dropdownContentButton',
|
|
31
|
+
iconCls: 'dropdownContentButton-icon',
|
|
32
|
+
overCls: '',
|
|
33
|
+
focusCls: '',
|
|
34
|
+
|
|
35
|
+
// конфигурируемые свойства элемента
|
|
36
|
+
contentPanelConfig: null,
|
|
37
|
+
alignment: 'br',
|
|
38
|
+
verticalOffset: 8,
|
|
39
|
+
roundCorners: false,
|
|
40
|
+
bgColor: null,
|
|
41
|
+
outerBgColor: '#fff',
|
|
42
|
+
|
|
43
|
+
controller: 'DropdownContentButtonController',
|
|
44
|
+
|
|
45
|
+
viewModel: {
|
|
46
|
+
data: {
|
|
47
|
+
isActive: false,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
listeners: {
|
|
52
|
+
click: 'onMainBtnClick',
|
|
53
|
+
move: 'onMove',
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
initComponent() {
|
|
57
|
+
this.callParent();
|
|
58
|
+
|
|
59
|
+
const defaultPanelConfig = [
|
|
60
|
+
['xtype', 'panel'],
|
|
61
|
+
['layout', 'fit'],
|
|
62
|
+
['floating', true],
|
|
63
|
+
['shadow', false],
|
|
64
|
+
['scrollable', true],
|
|
65
|
+
['alwaysOnTop', false]
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// Создаём контент панель, дефолтные параметры конфига при этом в приоритете
|
|
69
|
+
this.contentPanel = Ext.create('Ext.panel.Panel', Ext.apply(
|
|
70
|
+
{
|
|
71
|
+
viewModel: {
|
|
72
|
+
parent: this.getViewModel(),
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
Ext.applyIf(Object.fromEntries(defaultPanelConfig), this.contentPanelConfig)
|
|
76
|
+
));
|
|
77
|
+
this.contentPanel.on({
|
|
78
|
+
beforeshow: 'contentBanelBeforeShow',
|
|
79
|
+
show: function(panel) {
|
|
80
|
+
this.setButtonZIndex(panel);
|
|
81
|
+
const content = panel.items.first();
|
|
82
|
+
if (!content) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
content.fireEvent('ownerShow');
|
|
86
|
+
},
|
|
87
|
+
hide: 'returnButtonZIndex',
|
|
88
|
+
scope: this,
|
|
89
|
+
});
|
|
90
|
+
this.setButtonCssVariables();
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
onBoxReady() {
|
|
94
|
+
Coon.util.VisualLinker.createLinkedPair(
|
|
95
|
+
this,
|
|
96
|
+
this.contentPanel,
|
|
97
|
+
{
|
|
98
|
+
leadComponentClass: 'dropdownContentButton',
|
|
99
|
+
alignment: this.alignment,
|
|
100
|
+
outerBgColor: this.outerBgColor,
|
|
101
|
+
verticalOffset: this.verticalOffset,
|
|
102
|
+
roundCorners: this.roundCorners,
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
getContentPanel() {
|
|
108
|
+
return this.contentPanel;
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
setButtonCssVariables() {
|
|
112
|
+
if (this.bgColor) {
|
|
113
|
+
this.setStyle('--bg-color', this.bgColor);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
setButtonZIndex(panel) {
|
|
118
|
+
if (!panel.modal) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
this.savedZIndex = this.getEl().dom.style.zIndex;
|
|
122
|
+
this.setStyle({
|
|
123
|
+
zIndex: panel.getEl().dom.style.zIndex+5,
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
returnButtonZIndex(panel) {
|
|
128
|
+
if (!panel.modal) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
this.setStyle({
|
|
133
|
+
zIndex: this.savedZIndex || undefined,
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
contentBanelBeforeShow(panel) {
|
|
138
|
+
if (panel.autoSize) {
|
|
139
|
+
const body = Ext.getBody();
|
|
140
|
+
const widthDecrement = panel.widthDecrement || 60;
|
|
141
|
+
const heightDecrement = panel.heightDecrement || 100;
|
|
142
|
+
this.getContentPanel().setWidth(body.getWidth() - widthDecrement);
|
|
143
|
+
this.getContentPanel().setHeight(body.getHeight() - heightDecrement);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.dropdownContentButton {
|
|
2
|
+
--btn-width: 30px;
|
|
3
|
+
--btn-height: 30px;
|
|
4
|
+
// переменная --base-foreground-color из material-theme
|
|
5
|
+
--bg-color: var(--base-foreground-color);
|
|
6
|
+
--icon-hover-color: #5fa2dd;
|
|
7
|
+
|
|
8
|
+
border-radius: 6px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
background-color: var(--bg-color);
|
|
11
|
+
|
|
12
|
+
&.dropdownContentButton--active {
|
|
13
|
+
.dropdownContentButton-icon {
|
|
14
|
+
transform: rotateX(180deg);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.dropdownContentButton--bottom {
|
|
18
|
+
border-bottom: none;
|
|
19
|
+
border-bottom-left-radius: 0;
|
|
20
|
+
border-bottom-right-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.dropdownContentButton--top {
|
|
24
|
+
border-top: none;
|
|
25
|
+
border-top-left-radius: 0;
|
|
26
|
+
border-top-right-radius: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-btn {
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
background-color: var(--bg-color);
|
|
33
|
+
transition: background-color 0.2s;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: var(--bg-color);
|
|
37
|
+
|
|
38
|
+
& .dropdownContentButton-icon {
|
|
39
|
+
color: var(--icon-hover-color);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-icon {
|
|
45
|
+
mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjI5Mjg5IDcuMjkyODlDMy42ODM0MiA2LjkwMjM3IDQuMzE2NTggNi45MDIzNyA0LjcwNzExIDcuMjkyODlMMTIgMTQuNTg1OEwxOS4yOTI5IDcuMjkyODlDMTkuNjgzNCA2LjkwMjM3IDIwLjMxNjYgNi45MDIzNyAyMC43MDcxIDcuMjkyODlDMjEuMDk3NiA3LjY4MzQyIDIxLjA5NzYgOC4zMTY1OCAyMC43MDcxIDguNzA3MTFMMTIuNzA3MSAxNi43MDcxQzEyLjMxNjYgMTcuMDk3NiAxMS42ODM0IDE3LjA5NzYgMTEuMjkyOSAxNi43MDcxTDMuMjkyODkgOC43MDcxMUMyLjkwMjM3IDguMzE2NTggMi45MDIzNyA3LjY4MzQyIDMuMjkyODkgNy4yOTI4OVoiIGZpbGw9ImJsYWNrIi8+PC9zdmc+");
|
|
46
|
+
mask-size: 100%;
|
|
47
|
+
mask-repeat: no-repeat;
|
|
48
|
+
mask-position: center;
|
|
49
|
+
background-color: #3d6780;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.x-btn-default-small {
|
|
53
|
+
border: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dropdownContentButton-content {
|
|
58
|
+
--border-color: #a5a5a5;
|
|
59
|
+
--bg-color: white;
|
|
60
|
+
--shadow-color: #a5a5a5;
|
|
61
|
+
|
|
62
|
+
background-color: var(--bg-color);
|
|
63
|
+
border: 1px solid var(--border-color);
|
|
64
|
+
|
|
65
|
+
&.dropdownContentButton-content--bottom {
|
|
66
|
+
&.dropdownContentButton-content--right {
|
|
67
|
+
box-shadow:
|
|
68
|
+
-2px 4px 6px -1px var(--shadow-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.dropdownContentButton-content--left {
|
|
72
|
+
box-shadow:
|
|
73
|
+
2px 4px 6px -1px var(--shadow-color);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.dropdownContentButton-content--top {
|
|
78
|
+
&.dropdownContentButton-content--right {
|
|
79
|
+
box-shadow:
|
|
80
|
+
-2px -4px 6px -1px var(--shadow-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.dropdownContentButton-content--left {
|
|
84
|
+
box-shadow:
|
|
85
|
+
2px -4px 6px -1px var(--shadow-color);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.x-panel-body {
|
|
90
|
+
background-color: var(--bg-color);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Ext.define('Coon.common.button.DropdownContentButtonController', {
|
|
2
|
+
extend: 'Ext.app.ViewController',
|
|
3
|
+
alias: 'controller.DropdownContentButtonController',
|
|
4
|
+
|
|
5
|
+
listen: {
|
|
6
|
+
global: {
|
|
7
|
+
mousedown: 'checkDismissClick',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
onMainBtnClick() {
|
|
12
|
+
const vm = this.getViewModel();
|
|
13
|
+
const isActive = vm.get('isActive');
|
|
14
|
+
|
|
15
|
+
if (!isActive) {
|
|
16
|
+
this.showContent();
|
|
17
|
+
vm.set('isActive', true);
|
|
18
|
+
} else {
|
|
19
|
+
this.hideContent();
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
onMove() {
|
|
24
|
+
const vm = this.getViewModel();
|
|
25
|
+
const isActive = vm.get('isActive');
|
|
26
|
+
if (isActive) {
|
|
27
|
+
this.hideContent();
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
checkDismissClick: function(event) {
|
|
32
|
+
const isActive = this.getViewModel().get('isActive');
|
|
33
|
+
if (isActive) {
|
|
34
|
+
if (!this.getView().contentPanel.owns(event.getTarget()) && !this.getView().owns(event.getTarget())) {
|
|
35
|
+
this.hideContent();
|
|
36
|
+
this.getView().getViewModel().set('isActive', false);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
showContent() {
|
|
42
|
+
const panel = this.getView().contentPanel;
|
|
43
|
+
const btn = this.getView();
|
|
44
|
+
|
|
45
|
+
panel.show();
|
|
46
|
+
Coon.util.VisualLinker.link(btn, panel);
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
hideContent() {
|
|
50
|
+
const panel = this.getView().contentPanel;
|
|
51
|
+
const vm = this.getViewModel();
|
|
52
|
+
const btn = this.getView();
|
|
53
|
+
|
|
54
|
+
Coon.util.VisualLinker.unlink(btn, panel);
|
|
55
|
+
|
|
56
|
+
panel.hide();
|
|
57
|
+
vm.set('isActive', false);
|
|
58
|
+
this.getView().updateLayout();
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -4,10 +4,8 @@ Ext.define('Coon.common.component.settings.modules.settingClosePageConfirmation'
|
|
|
4
4
|
getFieldComponent: (get, set) => {
|
|
5
5
|
return {
|
|
6
6
|
xtype: 'checkbox',
|
|
7
|
-
|
|
8
|
-
labelAlign: 'left',
|
|
7
|
+
boxLabel: 'Предупреждать при закрытии страницы',
|
|
9
8
|
value: get(),
|
|
10
|
-
labelWidth: 300,
|
|
11
9
|
listeners: {
|
|
12
10
|
change: function(_, value) {
|
|
13
11
|
set(value);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Ext.define('Coon.common.component.settings.modules.settingFavoritePanelShow', {
|
|
2
|
+
alias: 'usersetting.favoritePanelHidden',
|
|
3
|
+
requires: ['Coon.setup'],
|
|
4
|
+
defaultValue: false,
|
|
5
|
+
getFieldComponent: (get, set) => {
|
|
6
|
+
return {
|
|
7
|
+
xtype: 'checkbox',
|
|
8
|
+
boxLabel: 'Скрыть панель избранного',
|
|
9
|
+
value: get(),
|
|
10
|
+
listeners: {
|
|
11
|
+
change: function(_, value) {
|
|
12
|
+
set(value);
|
|
13
|
+
Ext.fireEvent('nav:setvisiblefavoritepanel', value);
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
init(get) {
|
|
19
|
+
Coon.setup.set('favoritePanelHidden', get());
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Ext.define('Coon.common.component.settings.modules.settingReportCalculator', {
|
|
2
|
+
alias: 'usersetting.settingReportCalculator',
|
|
3
|
+
requires: ['Coon.setup'],
|
|
4
|
+
defaultValue: false,
|
|
5
|
+
getFieldComponent: (get, set) => {
|
|
6
|
+
return {
|
|
7
|
+
xtype: 'checkbox',
|
|
8
|
+
boxLabel: 'Показывать калькулятор',
|
|
9
|
+
value: get(),
|
|
10
|
+
listeners: {
|
|
11
|
+
change: function(_, value) {
|
|
12
|
+
Coon.setup.set('showReportCalculator', !!value);
|
|
13
|
+
Ext.fireEvent('enableReportCalculator', !!value);
|
|
14
|
+
set(value);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
init(get) {
|
|
20
|
+
Coon.setup.set('showReportCalculator', get());
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -4,10 +4,8 @@ Ext.define('Coon.common.component.settings.modules.settingShowNeedReloadMessage'
|
|
|
4
4
|
getFieldComponent: (get, set) => {
|
|
5
5
|
return {
|
|
6
6
|
xtype: 'checkbox',
|
|
7
|
-
|
|
8
|
-
labelAlign: 'left',
|
|
7
|
+
boxLabel: 'Выводить сообщение о необходимости перезагрузить старницу после обновления приложения',
|
|
9
8
|
value: get(),
|
|
10
|
-
labelWidth: 300,
|
|
11
9
|
listeners: {
|
|
12
10
|
change: function(_, value) {
|
|
13
11
|
set(value);
|
|
@@ -5,12 +5,11 @@ Ext.define('Coon.common.component.settings.modules.settingwindowHolder', {
|
|
|
5
5
|
getFieldComponent: (get, set) => {
|
|
6
6
|
return {
|
|
7
7
|
xtype: 'checkbox',
|
|
8
|
-
|
|
9
|
-
labelAlign: 'left',
|
|
8
|
+
boxLabel: 'Сворачивать окно добавления/редактирования',
|
|
10
9
|
value: get(),
|
|
11
|
-
labelWidth: 300,
|
|
12
10
|
listeners: {
|
|
13
11
|
change: function(_, value) {
|
|
12
|
+
Coon.setup.set('windowHolderMode', !!value);
|
|
14
13
|
set(value);
|
|
15
14
|
},
|
|
16
15
|
},
|
|
@@ -10,7 +10,7 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
10
10
|
},
|
|
11
11
|
addCloseButton: false,
|
|
12
12
|
closable: true,
|
|
13
|
-
constrain: true,
|
|
13
|
+
// constrain: true,
|
|
14
14
|
scrollable: false,
|
|
15
15
|
maximizable: true,
|
|
16
16
|
maximized: false,
|
|
@@ -20,7 +20,7 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
20
20
|
layout: 'fit',
|
|
21
21
|
frame: false,
|
|
22
22
|
border: false,
|
|
23
|
-
modal:
|
|
23
|
+
modal: false,
|
|
24
24
|
closeAction: 'destroy',
|
|
25
25
|
alwaysInCenter: false,
|
|
26
26
|
callbackFn: undefined,
|
|
@@ -62,13 +62,11 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
updateConstraints: function() {
|
|
65
|
-
const viewPortSize =
|
|
65
|
+
const viewPortSize = this.constrainView.getSize();
|
|
66
66
|
this.maxWidth = viewPortSize.width;
|
|
67
67
|
this.maxHeight = viewPortSize.height;
|
|
68
|
-
|
|
69
68
|
const isWinMaximized = this.height >= this.maxHeight && this.width >= this.maxWidth;
|
|
70
69
|
this.maximized = this.maximized || isWinMaximized;
|
|
71
|
-
|
|
72
70
|
if (this.maximized) {
|
|
73
71
|
const defaultRestoreSize = {
|
|
74
72
|
height: 500,
|
|
@@ -77,10 +75,10 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
77
75
|
this.height = Ext.isEmpty(this.height) ? defaultRestoreSize.height : this.height;
|
|
78
76
|
this.width = Ext.isEmpty(this.width) ? defaultRestoreSize.width : this.width;
|
|
79
77
|
}
|
|
80
|
-
|
|
81
78
|
if (this.alwaysInCenter) {
|
|
82
79
|
this.center();
|
|
83
80
|
}
|
|
81
|
+
this.updateLayout();
|
|
84
82
|
},
|
|
85
83
|
|
|
86
84
|
updateDem(panel) {
|
|
@@ -103,8 +101,10 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
103
101
|
const me = this;
|
|
104
102
|
const panel = this.items;
|
|
105
103
|
panel.header = false;
|
|
104
|
+
this.constrainView = Ext.getBody();// Coon.app.Config.get('mainViewXType');
|
|
105
|
+
// this.constrainTo = this.constrainView.getEl();
|
|
106
106
|
this.updateDimensions(panel);
|
|
107
|
-
this.
|
|
107
|
+
this.constrainView.on('resize', this.updateConstraints, this);
|
|
108
108
|
this.tools = this.tools || [];
|
|
109
109
|
if (this.canHold) {
|
|
110
110
|
this.tools.unshift({
|
|
@@ -130,6 +130,18 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
130
130
|
handler: Ext.bind(this.openInNewWindow, this),
|
|
131
131
|
}];
|
|
132
132
|
}
|
|
133
|
+
this.on({
|
|
134
|
+
show: () => {
|
|
135
|
+
this.constrainView.mask();
|
|
136
|
+
},
|
|
137
|
+
hide: () => {
|
|
138
|
+
this.constrainView.unmask();
|
|
139
|
+
},
|
|
140
|
+
destroy: () => {
|
|
141
|
+
this.constrainView.unmask();
|
|
142
|
+
},
|
|
143
|
+
scope: this,
|
|
144
|
+
});
|
|
133
145
|
this.callParent();
|
|
134
146
|
this.setFocusTarget(panel);
|
|
135
147
|
this.content = this.items.getAt(0);
|
|
@@ -211,8 +223,4 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
211
223
|
window.open(url);
|
|
212
224
|
},
|
|
213
225
|
|
|
214
|
-
onDestroy: function() {
|
|
215
|
-
// Ext.destroy(this.resizerDestroier);
|
|
216
|
-
},
|
|
217
|
-
|
|
218
226
|
});
|
|
@@ -10,12 +10,13 @@ Ext.define('Coon.common.tree.BaseContextMenu', {
|
|
|
10
10
|
validate: function() {
|
|
11
11
|
let count = 0;
|
|
12
12
|
if (this.items) {
|
|
13
|
+
this.shouldDisplaySeparator = false;
|
|
13
14
|
this.items.each(Ext.bind(function(item) {
|
|
14
|
-
if (item.xtype
|
|
15
|
+
if (item.xtype === 'menuseparator') {
|
|
15
16
|
item.setVisible(this.shouldDisplaySeparator);
|
|
16
17
|
this.shouldDisplaySeparator = false;
|
|
17
18
|
}
|
|
18
|
-
if (item.isValid) {
|
|
19
|
+
if (Ext.isFunction(item.isValid)) {
|
|
19
20
|
const valid = item.isValid();
|
|
20
21
|
item.setVisible(valid);
|
|
21
22
|
if (valid) {
|
|
@@ -23,7 +24,7 @@ Ext.define('Coon.common.tree.BaseContextMenu', {
|
|
|
23
24
|
this.shouldDisplaySeparator = true;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
}, this)
|
|
27
|
+
}, this));
|
|
27
28
|
}
|
|
28
29
|
return count;
|
|
29
30
|
},
|
package/src/log.js
CHANGED
|
@@ -19,9 +19,6 @@ Ext.define('Coon.log', {
|
|
|
19
19
|
const me = this;
|
|
20
20
|
if (!this.getInit() && this.isDebug) {
|
|
21
21
|
this.setInit(true);
|
|
22
|
-
if (this.isDebug) {
|
|
23
|
-
this.injectViewer();
|
|
24
|
-
}
|
|
25
22
|
}
|
|
26
23
|
this.consoleError = window.console.error;
|
|
27
24
|
this.getConsoleError = function() {
|
|
@@ -98,7 +95,7 @@ Ext.define('Coon.log', {
|
|
|
98
95
|
// eslint-disable-next-line no-console
|
|
99
96
|
console.trace(...args);
|
|
100
97
|
} else {
|
|
101
|
-
if (Coon.log.isProduction && level === 'error') {
|
|
98
|
+
if (Coon.log.isProduction() && level === 'error') {
|
|
102
99
|
Coon.log.getConsoleError()(` [${level}]: `, ...args);
|
|
103
100
|
} else {
|
|
104
101
|
// eslint-disable-next-line no-console
|
|
@@ -160,7 +157,9 @@ Ext.define('Coon.log', {
|
|
|
160
157
|
getEmptyProxy() {
|
|
161
158
|
const proxy = new Proxy({}, {
|
|
162
159
|
get() {
|
|
163
|
-
return ()
|
|
160
|
+
return function() {
|
|
161
|
+
return proxy;
|
|
162
|
+
};
|
|
164
163
|
},
|
|
165
164
|
});
|
|
166
165
|
return proxy;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Ext.define('Coon.nav.AppNavCalcButton', {
|
|
2
|
+
extend: 'Ext.button.Button',
|
|
3
|
+
xtype: 'AppNavCalcButton',
|
|
4
|
+
cls: 'AppNavCalcButton',
|
|
5
|
+
iconCls: 'svg-icon svg-icon-calculator',
|
|
6
|
+
hidden: false,
|
|
7
|
+
width: 40,
|
|
8
|
+
height: 40,
|
|
9
|
+
margin: 0,
|
|
10
|
+
|
|
11
|
+
initComponent() {
|
|
12
|
+
this.setVisible(Coon.setup.get('showReportCalculator'));
|
|
13
|
+
Ext.on('enableReportCalculator', (enabled) => {
|
|
14
|
+
this.setVisible(enabled);
|
|
15
|
+
}, this);
|
|
16
|
+
this.callParent();
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
handler() {
|
|
20
|
+
Coon.report.component.calculator.ReportCalculatorPanel.open();
|
|
21
|
+
this.blur();
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -7,6 +7,7 @@ Ext.define('Coon.nav.AppNavigationBar', {
|
|
|
7
7
|
controller: 'AppNavigationBarViewController',
|
|
8
8
|
|
|
9
9
|
cls: 'AppNavigationBar',
|
|
10
|
+
hidden: true,
|
|
10
11
|
|
|
11
12
|
layout: {
|
|
12
13
|
type: 'hbox',
|
|
@@ -42,7 +43,6 @@ Ext.define('Coon.nav.AppNavigationBar', {
|
|
|
42
43
|
const el = Ext.create({
|
|
43
44
|
xtype: 'AppNavTab',
|
|
44
45
|
tabId: tab.id,
|
|
45
|
-
hidden: !Coon.setup.get('overrides.displacedMode'),
|
|
46
46
|
tooltip: text,
|
|
47
47
|
text,
|
|
48
48
|
first: idx === 0,
|
|
@@ -12,14 +12,14 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
|
|
|
12
12
|
menuUpdate: false,
|
|
13
13
|
lastRoute: false,
|
|
14
14
|
init: function(view) {
|
|
15
|
+
this.router = Ext.getApplication().appRouter;
|
|
15
16
|
view.updateSelection = this.updateSelection.bind(this);
|
|
16
17
|
view.getMenuReady = this.getMenuReady.bind(this);
|
|
17
18
|
view.getFirstAvailable = this.getFirstAvailable.bind(this);
|
|
18
19
|
view.changeMicro = this.changeMicro.bind(this);
|
|
19
20
|
view.changeWorkspace = this.changeWorkspace.bind(this);
|
|
20
21
|
this.view.on('selectionchange', this.onSelectMenuItem, this);
|
|
21
|
-
|
|
22
|
-
this.lastRoute = appRouter && appRouter.lastRoute;
|
|
22
|
+
this.lastRoute = this.router && this.router.lastRoute;
|
|
23
23
|
this.loadMenu(false, !!this.lastRoute);
|
|
24
24
|
Ext.on('route:initial', (route) => {
|
|
25
25
|
this.selectThenMenuReady = route.id;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Ext.define('Coon.nav.AppNavigationMenuMinimized', {
|
|
2
|
+
extend: 'Ext.Panel',
|
|
3
|
+
xtype: 'AppNavigationMenuMinimized',
|
|
4
|
+
// mixins: ['Coon.mixin.RelayMethods'],
|
|
5
|
+
requires: [
|
|
6
|
+
'Coon.nav.menu.WorkspaceMenuView',
|
|
7
|
+
'Coon.nav.AppNavigationMenuController'
|
|
8
|
+
],
|
|
9
|
+
scrollable: 'y',
|
|
10
|
+
selectFirstOnLoad: true,
|
|
11
|
+
controller: 'AppNavigationMenuController',
|
|
12
|
+
viewModel: {
|
|
13
|
+
data: {
|
|
14
|
+
workspace_descr: null,
|
|
15
|
+
workspace_list: null,
|
|
16
|
+
workspace_icon: null,
|
|
17
|
+
navCollapsed: true,
|
|
18
|
+
collapsedWidth: 44,
|
|
19
|
+
fullWidth: 260,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
fullWidth: 260,
|
|
23
|
+
cls: 'AppNavigationMenu',
|
|
24
|
+
layout: {
|
|
25
|
+
type: 'vbox',
|
|
26
|
+
align: 'stretch',
|
|
27
|
+
},
|
|
28
|
+
items: [
|
|
29
|
+
{
|
|
30
|
+
xtype: 'button',
|
|
31
|
+
textAlign: 'left',
|
|
32
|
+
margin: '0 0 15px 0',
|
|
33
|
+
bind: {
|
|
34
|
+
text: '{workspace_descr}',
|
|
35
|
+
menu: '{workspace_list}',
|
|
36
|
+
iconCls: '{workspace_icon}',
|
|
37
|
+
arrowVisible: '{!navCollapsed}',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
xtype: 'WorkspaceMenuViewMinimized',
|
|
42
|
+
width: 260,
|
|
43
|
+
reference: 'WorkspaceMenuView',
|
|
44
|
+
store: {
|
|
45
|
+
root: {
|
|
46
|
+
expanded: true,
|
|
47
|
+
children: null,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
bind: {
|
|
54
|
+
width: `{!navCollapsed ? fullWidth : collapsedWidth}`,
|
|
55
|
+
},
|
|
56
|
+
initComponent: function() {
|
|
57
|
+
this.callParent();
|
|
58
|
+
this.relayEvents(this.lookup('WorkspaceMenuView'), ['selectionchange']);
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
});
|