Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
9fe9417
Fixes #461 (#473)
mmahalwy Sep 3, 2016
21229de
Merge remote-tracking branch 'quran/master'
atalebagha Sep 7, 2016
2753328
improved aya/sura url param handling
atalebagha Sep 10, 2016
8ca2149
improved code to ayah/surah url handler
atalebagha Sep 10, 2016
1da7a2c
used Route from react-router to handle reroute
atalebagha Sep 10, 2016
8b54642
Merge pull request #475 from atalebagha/feature/ayahParamHandling
thabti Sep 10, 2016
506fb30
Added tooltip prop for Ayah component in Search page (#474)
hassansin Sep 12, 2016
96f6731
Create LICENSE.md (#477)
mmahalwy Sep 30, 2016
95e5db3
added Nafees font for Urdu and Punjabi translation
naveed-ahmad Nov 8, 2016
2f292b1
Merge pull request #486 from naveed-ahmad/translation_fonts
thabti Nov 9, 2016
75f65be
footer layout improved (#490)
ar5had Nov 11, 2016
4f450ff
Quick links layout improved. (#491)
ar5had Nov 13, 2016
12e87d6
User authentication and profile (#460)
mmahalwy Nov 13, 2016
b4b5bf5
Add user bookmarks
mmahalwy Nov 13, 2016
9d52a23
Merge pull request #492 from quran/user-bookmarks
thabti Nov 14, 2016
44b28d1
Adding media and modal (#493)
mmahalwy Nov 14, 2016
227141c
Renav (#495)
mmahalwy Nov 17, 2016
b3007da
surah page layout breakdown fixed
ar5had Nov 19, 2016
bd518f9
Fix node-http-proxy host in proxy request (#501)
ahmedre Nov 19, 2016
a092aa9
Env problems (#494)
mmahalwy Nov 21, 2016
a5108dd
tooltip fix
ar5had Nov 18, 2016
cb3eef8
corrected elements nesting
ar5had Nov 18, 2016
325cfe7
edited
ar5had Nov 19, 2016
d47cca7
fixing tooltip bottom triangle glitch
ar5had Nov 21, 2016
aeaf885
moved getOffset function to utils folder
ar5had Nov 23, 2016
68d74c7
formatted code
ar5had Nov 23, 2016
38863f9
wip on app install banner #427
naveed-ahmad Nov 25, 2016
3e282bb
used fa icon for close btn
naveed-ahmad Nov 25, 2016
28c3a19
added event tracking for install and close banner
naveed-ahmad Nov 26, 2016
bd6cb07
Merge branch 'master' into surahPageFix
thabti Nov 27, 2016
0965aec
Merge pull request #503 from arshdkhn1/surahPageFix
thabti Nov 27, 2016
d1ff813
using default fonts for banner
naveed-ahmad Nov 27, 2016
031c47a
Merge branch 'master' into app_install_banner
naveed-ahmad Nov 27, 2016
833e2e7
removed one hiding console.log
ar5had Nov 28, 2016
7804afd
fix unit tests
thabti Nov 29, 2016
d53996e
Merge branch 'master' into fix
thabti Nov 29, 2016
35cc4d0
Merge pull request #514 from sabeurthabti/master
thabti Nov 29, 2016
b6e9c32
Merge branch 'master' into fix
thabti Nov 29, 2016
a786e74
tooltip fix
ar5had Nov 18, 2016
c175be8
corrected elements nesting
ar5had Nov 18, 2016
3cc086f
edited
ar5had Nov 19, 2016
b82ccae
fixing tooltip bottom triangle glitch
ar5had Nov 21, 2016
6ef26b5
moved getOffset function to utils folder
ar5had Nov 23, 2016
a8b1cf5
formatted code
ar5had Nov 23, 2016
c7511ff
removed one hiding console.log
ar5had Nov 28, 2016
f22a575
corrected QuickSurah assertion test
ar5had Nov 29, 2016
faf4949
Merge branch 'fix' of https://github.com/arshdkhn1/quran.com-frontend…
ar5had Nov 29, 2016
f24e1c3
corrected quicksurah tests
ar5had Nov 29, 2016
999c996
experimental check
ar5had Nov 29, 2016
3f1a966
another exprerimental check
ar5had Nov 29, 2016
86f50fb
another workaround for tests
ar5had Nov 29, 2016
0bddbfb
exporting tooltip code to file
ar5had Nov 29, 2016
eee34f5
editing.
ar5had Nov 29, 2016
3370a88
another attempt
ar5had Nov 29, 2016
c2cf2bb
another attempt
ar5had Nov 29, 2016
de21e67
removing eslint errors
ar5had Nov 29, 2016
0550acd
removing eslint errors - final
ar5had Nov 29, 2016
2ea7950
removing eslint errors - final
ar5had Nov 29, 2016
2bd14c4
Merge pull request #500 from arshdkhn1/fix
thabti Nov 29, 2016
dda4b58
fixed the banner icon and minor styling
naveed-ahmad Dec 1, 2016
18ce33e
Merge branch 'app_install_banner' of github.com:naveed-ahmad/quran.co…
naveed-ahmad Dec 1, 2016
f65d0ac
Merge branch 'master' into app_install_banner
naveed-ahmad Dec 1, 2016
08e9270
do not always load bismillah (#515)
mmahalwy Dec 2, 2016
6997a89
Code splitting (#516)
mmahalwy Dec 5, 2016
16e56de
added favicons, opensearch, and manifest files for chrome
naveed-ahmad Dec 6, 2016
07917d3
removed web from related app
naveed-ahmad Dec 6, 2016
a1b5e3b
Merge branch 'meta-tags-and-branding' into app_install_banner
naveed-ahmad Dec 6, 2016
f396ff5
highlight currently playing ayah (#510)
allyraza Dec 7, 2016
7c2adc4
added service worker and preconnect meta tags
naveed-ahmad Dec 7, 2016
3bc7fdf
Merge branch 'app_install_banner' of github.com:naveed-ahmad/quran.co…
naveed-ahmad Dec 7, 2016
453108a
Merge branch 'master' into app_install_banner
naveed-ahmad Dec 7, 2016
af0e3c6
don' show custom banner on chrome > 44 and safari > 6
naveed-ahmad Dec 7, 2016
a12a625
meh, when this was replaced
naveed-ahmad Dec 7, 2016
39a7a45
added prefer related apps
naveed-ahmad Dec 7, 2016
8e5fbef
Merge branch 'app_install_banner' of github.com:naveed-ahmad/quran.co…
naveed-ahmad Dec 7, 2016
c9b0b56
initial work on react-share
aslamhadi Dec 7, 2016
9a852b5
fix style
aslamhadi Dec 8, 2016
45b6655
fix facebook share
aslamhadi Dec 8, 2016
9ca8611
add cursor pointer for the icons
aslamhadi Dec 8, 2016
bc4775f
Merge pull request #508 from naveed-ahmad/app_install_banner
thabti Dec 8, 2016
8f9a77a
Merge branch 'master' into feature/react-share
thabti Dec 8, 2016
0d4056c
fix surah still display Loading even in last of surah (#521)
aslamhadi Dec 9, 2016
95819d9
Merge branch 'master' into feature/react-share
mmahalwy Dec 9, 2016
ae7cb2e
switched hightlight color to green
naveed-ahmad Dec 11, 2016
cc73da8
added nightmode css and optimized svgs #201
naveed-ahmad Dec 12, 2016
6e6a134
fixed night color for missing elements, added bare min component
naveed-ahmad Dec 12, 2016
dc76c27
added hightlight for readmore
naveed-ahmad Dec 12, 2016
6407de0
changed night more UI
naveed-ahmad Dec 12, 2016
83b729c
updated night mode UI
naveed-ahmad Dec 12, 2016
61d7fd5
Merge pull request #520 from aslamhadi/feature/react-share
thabti Dec 13, 2016
d659ab6
Merge branch 'master' into night-mode
thabti Dec 13, 2016
45acbd8
Merge pull request #524 from naveed-ahmad/night-mode
thabti Dec 13, 2016
75401e0
Added no script warning (#527)
naveed-ahmad Dec 16, 2016
a0d5bbe
fixed noscript break (#535)
naveed-ahmad Dec 20, 2016
33259e4
loaders when navigating on client side
mmahalwy Dec 20, 2016
6d1de68
notes on autocomplete
mmahalwy Dec 20, 2016
e205ae0
Merge pull request #537 from quran/loading-transition
thabti Dec 21, 2016
59e2b7a
Use new segments and surah info data (#542)
mmahalwy Dec 23, 2016
0de4d78
Local support (#523)
naveed-ahmad Dec 25, 2016
df624a9
Fixed sidebar (#554)
naveed-ahmad Jan 8, 2017
2bf8e1e
New React + eslint (#543)
mmahalwy Jan 9, 2017
a012203
Add new normalizr (#565)
mmahalwy Jan 10, 2017
2cea193
(#564) Fixes #562 Highlight ayah when playing
mmahalwy Jan 10, 2017
5df07d4
Fixes #557 Scrollbars bouncing (#563)
mmahalwy Jan 10, 2017
de48c45
Add slack to readme (#570)
mmahalwy Jan 10, 2017
1939f55
Fixes #547 Support continuing from last visited ayah (#559)
umairidris Jan 10, 2017
28b7eaa
Devise Token Auth for one quran (#571)
mmahalwy Jan 10, 2017
fa288e9
Highlight word in reading mode as well (#556)
naveed-ahmad Jan 11, 2017
a381c62
Update docs (#567)
umairidris Jan 12, 2017
575227b
Optimization of assets (#585)
mmahalwy Jan 16, 2017
8948a58
#568 UI improvements (#583)
mmahalwy Jan 18, 2017
606d25b
Remove missing contents (#589)
nurazharSG Jan 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
moved getOffset function to utils folder
  • Loading branch information
ar5had committed Nov 23, 2016
commit aeaf88515d4d43a192f610427c9c218afbbf6292
16 changes: 3 additions & 13 deletions src/components/Ayah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Copy from '../Copy';

import debug from '../../helpers/debug';

import getOffset from '../../utils/getOffset';

const styles = require('./style.scss');

/* eslint-disable no-unused-vars */
Expand Down Expand Up @@ -39,18 +41,6 @@ export default class Ayah extends Component {

componentDidMount() {

function getOffset(elem) {
var offsetLeft = 0, offsetTop = 0;
do {
if ( !isNaN( elem.offsetLeft ) )
{
offsetLeft += elem.offsetLeft;
offsetTop += elem.offsetTop;
}
} while( elem = elem.offsetParent );
return {left: offsetLeft, top: offsetTop};
}

var targets = document.querySelectorAll( '[rel=tooltip]' ),
target = false,
tooltip = false,
Expand All @@ -59,7 +49,7 @@ export default class Ayah extends Component {

Array.from(targets).forEach((target)=>{
target.addEventListener("mouseenter", function() {

tip = target.getAttribute("title");
tooltip = document.createElement("div");
tooltip.id = "tooltip";
Expand Down
13 changes: 13 additions & 0 deletions src/utils/getOffset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function getOffset(elem) {
let offsetLeft = 0, offsetTop = 0;

do {
if (!isNaN( elem.offsetLeft ))
{
offsetLeft += elem.offsetLeft;
offsetTop += elem.offsetTop;
}
} while (elem = elem.offsetParent);

return {left: offsetLeft, top: offsetTop};
}