From 09b213dd04a4bd4f62ea30c365deff29adf8ac3e Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 14 Aug 2017 11:24:43 +0100 Subject: [PATCH] [ADF-1372] support for tooltips (Upload button) (#2204) * support for tooltips (Upload button) * readme update * update layout to fix the tests * remove test code --- .../app/components/files/files.component.html | 2 + ng2-components/ng2-alfresco-upload/README.md | 1 + ng2-components/ng2-alfresco-upload/index.ts | 7 +- .../components/upload-button.component.html | 86 +++++++++++++------ .../src/components/upload-button.component.ts | 3 + .../src/material.module.ts | 37 ++++++++ 6 files changed, 106 insertions(+), 30 deletions(-) create mode 100644 ng2-components/ng2-alfresco-upload/src/material.module.ts diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index 913cad89f8..6d9dda7dae 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -263,6 +263,7 @@
-
+
file_upload - - - + + + - - - + + +
-
+
file_upload - - - + + +
diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts index 055d025c23..3f222785ee 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts @@ -55,6 +55,9 @@ export class UploadButtonComponent implements OnInit, OnChanges { @Input() staticTitle: string; + @Input() + tooltip: string = null; + /** * @deprecated Deprecated in 1.6.0, this property is not used for couple of releases already. * diff --git a/ng2-components/ng2-alfresco-upload/src/material.module.ts b/ng2-components/ng2-alfresco-upload/src/material.module.ts new file mode 100644 index 0000000000..4f8b787593 --- /dev/null +++ b/ng2-components/ng2-alfresco-upload/src/material.module.ts @@ -0,0 +1,37 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { NgModule } from '@angular/core'; +import { + MdButtonModule, + MdIconModule, + MdProgressSpinnerModule +} from '@angular/material'; + +export function modules() { + return [ + MdIconModule, + MdProgressSpinnerModule, + MdButtonModule + ]; +} + +@NgModule({ + imports: modules(), + exports: modules() +}) +export class MaterialModule {}