mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
remove model class on view, use generic function
This commit is contained in:
@@ -2383,14 +2383,11 @@ $(document).ready(function(){
|
||||
|
||||
<script>
|
||||
function viewQsl(picture, callsign) {
|
||||
<?php
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Qsl_model');
|
||||
echo 'var qslpath = "'.$CI->Qsl_model->get_imagePath().'"; ';
|
||||
?>
|
||||
|
||||
var webpath_qsl = "<?php echo wl_getPathQsl(); ?>";
|
||||
var baseURL= "<?php echo base_url();?>";
|
||||
var $textAndPic = $('<div></div>');
|
||||
$textAndPic.append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="'+baseURL+'/'+qslpath+'/'+picture+'" /><center>');
|
||||
$textAndPic.append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="'+baseURL+'/'+webpath_qsl+'/'+picture+'" /><center>');
|
||||
var title = '';
|
||||
if (callsign == null) {
|
||||
title = 'QSL Card';
|
||||
@@ -2450,14 +2447,10 @@ function deleteQsl(id) {
|
||||
</script>
|
||||
<script>
|
||||
function viewEqsl(picture, callsign) {
|
||||
<?php
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Eqsl_images');
|
||||
echo 'var eqslpath = "'.$CI->Eqsl_images->get_imagePath().'"; ';
|
||||
?>
|
||||
var webpath_eqsl = "<?php echo wl_getPathEqsl(); ?>";
|
||||
var baseURL= "<?php echo base_url();?>";
|
||||
var $textAndPic = $('<div></div>');
|
||||
$textAndPic.append('<img class="img-fluid" style="height:auto;width:auto;"src="'+baseURL+eqslpath+'/'+picture+'" />');
|
||||
$textAndPic.append('<img class="img-fluid" style="height:auto;width:auto;"src="'+baseURL+webpath_eqsl+'/'+picture+'" />');
|
||||
var title = '';
|
||||
if (callsign == null) {
|
||||
title = 'eQSL Card';
|
||||
@@ -2605,11 +2598,7 @@ function viewEqsl(picture, callsign) {
|
||||
});
|
||||
}
|
||||
function uploadQsl() {
|
||||
<?php
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Qsl_model');
|
||||
echo 'var qslpath = "'.$CI->Qsl_model->get_imagePath().'"; ';
|
||||
?>
|
||||
var webpath_qsl = "<?php echo wl_getPathQsl(); ?>";
|
||||
var baseURL= "<?php echo base_url();?>";
|
||||
var formdata = new FormData(document.getElementById("fileinfo"));
|
||||
|
||||
@@ -2629,7 +2618,7 @@ function viewEqsl(picture, callsign) {
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+qslpath+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
|
||||
$(".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>');
|
||||
$("#qslcardfront").val(null);
|
||||
}
|
||||
else {
|
||||
@@ -2649,7 +2638,7 @@ function viewEqsl(picture, callsign) {
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_'+data.status.front.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+qslpath+'/'+data.status.front.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
|
||||
$(".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>');
|
||||
$(".carouselExampleIndicators").carousel();
|
||||
$("#qslcardfront").val(null);
|
||||
}
|
||||
@@ -2668,7 +2657,7 @@ function viewEqsl(picture, callsign) {
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+qslpath+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
|
||||
$(".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>');
|
||||
$("#qslcardback").val(null);
|
||||
}
|
||||
else {
|
||||
@@ -2688,7 +2677,7 @@ function viewEqsl(picture, callsign) {
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_'+data.status.back.insertid+'"><img class="img-fluid w-qsl" src="'+baseURL+'/'+qslpath+'/'+data.status.back.filename+'" alt="QSL picture #'+(quantity+1)+'"></div></center>');
|
||||
$(".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>');
|
||||
$(".carouselExampleIndicators").carousel();
|
||||
$("#qslcardback").val(null);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<div class="carousel-inner">
|
||||
|
||||
<?php
|
||||
$this->load->model('Qsl_model');
|
||||
$i = 1;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
@@ -57,7 +56,7 @@
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo '<img class="img-fluid w-qsl" src="' . base_url() . '/'.$this->Qsl_model->get_imagePath().'/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
<?php echo '<img class="img-fluid w-qsl" src="' . base_url() . '/'. wl_getPathQsl() .'/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<div class="carousel-inner">
|
||||
|
||||
<?php
|
||||
$this->load->model('Qsl_model');
|
||||
$i = 1;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
@@ -25,7 +24,7 @@
|
||||
echo ' active';
|
||||
}
|
||||
echo '">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/'.$this->Qsl_model->get_imagePath().'/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/'. wl_getPathQsl() .'/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -607,11 +607,8 @@
|
||||
|
||||
<div class="tab-pane fade" id="eqslcard" role="tabpanel" aria-labelledby="table-tab">
|
||||
<?php
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Eqsl_images');
|
||||
$eqlpath = $CI->Eqsl_images->get_imagePath();
|
||||
if ($row->eqsl_image_file != null) {
|
||||
echo '<img class="d-block" src="' . base_url() . '/'. $eqlpath .'/' . $row->eqsl_image_file .'" alt="eQSL picture">';
|
||||
echo '<img class="d-block" src="' . base_url() . '/'. wl_getPathEqsl() .'/' . $row->eqsl_image_file .'" alt="eQSL picture">';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user