Skip to content

Commit

Permalink
Remove unnecessary pRipple
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Jul 18, 2024
1 parent 73eda97 commit 287e74b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
12 changes: 6 additions & 6 deletions src/app/showcase/doc/blockui/basicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Code } from '@domain/code';
<p>The element to block should be placed as a child of BlockUI and <i>blocked</i> property is required to control the state.</p>
</app-docsectiontext>
<div class="card">
<p-button pRipple label="Block" (onClick)="blockedPanel = true" />
<p-button pRipple label="Unblock" (onClick)="blockedPanel = false" />
<p-button label="Block" (onClick)="blockedPanel = true" />
<p-button label="Unblock" (onClick)="blockedPanel = false" />
<p-blockUI [target]="pnl" [blocked]="blockedPanel">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
Expand All @@ -27,8 +27,8 @@ export class BasicDoc {
blockedPanel: boolean = false;

code: Code = {
basic: `<p-button pRipple label="Block" (onClick)="blockedPanel = true" />
<p-button pRipple label="Unblock" (onClick)="blockedPanel = false" />
basic: `<p-button label="Block" (onClick)="blockedPanel = true" />
<p-button label="Unblock" (onClick)="blockedPanel = false" />
<p-blockUI [target]="pnl" [blocked]="blockedPanel">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
Expand All @@ -38,8 +38,8 @@ export class BasicDoc {
</p>
</p-panel>`,
html: `<div class="card">
<p-button pRipple label="Block" (onClick)="blockedPanel = true" />
<p-button pRipple label="Unblock" (onClick)="blockedPanel = false" />
<p-button label="Block" (onClick)="blockedPanel = true" />
<p-button label="Unblock" (onClick)="blockedPanel = false" />
<p-blockUI [target]="pnl" [blocked]="blockedPanel">
<i class="pi pi-lock" style="font-size: 3rem"></i>
</p-blockUI>
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/blockui/documentdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Code } from '@domain/code';
</app-docsectiontext>
<div class="card">
<p-blockUI [blocked]="blockedDocument" />
<p-button pRipple label="Block" (onClick)="blockDocument()" />
<p-button label="Block" (onClick)="blockDocument()" />
</div>
<app-code [code]="code" selector="block-ui-document-demo"></app-code>
`
Expand All @@ -31,7 +31,7 @@ export class DocumentDoc {
basic: `<p-blockUI [blocked]="blockedDocument" />`,
html: `<div class="card">
<p-blockUI [blocked]="blockedDocument" />
<p-button pRipple label="Block" (onClick)="blockDocument()" />
<p-button label="Block" (onClick)="blockDocument()" />
</div>`,
typescript: `import { Component, ChangeDetectorRef } from '@angular/core';
import { BlockUIModule } from 'primeng/blockui';
Expand Down
49 changes: 18 additions & 31 deletions src/app/showcase/doc/table/productsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { ProductService } from '@service/productservice';
<p-toast />
<p-toolbar styleClass="mb-4 gap-2">
<ng-template pTemplate="left">
<p-button pRipple severity="success" label="New" icon="pi pi-plus" class="mr-2" (onClick)="openNew()" />
<p-button pRipple severity="danger" label="Delete" icon="pi pi-trash" (onClick)="deleteSelectedProducts()" [disabled]="!selectedProducts || !selectedProducts.length" />
<p-button severity="success" label="New" icon="pi pi-plus" class="mr-2" (onClick)="openNew()" />
<p-button severity="danger" label="Delete" icon="pi pi-trash" (onClick)="deleteSelectedProducts()" [disabled]="!selectedProducts || !selectedProducts.length" />
</ng-template>
<ng-template pTemplate="right">
<p-fileUpload mode="basic" accept="image/*" [maxFileSize]="1000000" label="Import" chooseLabel="Import" class="mr-2 inline-block" />
<p-button pRipple severity="help" label="Export" icon="pi pi-upload" />
<p-button severity="help" label="Export" icon="pi pi-upload" />
</ng-template>
</p-toolbar>
Expand Down Expand Up @@ -67,15 +67,15 @@ import { ProductService } from '@service/productservice';
</td>
<td>{{ product.name }}</td>
<td><img [src]="'https://primefaces.org/cdn/primeng/images/demo/product/' + product.image" [alt]="product.name" width="50" class="shadow-4" /></td>
<td>{{ product.price | currency: 'USD' }}</td>
<td>{{ product.price | currency : 'USD' }}</td>
<td>{{ product.category }}</td>
<td><p-rating [(ngModel)]="product.rating" [readonly]="true" [cancel]="false" /></td>
<td>
<p-tag [value]="product.inventoryStatus" [severity]="getSeverity(product.inventoryStatus)" />
</td>
<td>
<p-button pRipple icon="pi pi-pencil" class="mr-2" [rounded]="true" [outlined]="true" severity="success" (onClick)="editProduct(product)" />
<p-button pRipple icon="pi pi-trash" severity="danger" [rounded]="true" [outlined]="true" (onClick)="deleteProduct(product)" />
<p-button icon="pi pi-pencil" class="mr-2" [rounded]="true" [outlined]="true" severity="success" (onClick)="editProduct(product)" />
<p-button icon="pi pi-trash" severity="danger" [rounded]="true" [outlined]="true" (onClick)="deleteProduct(product)" />
</td>
</tr>
</ng-template>
Expand Down Expand Up @@ -144,8 +144,8 @@ import { ProductService } from '@service/productservice';
</ng-template>
<ng-template pTemplate="footer">
<p-button pRipple label="Cancel" icon="pi pi-times" [text]="true" (onClick)="hideDialog()" />
<p-button pRipple label="Save" icon="pi pi-check" [text]="true" (onClick)="saveProduct()" />
<p-button label="Cancel" icon="pi pi-times" [text]="true" (onClick)="hideDialog()" />
<p-button label="Save" icon="pi pi-check" [text]="true" (onClick)="saveProduct()" />
</ng-template>
</p-dialog>
Expand All @@ -169,12 +169,7 @@ export class ProductsDoc {

statuses!: any[];

constructor(
private productService: ProductService,
private messageService: MessageService,
private confirmationService: ConfirmationService,
private cd: ChangeDetectorRef
) {}
constructor(private productService: ProductService, private messageService: MessageService, private confirmationService: ConfirmationService, private cd: ChangeDetectorRef) {}

loadDemoData() {
this.productService.getProducts().then((data) => {
Expand Down Expand Up @@ -288,14 +283,12 @@ export class ProductsDoc {
<p-toolbar styleClass="mb-4 gap-2">
<ng-template pTemplate="left">
<p-button
pRipple
severity="success"
label="New"
icon="pi pi-plus"
class="mr-2"
(onClick)="openNew()" />
<p-button
pRipple
severity="danger"
label="Delete"
icon="pi pi-trash"
Expand All @@ -312,8 +305,9 @@ export class ProductsDoc {
chooseLabel="Import"
class="mr-2 inline-block" />
<p-button
pRipple severity="help"
label="Export" icon="pi pi-upload" />
severity="help"
label="Export"
icon="pi pi-upload" />
</ng-template>
</p-toolbar>
Expand Down Expand Up @@ -398,15 +392,15 @@ export class ProductsDoc {
</td>
<td>
<p-button
pRipple
icon="pi pi-pencil"
class="mr-2"
[rounded]="true"
[outlined]="true"
severity="success"
(onClick)="editProduct(product)" />
<p-button
pRipple
icon="pi pi-trash"
severity="danger"
[rounded]="true"
Expand All @@ -425,15 +419,13 @@ export class ProductsDoc {
<p-toast />
<p-toolbar styleClass="mb-4 gap-2">
<ng-template pTemplate="left">
<p-button
pRipple
<p-button
severity="success"
label="New"
icon="pi pi-plus"
class="mr-2"
(onClick)="openNew()" />
<p-button
pRipple
<p-button
severity="danger"
label="Delete"
icon="pi pi-trash"
Expand All @@ -449,8 +441,7 @@ export class ProductsDoc {
label="Import"
chooseLabel="Import"
class="mr-2 inline-block" />
<p-button
pRipple
<p-button
severity="help"
label="Export"
icon="pi pi-upload" />
Expand Down Expand Up @@ -543,15 +534,13 @@ export class ProductsDoc {
</td>
<td>
<p-button
pRipple
icon="pi pi-pencil"
class="mr-2"
[rounded]="true"
[outlined]="true"
severity="success"
(onClick)="editProduct(product)" />
<p-button
pRipple
icon="pi pi-trash"
severity="danger"
[rounded]="true"
Expand Down Expand Up @@ -682,13 +671,11 @@ export class ProductsDoc {
<ng-template pTemplate="footer">
<p-button
pRipple
label="Cancel"
icon="pi pi-times"
[text]="true"
(onClick)="hideDialog()" />
<p-button
pRipple
<p-button
label="Save"
icon="pi pi-check"
[text]="true"
Expand Down

0 comments on commit 287e74b

Please sign in to comment.