Update backdate surat keluar external
Showing
1 changed file
with
220 additions
and
36 deletions
| ... | @@ -9,8 +9,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -9,8 +9,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 9 | $perihal = htmlspecialchars($purifier->purify(trim($_POST['perihal'])), ENT_QUOTES); | 9 | $perihal = htmlspecialchars($purifier->purify(trim($_POST['perihal'])), ENT_QUOTES); |
| 10 | $pembuat = htmlspecialchars($purifier->purify(trim($_POST['pembuat'])), ENT_QUOTES); | 10 | $pembuat = htmlspecialchars($purifier->purify(trim($_POST['pembuat'])), ENT_QUOTES); |
| 11 | $pembuat1 = htmlspecialchars($purifier->purify(trim($_POST['pembuat1'])), ENT_QUOTES); | 11 | $pembuat1 = htmlspecialchars($purifier->purify(trim($_POST['pembuat1'])), ENT_QUOTES); |
| 12 | $penandatangan = htmlspecialchars($purifier->purify(trim($_POST['penandatangan'])), ENT_QUOTES); | 12 | $penandatangan = json_encode($_POST['p_penandatangan']); |
| 13 | $penandatangan1 = htmlspecialchars($purifier->purify(trim($_POST['penandatangan1'])), ENT_QUOTES); | 13 | // $penandatangan = htmlspecialchars($purifier->purify(trim($_POST['penandatangan'])), ENT_QUOTES); |
| 14 | // $penandatangan1 = htmlspecialchars($purifier->purify(trim($_POST['penandatangan1'])), ENT_QUOTES); | ||
| 14 | $uker = htmlspecialchars($purifier->purify(trim($_POST['uker'])), ENT_QUOTES); | 15 | $uker = htmlspecialchars($purifier->purify(trim($_POST['uker'])), ENT_QUOTES); |
| 15 | $uker__ = htmlspecialchars($purifier->purify(trim($_POST['uker__'])), ENT_QUOTES); | 16 | $uker__ = htmlspecialchars($purifier->purify(trim($_POST['uker__'])), ENT_QUOTES); |
| 16 | $tujuan = htmlspecialchars($purifier->purify(trim($_POST['tujuan'])), ENT_QUOTES); | 17 | $tujuan = htmlspecialchars($purifier->purify(trim($_POST['tujuan'])), ENT_QUOTES); |
| ... | @@ -110,7 +111,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -110,7 +111,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 110 | 'pembuat' => $pembuat, | 111 | 'pembuat' => $pembuat, |
| 111 | 'id_pembuat' => $pembuat1, | 112 | 'id_pembuat' => $pembuat1, |
| 112 | 'penandatangan' => $penandatangan, | 113 | 'penandatangan' => $penandatangan, |
| 113 | 'id_penandatangan'=> $penandatangan1, | 114 | // 'id_penandatangan'=> $penandatangan1, |
| 114 | 'unitkerja' => $uker, | 115 | 'unitkerja' => $uker, |
| 115 | 'unitkerjaid' => $uker__, | 116 | 'unitkerjaid' => $uker__, |
| 116 | 'tujuan' => $tujuan, | 117 | 'tujuan' => $tujuan, |
| ... | @@ -129,7 +130,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -129,7 +130,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 129 | ':pembuat' => $pembuat, | 130 | ':pembuat' => $pembuat, |
| 130 | ':id_pembuat' => $pembuat1, | 131 | ':id_pembuat' => $pembuat1, |
| 131 | ':penandatangan' => $penandatangan, | 132 | ':penandatangan' => $penandatangan, |
| 132 | ':id_penandatangan' => $penandatangan1, | 133 | // ':id_penandatangan' => $penandatangan1, |
| 133 | ':unitkerja' => $uker, | 134 | ':unitkerja' => $uker, |
| 134 | ':unitkerjaid' => $uker__, | 135 | ':unitkerjaid' => $uker__, |
| 135 | ':tujuan' => $tujuan, | 136 | ':tujuan' => $tujuan, |
| ... | @@ -237,9 +238,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -237,9 +238,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 237 | 238 | ||
| 238 | if(!$mail->send()) { | 239 | if(!$mail->send()) { |
| 239 | //echo "Mailer Error: " . $mail->ErrorInfo; | 240 | //echo "Mailer Error: " . $mail->ErrorInfo; |
| 240 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan. Email notifikasi gagal dikirim!');window.location.href=\"./index.php?op=backdate\";</script>"; | 241 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan.');window.location.href=\"./index.php?op=backdate\";</script>"; |
| 241 | }else{ | 242 | }else{ |
| 242 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan, Email notifikasi dikirim!');window.location.href=\"./index.php?op=backdate\";</script>"; | 243 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan.');window.location.href=\"./index.php?op=backdate\";</script>"; |
| 243 | } | 244 | } |
| 244 | }else{ | 245 | }else{ |
| 245 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan!');window.location.href=\"./index.php?op=backdate\";</script>"; | 246 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan!');window.location.href=\"./index.php?op=backdate\";</script>"; |
| ... | @@ -355,9 +356,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -355,9 +356,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 355 | 356 | ||
| 356 | if(!$mail->send()) { | 357 | if(!$mail->send()) { |
| 357 | //echo "Mailer Error: " . $mail->ErrorInfo; | 358 | //echo "Mailer Error: " . $mail->ErrorInfo; |
| 358 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan. Email notifikasi gagal dikirim!');window.location.href=\"./index.php?op=backdate\";</script>"; | 359 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan.');window.location.href=\"./index.php?op=backdate\";</script>"; |
| 359 | }else{ | 360 | }else{ |
| 360 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan, Email notifikasi dikirim!');window.location.href=\"./index.php?op=backdate\";</script>"; | 361 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan.');window.location.href=\"./index.php?op=backdate\";</script>"; |
| 361 | } | 362 | } |
| 362 | }else{ | 363 | }else{ |
| 363 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan!');window.location.href=\"./index.php?op=backdate\";</script>"; | 364 | echo "<script type=\"text/javascript\">alert('Data Berhasil diSimpan!');window.location.href=\"./index.php?op=backdate\";</script>"; |
| ... | @@ -409,7 +410,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -409,7 +410,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 409 | if(inputString.length == 0) { | 410 | if(inputString.length == 0) { |
| 410 | $('#suggestionsq').fadeOut(); | 411 | $('#suggestionsq').fadeOut(); |
| 411 | } else { | 412 | } else { |
| 412 | $('#penandatangan').addClass('load'); | 413 | $('#pembuat').addClass('load'); |
| 413 | //$('#country1').addClass('load'); | 414 | //$('#country1').addClass('load'); |
| 414 | $.post("./index.php?op=get_autouser", {queryString: inputString, jenis: 'penandatangan'}, function(data){ | 415 | $.post("./index.php?op=get_autouser", {queryString: inputString, jenis: 'penandatangan'}, function(data){ |
| 415 | if(data.length >0) { | 416 | if(data.length >0) { |
| ... | @@ -429,14 +430,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -429,14 +430,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 429 | $('#pembuat1').val(thisValue); | 430 | $('#pembuat1').val(thisValue); |
| 430 | setTimeout("$('#suggestions').fadeOut();", 100); | 431 | setTimeout("$('#suggestions').fadeOut();", 100); |
| 431 | } | 432 | } |
| 432 | function fillq(thisValue) { | 433 | // function fillq(thisValue) { |
| 433 | $('#penandatangan').val(thisValue); | 434 | // $('#penandatangan').val(thisValue); |
| 434 | setTimeout("$('#suggestionsq').fadeOut();", 100); | 435 | // setTimeout("$('#suggestionsq').fadeOut();", 100); |
| 435 | } | 436 | // } |
| 436 | function fillq1(thisValue) { | 437 | // function fillq1(thisValue) { |
| 437 | $('#penandatangan1').val(thisValue); | 438 | // $('#penandatangan1').val(thisValue); |
| 438 | setTimeout("$('#suggestionsq').fadeOut();", 100); | 439 | // setTimeout("$('#suggestionsq').fadeOut();", 100); |
| 439 | } | 440 | // } |
| 440 | </script> | 441 | </script> |
| 441 | <style> | 442 | <style> |
| 442 | #pembuat{ | 443 | #pembuat{ |
| ... | @@ -444,11 +445,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -444,11 +445,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 444 | border:1px #CCC solid; | 445 | border:1px #CCC solid; |
| 445 | font-size:12px; | 446 | font-size:12px; |
| 446 | } | 447 | } |
| 447 | #penandatangan{ | 448 | /* #penandatangan{ |
| 448 | padding:3px; | 449 | padding:3px; |
| 449 | border:1px #CCC solid; | 450 | border:1px #CCC solid; |
| 450 | font-size:12px; | 451 | font-size:12px; |
| 451 | } | 452 | } */ |
| 452 | .suggestionsBox { | 453 | .suggestionsBox { |
| 453 | position: absolute; | 454 | position: absolute; |
| 454 | left: 136px; | 455 | left: 136px; |
| ... | @@ -621,7 +622,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -621,7 +622,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 621 | </div> | 622 | </div> |
| 622 | <div class="space-4"></div> | 623 | <div class="space-4"></div> |
| 623 | <div class="form-group"> | 624 | <div class="form-group"> |
| 624 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> Penanda Tangan *</label> | 625 | <!-- <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> Penanda Tangan *</label> |
| 625 | <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="Di isi sesuai Nama Penanda Tangan Surat." title="Penanda Tangan Surat Keluar">?</span> | 626 | <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="Di isi sesuai Nama Penanda Tangan Surat." title="Penanda Tangan Surat Keluar">?</span> |
| 626 | <div class="col-sm-4"> | 627 | <div class="col-sm-4"> |
| 627 | <input class="form-control" onKeyUp="suggestq(this.value);" placeholder="Penanda Tangan surat keluar" type="text" name="penandatangan" value="<?php if(isset($penandatangan)){ echo $penandatangan; }?>" id="penandatangan" required/> | 628 | <input class="form-control" onKeyUp="suggestq(this.value);" placeholder="Penanda Tangan surat keluar" type="text" name="penandatangan" value="<?php if(isset($penandatangan)){ echo $penandatangan; }?>" id="penandatangan" required/> |
| ... | @@ -629,7 +630,30 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -629,7 +630,30 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 629 | <div class="suggestionsBoxq" id="suggestionsq" style="display: none;"> <img src="./arrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" /> | 630 | <div class="suggestionsBoxq" id="suggestionsq" style="display: none;"> <img src="./arrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" /> |
| 630 | <div class="suggestionListq" id="suggestionsListq"> </div> | 631 | <div class="suggestionListq" id="suggestionsListq"> </div> |
| 631 | </div> | 632 | </div> |
| 632 | </div> | 633 | </div> --> |
| 634 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> Penanda Tangan *</label> | ||
| 635 | |||
| 636 | <a href="#my-modal2" role="button" class="blue" data-toggle="modal"><span class="ace-icon fa fa-search-plus bigger-130" data-placement="left"></span></a> | ||
| 637 | <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="Di isi sesuai dengan penanda tangan surat." title="Penanda Tangan">?</span> | ||
| 638 | <label class="col-sm-3 control-label no-padding-left" for="form-field-mask-1"> <a href="#selected-modal2" data-toggle="modal"><b class="m_selected2">0 Selected </b></a></label> | ||
| 639 | <!--div class="col-sm-6"> | ||
| 640 | <select multiple="" class="chosen-select form-control" id="m_tujuan" name="m_tujuan[]" data-placeholder="Pilih Tujuan Surat" required> | ||
| 641 | <?php | ||
| 642 | $UKerUser= $this->model->selectprepare("tag", $field=null, $params=null, $where=null, "Order by nama_pendek"); | ||
| 643 | if($UKerUser->rowCount() >= 1){ | ||
| 644 | ?> | ||
| 645 | <?php | ||
| 646 | while($dataUKerUser= $UKerUser->fetch(PDO::FETCH_OBJ)){ | ||
| 647 | $nip = $dataUKerUser->nip; | ||
| 648 | $ukt= $this->model->selectprepare("surat_keluar", $field=null, $params=null, $where=null, "WHERE FIND_IN_SET('{$nip}',UNQOUTE_LIST(penandatangan)) and id_sk={$skid}"); | ||
| 649 | $selected = ($ukt->rowCount() > 0 ) ? "selected" : 'xxx'; | ||
| 650 | ?> | ||
| 651 | <option value="<?php echo $dataUKerUser->nip;?>" <?php echo $selected; ?>><?php echo $dataUKerUser->nama_user." (".$dataUKerUser->nip.")";?></option> | ||
| 652 | <?php | ||
| 653 | } | ||
| 654 | }?> | ||
| 655 | </select> | ||
| 656 | </div--> | ||
| 633 | </div> | 657 | </div> |
| 634 | <div class="space-4"></div> | 658 | <div class="space-4"></div> |
| 635 | <div class="form-group"> | 659 | <div class="form-group"> |
| ... | @@ -680,21 +704,21 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -680,21 +704,21 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 680 | <div class="form-group"> | 704 | <div class="form-group"> |
| 681 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> Tembusan Surat *</label> | 705 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> Tembusan Surat *</label> |
| 682 | 706 | ||
| 683 | <a href="#my-modal2" role="button" class="blue" data-toggle="modal"><span class="ace-icon fa fa-search-plus bigger-130" data-placement="left"></span></a> | 707 | <a href="#my-modal" role="button" class="blue" data-toggle="modal"><span class="ace-icon fa fa-search-plus bigger-130" data-placement="left"></span></a> |
| 684 | <label class="col-sm-3 control-label no-padding-left" for="form-field-mask-1"> <a href="#selected-modal2" data-toggle="modal"><b class="m_selected2">0 Selected </b></a></label> | 708 | <label class="col-sm-3 control-label no-padding-left" for="form-field-mask-1"> <a href="#selected-modal" data-toggle="modal"><b class="m_selected">0 Selected </b></a></label> |
| 685 | </div> | 709 | </div> |
| 686 | <div class="space-4"></div> | 710 | <div class="space-4"></div> |
| 687 | <div class="form-group"> | 711 | <!-- <div class="form-group"> |
| 688 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> <?php echo $ketfile;?></label> | 712 | <label class="col-sm-2 control-label no-padding-right" for="form-field-mask-1"> <?php echo $ketfile;?></label> |
| 689 | <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="Pilih File surat keluar yang ingin di upload. Caranya klik menu Pilih File. Tipe file : .pdf, .jpg, .png" title="File surat keluar">?</span> | 713 | <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="Pilih File surat keluar yang ingin di upload. Caranya klik menu Pilih File. Tipe file : .pdf, .jpg, .png" title="File surat keluar">?</span> |
| 690 | <div class="col-sm-4"> | 714 | <div class="col-sm-4"> |
| 691 | <input class="form-control" type="file" name="filesk" id="id-input-file-1" <?php if(isset($validasifile)){ echo $validasifile; }?>/> | 715 | <input class="form-control" type="file" name="filesk" id="id-input-file-1" <?php if(isset($validasifile)){ echo $validasifile; }?>/> |
| 692 | </div> | 716 | </div> |
| 693 | </div> | 717 | </div> --> |
| 694 | <div class="clearfix form-actions"> | 718 | <div class="clearfix form-actions"> |
| 695 | <div class="col-md-offset-3 col-md-9"> | 719 | <div class="col-md-offset-3 col-md-9"> |
| 696 | <div class="col-sm-2"> | 720 | <div class="col-sm-2"> |
| 697 | <button type="submit" class="btn btn-info" type="button"> | 721 | <button onclick="return IsEmpty();" type="submit" class="btn btn-info" id="tombol" type="button" disabled> |
| 698 | <i class="ace-icon fa fa-check bigger-110"></i> | 722 | <i class="ace-icon fa fa-check bigger-110"></i> |
| 699 | Submit | 723 | Submit |
| 700 | </button> | 724 | </button> |
| ... | @@ -706,7 +730,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -706,7 +730,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 706 | <div class="modal-content"> | 730 | <div class="modal-content"> |
| 707 | <div class="modal-header"> | 731 | <div class="modal-header"> |
| 708 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | 732 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 709 | <h3 class="smaller lighter blue no-margin">SELECTED TEMBUSAN PEGAWAI</h3> | 733 | <h3 class="smaller lighter blue no-margin">SELECTED PENANDA TANGAN</h3> |
| 710 | </div> | 734 | </div> |
| 711 | 735 | ||
| 712 | <div class="modal-body munculkan2"> | 736 | <div class="modal-body munculkan2"> |
| ... | @@ -722,11 +746,32 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -722,11 +746,32 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 722 | </div><!-- /.modal-content --> | 746 | </div><!-- /.modal-content --> |
| 723 | </div><!-- /.modal-dialog --> | 747 | </div><!-- /.modal-dialog --> |
| 724 | </div> | 748 | </div> |
| 749 | <div id="selected-modal" class="modal fade" tabindex="-1"> | ||
| 750 | <div class="modal-dialog"> | ||
| 751 | <div class="modal-content"> | ||
| 752 | <div class="modal-header"> | ||
| 753 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
| 754 | <h3 class="smaller lighter blue no-margin">SELECTED TEMBUSAN PEGAWAI</h3> | ||
| 755 | </div> | ||
| 756 | |||
| 757 | <div class="modal-body munculkan"> | ||
| 758 | <!-- Disini muncul data dari Jquery --> | ||
| 759 | </div> | ||
| 760 | |||
| 761 | <div class="modal-footer"> | ||
| 762 | <button class="btn btn-sm btn-danger pull-right" data-dismiss="modal"> | ||
| 763 | <i class="ace-icon fa fa-times"></i> | ||
| 764 | Close | ||
| 765 | </button> | ||
| 766 | </div> | ||
| 767 | </div><!-- /.modal-content --> | ||
| 768 | </div><!-- /.modal-dialog --> | ||
| 769 | </div> | ||
| 725 | </form> | 770 | </form> |
| 726 | </div> | 771 | </div> |
| 727 | </div> | 772 | </div> |
| 728 | </div> | 773 | </div> |
| 729 | <div id="my-modal2" class="modal fade" tabindex="-1"> | 774 | <div id="my-modal" class="modal fade" tabindex="-1"> |
| 730 | <div class="modal-dialog"> | 775 | <div class="modal-dialog"> |
| 731 | <div class="modal-content"> | 776 | <div class="modal-content"> |
| 732 | <div class="modal-header"> | 777 | <div class="modal-header"> |
| ... | @@ -754,7 +799,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -754,7 +799,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 754 | <input placeholder="Search ..." class="nav-search-input" id="m_cari" autocomplete="off" type="text"> | 799 | <input placeholder="Search ..." class="nav-search-input" id="m_cari" autocomplete="off" type="text"> |
| 755 | <i class="ace-icon fa fa-search nav-search-icon"></i> | 800 | <i class="ace-icon fa fa-search nav-search-icon"></i> |
| 756 | </span> | 801 | </span> |
| 757 | <button type="submit" class="simpanbtl" hidden="hidden">P</button> | 802 | <!--<button type="submit" class="simpanbtl" hidden="hidden">P</button>--> |
| 803 | <button type="submit" class="btn btn-info btn-xs simpanbtl" style="margin-top:-4px;" ><span class="glyphicon glyphicon-search"></span></button> | ||
| 758 | </form> | 804 | </form> |
| 759 | </div> | 805 | </div> |
| 760 | </div> | 806 | </div> |
| ... | @@ -772,6 +818,76 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -772,6 +818,76 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 772 | <th>NIK</th> | 818 | <th>NIK</th> |
| 773 | <th>Nama</th> | 819 | <th>Nama</th> |
| 774 | <th>Jabatan</th> | 820 | <th>Jabatan</th> |
| 821 | <th>Departemen</th> | ||
| 822 | </tr> | ||
| 823 | </thead> | ||
| 824 | |||
| 825 | <tbody class="tampilkandata"> | ||
| 826 | </tbody> | ||
| 827 | </table> | ||
| 828 | </div> | ||
| 829 | |||
| 830 | <div class="modal-footer"> | ||
| 831 | <button class="btn btn-sm btn-info pull-left pilih_chk" data-dismiss="modal"> | ||
| 832 | Pilih | ||
| 833 | </button> | ||
| 834 | <button class="btn btn-sm btn-danger pull-right" data-dismiss="modal"> | ||
| 835 | <i class="ace-icon fa fa-times"></i> | ||
| 836 | Close | ||
| 837 | </button> | ||
| 838 | </div> | ||
| 839 | </div><!-- /.modal-content --> | ||
| 840 | </div><!-- /.modal-dialog --> | ||
| 841 | </div> | ||
| 842 | |||
| 843 | <div id="my-modal2" class="modal fade" tabindex="-1"> | ||
| 844 | <div class="modal-dialog"> | ||
| 845 | <div class="modal-content"> | ||
| 846 | <div class="modal-header"> | ||
| 847 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
| 848 | <h3 class="smaller lighter blue no-margin">SELURUH PEGAWAI</h3> | ||
| 849 | </div> | ||
| 850 | |||
| 851 | <div class="modal-body"> | ||
| 852 | <div class="form-group"> | ||
| 853 | <label class="col-sm-2 control-label no-padding-left" for="form-field-1"> Display</label> | ||
| 854 | <div class="col-sm-2"> | ||
| 855 | <select class="form-control1" id="m_display2"> | ||
| 856 | <option value="10">10</option> | ||
| 857 | <option value="25">25</option> | ||
| 858 | <option value="50">50</option> | ||
| 859 | <option value="100">100</option> | ||
| 860 | |||
| 861 | </select> | ||
| 862 | </div> | ||
| 863 | <label class="col-sm-2 control-label no-padding-left" for="form-field-1"> dari <span class="jumlahdata"></span> Data</label> | ||
| 864 | <div class="col-sm-6"> | ||
| 865 | <div class="nav-search" id="nav-search"> | ||
| 866 | <form class="form-search" action="javascript:" method="post"> | ||
| 867 | <span class="input-icon"> | ||
| 868 | <input placeholder="Search ..." class="nav-search-input" id="m_cari2" autocomplete="off" type="text"> | ||
| 869 | <i class="ace-icon fa fa-search nav-search-icon"></i> | ||
| 870 | </span> | ||
| 871 | <!--<button type="submit" class="simpanbtl" hidden="hidden">P</button>--> | ||
| 872 | <button type="submit" class="btn btn-info btn-xs simpanbtl2" style="margin-top:-4px;" ><span class="glyphicon glyphicon-search"></span></button> | ||
| 873 | </form> | ||
| 874 | </div> | ||
| 875 | </div> | ||
| 876 | </div> | ||
| 877 | <span class="loaderdata"></span> | ||
| 878 | <table id="simple-table2" class="table table-bordered table-hover"> | ||
| 879 | <thead> | ||
| 880 | <tr> | ||
| 881 | <th class="center"> | ||
| 882 | <label class="pos-rel"> | ||
| 883 | <input type="checkbox" class="ace" /> | ||
| 884 | <span class="lbl"></span> | ||
| 885 | </label> | ||
| 886 | </th> | ||
| 887 | <th>NIK</th> | ||
| 888 | <th>Nama</th> | ||
| 889 | <th>Jabatan</th> | ||
| 890 | <th>Departemen</th> | ||
| 775 | </tr> | 891 | </tr> |
| 776 | </thead> | 892 | </thead> |
| 777 | 893 | ||
| ... | @@ -792,6 +908,20 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -792,6 +908,20 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 792 | </div><!-- /.modal-content --> | 908 | </div><!-- /.modal-content --> |
| 793 | </div><!-- /.modal-dialog --> | 909 | </div><!-- /.modal-dialog --> |
| 794 | </div> | 910 | </div> |
| 911 | |||
| 912 | <script> | ||
| 913 | function IsEmpty() { | ||
| 914 | if (document.forms['formku'].penandatangan.value === "") { | ||
| 915 | alert("Harap diisi Penanda Tangan"); | ||
| 916 | return false; | ||
| 917 | }else if (document.forms['formku'].tembusan.value === "") { | ||
| 918 | alert("Harap diisi Tembusan Surat"); | ||
| 919 | return false; | ||
| 920 | } | ||
| 921 | return true; | ||
| 922 | } | ||
| 923 | </script> | ||
| 924 | |||
| 795 | <script src="assets/js/jquery-2.1.4.min.js"></script> | 925 | <script src="assets/js/jquery-2.1.4.min.js"></script> |
| 796 | <script type="text/javascript"> | 926 | <script type="text/javascript"> |
| 797 | $(document).ready(function () { | 927 | $(document).ready(function () { |
| ... | @@ -843,6 +973,24 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -843,6 +973,24 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 843 | if(this.checked) $row.addClass(active_class); | 973 | if(this.checked) $row.addClass(active_class); |
| 844 | else $row.removeClass(active_class); | 974 | else $row.removeClass(active_class); |
| 845 | }); | 975 | }); |
| 976 | |||
| 977 | $('#simple-table2 > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
| 978 | var th_checked = this.checked;//checkbox inside "TH" table header | ||
| 979 | |||
| 980 | $(this).closest('table').find('tbody > tr').each(function(){ | ||
| 981 | var row = this; | ||
| 982 | if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
| 983 | else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
| 984 | }); | ||
| 985 | }); | ||
| 986 | |||
| 987 | //select/deselect a row when the checkbox is checked/unchecked | ||
| 988 | $('#simple-table2').on('click', 'td input[type=checkbox]' , function(){ | ||
| 989 | var $row = $(this).closest('tr'); | ||
| 990 | if($row.is('.detail-row ')) return; | ||
| 991 | if(this.checked) $row.addClass(active_class); | ||
| 992 | else $row.removeClass(active_class); | ||
| 993 | }); | ||
| 846 | }); | 994 | }); |
| 847 | 995 | ||
| 848 | var m_display = $("#m_display").val(); | 996 | var m_display = $("#m_display").val(); |
| ... | @@ -856,21 +1004,51 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -856,21 +1004,51 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 856 | panggil_pegawais(key); | 1004 | panggil_pegawais(key); |
| 857 | }); | 1005 | }); |
| 858 | 1006 | ||
| 859 | $(".pilih_chk2").click(function() { | 1007 | var m_display2 = $("#m_display2").val(); |
| 1008 | panggil_pegawais(m_display2); | ||
| 1009 | $(".simpanbtl2").click(function(){ | ||
| 1010 | var key_cari2 = $("#m_cari2").val(); | ||
| 1011 | var m_display2 = $("#m_display2").val(); | ||
| 1012 | panggil_pegawais(m_display2, key_cari2); | ||
| 1013 | }); | ||
| 1014 | $("#m_display2").change(function(){ | ||
| 1015 | var key = $(this).val(); | ||
| 1016 | panggil_pegawais(key); | ||
| 1017 | }); | ||
| 1018 | |||
| 1019 | $(".pilih_chk").click(function() { | ||
| 1020 | $("#tombol").prop('disabled', false); | ||
| 860 | var jumlahid = 0; | 1021 | var jumlahid = 0; |
| 861 | $(".ace_pilih2").each(function(i){ | 1022 | $(".ace_pilih").each(function(i){ |
| 862 | if($(this).is(":checked")){ | 1023 | if($(this).is(":checked")){ |
| 863 | var keys = $(this).val(); | 1024 | var keys = $(this).val(); |
| 864 | 1025 | ||
| 865 | if($(".m_tembusan_"+keys).val() == undefined){ | 1026 | if($(".m_tembusan_"+keys).val() == undefined){ |
| 866 | $(".munculkan2").append('<p class="v_hapus_'+ keys +'"><a href="javascript:" onclick="v_hapus('+keys+')" class="v_hapus_'+ keys +'">X </a> '+$(this).attr('attrnama')+'</p><input type="hidden" name="m_tembusan[]" id="m_tembusan[]" class="m_tembusan m_tembusan_'+ keys +' v_hapus_'+ keys +'" value="'+keys+'">'); | 1027 | $(".munculkan").append('<p class="m_hapus_'+ keys +'"><a href="javascript:" onclick="m_hapus(\''+keys+'\')" class="m_hapus_'+ keys +'">X </a> '+$(this).attr('attrnama')+'</p><input type="hidden" name="m_tembusan[]" id="m_tembusan[]" class="m_tembusan m_tembusan_'+ keys +' m_hapus_'+ keys +'" value="'+keys+'">'); |
| 867 | } | 1028 | } |
| 868 | 1029 | ||
| 869 | jumlahid++; | 1030 | jumlahid++; |
| 870 | } | 1031 | } |
| 871 | }); | 1032 | }); |
| 872 | var dataTembusan = $(".m_tembusan").length; | 1033 | var dataTembusan = $(".m_tembusan").length; |
| 873 | $(".m_selected2").html(dataTembusan+" Selected"); | 1034 | $(".m_selected").html(dataTembusan+" Selected"); |
| 1035 | }); | ||
| 1036 | |||
| 1037 | $(".pilih_chk2").click(function() { | ||
| 1038 | var jumlahid = 0; | ||
| 1039 | $(".ace_pilih3").each(function(i){ | ||
| 1040 | if($(this).is(":checked")){ | ||
| 1041 | var keys = $(this).val(); | ||
| 1042 | |||
| 1043 | if($(".p_penandatangan_"+keys).val() == undefined){ | ||
| 1044 | $(".munculkan2").append('<p class="p_hapus_'+ keys +'"><a href="javascript:" onclick="p_hapus(\''+keys+'\')" class="p_hapus_'+ keys +'">X </a> '+$(this).attr('attrnama')+'</p><input type="hidden" name="p_penandatangan[]" id="p_penandatangan[]" class="p_penandatangan p_penandatangan_'+ keys +' p_hapus_'+ keys +'" value="'+keys+'">'); | ||
| 1045 | } | ||
| 1046 | |||
| 1047 | jumlahid++; | ||
| 1048 | } | ||
| 1049 | }); | ||
| 1050 | var dataPenandatangan = $(".p_penandatangan").length; | ||
| 1051 | $(".m_selected2").html(dataPenandatangan+" Selected"); | ||
| 874 | }); | 1052 | }); |
| 875 | 1053 | ||
| 876 | function panggil_pegawais(m_display = "", m_cari = ""){ | 1054 | function panggil_pegawais(m_display = "", m_cari = ""){ |
| ... | @@ -889,8 +1067,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -889,8 +1067,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 889 | }, | 1067 | }, |
| 890 | success: function (response) { | 1068 | success: function (response) { |
| 891 | $(".loaderdata").hide(); | 1069 | $(".loaderdata").hide(); |
| 892 | //$(".tampilkandata").html(response.html); | 1070 | $(".tampilkandata").html(response.html); |
| 893 | $(".tampilkandata2").html(response.html2); | 1071 | $(".tampilkandata2").html(response.html3); |
| 894 | $(".jumlahdata").html("<b>"+response.jumlahdata+"</b>"); | 1072 | $(".jumlahdata").html("<b>"+response.jumlahdata+"</b>"); |
| 895 | } | 1073 | } |
| 896 | }); | 1074 | }); |
| ... | @@ -899,7 +1077,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ | ... | @@ -899,7 +1077,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ |
| 899 | function v_hapus(id = ""){ | 1077 | function v_hapus(id = ""){ |
| 900 | $(".v_hapus_"+id).remove(); | 1078 | $(".v_hapus_"+id).remove(); |
| 901 | var dataTembusan = $(".m_tembusan").length; | 1079 | var dataTembusan = $(".m_tembusan").length; |
| 902 | $(".m_selected2").html(dataTembusan+" Selected"); | 1080 | $(".m_selected").html(dataTembusan+" Selected"); |
| 1081 | } | ||
| 1082 | |||
| 1083 | function p_hapus(id = ""){ | ||
| 1084 | $(".p_hapus_"+id).remove(); | ||
| 1085 | var dataPenandatangan = $(".p_penandatangan").length; | ||
| 1086 | $(".m_selected2").html(dataPenandatangan+" Selected"); | ||
| 903 | } | 1087 | } |
| 904 | </script> | 1088 | </script> |
| 905 | <?php }?> | 1089 | <?php }?> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment