Skip to content

Commit 3334983

Browse files
committed
Carousel fix
1 parent ef8e6e0 commit 3334983

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

application/views/interface_assets/footer.php

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,9 +2130,8 @@ className: 'buttons-clear',
21302130
function viewQsl(picture, callsign) {
21312131

21322132
var webpath_qsl = "<?php echo $this->paths->getPathQsl(); ?>";
2133-
var baseURL= "<?php echo base_url();?>";
2134-
var $textAndPic = $('<div></div>');
2135-
$textAndPic.append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="'+baseURL+webpath_qsl+'/'+picture+'" /><center>');
2133+
var textAndPic = $('<div class="text-center"></div>');
2134+
textAndPic.append('<img class="img-fluid w-qsl" style="height:auto;width:auto;"src="'+base_url+webpath_qsl+'/'+picture+'" />');
21362135
var title = '';
21372136
if (callsign == null) {
21382137
title = 'QSL Card';
@@ -2143,7 +2142,7 @@ function viewQsl(picture, callsign) {
21432142
BootstrapDialog.show({
21442143
title: title,
21452144
size: BootstrapDialog.SIZE_WIDE,
2146-
message: $textAndPic,
2145+
message: textAndPic,
21472146
buttons: [{
21482147
label: lang_admin_close,
21492148
action: function(dialogRef){
@@ -2164,9 +2163,8 @@ function deleteQsl(id) {
21642163
btnOKClass: 'btn-danger',
21652164
callback: function(result) {
21662165
if(result) {
2167-
var baseURL= "<?php echo base_url();?>";
21682166
$.ajax({
2169-
url: baseURL + 'index.php/qsl/delete',
2167+
url: base_url + 'index.php/qsl/delete',
21702168
type: 'post',
21712169
data: {'id': id
21722170
},
@@ -2238,9 +2236,8 @@ function viewEqsl(picture, callsign) {
22382236
* Used to fetch QSOs from the logbook in the awards
22392237
*/
22402238
function displayContacts(searchphrase, band, mode, type, qsl) {
2241-
var baseURL = "<?php echo base_url();?>";
22422239
$.ajax({
2243-
url: baseURL + 'index.php/awards/qso_details_ajax',
2240+
url: base_url + 'index.php/awards/qso_details_ajax',
22442241
type: 'post',
22452242
data: {
22462243
'Searchphrase': searchphrase,
@@ -2342,13 +2339,13 @@ function displayContactsOnMap(target, searchphrase, band, mode, type, qsl) {
23422339
}
23432340
});
23442341
}
2342+
23452343
function uploadQsl() {
23462344
var webpath_qsl = "<?php echo $this->paths->getPathQsl(); ?>";
2347-
var baseURL= "<?php echo base_url();?>";
23482345
var formdata = new FormData(document.getElementById("fileinfo"));
23492346

23502347
$.ajax({
2351-
url: baseURL + 'index.php/qsl/uploadqsl',
2348+
url: base_url + 'index.php/qsl/uploadqsl',
23522349
type: 'post',
23532350
data: formdata,
23542351
enctype: 'multipart/form-data',
@@ -2363,7 +2360,7 @@ function uploadQsl() {
23632360
'</tr>');
23642361
var quantity = $(".carousel-indicators li").length;
23652362
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
2366-
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+webpath_qsl+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
2363+
$(".carousel-inner").append('<div class="text-center carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+base_url+'/'+webpath_qsl+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div>');
23672364
$("#qslcardfront").val(null);
23682365
}
23692366
else {
@@ -2383,7 +2380,7 @@ function uploadQsl() {
23832380
$('.qslcardtab').removeAttr('hidden');
23842381
var quantity = $(".carousel-indicators li").length;
23852382
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
2386-
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+webpath_qsl+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
2383+
$(".carousel-inner").append('<div class="text-center active carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+base_url+'/'+webpath_qsl+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div>');
23872384
$(".carouselExampleIndicators").carousel();
23882385
$("#qslcardfront").val(null);
23892386
}
@@ -2402,7 +2399,7 @@ function uploadQsl() {
24022399
'</tr>');
24032400
var quantity = $(".carousel-indicators li").length;
24042401
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
2405-
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+webpath_qsl+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
2402+
$(".carousel-inner").append('<div class="text-center carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+base_url+'/'+webpath_qsl+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div>');
24062403
$("#qslcardback").val(null);
24072404
}
24082405
else {
@@ -2422,7 +2419,7 @@ function uploadQsl() {
24222419
$('.qslcardtab').removeAttr('hidden');
24232420
var quantity = $(".carousel-indicators li").length;
24242421
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
2425-
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+webpath_qsl+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
2422+
$(".carousel-inner").append('<div class="text-center active carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+base_url+'/'+webpath_qsl+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div>');
24262423
$(".carouselExampleIndicators").carousel();
24272424
$("#qslcardback").val(null);
24282425
}
@@ -2440,9 +2437,8 @@ function uploadQsl() {
24402437
function addQsosToQsl(filename) {
24412438
var title = 'Add additional QSOs to a QSL Card';
24422439

2443-
var baseURL= "<?php echo base_url();?>";
24442440
$.ajax({
2445-
url: baseURL + 'index.php/qsl/loadSearchForm',
2441+
url: base_url + 'index.php/qsl/loadSearchForm',
24462442
type: 'post',
24472443
data: {'filename': filename},
24482444
success: function(html) {
@@ -2466,9 +2462,8 @@ function addQsosToQsl(filename) {
24662462
function addQsoToQsl(qsoid, filename, id) {
24672463
var title = 'Add additional QSOs to a QSL Card';
24682464

2469-
var baseURL= "<?php echo base_url();?>";
24702465
$.ajax({
2471-
url: baseURL + 'index.php/qsl/addQsoToQsl',
2466+
url: base_url + 'index.php/qsl/addQsoToQsl',
24722467
type: 'post',
24732468
data: {'filename': filename, 'qsoid': qsoid},
24742469
success: function(html) {
@@ -2483,9 +2478,8 @@ function addQsoToQsl(qsoid, filename, id) {
24832478
}
24842479

24852480
function searchAdditionalQsos(filename) {
2486-
var baseURL= "<?php echo base_url();?>";
24872481
$.ajax({
2488-
url: baseURL + 'index.php/qsl/searchQsos',
2482+
url: base_url + 'index.php/qsl/searchQsos',
24892483
type: 'post',
24902484
data: {'callsign': $('#callsign').val(), 'filename': filename},
24912485
success: function(html) {

application/views/qslcard/qslcarousel.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
2-
<?php if (count($qslimages) > 1) { ?>
32
<ol class="carousel-indicators">
43
<?php
54
$i = 0;
@@ -13,7 +12,6 @@
1312
}
1413
?>
1514
</ol>
16-
<?php } ?>
1715
<div class="carousel-inner">
1816

1917
<?php
@@ -29,7 +27,6 @@
2927
}
3028
?>
3129
</div>
32-
<?php if (count($qslimages) > 1) { ?>
3330
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-bs-slide="prev">
3431
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
3532
<span class="visually-hidden">Previous</span>
@@ -38,5 +35,4 @@
3835
<span class="carousel-control-next-icon" aria-hidden="true"></span>
3936
<span class="visually-hidden">Next</span>
4037
</a>
41-
<?php } ?>
4238
</div>

0 commit comments

Comments
 (0)