mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 23:39: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);
|
this.appService.updatePassage(this.cardItem, this.ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
openStrongs(strongs: string) {
|
openStrongs(q: string) {
|
||||||
this.onItemClicked.emit({
|
const dict = q.substring(0, 1).search(/h/i) !== -1 ? 'heb' : 'grk';
|
||||||
card: this.cardItem,
|
const strongsNumber = q.substring(1, q.length);
|
||||||
qry: this.cardItem.dict + strongs,
|
this.appService.getNewStrongs(strongsNumber, dict);
|
||||||
from_search_bar: false,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isPunct(c: string) {
|
isPunct(c: string) {
|
||||||
|
@ -19,20 +19,6 @@ export class StrongsComponent extends CardComponent {
|
|||||||
super(elementRef);
|
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() {
|
copy() {
|
||||||
const html = this.strongsElement.nativeElement.innerHTML;
|
const html = this.strongsElement.nativeElement.innerHTML;
|
||||||
const text = this.strongsElement.nativeElement.innerText;
|
const text = this.strongsElement.nativeElement.innerText;
|
||||||
@ -48,21 +34,17 @@ export class StrongsComponent extends CardComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makePassage(p: string) {
|
makePassage(p: string) {
|
||||||
return (
|
return new BibleReference(
|
||||||
BibleReference.bookName(parseInt(p.split(';')[0], 10)).name +
|
BibleReference.bookName(parseInt(p.split(';')[0], 10)).name +
|
||||||
' ' +
|
' ' +
|
||||||
p.split(';')[1] +
|
p.split(';')[1] +
|
||||||
':' +
|
':' +
|
||||||
p.split(';')[2]
|
p.split(';')[2]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
openPassage(p: string) {
|
openPassage(p: string) {
|
||||||
const ref = this.makePassage(p);
|
const ref = this.makePassage(p);
|
||||||
this.onItemClicked.emit({
|
this.appService.getNewPassage(ref);
|
||||||
card: this.cardItem,
|
|
||||||
qry: ref,
|
|
||||||
from_search_bar: false,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user