Skip to content

Commit

Permalink
Fixed #260
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Apr 29, 2016
1 parent d7d9a1a commit 1a46e74
Show file tree
Hide file tree
Showing 47 changed files with 143 additions and 143 deletions.
4 changes: 2 additions & 2 deletions components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const AUTOCOMPLETE_VALUE_ACCESSOR: Provider = CONST_EXPR(
[value]="value ? (field ? resolveFieldData(value)||value : value) : null" (input)="onInput($event)" (keydown)="onKeydown($event)" (blur)="onModelTouched()"
[attr.placeholder]="placeholder" [attr.size]="size" [attr.maxlength]="maxlength" [attr.readonly]="readonly" [disabled]="disabled"
><ul *ngIf="multiple" class="ui-autocomplete-multiple ui-widget ui-inputtext ui-state-default ui-corner-all" (click)="multiIn.focus()">
<li #token *ngFor="#val of value" class="ui-autocomplete-token ui-state-highlight ui-corner-all">
<li #token *ngFor="let val of value" class="ui-autocomplete-token ui-state-highlight ui-corner-all">
<span class="ui-autocomplete-token-icon fa fa-fw fa-close" (click)="removeItem(token)"></span>
<span class="ui-autocomplete-token-label">{{field ? val[field] : val}}</span>
</li>
Expand All @@ -33,7 +33,7 @@ const AUTOCOMPLETE_VALUE_ACCESSOR: Provider = CONST_EXPR(
<div class="ui-autocomplete-panel ui-widget-content ui-corner-all ui-shadow" [style.display]="panelVisible ? 'block' : 'none'" [style.width]="'100%'" [style.max-height]="scrollHeight">
<ul class="ui-autocomplete-items ui-autocomplete-list ui-widget-content ui-widget ui-corner-all ui-helper-reset"
(mouseover)="onItemMouseover($event)" (mouseout)="onItemMouseout($event)" (click)="onItemClick($event)" *ngIf="!itemTemplate">
<li class="ui-autocomplete-list-item ui-corner-all" *ngFor="#item of suggestions">{{field ? item[field] : item}}</li>
<li class="ui-autocomplete-list-item ui-corner-all" *ngFor="let item of suggestions">{{field ? item[field] : item}}</li>
</ul>
<ul class="ui-autocomplete-items ui-autocomplete-list ui-widget-content ui-widget ui-corner-all ui-helper-reset"
(mouseover)="onItemMouseover($event)" (mouseout)="onItemMouseout($event)" (click)="onItemClick($event)"*ngIf="itemTemplate">
Expand Down
22 changes: 11 additions & 11 deletions components/datatable/datatable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {DomHandler} from '../dom/domhandler';
<table>
<thead>
<tr *ngIf="!headerRows" class="ui-state-default">
<th #headerCell *ngFor="#col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
<th #headerCell *ngFor="let col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
(click)="sort($event,col)" (mouseenter)="hoveredHeader = $event.target" (mouseleave)="hoveredHeader = null"
[ngClass]="{'ui-state-default ui-unselectable-text':true, 'ui-state-hover': headerCell === hoveredHeader && col.sortable,'ui-sortable-column': col.sortable,'ui-state-active': isSorted(col)}">
<span class="ui-column-title">{{col.header}}</span>
Expand All @@ -32,8 +32,8 @@ import {DomHandler} from '../dom/domhandler';
<input type="text" pInputText class="ui-column-filter" *ngIf="col.filter" [value]="filters[col.field] ? filters[col.field].value : ''" (click)="onFilterInputClick($event)" (keyup)="onFilterKeyup($event.target.value, col.field, col.filterMatchMode)"/>
</th>
</tr>
<tr *ngFor="#headerRow of headerRows" class="ui-state-default">
<th #headerCell *ngFor="#col of headerRow.columns" [attr.style]="col.style" [class]="col.styleClass" [attr.colspan]="col.colspan" [attr.rowspan]="col.rowspan"
<tr *ngFor="let headerRow of headerRows" class="ui-state-default">
<th #headerCell *ngFor="let col of headerRow.columns" [attr.style]="col.style" [class]="col.styleClass" [attr.colspan]="col.colspan" [attr.rowspan]="col.rowspan"
(click)="sort($event,col)" (mouseenter)="hoveredHeader = $event.target" (mouseleave)="hoveredHeader = null" [style.display]="col.hidden ? 'none' : 'table-cell'"
[ngClass]="{'ui-state-default ui-unselectable-text':true, 'ui-state-hover': headerCell === hoveredHeader && col.sortable,'ui-sortable-column': col.sortable,'ui-state-active': isSorted(col)}">
<span class="ui-column-title">{{col.header}}</span>
Expand All @@ -45,20 +45,20 @@ import {DomHandler} from '../dom/domhandler';
</thead>
<tfoot *ngIf="hasFooter()">
<tr *ngIf="!footerRows">
<th *ngFor="#col of columns" [attr.style]="col.style" [class]="col.styleClass" [ngClass]="{'ui-state-default':true}" [style.display]="col.hidden ? 'none' : 'table-cell'">{{col.footer}}</th>
<th *ngFor="let col of columns" [attr.style]="col.style" [class]="col.styleClass" [ngClass]="{'ui-state-default':true}" [style.display]="col.hidden ? 'none' : 'table-cell'">{{col.footer}}</th>
</tr>
<tr *ngFor="#footerRow of footerRows">
<th *ngFor="#col of footerRow.columns" [attr.style]="col.style" [class]="col.styleClass"
<tr *ngFor="let footerRow of footerRows">
<th *ngFor="let col of footerRow.columns" [attr.style]="col.style" [class]="col.styleClass"
[attr.colspan]="col.colspan" [attr.rowspan]="col.rowspan" [style.display]="col.hidden ? 'none' : 'table-cell'"
[ngClass]="{'ui-state-default':true}">{{col.footer}}</th>
</tr>
</tfoot>
<tbody class="ui-datatable-data ui-widget-content">
<template ngFor #rowData [ngForOf]="dataToRender" #even="even" #odd="odd" #rowIndex="index">
<template ngFor let-rowData [ngForOf]="dataToRender" let-even="even" let-odd="odd" let-rowIndex="index">
<tr #rowElement class="ui-widget-content" (mouseenter)="hoveredRow = $event.target" (mouseleave)="hoveredRow = null"
(click)="handleRowClick($event, rowData)" (dblclick)="rowDblclick($event,rowData)" (contextmenu)="onRowRightClick($event,rowData)"
[ngClass]="{'ui-datatable-even':even,'ui-datatable-odd':odd,'ui-state-hover': (selectionMode && rowElement == hoveredRow), 'ui-state-highlight': isSelected(rowData)}">
<td *ngFor="#col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
<td *ngFor="let col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
[ngClass]="{'ui-editable-column':col.editable}" (click)="switchCellToEditMode($event.target,col,rowData)">
<span class="ui-column-title" *ngIf="responsive">{{col.header}}</span>
<span class="ui-cell-data" *ngIf="!col.template">{{resolveFieldData(rowData,col.field)}}</span>
Expand All @@ -85,7 +85,7 @@ import {DomHandler} from '../dom/domhandler';
<table>
<thead>
<tr>
<th #headerCell *ngFor="#col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
<th #headerCell *ngFor="let col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
(click)="sort($event,col)" (mouseenter)="hoveredHeader = $event.target" (mouseleave)="hoveredHeader = null"
[ngClass]="{'ui-state-default ui-unselectable-text':true, 'ui-state-hover': headerCell === hoveredHeader && col.sortable,'ui-sortable-column': col.sortable,'ui-state-active': isSorted(col)}">
<span class="ui-column-title">{{col.header}}</span>
Expand All @@ -101,11 +101,11 @@ import {DomHandler} from '../dom/domhandler';
<div class="ui-datatable-scrollable-body" *ngIf="scrollable">
<table>
<tbody class="ui-datatable-data ui-widget-content">
<template ngFor #rowData [ngForOf]="dataToRender" #even="even" #odd="odd" #rowIndex="index">
<template ngFor let-rowData [ngForOf]="dataToRender" let-even="even" let-odd="odd" let-rowIndex="index">
<tr #rowElement class="ui-widget-content" (mouseenter)="hoveredRow = $event.target" (mouseleave)="hoveredRow = null"
(click)="handleRowClick($event, rowData)" (dblclick)="rowDblclick($event,rowData)" (contextmenu)="onRowRightClick($event,rowData)"
[ngClass]="{'ui-datatable-even':even,'ui-datatable-odd':odd,'ui-state-hover': (selectionMode && rowElement == hoveredRow), 'ui-state-highlight': isSelected(rowData)}">
<td *ngFor="#col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
<td *ngFor="let col of columns" [attr.style]="col.style" [class]="col.styleClass" [style.display]="col.hidden ? 'none' : 'table-cell'"
[ngClass]="{'ui-editable-column':col.editable}" (click)="switchCellToEditMode($event.target,col,rowData)">
<span class="ui-column-title" *ngIf="responsive">{{col.header}}</span>
<span class="ui-cell-data" *ngIf="!col.template">{{resolveFieldData(rowData,col.field)}}</span>
Expand Down
4 changes: 2 additions & 2 deletions components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DROPDOWN_VALUE_ACCESSOR: Provider = CONST_EXPR(
(mouseenter)="onMouseenter($event)" (mouseleave)="onMouseleave($event)" (click)="onMouseclick($event,in)" [attr.style]="style" [class]="styleClass">
<div class="ui-helper-hidden-accessible">
<select [required]="required">
<option *ngFor="#option of options" [value]="option.value" [selected]="value == option.value">{{option.label}}</option>
<option *ngFor="let option of options" [value]="option.value" [selected]="value == option.value">{{option.label}}</option>
</select>
</div>
<div class="ui-helper-hidden-accessible">
Expand All @@ -37,7 +37,7 @@ const DROPDOWN_VALUE_ACCESSOR: Provider = CONST_EXPR(
<div class="ui-dropdown-items-wrapper" [style.max-height]="scrollHeight||'auto'">
<ul *ngIf="!itemTemplate" class="ui-dropdown-items ui-dropdown-list ui-widget-content ui-widget ui-corner-all ui-helper-reset"
(mouseover)="onListMouseover($event)" (mouseout)="onListMouseout($event)">
<li *ngFor="#option of optionsToDisplay;#i=index" [attr.data-label]="option.label" [attr.data-value]="option.value" (click)="onListClick($event)"
<li *ngFor="let option of optionsToDisplay;let i=index" [attr.data-label]="option.label" [attr.data-value]="option.value" (click)="onListClick($event)"
class="ui-dropdown-item ui-corner-all">{{option.label}}</li>
</ul>
<ul *ngIf="itemTemplate" class="ui-dropdown-items ui-dropdown-list ui-widget-content ui-widget ui-corner-all ui-helper-reset"
Expand Down
4 changes: 2 additions & 2 deletions components/galleria/galleria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {DomHandler} from '../dom/domhandler';
template: `
<div [ngClass]="{'ui-galleria ui-widget ui-widget-content ui-corner-all':true}" [attr.style]="style" [class]="styleClass" [style.width.px]="panelWidth">
<ul class="ui-galleria-panel-wrapper" [style.width.px]="panelWidth" [style.height.px]="panelHeight">
<li *ngFor="#image of images;#i=index" class="ui-galleria-panel" [ngClass]="{'ui-helper-hidden':i!=activeIndex}"
<li *ngFor="let image of images;let i=index" class="ui-galleria-panel" [ngClass]="{'ui-helper-hidden':i!=activeIndex}"
[style.width.px]="panelWidth" [style.height.px]="panelHeight">
<img class="ui-panel-images" [src]="image.source" [alt]="image.alt" [title]="image.title"/>
</li>
</ul>
<div [ngClass]="{'ui-galleria-filmstrip-wrapper':true}">
<ul class="ui-galleria-filmstrip" style="transition:left 1s" [style.left.px]="stripLeft">
<li #frame *ngFor="#image of images;#i=index" [ngClass]="{'ui-galleria-frame-active':i==activeIndex}" class="ui-galleria-frame" (click)="frameClick(frame)"
<li #frame *ngFor="let image of images;let i=index" [ngClass]="{'ui-galleria-frame-active':i==activeIndex}" class="ui-galleria-frame" (click)="frameClick(frame)"
[style.width.px]="frameWidth" [style.height.px]="frameHeight" [style.transition]="'opacity 0.75s ease'">
<div class="ui-galleria-frame-content">
<img [src]="image.source" [alt]="image.alt" [title]="image.title" class="ui-galleria-frame-image"
Expand Down
2 changes: 1 addition & 1 deletion components/growl/growl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {DomHandler} from '../dom/domhandler';
selector: 'p-growl',
template: `
<div class="ui-growl ui-widget" [style.zIndex]="zIndex">
<div #msgel *ngFor="#msg of value" class="ui-growl-item-container ui-state-highlight ui-corner-all ui-shadow" aria-live="polite"
<div #msgel *ngFor="let msg of value" class="ui-growl-item-container ui-state-highlight ui-corner-all ui-shadow" aria-live="polite"
[ngClass]="{'ui-growl-message-info ':msg.severity == 'info','ui-growl-message-warn':msg.severity == 'warn','ui-growl-message-error':msg.severity == 'error'}">
<div class="ui-growl-item">
<div class="ui-growl-icon-close fa fa-close" (click)="remove(msg,msgel)"></div>
Expand Down
2 changes: 1 addition & 1 deletion components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LISTBOX_VALUE_ACCESSOR: Provider = CONST_EXPR(
template: `
<div [ngClass]="{'ui-listbox ui-inputtext ui-widget ui-widget-content ui-corner-all':true,'ui-state-disabled':disabled}" [attr.style]="style" [class]="styleClass">
<ul class="ui-listbox-list" *ngIf="!itemTemplate" (mouseover)="onMouseover($event)" (mouseout)="onMouseout($event)" (click)="onClick($event)">
<li *ngFor="#option of options" class="ui-listbox-item ui-corner-all">
<li *ngFor="let option of options" class="ui-listbox-item ui-corner-all">
{{option.label}}
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion components/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Message} from '../api/message';
</a>
<span class="ui-messages-icon fa fa-2x fa-info-circle"></span>
<ul>
<li *ngFor="#msg of value">
<li *ngFor="let msg of value">
<span class="ui-messages-summary">{{msg.summary}}</span>
<span class="ui-messages-detail">{{msg.detail}}</span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const MULTISELECT_VALUE_ACCESSOR: Provider = CONST_EXPR(
</div>
<div class="ui-multiselect-items-wrapper">
<ul class="ui-multiselect-items ui-multiselect-list ui-widget-content ui-widget ui-corner-all ui-helper-reset" [style.max-height]="scrollHeight||'auto'">
<li #item *ngFor="#option of options" class="ui-multiselect-item ui-corner-all" (click)="onItemClick($event,option.value)"
<li #item *ngFor="let option of options" class="ui-multiselect-item ui-corner-all" (click)="onItemClick($event,option.value)"
[style.display]="isItemVisible(option) ? 'block' : 'none'"
[ngClass]="{'ui-state-highlight':isSelected(option.value),'ui-state-hover':hoveredItem==item}" (mouseenter)="hoveredItem=item" (mouseleave)="hoveredItem=null">
<div class="ui-chkbox ui-widget">
Expand Down
4 changes: 2 additions & 2 deletions components/paginator/paginator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Component,ElementRef,Input,Output,SimpleChange,EventEmitter} from 'angul
<span class="fa fa-backward"></span>
</span>
<span class="ui-paginator-pages">
<span #plink *ngFor="#pageLink of pageLinks" class="ui-paginator-page ui-paginator-element ui-state-default ui-corner-all"
<span #plink *ngFor="let pageLink of pageLinks" class="ui-paginator-page ui-paginator-element ui-state-default ui-corner-all"
(mouseenter)="hoveredItem = $event.target" (mouseleave)="hoveredItem = null" (click)="changePage(pageLink - 1)"
[ngClass]="{'ui-state-hover':(plink === hoveredItem), 'ui-state-active': (pageLink-1 == getPage())}">{{pageLink}}</span>
</span>
Expand All @@ -26,7 +26,7 @@ import {Component,ElementRef,Input,Output,SimpleChange,EventEmitter} from 'angul
<span class="fa fa-step-forward"></span>
</span>
<select class="ui-paginator-rpp-options ui-widget ui-state-default" *ngIf="rowsPerPageOptions" (change)="onRppChange($event)">
<option *ngFor="#opt of rowsPerPageOptions" [value]="opt" [selected]="rows == opt">{{opt}}</option>
<option *ngFor="let opt of rowsPerPageOptions" [value]="opt" [selected]="rows == opt">{{opt}}</option>
</select>
</div>
`
Expand Down
2 changes: 1 addition & 1 deletion components/rating/rating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const RATING_VALUE_ACCESSOR: Provider = CONST_EXPR(
<div class="ui-rating" [ngClass]="{'ui-state-disabled': disabled}">
<div class="ui-rating-cancel" *ngIf="cancel" (click)="clear($event)" [ngClass]="{'ui-rating-cancel-hover':hoverCancel}"
(mouseenter)="hoverCancel=true" (mouseleave)="hoverCancel=false"><a></a></div>
<div class="ui-rating-star" *ngFor="#star of starsArray;#i=index" (click)="rate($event,i)"
<div class="ui-rating-star" *ngFor="let star of starsArray;let i=index" (click)="rate($event,i)"
[ngClass]="{'ui-rating-star-on':(i < value)}"><a></a></div>
</div>
`,
Expand Down
2 changes: 1 addition & 1 deletion components/selectbutton/selectbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SELECTBUTTON_VALUE_ACCESSOR: Provider = CONST_EXPR(
selector: 'p-selectButton',
template: `
<div [ngClass]="'ui-selectbutton ui-buttonset ui-widget ui-corner-all ui-buttonset-' + options.length" (mouseleave)="hoveredItem=null" [attr.style]="style" [class]="styleClass">
<div *ngFor="#option of options;" class="ui-button ui-widget ui-state-default ui-button-text-only"
<div *ngFor="let option of options;" class="ui-button ui-widget ui-state-default ui-button-text-only"
[ngClass]="{'ui-state-hover': hoveredItem == option,'ui-state-active':isSelected(option)}"
(mouseenter)="hoveredItem=option" (click)="onItemClick($event,option)">
<span class="ui-button-text ui-c">{{option.label}}</span>
Expand Down
2 changes: 1 addition & 1 deletion components/splitbutton/splitbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {Location} from 'angular2/platform/common';
<div #menu [ngClass]="'ui-menu ui-menu-dynamic ui-widget ui-widget-content ui-corner-all ui-helper-clearfix ui-shadow'" [style.display]="menuVisible ? 'block' : 'none'"
[attr.style]="menuStyle" [attr.styleClass]="menuStyleClass">
<ul class="ui-menu-list ui-helper-reset">
<li class="ui-menuitem ui-widget ui-corner-all" role="menuitem" *ngFor="#item of items" [ngClass]="{'ui-state-hover':(hoveredItem==item)}"
<li class="ui-menuitem ui-widget ui-corner-all" role="menuitem" *ngFor="let item of items" [ngClass]="{'ui-state-hover':(hoveredItem==item)}"
(mouseenter)="hoveredItem=item" (mouseleave)="hoveredItem=null">
<a [href]="getItemUrl(item)" class="ui-menuitem-link ui-corner-all" (click)="onItemClick($event,item)">
<span [ngClass]="'ui-menuitem-icon fa fa-fw'" [class]="item.icon" *ngIf="item.icon"></span>
Expand Down
Loading

0 comments on commit 1a46e74

Please sign in to comment.