mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
remove old MDL wrapper directives (#2095)
- remove mdl-button directive - remove mdl-tooltip directive
This commit is contained in:
committed by
Eugenio Romano
parent
914e2af98d
commit
34c89bd2ba
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="showOutcomeButtons && form.hasOutcomes()" class="mdl-card__actions mdl-card--border" #outcomesContainer>
|
<div *ngIf="showOutcomeButtons && form.hasOutcomes()" class="mdl-card__actions mdl-card--border" #outcomesContainer>
|
||||||
<button *ngFor="let outcome of form.outcomes"
|
<button *ngFor="let outcome of form.outcomes"
|
||||||
alfresco-mdl-button
|
md-button
|
||||||
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
||||||
[class.mdl-button--colored]="!outcome.isSystem"
|
[class.mdl-button--colored]="!outcome.isSystem"
|
||||||
[class.activiti-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
[class.activiti-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
<h4 class="container-widget__header-text" id="container-header"
|
<h4 class="container-widget__header-text" id="container-header"
|
||||||
[class.collapsible]="content?.isCollapsible()">
|
[class.collapsible]="content?.isCollapsible()">
|
||||||
<button *ngIf="content?.isCollapsible()"
|
<button *ngIf="content?.isCollapsible()"
|
||||||
alfresco-mdl-button
|
md-icon-button
|
||||||
class="mdl-button--icon"
|
class="mdl-button--icon"
|
||||||
(click)="onExpanderClicked()">
|
(click)="onExpanderClicked()">
|
||||||
<i class="material-icons">{{ content?.isExpanded ? 'expand_less' : 'expand_more' }}</i>
|
<md-icon>{{ content?.isExpanded ? 'expand_less' : 'expand_more' }}</md-icon>
|
||||||
</button>
|
</button>
|
||||||
<span (click)="onExpanderClicked()" id="container-header-label">{{content.name}}</span>
|
<span (click)="onExpanderClicked()" id="container-header-label">{{content.name}}</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
@@ -98,10 +98,8 @@ import { UploadDirective } from './src/directives/upload.directive';
|
|||||||
import { FileSizePipe } from './src/pipes/file-size.pipe';
|
import { FileSizePipe } from './src/pipes/file-size.pipe';
|
||||||
import { HighlightPipe } from './src/pipes/text-highlight.pipe';
|
import { HighlightPipe } from './src/pipes/text-highlight.pipe';
|
||||||
|
|
||||||
import { AlfrescoMdlButtonDirective } from './src/components/material/mdl-button.directive';
|
|
||||||
import { AlfrescoMdlMenuDirective } from './src/components/material/mdl-menu.directive';
|
import { AlfrescoMdlMenuDirective } from './src/components/material/mdl-menu.directive';
|
||||||
import { AlfrescoMdlTextFieldDirective } from './src/components/material/mdl-textfield.directive';
|
import { AlfrescoMdlTextFieldDirective } from './src/components/material/mdl-textfield.directive';
|
||||||
import { AlfrescoMdlTooltipDirective } from './src/components/material/mdl-tooltip.directive';
|
|
||||||
import { MDLDirective } from './src/components/material/mdl-upgrade-element.directive';
|
import { MDLDirective } from './src/components/material/mdl-upgrade-element.directive';
|
||||||
|
|
||||||
export { ContextMenuModule } from './src/components/context-menu/context-menu.module';
|
export { ContextMenuModule } from './src/components/context-menu/context-menu.module';
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @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 { AfterViewInit, Directive, ElementRef } from '@angular/core';
|
|
||||||
|
|
||||||
declare var componentHandler;
|
|
||||||
|
|
||||||
@Directive({
|
|
||||||
selector: '[adf-mdl-button] ,[alfresco-mdl-button]'
|
|
||||||
})
|
|
||||||
export class AlfrescoMdlButtonDirective implements AfterViewInit {
|
|
||||||
|
|
||||||
constructor(private element: ElementRef) {}
|
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
if (componentHandler) {
|
|
||||||
let el = this.element.nativeElement;
|
|
||||||
el.classList.add('mdl-button');
|
|
||||||
el.classList.add('mdl-js-button');
|
|
||||||
el.classList.add('mdl-js-ripple-effect');
|
|
||||||
componentHandler.upgradeElement(el, 'MaterialButton');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @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 { AfterViewInit, Directive, ElementRef } from '@angular/core';
|
|
||||||
|
|
||||||
declare var componentHandler;
|
|
||||||
|
|
||||||
@Directive({
|
|
||||||
selector: '[alfresco-mdl-tooltip]'
|
|
||||||
})
|
|
||||||
export class AlfrescoMdlTooltipDirective implements AfterViewInit {
|
|
||||||
|
|
||||||
constructor(private element: ElementRef) {}
|
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
if (componentHandler) {
|
|
||||||
let el = this.element.nativeElement;
|
|
||||||
el.classList.add('mdl-tooltip');
|
|
||||||
componentHandler.upgradeElement(el, 'MaterialTooltip');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -22,6 +22,11 @@ declare var componentHandler;
|
|||||||
selector: '[mdl]'
|
selector: '[mdl]'
|
||||||
})
|
})
|
||||||
export class MDLDirective implements AfterViewInit {
|
export class MDLDirective implements AfterViewInit {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
console.log('MDLDirective is deprecated and should not be used.');
|
||||||
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
componentHandler.upgradeAllRegistered();
|
componentHandler.upgradeAllRegistered();
|
||||||
}
|
}
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
<span class="mdl-paging__count">{{summary}}</span>
|
<span class="mdl-paging__count">{{summary}}</span>
|
||||||
<button (click)="showPrevPage()"
|
<button (click)="showPrevPage()"
|
||||||
[disabled]="!prevPageAvail()"
|
[disabled]="!prevPageAvail()"
|
||||||
alfresco-mdl-button class="mdl-button--icon mdl-paging__prev">
|
md-icon-button class="mdl-button--icon mdl-paging__prev">
|
||||||
<i class="material-icons">keyboard_arrow_left</i>
|
<md-icon>keyboard_arrow_left</md-icon>
|
||||||
</button>
|
</button>
|
||||||
<button (click)="showNextPage()"
|
<button (click)="showNextPage()"
|
||||||
[disabled]="!nextPageAvail()"
|
[disabled]="!nextPageAvail()"
|
||||||
alfresco-mdl-button class="mdl-button--icon mdl-paging__next">
|
md-icon-button class="mdl-button--icon mdl-paging__next">
|
||||||
<i class="material-icons">keyboard_arrow_right</i>
|
<md-icon>keyboard_arrow_right</md-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user