주소 복사 뷰스킨 적용

주소 복사 뷰스킨 적용

정한솔 0 7003

주소 복사 뷰스킨 적용 

 

<script src="../js/clipboard.min.js"></script>

<script>

var clipboard = new Clipboard('.btn-clipboard-subject', {

        text: function() {

             return 'http://<?php echo $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; ?>';

        }

    });

  

    clipboard.on('success', function(e) {

        console.log(e);

    });

  

    clipboard.on('error', function(e) {

        console.log(e);

    });

</script>

<style>

button.btn-clipboard-subject {display:inline-block;margin:0;padding:5px 7px;line-height:12px;border:0px solid #ccc;background:#FFFFFF;color:#555;text-decoration:none}

button.btn-clipboard-subject:focus, button.btn-clipboard-subject:hover {color:#000}

</style>

 

<?php if(G5_IS_MOBILE) {?>

<div class="list-group-item break-word" style="padding:5px 8px; border-width:0px 0px 1px 0px;">

<button class="btn-clipboard-subject cursor at-tip" data-toggle="tooltip" data-trigger="hover" data-placement="top" data-original-title="주소가 복사되었습니다."><i class="fa fa-share-alt"></i> 주소복사 : <?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&wr_id=".$view['wr_id'];?></button></div>

<?php } ?>

<?php if(!G5_IS_MOBILE) {?>

<div class="list-group-item break-word" style="padding:5px 8px; border-width:0px 0px 1px 0px;">

<button class="btn-clipboard-subject cursor at-tip" data-toggle="tooltip" data-trigger="click focus" data-placement="right" data-original-title="주소가 복사되었습니다."><i class="fa fa-share-alt"></i> 주소복사 : <?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&wr_id=".$view['wr_id'];?></button></div>

<?php } ?>





0 Comments