ru.coon 2.8.65 → 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 +319 -6
- 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/editor/EditorFactory.js +3 -1
- 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/ReportCharacteristicBindPlugin.js +6 -4
- 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
package/src/nav/MenuEntity.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Ext.define('Coon.nav.MenuEntity', {
|
|
2
2
|
singleton: true,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
privates: {
|
|
5
|
+
menuItems: [],
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
isLoading: true,
|
|
9
|
+
|
|
6
10
|
get() {
|
|
7
|
-
if (
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} else if (!this.promise) {
|
|
12
|
-
this.isLoading = true;
|
|
13
|
-
this.promise = Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
|
|
11
|
+
if (!this.isLoading) {
|
|
12
|
+
return Promise.resolve(this.menuItems);
|
|
13
|
+
} else {
|
|
14
|
+
return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
|
|
14
15
|
.then((data) => {
|
|
15
16
|
if (Array.isArray(data.list)) {
|
|
16
17
|
this.menuItems = data.list;
|
|
@@ -19,17 +20,24 @@ Ext.define('Coon.nav.MenuEntity', {
|
|
|
19
20
|
}
|
|
20
21
|
this.isLoading = false;
|
|
21
22
|
return this.menuItems;
|
|
22
|
-
}).
|
|
23
|
-
|
|
23
|
+
}).catch((error) => {
|
|
24
|
+
Coon.log.error(`ошибка начитывания меню навигации: ${JSON.stringify(error)}`);
|
|
25
|
+
this.isLoading = false;
|
|
26
|
+
return this.menuItems;
|
|
24
27
|
});
|
|
25
28
|
}
|
|
26
|
-
return this.promise;
|
|
27
29
|
},
|
|
28
30
|
|
|
29
|
-
isValid(
|
|
31
|
+
isValid(menuEntryCD) {
|
|
30
32
|
return this.get().then((data) => {
|
|
31
|
-
return !!data.find((i) => i.
|
|
33
|
+
return !!data.find((i) => i.MENU_ENTRY_CD === menuEntryCD);
|
|
32
34
|
});
|
|
33
35
|
},
|
|
34
36
|
|
|
37
|
+
getMenuItem(menuEntryCD, property) {
|
|
38
|
+
return this.get().then((data) => {
|
|
39
|
+
const menuItem = data.find((i) => i.MENU_ENTRY_CD === menuEntryCD);
|
|
40
|
+
return property ? menuItem[property] : menuItem;
|
|
41
|
+
});
|
|
42
|
+
},
|
|
35
43
|
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Ext.define('Coon.nav.menu.MenuFavoritesBar', {
|
|
2
|
+
extend: 'Ext.panel.Panel',
|
|
3
|
+
xtype: 'MenuFavoritesBar',
|
|
4
|
+
cls: 'MenuFavoritesBar',
|
|
5
|
+
layout: {
|
|
6
|
+
type: 'vbox',
|
|
7
|
+
align: 'stretch',
|
|
8
|
+
},
|
|
9
|
+
listeners: {
|
|
10
|
+
render: 'onRender',
|
|
11
|
+
},
|
|
12
|
+
items: [],
|
|
13
|
+
popupEl: null,
|
|
14
|
+
scrollable: true,
|
|
15
|
+
|
|
16
|
+
controller: {
|
|
17
|
+
init() {
|
|
18
|
+
Ext.on({
|
|
19
|
+
'nav:menuitemchange': {fn: this.onMenuItemChanged, scope: this},
|
|
20
|
+
'nav:favoriteitemschange': {
|
|
21
|
+
fn: function() {
|
|
22
|
+
this.renderFavoritesItems(true);
|
|
23
|
+
},
|
|
24
|
+
scope: this,
|
|
25
|
+
},
|
|
26
|
+
'nav:setvisiblefavoritepanel': {fn: (visible) => {
|
|
27
|
+
this.getView().setVisible(!visible);
|
|
28
|
+
this.onMenuItemChanged({MENU_ENTRY_CD: Ext.getApplication().appRouter?.lastRoute?.id});
|
|
29
|
+
}, scope: this},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
this.renderFavoritesItems();
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
onRender() {
|
|
36
|
+
this.getView().setVisible(!Coon.userSettings.get('favoritePanelHidden'));
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
onMenuItemChanged(item) {
|
|
40
|
+
const menuItem = item && this.getView().down(`#${item.MENU_ENTRY_CD}`);
|
|
41
|
+
this.deselectAll();
|
|
42
|
+
if (menuItem) {
|
|
43
|
+
this.select(menuItem);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
renderFavoritesItems(selectItem) {
|
|
48
|
+
this.getView().removeAll();
|
|
49
|
+
const props = Coon.nav.menu.FavoriteCfg.get().favorite || [];
|
|
50
|
+
Coon.nav.MenuEntity.get().then((menu) => {
|
|
51
|
+
const lastRoute = Ext.getApplication().appRouter?.lastRoute?.id;
|
|
52
|
+
menu.forEach((item) => {
|
|
53
|
+
if (props.indexOf(item.MENU_ENTRY_CD) > -1) {
|
|
54
|
+
this.addNewItem({
|
|
55
|
+
WORKSPACE_DESCR: item.WORKSPACE_DESCR,
|
|
56
|
+
text: item.MENU_ENTRY_DESCR,
|
|
57
|
+
UI_ELEMENT_CD: item.UI_ELEMENT_CD,
|
|
58
|
+
MENU_ENTRY_CD: item.MENU_ENTRY_CD,
|
|
59
|
+
iconCls: item.MENU_ENTRY_ICON,
|
|
60
|
+
selected: selectItem && lastRoute === item.MENU_ENTRY_CD ? 'selected' : '',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
deselectAll() {
|
|
68
|
+
Ext.dom.Query.select('.selected', this.getView().el.dom).forEach((item) => item.classList.remove('selected'));
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
select(item) {
|
|
72
|
+
if (item.el) {
|
|
73
|
+
item.el.dom.firstElementChild.classList.add('selected');
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
addNewItem(item) {
|
|
78
|
+
const iconCls = item.iconCls ? item.iconCls : 'svg-icon svg-icon-attention';
|
|
79
|
+
return this.getView().add({
|
|
80
|
+
xtype: 'component',
|
|
81
|
+
itemId: item.MENU_ENTRY_CD,
|
|
82
|
+
iconCls: item.iconCls,
|
|
83
|
+
html: `<div class="vb-item ${item.selected}">
|
|
84
|
+
<i class="vb-icon ${iconCls} svg-icon-size-18 menu-item-main-icon"></i>
|
|
85
|
+
<span class="menu-item-text-elem">
|
|
86
|
+
<i class="vb-text svg-icon-size-18">${item.text}</i>
|
|
87
|
+
</span>
|
|
88
|
+
</div>`,
|
|
89
|
+
listeners: {
|
|
90
|
+
render: (c) => {
|
|
91
|
+
c.getEl().dom.onclick = () => {
|
|
92
|
+
Ext.fireEvent('nav:menuitemclick', item.MENU_ENTRY_CD);
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.menu-item-text-elem.selected{
|
|
2
|
+
background-color: #112b39;
|
|
3
|
+
}
|
|
4
|
+
.menu-item-text-elem.selected::before {
|
|
5
|
+
background-color: #9a2d2a;
|
|
6
|
+
content: " ";
|
|
7
|
+
position: absolute;
|
|
8
|
+
display: block;
|
|
9
|
+
left: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
width: 5px;
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
.menu-item-text-elem{
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
background-color: #2C5771;
|
|
17
|
+
height: 40px;
|
|
18
|
+
color: #fff;
|
|
19
|
+
position: absolute;
|
|
20
|
+
z-index: 999999999;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
top: 0px;
|
|
24
|
+
left: 40px;
|
|
25
|
+
.vb-icon{
|
|
26
|
+
background-color: #fff;
|
|
27
|
+
display: inline-block;
|
|
28
|
+
width: 40px;
|
|
29
|
+
height: 40px;
|
|
30
|
+
}
|
|
31
|
+
.vb-text{
|
|
32
|
+
color: #fff;
|
|
33
|
+
margin:0 20px 0 5px;
|
|
34
|
+
display: inline-block;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.MenuFavoritesBar{
|
|
39
|
+
width: 100% !important;
|
|
40
|
+
.menu-item-text-elem {
|
|
41
|
+
display: none;
|
|
42
|
+
.vb-text {
|
|
43
|
+
font-style: normal;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.vb-item:hover {
|
|
47
|
+
.menu-item-text-elem {
|
|
48
|
+
display: flex;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.x-panel-body {
|
|
52
|
+
scrollbar-width: none;
|
|
53
|
+
width: 100% !important;
|
|
54
|
+
}
|
|
55
|
+
.x-box-inner{
|
|
56
|
+
background-color: $base-color;
|
|
57
|
+
width: 40px !important;
|
|
58
|
+
overflow: visible;
|
|
59
|
+
}
|
|
60
|
+
.x-box-item {
|
|
61
|
+
width: 40px !important;
|
|
62
|
+
}
|
|
63
|
+
.vb-item{
|
|
64
|
+
height: 40px;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
.vb-icon{
|
|
67
|
+
background-color: #fff;
|
|
68
|
+
display: block;
|
|
69
|
+
width: 40px;
|
|
70
|
+
height: 40px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.vb-item:hover{
|
|
74
|
+
background-color: #2C5771;
|
|
75
|
+
}
|
|
76
|
+
.vb-item.selected{
|
|
77
|
+
background-color: #112b39;
|
|
78
|
+
.menu-item-text-elem {
|
|
79
|
+
background-color: #112b39;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.vb-item.selected::before {
|
|
83
|
+
background-color: #9a2d2a;
|
|
84
|
+
content: " ";
|
|
85
|
+
position: absolute;
|
|
86
|
+
display: block;
|
|
87
|
+
left: 0;
|
|
88
|
+
top: 0;
|
|
89
|
+
width: 5px;
|
|
90
|
+
height: 100%;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
Ext.define('Coon.nav.editor.NavigateElementEditorView', {
|
|
7
|
-
extend: 'Ext.
|
|
7
|
+
extend: 'Ext.panel.Panel',
|
|
8
8
|
xtype: 'NavigateElementEditorView',
|
|
9
|
-
ui: 'NavigateElementEditorView',
|
|
9
|
+
// ui: 'NavigateElementEditorView',
|
|
10
10
|
|
|
11
11
|
viewModel: 'NavigateElementEditorViewModel',
|
|
12
12
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Ext.define('Coon.nav.menu.WorkspaceMenuViewMinimized', {
|
|
2
|
+
extend: 'Ext.list.Tree',
|
|
3
|
+
requires: [
|
|
4
|
+
'Ext.data.TreeStore'
|
|
5
|
+
],
|
|
6
|
+
xtype: 'WorkspaceMenuViewMinimized',
|
|
7
|
+
ui: 'menu',
|
|
8
|
+
micro: true,
|
|
9
|
+
cls: 'WorkspaceMenuView',
|
|
10
|
+
listeners: {
|
|
11
|
+
itemcollapse: (cmp) => {
|
|
12
|
+
Ext.defer(() => {
|
|
13
|
+
cmp.updateLayout();
|
|
14
|
+
}, 300, this);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
scrollable: true,
|
|
18
|
+
expanderFirst: false,
|
|
19
|
+
highlightPath: true,
|
|
20
|
+
expanderOnly: false,
|
|
21
|
+
singleExpand: true,
|
|
22
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Override класса 'Ext.tab.Panel'.
|
|
3
|
+
* Добавлен функционал:
|
|
4
|
+
* - Подписка на событие 'dirtychange' на все items в tabpanel,
|
|
5
|
+
* добавляющий/удаляющий дополнительный класс tabDirtyCls у tab.
|
|
6
|
+
*
|
|
7
|
+
* Стилизация вертикальных табов осуществлена добавлением "cls: 'coonVerticalTabpanel'" в конфигурацию tabpanel.
|
|
8
|
+
*/
|
|
9
|
+
Ext.define('Coon.overrides.panel.TabPanelOverride', {
|
|
10
|
+
override: 'Ext.tab.Panel',
|
|
11
|
+
|
|
12
|
+
tabDirtyCls: 'tab-dirty',
|
|
13
|
+
|
|
14
|
+
initComponent() {
|
|
15
|
+
this.callParent();
|
|
16
|
+
this.getLayout().getLayoutItems().forEach((tab) => {
|
|
17
|
+
tab.on('dirtychange', this.onCardDirtyChange.bind(this));
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param { component: Component, isDirty: boolean }
|
|
23
|
+
* Ставит/убирает CSS класс "tabDirtyCls" в зависимости от флага "isDirty" соответствующей табе
|
|
24
|
+
*/
|
|
25
|
+
onCardDirtyChange(component, isDirty) {
|
|
26
|
+
if (!component.tab) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (isDirty) {
|
|
30
|
+
component.tab.addCls(this.tabDirtyCls);
|
|
31
|
+
} else {
|
|
32
|
+
component.tab.removeCls(this.tabDirtyCls);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.coonVerticalTabpanel {
|
|
2
|
+
.x-tab-bar.x-tab-bar-vertical {
|
|
3
|
+
background-color: #fff;
|
|
4
|
+
|
|
5
|
+
.x-tab {
|
|
6
|
+
position: static !important;
|
|
7
|
+
padding: 8px 16px;
|
|
8
|
+
border-color: transparent;
|
|
9
|
+
color: var(--color);
|
|
10
|
+
text-transform: none;
|
|
11
|
+
max-width: 200px;
|
|
12
|
+
|
|
13
|
+
&.x-tab-left {
|
|
14
|
+
border-width: 0 0 0 4px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.x-tab-over {
|
|
18
|
+
background-color: #ececec;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.x-tab-active,
|
|
22
|
+
&.x-tab-active.x-tab-focus {
|
|
23
|
+
border-color: $active-color-tec;
|
|
24
|
+
background-color: #F5F5F5;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.x-tab-inner {
|
|
28
|
+
text-wrap-mode: wrap;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.x-tab-text {
|
|
33
|
+
text-align: left;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.x-tab-inner {
|
|
37
|
+
--line-height: 16px;
|
|
38
|
+
|
|
39
|
+
color: var(--color);
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
line-height: var(--line-height);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tab-dirty {
|
|
46
|
+
position: relative;
|
|
47
|
+
.x-tab-inner {
|
|
48
|
+
position: relative;
|
|
49
|
+
overflow: visible;
|
|
50
|
+
|
|
51
|
+
&::before {
|
|
52
|
+
content: '';
|
|
53
|
+
display: block;
|
|
54
|
+
width: 5px;
|
|
55
|
+
height: 5px;
|
|
56
|
+
background: $base-color-light;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: -10px;
|
|
60
|
+
top: calc(1em / 2);
|
|
61
|
+
transform: translateY(-50%);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -14,7 +14,10 @@ Ext.define('Coon.report.component.ClearFiltersButton', {
|
|
|
14
14
|
grid: null,
|
|
15
15
|
handler() {
|
|
16
16
|
if (this.grid) {
|
|
17
|
-
|
|
17
|
+
// clearFilters примешивается, если есть GridFiltersPlugin
|
|
18
|
+
if (Ext.isFunction(this.grid.clearFilters)) {
|
|
19
|
+
this.grid.clearFilters();
|
|
20
|
+
}
|
|
18
21
|
this.grid.fireEvent('clearAllFilters');
|
|
19
22
|
}
|
|
20
23
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Ext.define('Coon.report.component.CopyCellValueMenuItem', {
|
|
2
|
+
extend: 'Ext.menu.Item',
|
|
3
|
+
alias: 'widget.CopyCellValueMenuItem',
|
|
4
|
+
text: 'Копировать',
|
|
5
|
+
isItemHidden() {
|
|
6
|
+
const menu = this.parentMenu;
|
|
7
|
+
return !(menu.context && menu.context.hasContext);
|
|
8
|
+
},
|
|
9
|
+
isItemDisabled() {
|
|
10
|
+
return false;
|
|
11
|
+
},
|
|
12
|
+
handler() {
|
|
13
|
+
const menu = this.parentMenu;
|
|
14
|
+
if (menu.context && menu.context.td) {
|
|
15
|
+
Coon.util.copyToClipboard(menu.context.td.innerText);
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
});
|