Merge pull request #10418 from rusikv/bug/widgets-edit-with-search
Fixed widgets in search mode not editable
This commit is contained in:
commit
011ac8cf3e
@ -11,7 +11,7 @@
|
|||||||
"resources": [],
|
"resources": [],
|
||||||
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
||||||
"templateCss": "",
|
"templateCss": "",
|
||||||
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.entitiesTableWidget.onEditModeChanged();\n}\n\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
||||||
"settingsSchema": "",
|
"settingsSchema": "",
|
||||||
"dataKeySettingsSchema": "",
|
"dataKeySettingsSchema": "",
|
||||||
"settingsDirective": "tb-entities-table-widget-settings",
|
"settingsDirective": "tb-entities-table-widget-settings",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"resources": [],
|
"resources": [],
|
||||||
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
||||||
"templateCss": "",
|
"templateCss": "",
|
||||||
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.entitiesTableWidget.onEditModeChanged();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
||||||
"settingsSchema": "",
|
"settingsSchema": "",
|
||||||
"dataKeySettingsSchema": "",
|
"dataKeySettingsSchema": "",
|
||||||
"settingsDirective": "tb-entities-table-widget-settings",
|
"settingsDirective": "tb-entities-table-widget-settings",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"resources": [],
|
"resources": [],
|
||||||
"templateHtml": "<tb-entities-hierarchy-widget \n [ctx]=\"ctx\">\n</tb-entities-hierarchy-widget>",
|
"templateHtml": "<tb-entities-hierarchy-widget \n [ctx]=\"ctx\">\n</tb-entities-hierarchy-widget>",
|
||||||
"templateCss": "",
|
"templateCss": "",
|
||||||
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesHierarchyWidget.onDataUpdated();\n}\n\nself.typeParameters = function() {\n return {\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'nodeSelected': {\n name: 'widget-action.node-selected',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesHierarchyWidget.onDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.entitiesHierarchyWidget.onEditModeChanged();\n}\n\nself.typeParameters = function() {\n return {\n dataKeysOptional: true\n };\n}\n\nself.actionSources = function() {\n return {\n 'nodeSelected': {\n name: 'widget-action.node-selected',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
||||||
"settingsSchema": "",
|
"settingsSchema": "",
|
||||||
"dataKeySettingsSchema": "",
|
"dataKeySettingsSchema": "",
|
||||||
"settingsDirective": "tb-entities-hierarchy-widget-settings",
|
"settingsDirective": "tb-entities-hierarchy-widget-settings",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"resources": [],
|
"resources": [],
|
||||||
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
"templateHtml": "<tb-entities-table-widget \n [ctx]=\"ctx\">\n</tb-entities-table-widget>",
|
||||||
"templateCss": "",
|
"templateCss": "",
|
||||||
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'name', type: 'entityField' }];\n }\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.entitiesTableWidget.onDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.entitiesTableWidget.onEditModeChanged();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n hasDataPageLink: true,\n warnOnPageDataOverflow: false,\n dataKeysOptional: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'name', type: 'entityField' }];\n }\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n },\n 'rowDoubleClick': {\n name: 'widget-action.row-double-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
||||||
"settingsSchema": "",
|
"settingsSchema": "",
|
||||||
"dataKeySettingsSchema": "",
|
"dataKeySettingsSchema": "",
|
||||||
"settingsDirective": "tb-entities-table-widget-settings",
|
"settingsDirective": "tb-entities-table-widget-settings",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"resources": [],
|
"resources": [],
|
||||||
"templateHtml": "<tb-timeseries-table-widget \n [ctx]=\"ctx\">\n</tb-timeseries-table-widget>",
|
"templateHtml": "<tb-timeseries-table-widget \n [ctx]=\"ctx\">\n</tb-timeseries-table-widget>",
|
||||||
"templateCss": "",
|
"templateCss": "",
|
||||||
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.timeseriesTableWidget.onDataUpdated();\n}\n\nself.onLatestDataUpdated = function() {\n self.ctx.$scope.timeseriesTableWidget.onLatestDataUpdated();\n}\n\nself.typeParameters = function() {\n return {\n ignoreDataUpdateOnIntervalTick: true,\n hasAdditionalLatestDataKeys: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'temperature', label: 'Temperature', type: 'timeseries', units: '°C', decimals: 0 }];\n }\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
"controllerScript": "self.onInit = function() {\n}\n\nself.onDataUpdated = function() {\n self.ctx.$scope.timeseriesTableWidget.onDataUpdated();\n}\n\nself.onLatestDataUpdated = function() {\n self.ctx.$scope.timeseriesTableWidget.onLatestDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.timeseriesTableWidget.onEditModeChanged();\n}\n\nself.typeParameters = function() {\n return {\n ignoreDataUpdateOnIntervalTick: true,\n hasAdditionalLatestDataKeys: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'temperature', label: 'Temperature', type: 'timeseries', units: '°C', decimals: 0 }];\n }\n };\n}\n\nself.actionSources = function() {\n return {\n 'actionCellButton': {\n name: 'widget-action.action-cell-button',\n multiple: true,\n hasShowCondition: true\n },\n 'rowClick': {\n name: 'widget-action.row-click',\n multiple: false\n }\n };\n}\n\nself.onDestroy = function() {\n}\n",
|
||||||
"settingsSchema": "",
|
"settingsSchema": "",
|
||||||
"dataKeySettingsSchema": "",
|
"dataKeySettingsSchema": "",
|
||||||
"latestDataKeySettingsSchema": "",
|
"latestDataKeySettingsSchema": "",
|
||||||
|
|||||||
@ -163,6 +163,13 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O
|
|||||||
this.updateNodeData(this.subscription.data);
|
this.updateNodeData(this.subscription.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public onEditModeChanged() {
|
||||||
|
if (this.textSearchMode) {
|
||||||
|
this.ctx.hideTitlePanel = !this.ctx.isEdit;
|
||||||
|
this.ctx.detectChanges(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private initializeConfig() {
|
private initializeConfig() {
|
||||||
this.ctx.widgetActions = [this.searchAction];
|
this.ctx.widgetActions = [this.searchAction];
|
||||||
|
|
||||||
|
|||||||
@ -266,6 +266,13 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
|
|||||||
this.ctx.detectChanges();
|
this.ctx.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public onEditModeChanged() {
|
||||||
|
if (this.textSearchMode) {
|
||||||
|
this.ctx.hideTitlePanel = !this.ctx.isEdit;
|
||||||
|
this.ctx.detectChanges(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public pageLinkSortDirection(): SortDirection {
|
public pageLinkSortDirection(): SortDirection {
|
||||||
return entityDataPageLinkSortDirection(this.pageLink);
|
return entityDataPageLinkSortDirection(this.pageLink);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -307,6 +307,13 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
|
|||||||
this.ctx.detectChanges();
|
this.ctx.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public onEditModeChanged() {
|
||||||
|
if (this.textSearchMode) {
|
||||||
|
this.ctx.hideTitlePanel = !this.ctx.isEdit;
|
||||||
|
this.ctx.detectChanges(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private initialize() {
|
private initialize() {
|
||||||
this.ctx.widgetActions = [this.searchAction, this.columnDisplayAction];
|
this.ctx.widgetActions = [this.searchAction, this.columnDisplayAction];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user