mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
ADF-2974] New Buttons Menu component version (#3429)
* [ADF-2974] Buttons injected from parent html component * [ADF-2974] New version of buttons menu component * [ADF-2974] Updated unit tests * [ADF-2974] Updated documentation * [ADF-2974] Removed unused variable * [ADF-2974] Fixed failing test at analytics report parameters * [ADF-2974] Removed fdescribe * [ADF-2974] Moved mock inside testing file for buttons menu component
This commit is contained in:
committed by
Eugenio Romano
parent
1838818295
commit
3759a7967c
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentService, LogService, MenuButton } from '@alfresco/adf-core';
|
||||
import { ContentService, LogService } from '@alfresco/adf-core';
|
||||
import {
|
||||
AfterContentChecked,
|
||||
Component,
|
||||
@@ -95,8 +95,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
|
||||
reportName: string;
|
||||
|
||||
buttons: MenuButton[] = [];
|
||||
|
||||
private dropDownSub;
|
||||
private reportParamsSub;
|
||||
private paramOpts;
|
||||
@@ -138,7 +136,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
if (reportId && reportId.currentValue) {
|
||||
this.reportId = reportId.currentValue;
|
||||
this.getReportParams(reportId.currentValue);
|
||||
this.setButtons();
|
||||
}
|
||||
|
||||
let appId = changes['appId'];
|
||||
@@ -391,34 +388,4 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
isFormValid() {
|
||||
return this.reportForm && this.reportForm.dirty && this.reportForm.valid;
|
||||
}
|
||||
|
||||
setButtons() {
|
||||
this.buttons = [
|
||||
new MenuButton({
|
||||
label: 'ANALYTICS.MESSAGES.ICON-SETTING',
|
||||
icon: 'settings',
|
||||
handler: this.toggleParameters.bind(this)
|
||||
}),
|
||||
new MenuButton({
|
||||
label: 'ANALYTICS.MESSAGES.ICON-DELETE',
|
||||
icon: 'delete',
|
||||
handler: this.deleteReport.bind(this, this.reportId),
|
||||
id: 'delete-button'
|
||||
}),
|
||||
new MenuButton({
|
||||
label: 'ANALYTICS.MESSAGES.ICON-EXPORT-CSV',
|
||||
icon: 'file_download',
|
||||
handler: this.showDialog.bind(this, 'Export'),
|
||||
id: 'export-button',
|
||||
isVisible: this.isFormValid.bind(this)
|
||||
}),
|
||||
new MenuButton({
|
||||
label: 'ANALYTICS.MESSAGES.ICON-SAVE',
|
||||
icon: 'save',
|
||||
handler: this.showDialog.bind(this, 'Save'),
|
||||
id: 'save-button',
|
||||
isVisible: this.isFormValid.bind(this)
|
||||
})
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user