diff --git a/classes/modules/adminModule.php b/classes/modules/adminModule.php index a770470f784553cf35fce4344daaa068e4693b4e..33cdd6b6077e7caf432d6bc72a177e3db645b7ee 100644 --- a/classes/modules/adminModule.php +++ b/classes/modules/adminModule.php @@ -168,8 +168,10 @@ class AdminModule extends abstractModule{ <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> <h3>Embed this code</h3> </div> - <div id='embed-body' class='modal-body'> - + <div class='modal-body'> + <form class='form-inline'><fieldset><label>Width:</label> <input type='text' class='input-small embed-size' id='embed-width' value='600px'/> <label>Height:</label> <input type='text' class='input-small embed-size' id='embed-height' value='400px'/></fieldset></form> + <div id='embed-body'> + </div> </div> <div class='modal-footer'> <a href='#' class='btn' data-dismiss='modal'>Close</a> diff --git a/doc/examples/originalComponents/static/admin/img/wordcloud.png b/doc/examples/originalComponents/static/admin/img/wordcloud.png index f21dedbee1498475d0ef91cc0b4d58aef0ee96fc..dcf8f65f6c95ddc117965f80d00252cb0f567f1e 100644 Binary files a/doc/examples/originalComponents/static/admin/img/wordcloud.png and b/doc/examples/originalComponents/static/admin/img/wordcloud.png differ diff --git a/doc/examples/originalComponents/static/admin/js/editor.js b/doc/examples/originalComponents/static/admin/js/editor.js index ad78f213bd11cf317aad240651286e4d8d6d39ff..acb5303576b8086a418a0efb0006c7e227963d41 100644 --- a/doc/examples/originalComponents/static/admin/js/editor.js +++ b/doc/examples/originalComponents/static/admin/js/editor.js @@ -112,6 +112,15 @@ $(document).ready(function(){ } }); + function updateEmbeddableCode(e){ + var url = $("#embed-button").attr('data-url').replace("../", home); + var width = $("#embed-width").val(), + height = $("#embed-height").val(); + var code = "<iframe src='"+url+"' style='overflow-x: hidden;overflow-y: hidden;' frameborder='0' width='"+width+"' height='"+height+"'></iframe>"; + $("#embed-body").html(code); + $("#embed-box").modal('show'); + } + function executePost(url, data, message){ $.ajax({ type: 'POST', @@ -380,11 +389,8 @@ $(document).ready(function(){ } }); - $("#embed-button").on('click', function(e){ - var url = $(this).attr('data-url').replace("../", home); - var code = "<iframe src='"+url+"' style='overflow-x: hidden;overflow-y: hidden;' frameborder='0' width='600px' height='400px'></iframe>"; - $("#embed-body").html(code); - $("#embed-box").modal('show'); - }) + $("#embed-button").on('click', updateEmbeddableCode); + $(".embed-size").on('keyup', updateEmbeddableCode); + } });