mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
hook up passages and strongs from within cards
This commit is contained in:
parent
6a8903f905
commit
27878c6412
@ -147,12 +147,10 @@ export class PassageComponent extends CardComponent implements OnInit {
|
||||
this.appService.updatePassage(this.cardItem, this.ref);
|
||||
}
|
||||
|
||||
openStrongs(strongs: string) {
|
||||
this.onItemClicked.emit({
|
||||
card: this.cardItem,
|
||||
qry: this.cardItem.dict + strongs,
|
||||
from_search_bar: false,
|
||||
});
|
||||
openStrongs(q: string) {
|
||||
const dict = q.substring(0, 1).search(/h/i) !== -1 ? 'heb' : 'grk';
|
||||
const strongsNumber = q.substring(1, q.length);
|
||||
this.appService.getNewStrongs(strongsNumber, dict);
|
||||
}
|
||||
|
||||
isPunct(c: string) {
|
||||
|
@ -19,20 +19,6 @@ export class StrongsComponent extends CardComponent {
|
||||
super(elementRef);
|
||||
}
|
||||
|
||||
// @HostListener('window:resize', ['$event'])
|
||||
// onResize(evt) {
|
||||
// $('strongs ion-scroll').each((i, el) => {
|
||||
// let len = $(el).find('.scroll-content .scroll-zoom-wrapper dl span')
|
||||
// .length;
|
||||
// len += $(el).find('.scroll-content .scroll-zoom-wrapper dl dd').length;
|
||||
// if (len < 20) $(el).css('height', Math.ceil(len / 3) * 30 + 30);
|
||||
// });
|
||||
// }
|
||||
|
||||
// ngAfterViewChecked(): void {
|
||||
// this.onResize(null);
|
||||
// }
|
||||
|
||||
copy() {
|
||||
const html = this.strongsElement.nativeElement.innerHTML;
|
||||
const text = this.strongsElement.nativeElement.innerText;
|
||||
@ -48,21 +34,17 @@ export class StrongsComponent extends CardComponent {
|
||||
}
|
||||
|
||||
makePassage(p: string) {
|
||||
return (
|
||||
return new BibleReference(
|
||||
BibleReference.bookName(parseInt(p.split(';')[0], 10)).name +
|
||||
' ' +
|
||||
p.split(';')[1] +
|
||||
':' +
|
||||
p.split(';')[2]
|
||||
' ' +
|
||||
p.split(';')[1] +
|
||||
':' +
|
||||
p.split(';')[2]
|
||||
);
|
||||
}
|
||||
|
||||
openPassage(p: string) {
|
||||
const ref = this.makePassage(p);
|
||||
this.onItemClicked.emit({
|
||||
card: this.cardItem,
|
||||
qry: ref,
|
||||
from_search_bar: false,
|
||||
});
|
||||
this.appService.getNewPassage(ref);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user