EVOLUTION-NINJA
Edit File: sample_request_grid.php
<style> .ui-widget-content { overflow-x: scroll !important; } .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid .ui-jqgrid-bdiv { overflow: hidden !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } #more { display:none; } </style> <?php //include("menu.php"); error_reporting(E_ALL); ?> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Sample Request Form </h3> <?php // echo $this->load->view('templates/nav_menu'); ?> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="<?php echo base_url(); ?>dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Sample Request </a></li> </ul> </div> <?php $this->load->view('import_module/masters_data_display'); ?> <?php if(empty($access_row)) { } else { ?> <form action="<?php echo base_url(); ?>request/request_details" method="post" class="form-horizontal"> <input type="hidden" value="<?php echo $ref; ?>" id="" name="reference_value"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /> </form> <?php }?> <input type="hidden" id="delete_id" class="delete_id" value="<?php if(empty($access_row)){ } else { echo $access_row->delete_id; } ?>" > <input type="hidden" id="insert_id" class="insert_id" value="<?php if(empty($access_row)){ } else { echo $access_row->insert_id; } ?>" > <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)){ } else { echo $access_row->preview_id; } ?>" > <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > <input type="submit" id="less" value="View" onclick="show();" /> <input type="submit" id="more" value="View" onclick="hide();" /> <br><br> <div id = "jaytab" class="jaytab"> <table id="list2"></table> <div id="pager2"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <!-- BEGIN FOOTER --> <script> $("#less").click(function() { $("#more").show(); $("#less").hide(); }); </script> <script> $("#more").click(function() { $("#less").show(); $("#more").hide(); }); </script> <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style> .ss{ padding-right: 0 !important; padding-left: 0 !important; } .form-control { width:65% !important; height:27px !important; padding: 3px 12px !important; border-radius: 0px !important; //margin-bottom:15px; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } #table_approved_indent { display:none; } #refresh_list3 { display:none !important; } @media only screen and (min-width:320px) and (max-width:640px) { } </style> <script> function getDesignAndQuality(articleNo) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getDesignAndQuality", data: "articleNo=" + articleNo, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("design").value = objData.design; document.getElementById("quality").value = objData.quality; } }); } </script> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <link href="<?php echo base_url('assets/css/sweetalert2.min.css');?>" rel="stylesheet"/> <script src="<?php echo base_url('assets/js/sweetalert2.min.js');?>"></script> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <!-- This is the localization file of the grid controlling messages, labels, etc. <!-- We support more than 40 localizations --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.min.js'); ?>"></script> <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom --> <!-- The link to the CSS that the grid needs --> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap-ui.min.css'); ?>" /> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style type="text/css"> .ss{ padding-right: 0 !important; padding-left: 0 !important; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } input[type=file] { display: none; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } .coledit { cursor:pointer; padding-right: 22px !important; padding-left: 23px !important; margin-top: 4px !important; color:bold !important; } </style> <!-----------------datepicker-------------> <script> $(document).ready(function(){ var colPos = 0; var navGrid = $('#list2'); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[5].name); </script> <script> var swan_id=''; $(document).ready(function (){ $('#more').hide(); var l=$("#ref_id").val(); jQuery("#list2").jqGrid({ url:"<?php echo base_url('request/customer_fetch')?>/s"+l+"/", mtype : "post", datatype: "json", colNames:['Id','Customer','Customer Id','Reference','Date','Product Type','Article','Quality','Price','Composition','Description','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_name',index:'customer_name',editable:false,width:20}, {name:'customer_id',index:'customer_id',editable:true,hidden:true, width:10}, {name:'reference',index:'reference',edittype:'text',editable:true,editrules:{required: true}, width:20}, {name:'date',index:'date',editable:true,editrules:{required: true},editoptions: {size:10, maxlength: 10}, width:10,formatter: 'date', formatoptions: { newformat: 'd/m/Y'}}, {name:'product_type',index:'product_type',hidden:true,editable:true,editrules:{required: true}, width:10}, {name:'article',index:'article',editable:true,hidden:true,editrules:{required: true}, width:10}, {name:'quality',index:'quality',editable:true,hidden:true,editrules:{required: true}, width:20}, {name:'price',index:'price',edittype:'text',hidden:true,editable:true,editrules:{required: true}, width:10}, {name:'composition',index:'composition',hidden:true,editable:true,editrules:{required: true}, width:100}, {name:'description',index:'description',hidden:true,editable:true,editrules:{required: true}, width:40}, // {name:'preview',index:'preview',editable:true,editrules:{required: true}, width:100,classes:'fa fa-eye col_pre' ,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('request/preview')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:10,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'date', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", //multiple: true, loadonce:true, caption:"Sample Request Details", subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { // we pass two parameters // subgrid_id is a id of the div tag created within a table // the row_id is the id of the row // If we want to pass additional parameters to the url we can use // the method getRowData(row_id) - which returns associative array in type name-value // here we can easy construct the following var subgrid_table_id; // alert(row_id); swan_id=row_id; //alert(swan_id); subgrid_table_id = subgrid_id+"_t"; jQuery("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table>"); jQuery("#"+subgrid_table_id).jqGrid({ url:"<?php echo base_url('request/customer_fetch1')?>/s"+row_id+"/", mtype : "get", datatype: "json", colNames:['Id','Article','Quality','Description','Color','Design','Composition','weight','Size/Width','Price','hanger','cushion','view','Edit','Delete'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'article',index:'article',editable:true,editrules:{required: true}, width:100}, {name:'quality',index:'quality',editable:true,editrules:{required: true}, width:280}, {name:'description',index:'description',editable:true,editrules:{required: true}, width:270}, {name:'color',index:'color',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'design',index:'design',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'composition',index:'composition',editable:true,editrules:{required: true}, width:327}, {name:'wight',hidden:true,index:'wight',editable:true,editrules:{required: true}, width:100}, {name:'size',index:'size',editable:true,editrules:{required: true}, width:60}, {name:'price',index:'price',editable:true,editrules:{required: true}, width:60}, {name:'hanger',index:'hanger',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_sub_hanger($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='PREVIEW' \>"; }}, {name:'cusion',index:'cusion',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_sub_cusion($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='PREVIEW' \>"; }}, {name:'view',index:'view',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_sub_view($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='PREVIEW' \>"; }}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:70,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_sub_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='EDIT' \>"; }}, {name:'delete',index:'delete',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_sub_del($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='DELETE' \>"; }}, // {name:'hanger',index:'hanger',editable:true,editrules:{required: true}, width:80,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('request/hangerpreview')?>'}}, // {name:'cusion',index:'cusion',editable:true,editrules:{required: true}, width:80,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('request/cusionpreview')?>'}}, // {name:'view',index:'view',editable:true,editrules:{required: true}, width:42,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('request/view_all_data')?>'}}, // {name:'edit',index:'edit',editable:true,editrules:{required: true}, width:60,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('request/edit_form')?>'}}, // {name:'delete',index:'delete',editable:true,editrules:{required: true}, width:90,formatter:'showlink',classes:'fa fa-trash-o col_delete',formatoptions:{baseLinkUrl:'<?php echo base_url('request/delete_form')?>'}}, ], height: 'auto', rowNum:2000000000000000000, sortname: 'num', sortorder: "asc", }); } }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list2").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,search:false,refreshstate:false}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); $("#list2").navButtonAdd('#pager2', { caption:"Delete", buttonicon:"ui-icon-trash", onClickButton: deleteRow, position: "last", title:"", cursor: "pointer", id:"client_delete" } ); }); function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('request/preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('request/sample_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('request/sample_request_preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('request/sample_request_view');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_sub_del(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/delete_form"); ?>', data:{'as':as}, async:false, success:function() { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_sub_edit(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/edit_form"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('request/edit_form');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('request/sample_edit_form');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('request/sample_request_edit_form');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('request/sample_request_editform');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function fun_sub_view(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/view_all_data"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('request/view_all_data');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('request/sample_view_all_data');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('request/sample_view_data');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('request/sample_request_data');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_sub_cusion(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/cusionpreview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('request/cusionpreview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('request/sample_cusionpreview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('request/sample_request_cusionpreview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('request/cusion_preview');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_sub_hanger(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("request/hangerpreview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('request/hangerpreview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('request/sample_hanger_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('request/sample_hangerpreview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('request/hanger_preview');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function editRow() { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); if( row != null ) $("#list2").jqGrid('editGridRow',row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ var id=$("#id").val(); // var customer=$("#customer_name").val(); //var customer_id=$("#customer_id").val(); var date=$("#date").val(); var product_type=$("#product_type").val(); var article=$("#article").val(); var price=$("#price").val(); var reference= $("#reference").val(); var quality= $("#quality").val(); var composition=$("#composition").val(); //alert(id); $.ajax({ url:"<?php echo base_url('request/customer_update')?>", type:"POST", data:{'id':id,'date':date,'product_type':product_type,'article':article,'price':price,'reference':reference,'quality':quality,'composition':composition}, async:false, success:function(data){ if(data==""){ alert('Successfully Updated.'); $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); window.location.reload(); } else{ window.location.reload(); } } }); }, closeAfterEdit: true, reloadAfterSubmit:false, afterSubmit : false }); else $( "#dialogSelectRow" ).dialog(); } function deleteRow() { var v=$('#delete_id').val(); if(v == 1) { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); $("#id").val(row); // A pop-up dialog will appear to confirm the selected action if( row != null ) $("#list2").jqGrid( 'delGridRow', row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ $.ajax({ url:"<?php echo base_url('request/customer_delete')?>", type:"POST", data:{'id':row}, async:false, success:function(data){ if(data==""){ //alert('Successfully Updated.'); $("#delmodlist2").remove(); window.location.reload(); //$("#list2").trigger("reloadGrid"); } else{ // alert('Successful'); $("#delmodlist2").remove(); window.location.reload(); $("#list2").trigger("reloadGrid"); } } }); }, reloadAfterSubmit:false, closeAfterDelete: true, afterSubmit : function(response, postdata) { } }); else $( "#dialogSelectRow" ).dialog(); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function adddetails() { var customer=$("#customer").val(); var date=$("#date").val(); var product_type=$("#product_type").val(); var description=$("#description").val(); var size=$("#size").val(); var min_quality=$("#min_quality").val(); var customer_id=$("#customer_id").val(); var currency= $("#currency").val(); var article=$("#article").val(); var design=$("#design").val(); var price=$("#price").val(); var image=$("#image").val(); var reference= $("#reference").val(); var terms=$("#terms").val(); var quality= $("#quality").val(); var color=$("#color").val(); var composition=$("#composition").val(); var note=$("#note").val(); $.ajax({ url:"<?php echo base_url('request/customer_insert')?>", type:"POST", data:{'customer':customer,'date':date,'product_type':product_type,'description':description,'size':size,'min_quality':min_quality,'customer_id':customer_id,'currency':currency,'article':article,'design':design,'price':price,'image':image,'reference':reference,'terms':terms,'quality':quality,'color':color,'composition':composition,'note':note}, async:false, success:function(data){ alert('Successfully Added.'); var customer=$("#customer").val(''); var date=$("#date").val(''); var product_type=$("#product_type").val(''); var description=$("#description").val(''); var size=$("#size").val(''); var min_quality=$("#min_quality").val(''); var customer_id=$("#customer_id").val(''); var currency= $("#currency").val(''); var article=$("#article").val(''); var design=$("#design").val(''); var price=$("#price").val(''); var image=$("#image").val(''); var reference= $("#reference").val(''); var terms=$("#terms").val(''); var quality= $("#quality").val(''); var color=$("#color").val(); var composition=$("#composition").val(''); var note=$("#note").val(''); var obj = jQuery.parseJSON(data); var v=$('#customer').val(obj.customer_name); //alert(v); $('#customer_id').val(obj.customer_id); } }); } function show () { // // Position of the name column var colPos = 0; var navGrid = $('#list2'); // alert(navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[colPos + 6].name)); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[colPos].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[3].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[4].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[5].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[6].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[7].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[8].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[9].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[10].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[11].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[12].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[13].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[14].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[15].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[16].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[17].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[18].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[19].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[20].name); } function hide() { var colPos = 0; var navGrid = $('#list2'); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[6].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[7].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[8].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[9].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[10].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[11].name); //navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[9].name); //navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[10].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[11].name); //navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[12].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[13].name); //navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[14].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[15].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[16].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[17].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[18].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[19].name); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[20].name); } </script> <style> .preview { padding-bottom:3px !important; padding-top:3px !important; } .tablediv { width: auto !important; // overflow: auto !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> $(document).ready(function() { $( "#customer" ).autocomplete({ source: '<?php echo base_url('request/auto_sea'); ?>', }); }); function searchname() { var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_fetch')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); var obj=JSON.parse(data); document.getElementById('customer_id').value=obj[0].customerID; } }); } </script> <style> #jaytab{ width:100%; overflow:auto; } } #search_list2 { display:none !important; } #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { width: 1050px; height: 0px !important; } #gbox_list2 { height: auto !important; } #gview_list2 { height: auto !important; } @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } .radio-list { margin-left:7% !important; } #table_pending_indent{ overflow-x: scroll; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 600px !important; padding-left: 0 !important; } #jaytab1 { margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 300px !important; padding-left: 0 !important; } #editmodlist2 { width:90% !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; } </style>