fixed CSS references to element instead of class

This commit is contained in:
alecmerdler 2017-02-21 16:21:54 -08:00 committed by Joseph Schorr
parent e59d394491
commit b0cc8d0f19
3 changed files with 20 additions and 15 deletions

View file

@ -1,51 +1,51 @@
.linear-workflow-section { linear-workflow-section {
margin-bottom: 10px; margin-bottom: 10px;
} }
.linear-workflow-section.row { linear-workflow-section.row {
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
} }
.linear-workflow .upcoming-table { linear-workflow .upcoming-table {
vertical-align: middle; vertical-align: middle;
margin-left: 20px; margin-left: 20px;
} }
.linear-workflow .upcoming-table .fa { linear-workflow .upcoming-table .fa {
margin-right: 8px; margin-right: 8px;
} }
.linear-workflow .upcoming { linear-workflow .upcoming {
color: #888; color: #888;
vertical-align: middle; vertical-align: middle;
margin-left: 10px; margin-left: 10px;
} }
.linear-workflow .upcoming ul { linear-workflow .upcoming ul {
padding: 0px; padding: 0px;
display: inline-block; display: inline-block;
margin: 0px; margin: 0px;
} }
.linear-workflow .upcoming li { linear-workflow .upcoming li {
display: inline-block; display: inline-block;
margin-right: 6px; margin-right: 6px;
margin-left: 2px; margin-left: 2px;
} }
.linear-workflow .upcoming li:after { linear-workflow .upcoming li:after {
content: "•"; content: "•";
display: inline-block; display: inline-block;
margin-left: 6px; margin-left: 6px;
margin-right: 2px; margin-right: 2px;
} }
.linear-workflow .upcoming li:last-child:after { linear-workflow .upcoming li:last-child:after {
content: ""; content: "";
} }
.linear-workflow .bottom-controls { linear-workflow .bottom-controls {
padding: 10px; padding: 10px;
} }

View file

@ -28,7 +28,7 @@
<ul> <ul>
<li ng-repeat="section in $ctrl.sections" <li ng-repeat="section in $ctrl.sections"
ng-if="section.index > $ctrl.currentSection.index"> ng-if="section.index > $ctrl.currentSection.index">
{{ section.title }} {{ section.component.sectionTitle }}
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -27,15 +27,20 @@ export class LinearWorkflowComponent implements ng.IComponentController {
} }
public addSection(section: LinearWorkflowSectionComponent): void { public addSection(component: LinearWorkflowSectionComponent): void {
this.sections.push({ this.sections.push({
index: this.sections.length, index: this.sections.length,
section: section, component: component,
}); });
if (this.sections.length == 1) {
this.sections[0].component.sectionVisible = true;
this.currentSection = this.sections[0];
}
} }
public onNextSection(): void { public onNextSection(): void {
if (this.currentSection.section.sectionValid) { if (this.currentSection.component.sectionValid) {
if (this.currentSection.index + 1 >= this.sections.length) { if (this.currentSection.index + 1 >= this.sections.length) {
this.onWorkflowComplete({}); this.onWorkflowComplete({});
} }
@ -52,5 +57,5 @@ export class LinearWorkflowComponent implements ng.IComponentController {
*/ */
export type SectionInfo = { export type SectionInfo = {
index: number; index: number;
section: LinearWorkflowSectionComponent; component: LinearWorkflowSectionComponent;
} }