2016-12-02 13:00:55 -05:00
|
|
|
import { EventEmitter, Component, Input, Output } from "@angular/core";
|
2017-01-16 21:36:22 -05:00
|
|
|
import { Reference } from '../../Reference';
|
2016-12-01 10:39:04 -05:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "strongs",
|
|
|
|
templateUrl: "strongs.html"
|
|
|
|
})
|
|
|
|
export class Strongs {
|
|
|
|
@Output()
|
2016-12-01 15:21:07 -05:00
|
|
|
onClose = new EventEmitter<CardItem>();
|
2016-12-01 10:39:04 -05:00
|
|
|
|
2016-12-02 13:00:55 -05:00
|
|
|
@Output()
|
2016-12-28 16:57:40 -05:00
|
|
|
onPassageClicked = new EventEmitter<OpenData>();
|
2016-12-02 13:00:55 -05:00
|
|
|
|
2016-12-01 10:39:04 -05:00
|
|
|
@Input()
|
|
|
|
item: StrongsResult;
|
|
|
|
|
2016-12-01 15:21:07 -05:00
|
|
|
@Input()
|
|
|
|
cardItem: CardItem;
|
|
|
|
|
2016-12-01 10:39:04 -05:00
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
|
2017-01-16 21:36:22 -05:00
|
|
|
close()
|
2016-12-27 21:10:00 -05:00
|
|
|
{
|
2016-12-01 15:21:07 -05:00
|
|
|
this.onClose.emit(this.cardItem);
|
2016-12-01 10:39:04 -05:00
|
|
|
}
|
2016-12-02 13:00:55 -05:00
|
|
|
makePassage(p: string) {
|
2016-12-27 21:10:00 -05:00
|
|
|
return Reference.bookName(parseInt(p.split(";")[0])) + ' ' + p.split(";")[1] + ":" + p.split(";")[2];
|
2016-12-02 13:00:55 -05:00
|
|
|
}
|
|
|
|
openPassage(p: string) {
|
|
|
|
let ref = this.makePassage(p);
|
2016-12-28 16:57:40 -05:00
|
|
|
this.onPassageClicked.emit({ card: this.cardItem, qry: ref });
|
2016-12-02 13:00:55 -05:00
|
|
|
}
|
2017-01-16 21:36:22 -05:00
|
|
|
}
|