|
|
@@ -1,3 +1,4 @@
|
|
|
+var test;
|
|
|
$(document).ready(function () {
|
|
|
const types = ["工程概要", "工程計算書", "設計圖", "數量計算書", "工程預算書", "施工規範&特定條款", "設計報告書"];
|
|
|
var path = '';
|
|
|
@@ -93,9 +94,9 @@ $(document).ready(function () {
|
|
|
page: 'current'
|
|
|
}).count();
|
|
|
|
|
|
- for (var i = 0; i < api.page.len() - (rowCount === 0 ? 1 : rowCount); i++) {
|
|
|
+ /*for (var i = 0; i < api.page.len() - (rowCount === 0 ? 1 : rowCount); i++) {
|
|
|
$('#datatable-ajax tbody').append($("<tr><td> </td><td></td><td></td><td></td></tr>"));
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
}
|
|
|
start = false;
|
|
|
@@ -370,20 +371,22 @@ $(document).ready(function () {
|
|
|
});
|
|
|
|
|
|
function displayDetail(isFile, isBlueprint) {
|
|
|
+ table.column(0).visible(isBlueprint);
|
|
|
+ table.column(2).visible(isFile);
|
|
|
+ table.column(3).visible(isFile);
|
|
|
+ table.column(4).visible(!isFile);
|
|
|
if (isFile) {
|
|
|
- table.column(0).visible(isBlueprint);
|
|
|
- table.column(2).visible(true);
|
|
|
- table.column(3).visible(true);
|
|
|
- table.column(4).visible(false);
|
|
|
$(".table-responsive").show();
|
|
|
$("#SN").text("圖號");
|
|
|
$("#name").text("圖名");
|
|
|
$('.nav-tabs a[href="#pdfTab"]').tab('show');
|
|
|
-
|
|
|
+ test = table;
|
|
|
+ if(table.rows().count()>10){
|
|
|
+ table.page.len(10).draw();
|
|
|
+ }else{
|
|
|
+ table.page.len(-1).draw();
|
|
|
+ }
|
|
|
} else {
|
|
|
- table.column(2).visible(false);
|
|
|
- table.column(3).visible(false);
|
|
|
- table.column(4).visible(true);
|
|
|
$(".table-responsive").hide();
|
|
|
$("#SN").text("項次");
|
|
|
$("#name").text("類別");
|
|
|
@@ -424,15 +427,6 @@ $(document).ready(function () {
|
|
|
table.clear().draw();
|
|
|
if (data[1] != "設計圖" && data[1] != "成果圖") {
|
|
|
|
|
|
- if (notes.includes(data[1])) {
|
|
|
- is_blueprint2 = true;
|
|
|
- displayDetail(true, true);
|
|
|
- table.page.len(10).draw();
|
|
|
- } else {
|
|
|
- displayDetail(true, false);
|
|
|
- table.page.len(-1).draw();
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
for (i = 0; i < response.length; i++) {
|
|
|
table.row.add([
|
|
|
@@ -450,7 +444,12 @@ $(document).ready(function () {
|
|
|
])
|
|
|
table.draw();
|
|
|
}
|
|
|
-
|
|
|
+ if (notes.includes(data[1])) {
|
|
|
+ is_blueprint2 = true;
|
|
|
+ displayDetail(true, true);
|
|
|
+ } else {
|
|
|
+ displayDetail(true, false);
|
|
|
+ }
|
|
|
|
|
|
} else {
|
|
|
displayDetail(false, true);
|