Commit 3515dee8 by Phạm Văn Đoan

fix lỗi phân trang

parent a5cfe777
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<?php endif; ?> <?php endif; ?>
<div class="row"> <div class="row">
<?php echo form_open(base_url().'backend/cmsTrack/listTrackAjax'); ?> <?php //echo form_open(base_url().'backend/cmsTrack/listTrackAjax'); ?>
<!-- Tìm kiếm theo tên bài hát --> <!-- Tìm kiếm theo tên bài hát -->
<div class="col-lg-3"> <div class="col-lg-3">
<input class="form-control" type="text" name="input-name" id="input-name" placeholder="Nhập tên bài hát..." /> <input class="form-control" type="text" name="input-name" id="input-name" placeholder="Nhập tên bài hát..." />
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="col-lg-1"> <div class="col-lg-1">
<button class="btn btn-sm btn-default" id="delete-filter">Xóa bộ lọc</button> <button class="btn btn-sm btn-default" id="delete-filter">Xóa bộ lọc</button>
</div> </div>
<?php echo form_close(); ?> <?php //echo form_close(); ?>
<div class="col-lg-1" style="float:right;"> <div class="col-lg-1" style="float:right;">
<a class="btn btn-sm btn-success" href="<?php echo base_url('backend/cmsTrack/addTrack');?>"> <a class="btn btn-sm btn-success" href="<?php echo base_url('backend/cmsTrack/addTrack');?>">
<i class="glyphicon-plus"></i> Thêm</a> <i class="glyphicon-plus"></i> Thêm</a>
...@@ -86,12 +86,12 @@ $(document).ready(function() { ...@@ -86,12 +86,12 @@ $(document).ready(function() {
$("#input-name").val(''); $("#input-name").val('');
$("#fBySinger").val('-1'); $("#fBySinger").val('-1');
$("#fByComposer").val('-1'); $("#fByComposer").val('-1');
changePagination('0', url); changePagination('0');
return false; return false;
}); });
changePagination('0', url); changePagination('0');
}); });
...@@ -114,8 +114,9 @@ function loadDataByAjaxDateRange(dtFrom, dtTo, url) { ...@@ -114,8 +114,9 @@ function loadDataByAjaxDateRange(dtFrom, dtTo, url) {
callAjax(pageId, url); callAjax(pageId, url);
} }
function changePagination(pageId, url) { function changePagination(pageId) {
$('#data-loading').show(); $('#data-loading').show();
var url = '<?php echo base_url("backend/cmsTrack/listTrackAjax"); ?>';
callAjax(pageId, url); callAjax(pageId, url);
} }
...@@ -124,17 +125,18 @@ function callAjax(pageId, url) { ...@@ -124,17 +125,18 @@ function callAjax(pageId, url) {
var fByName = $("#input-name").val(); var fByName = $("#input-name").val();
var fBySinger = $("#fBySinger").val(); var fBySinger = $("#fBySinger").val();
var fByComposer = $("#fByComposer").val(); var fByComposer = $("#fByComposer").val();
var dataReq = {
csrf_name: csrf_value,
fByName: fByName,
fBySinger: fBySinger,
fByComposer: fByComposer,
pageId: pageId
};
//Ajax //Ajax
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: url, url: url,
data: { data: dataReq,
csrf_name: csrf_value,
fByName: fByName,
fBySinger: fBySinger,
fByComposer: fByComposer,
pageId: pageId
},
dataType: "text", dataType: "text",
cache: false, cache: false,
success: function(data) { success: function(data) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment