diff --git a/application/controllers/CostCenter.php b/application/controllers/CostCenter.php index 89644b5d..6fbc7002 100644 --- a/application/controllers/CostCenter.php +++ b/application/controllers/CostCenter.php @@ -53,7 +53,7 @@ class CostCenter extends BaseController $data['userRecords'] = $this->costcenter_model->CostListing($searchText, $returns["page"], $returns["segment"]); //print_r( $data) ; - $this->global['pageTitle'] = 'Siddharth : Test List'; + $this->global['pageTitle'] = 'Siddharth : Cost List'; $this->loadViews("costListing", $this->global, $data, NULL); diff --git a/application/views/addCostCenter.php b/application/views/addCostCenter.php index c609d2e5..db0df595 100644 --- a/application/views/addCostCenter.php +++ b/application/views/addCostCenter.php @@ -382,7 +382,8 @@ $(function() { - + + Cancel @@ -514,7 +515,7 @@ $("#Edit").on("shown.bs.modal", function(e) { $('#txtRowCount').val(temp); - + CountRows(); } else { @@ -599,6 +600,59 @@ $('.tempClickEdit').click(function(){ return true; } + + + function Rowcount() + { + var rowCount = $('#BudgetTable').length; + if(rowCount=='4') + { + $("#addbudgetmodel").modal('hide'); + + } + else + { + + $("#addbudgetmodel").modal('show'); + } + + } + + + var totalRowCount = 0; + var rowCount = 0; + var table = document.getElementById("BudgetTable"); + var rows = table.getElementsByTagName("tr"); + +function CountRows() { + totalRowCount = 0; + rowCount = 0; + table = document.getElementById("BudgetTable"); + rows = table.getElementsByTagName("tr") + for (var i = 0; i < rows.length; i++) { + totalRowCount++; + if (rows[i].getElementsByTagName("td").length > 0) { + rowCount++; + } + } + + + var message = "Total Row Count: " + totalRowCount; + message += "\nRow Count: " + rowCount; + //alert(message); + if(totalRowCount>"4") + { + $("#addbudgetmodel").modal('hide'); + } + else + { + return false; + } + + } + + + \ No newline at end of file diff --git a/application/views/editOldcost.php b/application/views/editOldcost.php index 58f1a5d4..97df7f4d 100644 --- a/application/views/editOldcost.php +++ b/application/views/editOldcost.php @@ -521,7 +521,7 @@ $(function() {