+
-
+
@@ -103,32 +104,25 @@ import {properties} from "../../../../environments/environment";
export class ShowAuthorsComponent {
@Input() authors: Author[];
- @Input() authorsLimit: number = 3;
+ @Input() authorsLimit: number = 7;
@Input() showAll: boolean = true;
@Input() modal: AlertModal;
@Input() viewAll: boolean = false;
public lessBtn: boolean = false;
@ViewChild('authorsModal') authorsModal;
- public numberOfAuthors: number;
public properties: EnvProperties = properties;
public routerHelper: RouterHelper = new RouterHelper();
testBrowser: boolean;
-
+ public clipboard;
+
constructor(private route: ActivatedRoute, @Inject(PLATFORM_ID) private platformId: string) {
this.testBrowser = isPlatformBrowser(platformId);
}
ngOnInit() {
- this.numberOfAuthors = this.authorsLimit;
- }
-
- copyToClipboard(element: HTMLInputElement) {
- element.select();
- if (typeof document !== 'undefined') {
- document.execCommand('copy');
- }
+ this.createClipboard();
}
public onClick() {
@@ -152,4 +146,13 @@ export class ShowAuthorsComponent {
this.authorsModal.alertTitle = "Authors";
this.authorsModal.open();
}
+
+ private createClipboard() {
+ if (typeof window !== 'undefined') {
+ delete this.clipboard;
+ let Clipboard;
+ Clipboard = require('clipboard');
+ this.clipboard = new Clipboard('.orcid_clipboard_btn');
+ }
+ }
}
diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts
index 3ed494e8..fe3f2fe4 100644
--- a/utils/icons/icons.ts
+++ b/utils/icons/icons.ts
@@ -198,4 +198,26 @@ export const filters = {
data: '
'
}
+export const orcid_add = {
+ name: 'orcid_add',
+ data: '
'
+}
+
+export const orcid_bin = {
+ name: 'orcid_bin',
+ data: '
'
+}
+
+export const link = {
+ name: 'link',
+ data: '
\n' +
+ ' '
+}
+
/** Add new icon under this line to be sure that it will be added on preview */
diff --git a/utils/modal/alert.ts b/utils/modal/alert.ts
index 796f6b09..c4a2705b 100644
--- a/utils/modal/alert.ts
+++ b/utils/modal/alert.ts
@@ -13,7 +13,7 @@ declare var UIkit: any;
-
{{alertTitle}}
+
{{alertTitle}}
diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html
index 60a2b247..fd68745a 100644
--- a/utils/result-preview/result-preview.component.html
+++ b/utils/result-preview/result-preview.component.html
@@ -36,10 +36,10 @@