|
|
@ -74,6 +74,8 @@ if (file_exists($tagslang)) { |
|
|
file_put_contents($tagslang, print_r($tmp, true)); |
|
|
file_put_contents($tagslang, print_r($tmp, true)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$images = get_gallery(); |
|
|
|
|
|
|
|
|
?>
|
|
|
?>
|
|
|
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> |
|
|
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> |
|
|
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> |
|
|
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> |
|
|
@ -248,12 +250,32 @@ $( function() { |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
.wmd-prompt-background {z-index:10!important;} |
|
|
|
|
|
#wmd-preview img {max-width:100%;}
|
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
.wmd-prompt-background {z-index:10!important;} |
|
|
|
|
|
#wmd-preview img {max-width:100%;}
|
|
|
|
|
|
.cover-container { |
|
|
|
|
|
height: 200px; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
overflow-x: scroll; |
|
|
|
|
|
overflow-y: hidden; |
|
|
|
|
|
} |
|
|
|
|
|
.cover-item { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
margin: 2px 2px; |
|
|
|
|
|
border-top-right-radius: 2px; |
|
|
|
|
|
width: 200px; |
|
|
|
|
|
height: 150px; |
|
|
|
|
|
vertical-align: top; |
|
|
|
|
|
background-position: top left; |
|
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
|
background-size: cover; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true"> |
|
|
<div class="modal fade" id="insertImageDialog" tabindex="-1" role="dialog" aria-labelledby="insertImageDialogTitle" aria-hidden="true"> |
|
|
<div class="modal-dialog modal-dialog-centered" role="document"> |
|
|
|
|
|
|
|
|
<div class="modal-dialog modal-lg" role="document"> |
|
|
<div class="modal-content"> |
|
|
<div class="modal-content"> |
|
|
<div class="modal-header"> |
|
|
<div class="modal-header"> |
|
|
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
|
|
|
<h5 class="modal-title" id="insertImageDialogTitle"><?php echo i18n('Insert_Image');?></h5>
|
|
|
@ -262,6 +284,18 @@ $( function() { |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="modal-body"> |
|
|
<div class="modal-body"> |
|
|
|
|
|
<?php if (!empty($images)) :?>
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
<div class="row-fluid cover-container"> |
|
|
|
|
|
<?php foreach ($images as $img):?>
|
|
|
|
|
|
<div class="cover-item"> |
|
|
|
|
|
<img class="img-thumbnail the-img" src="<?php echo site_url() . $img['dirname'] . '/' . $img['basename']?>"> |
|
|
|
|
|
</div> |
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<hr> |
|
|
|
|
|
<?php endif;?>
|
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label for="insertImageDialogURL">URL</label> |
|
|
<label for="insertImageDialogURL">URL</label> |
|
|
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" /> |
|
|
<input type="text" class="form-control" id="insertImageDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" /> |
|
|
@ -279,9 +313,9 @@ $( function() { |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<?php if ($type == 'is_image'):?>
|
|
|
<div class="modal fade" id="insertMediaDialog" tabindex="-1" role="dialog" aria-labelledby="insertMediaDialogTitle" aria-hidden="true"> |
|
|
<div class="modal fade" id="insertMediaDialog" tabindex="-1" role="dialog" aria-labelledby="insertMediaDialogTitle" aria-hidden="true"> |
|
|
<div class="modal-dialog modal-dialog-centered" role="document"> |
|
|
|
|
|
|
|
|
<div class="modal-dialog modal-lg" role="document"> |
|
|
<div class="modal-content"> |
|
|
<div class="modal-content"> |
|
|
<div class="modal-header"> |
|
|
<div class="modal-header"> |
|
|
<h5 class="modal-title" id="insertMediaDialogTitle"><?php echo i18n('Insert_Image');?></h5>
|
|
|
<h5 class="modal-title" id="insertMediaDialogTitle"><?php echo i18n('Insert_Image');?></h5>
|
|
|
@ -290,6 +324,18 @@ $( function() { |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="modal-body"> |
|
|
<div class="modal-body"> |
|
|
|
|
|
<?php if (!empty($images)) :?>
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
<div class="row-fluid cover-container"> |
|
|
|
|
|
<?php foreach ($images as $img):?>
|
|
|
|
|
|
<div class="cover-item"> |
|
|
|
|
|
<img class="img-thumbnail the-img" src="<?php echo site_url() . $img['dirname'] . '/' . $img['basename']?>"> |
|
|
|
|
|
</div> |
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<hr> |
|
|
|
|
|
<?php endif;?>
|
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label for="insertMediaDialogURL">URL</label> |
|
|
<label for="insertMediaDialogURL">URL</label> |
|
|
<input type="text" class="form-control" id="insertMediaDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" /> |
|
|
<input type="text" class="form-control" id="insertMediaDialogURL" size="48" placeholder="<?php echo i18n('Enter_image_URL');?>" /> |
|
|
@ -306,9 +352,17 @@ $( function() { |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<?php endif;?>
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<!-- Declare the base path. Important --> |
|
|
<!-- Declare the base path. Important --> |
|
|
<script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> |
|
|
<script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/editor.js"></script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/editor.js"></script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/resources/js/media.uploader.js"></script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/resources/js/media.uploader.js"></script> |
|
|
|
|
|
<script> |
|
|
|
|
|
$('.the-img').click(function(e) { |
|
|
|
|
|
$('#insertMediaDialogURL').val($(e.target).attr('src')); |
|
|
|
|
|
$('#insertImageDialogURL').val($(e.target).attr('src')); |
|
|
|
|
|
}); |
|
|
|
|
|
</script> |