EVOLUTION-NINJA
Edit File: d_technical_notes_test.php
<div class="content-wrapper"> <div class="container-fluid"> <div class="p_list"> <h3>TECHNICAL NOTES</h3> <table id="list2"></table> <div id="pager2"></div> </div> </div> </div> <style> @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } #sData span, #cData span { margin-left: 0 !important; } } @media only screen and (min-width:641px) and (max-width:991px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } .text_color a{ color:white !important; } </style> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.js'); ?>"></script> <!-- This is the Javascript file of jqGrid --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.js'); ?>"></script> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <script> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list2").jqGrid({ url:"<?php echo site_url('controller/get_technical_notes');?>", mtype : "post", datatype: "json", colNames:['Id','Document Number','Document Name','Product','Application','Upload Date','Download',''], colModel:[ {name:'id',index:'id', width:50, align:'center',key:true,editable:true,hidden:true, sortable: false}, {name:'document_no',index:'document_no', width:50, align:'center',key:true,editable:true, sortable: false}, {name:'document_name',index:'document_name', width:110, align:'center',key:true,editable:true, sortable: false}, {name:'product', index:'product', align:'center',editable:true, width:30, sortable: false}, {name:'application', index:'application', align:'center',editable:true, width:30, sortable: false}, {name:'createdate', index:'createdate', align:'center',editable:true, width:30, sortable: false,formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'d-m-Y'}}, {name:'',index:'', search:false, width:20, align:'center',editable:false, sortable: false,formatter: function (cellvalue, options, rowObject) { var retVal = ""; var path='<?php echo base_url();?>\''+rowObject.document+'\''; var finalpath=path.replace(/\'/g, ''); var retVal = '<a data-toggle="tooltip" title="Download" class="" target="new_blank" href="'+finalpath+'"><button>Download</button></a> '; return retVal; }}, {name:'document', index:'document', align:'center',editable:true, width:150,hidden:true, sortable: false}, ], rowNum:50, rowTotal: 2000, rowList : [50,100,500,1000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'case_id', viewrecords: true, loadonce:true, gridview: true, autowidth: true, sortorder:"asc", caption:"Technical Notes" }); $("#list2").jqGrid('filterToolbar',{searchOperators : false});//for multisearch code,remove if not required $("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); //$('#pager2').css("height", "auto"); // $("#list2").navButtonAdd('#pager2', // { caption:"Add", // buttonicon:"ui-icon-plus", // onClickButton: addRow, // position: "last", // title:"", // cursor:"pointer", // id:"client_add" // } // ); // $("#list2").navButtonAdd('#pager2', // { caption:"Edit", // buttonicon:"ui-icon-pencil", // onClickButton: editRow, // position: "last", // title:"", // cursor: "pointer", // id:"client_edit" // } // ); // $("#list2").navButtonAdd('#pager2', // { caption:"Delete", // buttonicon:"ui-icon-trash", // onClickButton: deleteRow, // position: "last", // title:"", // cursor: "pointer", // id:"client_delete" // } // ); }); </script>