Skip to content

Commit

Permalink
Reduce page size and upgrade to php 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Jun 3, 2021
1 parent 3271364 commit 0b9a011
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM islamicnetwork/php:7.4-apache
FROM islamicnetwork/php:8.0-apache

# Copy files
RUN cd ../ && rm -rf /var/www/html
Expand Down
5 changes: 1 addition & 4 deletions html/public/js/jquery.mediaplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ jQuery( document ).ready( function( $ ) {
currentSurah: '',
mode: 'surah',
surahChangers: '',
quran: '',
firstAyah: '',
lastAyah: '',
player: '',
surahChanged: false,
realNumber: 1,
container: '',
firstPlayCompleted: false,
init: function(player, mode, firstAyah, lastAyah, surah, quran, surahChangers) {
init: function(player, mode, firstAyah, lastAyah, surah, surahChangers) {
this.mode = mode;
this.player = player;
this.firstAyah = Number(firstAyah);
this.lastAyah = Number(lastAyah);
this.surah = Number(surah);
this.quran = quran;
this.surahChangers = surahChangers;
this.container = $("html,body");
},
Expand Down Expand Up @@ -86,7 +84,6 @@ jQuery( document ).ready( function( $ ) {
w.player.oncanplaythrough = w.player.play();
}
if (w.firstPlayCompleted == false) {
console.log('yes');
if ($('.playThisAyah').hasClass('hide')) {
$('.playThisAyah').removeClass('hide');
}
Expand Down
2 changes: 1 addition & 1 deletion src/AlQuranCloud/Renderer/Juz.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function renderZoomIcon($ayah)

public static function renderPlayIcon($ayah, $juz)
{
return '<span class="linkify pull-left playThisAyah" data-juz="' . $juz->data->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
return '<span class="linkify pull-left playThisAyah hide" data-juz="' . $juz->data->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
}

}
2 changes: 1 addition & 1 deletion views/ayah.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
$(function() {
$('#editionSelector').multiselect({ enableFiltering: true, enableCaseInsensitiveFiltering: true, dropUp: true, maxHeight: 400 });
$.alQuranAyah.init('#editionSelector', '<?= $ayah->data->number; ?>');
$.alQuranMediaPlayer.init($("#ayahPlayer")[0], 'ayah', <?= $ayah->data->number; ?>, <?= $ayah->data->number; ?>, <?= $ayah->data->surah->number; ?>, 0, 0);
$.alQuranMediaPlayer.init($("#ayahPlayer")[0], 'ayah', <?= $ayah->data->number; ?>, <?= $ayah->data->number; ?>, <?= $ayah->data->surah->number; ?>, 0);
$.alQuranMediaPlayer.defaultPlayer();

});
Expand Down
2 changes: 1 addition & 1 deletion views/juz.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$('#editionSelector').multiselect({ enableFiltering: true, enableCaseInsensitiveFiltering: true, dropUp: true, maxHeight: 400 });
$.alQuranJuz.editions('#editionSelector', '<?= $juz->data->number; ?>');
$.alQuranJuz.juzs('#juzSelector');
$.alQuranMediaPlayer.init($("#juzPlayer")[0], 'surah', <?=$ayahs[0]->number?>, <?=end($ayahs)->number?>,<?=$currentSurah?>, 0, 0);
$.alQuranMediaPlayer.init($("#juzPlayer")[0], 'surah', <?=$ayahs[0]->number?>, <?=end($ayahs)->number?>,<?=$currentSurah?>, 0);
$.alQuranMediaPlayer.defaultPlayer();
$.alQuranMediaPlayer.zoomIntoThisAyah();

Expand Down
2 changes: 1 addition & 1 deletion views/quran.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
$('#editionSelector').multiselect({ enableFiltering: true, enableCaseInsensitiveFiltering: true, dropUp: true, maxHeight: 400 });
$.alQuranQuran.editions('#editionSelector');
$.alQuranQuran.surahs('#surahSelector', player, quran);
$.alQuranMediaPlayer.init(player, 'quran', 1, 6236, 1, quran, surahChangers);
$.alQuranMediaPlayer.init(player, 'quran', 1, 6236, 1, surahChangers);
$.alQuranMediaPlayer.defaultPlayer();
$.alQuranMediaPlayer.zoomIntoThisAyah();

Expand Down
2 changes: 1 addition & 1 deletion views/surah.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
$('#editionSelector').multiselect({ enableFiltering: true, enableCaseInsensitiveFiltering: true, maxHeight: 400, dropUp: true});
$.alQuranSurah.editions('#editionSelector', '<?= $surah->data->number; ?>');
$.alQuranSurah.surahs('#surahSelector');
$.alQuranMediaPlayer.init($("#surahPlayer")[0], 'surah', <?=$ayahs[0]->number?>, <?=end($ayahs)->number?>, <?=$surah->data->number?>, 0, 0);
$.alQuranMediaPlayer.init($("#surahPlayer")[0], 'surah', <?=$ayahs[0]->number?>, <?=end($ayahs)->number?>, <?=$surah->data->number?>, 0);
$.alQuranMediaPlayer.defaultPlayer();
$.alQuranMediaPlayer.zoomIntoThisAyah();
});
Expand Down

0 comments on commit 0b9a011

Please sign in to comment.