EVOLUTION-NINJA
Edit File: planning_shade_details.php
<script> function displayshadedetails(str) { //alert(str); $.ajax({ type:"post", url:"<?php echo base_url(); ?>display_data/testingshade", data:"id="+str, success:function(data) { document.getElementById("dynamicdatamster").innerHTML=data; } }); } </script> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Planning Shade Details </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">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Shade Master </a></li> </ul> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>planning/add_shade_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 } }?> <?php $this->load->view('import_module/masters_data_display'); ?> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <div class="portlet box blue-madison"> <div class="portlet-title"> <div class="caption"> <i class="fa fa-globe"></i>Shade details </div> <div class="tools"> <!--<a href="javascript:;" class="reload"> </a> <?php //echo $this->load->view('templates/download_types'); ?> <a href="#" style="color: #fff;"> <i class="fa fa-file-pdf-o tooltips" data-container="body" data-placement="top" data-original-title="Export PDF" style="font-size: 20px;"></i> </a> <a href="#" style="color: #fff;"> <i class="fa fa-file-excel-o tooltips" data-container="body" data-placement="top" data-original-title="Export Excel" style="font-size: 20px;"></i> </a> <a href="#" style="color: #fff;"> <i class="fa fa-print tooltips" data-container="body" data-placement="top" data-original-title="Take Print" style="font-size: 20px;"></i> </a>--> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Sr.No. </th> <th> Shade Name </th> <th> Shade Type </th> <th> Article No. </th> <th> Weave </th> <th> Design </th> <th> Quality </th> <th> Process Flow </th> <th> Created By </th> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <th> Edit </th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->delete_id == '1' ) { ?> <th> Delete </th> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->preview_id== '1' ) { ?> <th> Preview </th> <?php } } ?> </tr> </thead> <tbody> <?php $count=1; foreach($getalldata as $getresult) { ?> <?php IF($getresult->shadeID == 1) { } else { ?> <tr> <td><?php echo $count++; ?></td> <td style="text-transform: uppercase !important"><a id="<?php echo $getresult->shadeID; ?>" onclick="displayshadedetails(this.id)" href="#" data-reveal-id="<?php echo $this->uri->segment(2); ?>" data-animation="fade"><?php echo $getresult->shadeName; ?></a></td> <td style="text-transform: uppercase !important"><?php echo $getresult->shadeType; ?></td> <td style="text-transform: uppercase !important"> <?php foreach($articledata as $articlesdata){ if($articlesdata->articleID==$getresult->articleID){ echo $articlesdata->articleNo; } } ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->weave; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->design; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->quality; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->fabricType; ?></td> <td style="text-transform: uppercase !important"><?php echo $getresult->created_by; ?></td> <?php if(empty($access_row)){ } else { if($access_row->edit_id == '1' ) { ?> <td><form action="<?php echo base_url(); ?>planning/edit_shade_master_details" method="post" class="form-horizontal"><input type="hidden" name="edit_id" value="<?php echo $getresult->shadeID; ?>"><i style="background: none !important; color:rgb(81,149,205);" class="fa fa-pencil-square-o" aria-hidden="true"></i><input type="submit" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="EDIT"> </form></td> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->delete_id == '1' ) { ?> <td><a><i class="fa fa-trash-o" aria-hidden="true"></i><input onclick="removedata(<?php echo $getresult->shadeID; ?>)" type="button" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="DELETE"></a></td> <?php } } ?> <?php if(empty($access_row)){ } else { if($access_row->preview_id== '1' ) { ?> <td><form action="<?php echo base_url(); ?>planning/preview_shade_master_details" method="post" class="form-horizontal"><input type="hidden" name="edit_id" value="<?php echo $getresult->shadeID; ?>"><i style="background: none !important; color:rgb(81,149,205);" class="fa fa-eye" aria-hidden="true"></i><input type="submit" style="border: 0px !important; background: none !important; color:rgb(81,149,205);" value="PREVIEW"> </form></td> <?php } } ?> </tr> <?php }} ?> </tbody> </table> </div> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script> function fun(id) { alert(id); var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("Do You Want To Confirm!"); if (confirmMsg==true) { $.ajax({ url:"<?php echo base_url('marketing/add_confirmation')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); } else{ } } }); } else if (confirmMsg==false) { $.ajax({ url:"<?php echo base_url('marketing/add')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); } else{ } } }); } } </script> <script> function removedata(b) { //alert(b); $.ajax({ type:'post', url:'<?php echo base_url("planning/delete_shade_details"); ?>', data:{'as':b}, async:false, success:function() { window.location.reload(); } }); } </script> <style> @media only screen and (min-width:320px) and (max-width:640px) { .reveal-mastermoduledata { top: 0; left: 2% ; margin-left:0px; width: 94%; margin-bottom:20px; overflow-x:auto; } .reveal-mastermoduledata table { overflow-x:scroll !important; } #dynamicdatamster{ overflow-x:scroll !important; } } </style>