@ -6,11 +6,11 @@ import {NgIf, NgFor} from 'angular2/common';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {document} from 'angular2/src/facade/browser';
|
||||
|
||||
import {Component, Directive, View} from 'angular2/core';
|
||||
import {Component, Directive} from 'angular2/core';
|
||||
|
||||
|
||||
@Component({selector: 'scroll-app'})
|
||||
@View({
|
||||
@Component({
|
||||
selector: 'scroll-app',
|
||||
directives: [ScrollAreaComponent, NgIf, NgFor],
|
||||
template: `
|
||||
<div>
|
||||
|
@ -2,7 +2,7 @@ import {ListWrapper, Map} from 'angular2/src/facade/collection';
|
||||
import {Company, Opportunity, Offering, Account, CustomDate, STATUS_LIST} from './common';
|
||||
import {NgFor} from 'angular2/common';
|
||||
|
||||
import {Component, Directive, View} from 'angular2/core';
|
||||
import {Component, Directive} from 'angular2/core';
|
||||
|
||||
export class HasStyle {
|
||||
cellWidth: number;
|
||||
@ -12,20 +12,32 @@ export class HasStyle {
|
||||
set width(w: number) { this.cellWidth = w; }
|
||||
}
|
||||
|
||||
@Component({selector: 'company-name', inputs: ['width: cell-width', 'company']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{company.name}}</div>`})
|
||||
@Component({
|
||||
selector: 'company-name',
|
||||
inputs: ['width: cell-width', 'company'],
|
||||
directives: [],
|
||||
template: `<div [style.width.px]="cellWidth">{{company.name}}</div>`
|
||||
})
|
||||
export class CompanyNameComponent extends HasStyle {
|
||||
company: Company;
|
||||
}
|
||||
|
||||
@Component({selector: 'opportunity-name', inputs: ['width: cell-width', 'opportunity']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{opportunity.name}}</div>`})
|
||||
@Component({
|
||||
selector: 'opportunity-name',
|
||||
inputs: ['width: cell-width', 'opportunity'],
|
||||
directives: [],
|
||||
template: `<div [style.width.px]="cellWidth">{{opportunity.name}}</div>`
|
||||
})
|
||||
export class OpportunityNameComponent extends HasStyle {
|
||||
opportunity: Opportunity;
|
||||
}
|
||||
|
||||
@Component({selector: 'offering-name', inputs: ['width: cell-width', 'offering']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{offering.name}}</div>`})
|
||||
@Component({
|
||||
selector: 'offering-name',
|
||||
inputs: ['width: cell-width', 'offering'],
|
||||
directives: [],
|
||||
template: `<div [style.width.px]="cellWidth">{{offering.name}}</div>`
|
||||
})
|
||||
export class OfferingNameComponent extends HasStyle {
|
||||
offering: Offering;
|
||||
}
|
||||
@ -37,8 +49,9 @@ export class Stage {
|
||||
apply: Function;
|
||||
}
|
||||
|
||||
@Component({selector: 'stage-buttons', inputs: ['width: cell-width', 'offering']})
|
||||
@View({
|
||||
@Component({
|
||||
selector: 'stage-buttons',
|
||||
inputs: ['width: cell-width', 'offering'],
|
||||
directives: [NgFor],
|
||||
template: `
|
||||
<div [style.width.px]="cellWidth">
|
||||
@ -82,8 +95,9 @@ export class StageButtonsComponent extends HasStyle {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'account-cell', inputs: ['width: cell-width', 'account']})
|
||||
@View({
|
||||
@Component({
|
||||
selector: 'account-cell',
|
||||
inputs: ['width: cell-width', 'account'],
|
||||
directives: [],
|
||||
template: `
|
||||
<div [style.width.px]="cellWidth">
|
||||
@ -96,8 +110,12 @@ export class AccountCellComponent extends HasStyle {
|
||||
account: Account;
|
||||
}
|
||||
|
||||
@Component({selector: 'formatted-cell', inputs: ['width: cell-width', 'value']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{formattedValue}}</div>`})
|
||||
@Component({
|
||||
selector: 'formatted-cell',
|
||||
inputs: ['width: cell-width', 'value'],
|
||||
directives: [],
|
||||
template: `<div [style.width.px]="cellWidth">{{formattedValue}}</div>`
|
||||
})
|
||||
export class FormattedCellComponent extends HasStyle {
|
||||
formattedValue: string;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Math} from 'angular2/src/facade/math';
|
||||
|
||||
import {Component, Directive, View} from 'angular2/core';
|
||||
import {Component, Directive} from 'angular2/core';
|
||||
|
||||
import {
|
||||
Offering,
|
||||
@ -18,8 +18,6 @@ import {NgFor} from 'angular2/common';
|
||||
|
||||
@Component({
|
||||
selector: 'scroll-area',
|
||||
})
|
||||
@View({
|
||||
directives: [ScrollItemComponent, NgFor],
|
||||
template: `
|
||||
<div>
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
FormattedCellComponent
|
||||
} from './cells';
|
||||
|
||||
import {Component, Directive, View} from 'angular2/core';
|
||||
import {Component, Directive} from 'angular2/core';
|
||||
|
||||
import {
|
||||
Offering,
|
||||
@ -25,8 +25,9 @@ import {
|
||||
AAT_STATUS_WIDTH
|
||||
} from './common';
|
||||
|
||||
@Component({selector: 'scroll-item', inputs: ['offering']})
|
||||
@View({
|
||||
@Component({
|
||||
selector: 'scroll-item',
|
||||
inputs: ['offering'],
|
||||
directives: [
|
||||
CompanyNameComponent,
|
||||
OpportunityNameComponent,
|
||||
|
Reference in New Issue
Block a user