EVOLUTION-NINJA
Edit File: vendor_master_grid.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Out Source Master </h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="https://swansilk.co/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Out Source Master </a></li> </ul> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>out_source/out_source_master" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form> <?php } else { ?> <?php } }?> <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <div id = "jaytab1" class="jaytab"> <table id="list3"></table> <div id="pager3"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!-- 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'); ?>" /> <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_id1').value=obj.customerID; } }); } </script> <script> 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.'); //$("#editmodlist2").remove(); window.location.reload(); } }); } </script> <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'); ?>" /> <script> $('.datepicker').datepicker({ format: 'yyyy/mm/dd', }); </script> <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-------------> <!-- The link to the CSS that the grid needs --> <script> <!---------------------------approved indent -----------------------------------------> $(document).ready(function (){ $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); jQuery("#list3").jqGrid({ url:"<?php echo base_url('out_source/outsource_master_grid')?>", datatype: "json", colNames:['Id','Name','Vendor Id','Contact Person','Address','GST No','PAN No','Phone','Email','Edit','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, editable:true,width:100}, {name:'name',index:'name', editable:false,width:100}, {name:'import_fileno',index:'import_fileno',editable:true,editrules:{required: true},width:110}, {name:'company_name',index:'company_name',editable:true,editrules:{required: true},width:110}, {name:'address',index:'address', width:110,editable:true,editrules:{required: true}}, {name:'gst_no',index:'gst_no', width:110,editable:true,editrules:{required: true}}, {name:'pan_no',index:'pan_no', width:110,editable:true,editrules:{required: true}}, {name:'phone',index:'phone', width:110,editable:true,editrules:{required: true}}, {name:'email',index:'email', width:164,editable:true,editrules:{required: true}}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:130,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:200,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='DELETE' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:200,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 20000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager3", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"desc", loadonce:true, caption:"Out Source Master Details", }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list3").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list3").jqGrid('navGrid','#pager3', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function fun_preview(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("out_source/vendor_preview"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('out_source/vendor_preview');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This View", text: "", }); } } function fun_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; // alert(as); var v=$('#delete_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("out_source/outsource_delete_fun"); ?>', data:{'as':as}, async:false, success:function() { $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_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("out_source/vendor_edit"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('out_source/vendor_edit');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function deleteRow() { // Get the currently selected row var row = $("#list3").jqGrid('getGridParam','selrow'); $("#id").val(row); if( row != null ) $("#list3").jqGrid('delGridRow',row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ $.ajax({ url:"<?php echo base_url('out_source/outsource_master_delete');?>", type:"POST", data:{'id':row}, async:false, success:function(data){ if(data==""){ alert('Successfully Deleted'); $("#delmodlist3").remove(); $("#list3").trigger("reloadGrid"); window.location.reload(); } else{ alert('Successfully Deleted'); $("#delmodlist3").remove(); $("#list3").trigger("reloadGrid"); window.location.reload(); } } }); }, closeAfterEdit: true, reloadAfterSubmit:false, afterSubmit : false }); else $( "#dialogSelectRow" ).dialog(); } </script> <style> .preview { padding-bottom:3px !important; padding-top:3px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .tablediv { width: auto !important; overflow: scroll !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>