<?php
$url = Plugin::get('URL',"imgedit");

return '
<script type="text/javascript">
$(document).ready(function() {
    $("body").on("click","#show_img_editor",function() {
        $("#meta_box").html();
        $.ajax({
            type: "GET",
            url: "'.Plugin::getFile("imgedit", "imageeditor").'",
             success : function(text) {
                 $("#meta_box").empty().html(text);
                 $("#meta_box").fadeIn();
             }
        });
    });
    
    window.show_imgedit_options = function(that){
        that.contentEditable = false;
        console.log("test");
        console.log($(that).parent());
        $.ajax({
            type: "GET",
            url: "'.Plugin::getFile("imgedit", "options").'",
             success : function(text) {
                 $("#meta_box").empty().html(text);
                 $("#meta_box").fadeIn();
             }
        });
    }
});
</script>
<script src="'.$url.'js/cropper.min.js"></script>
<script src="'.$url.'js/ui.js"></script>
<script src="'.$url.'js/bricklayer.js"></script>
';

?>
