diff --git a/ChangeLog b/ChangeLog index a0c4a03e29..155813e169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ phpMyAdmin - ChangeLog - issue #13095 Fixed alignmnet of foreign keys editing - issue #12944 Improved inline editor for JSON - issue #13145 Improved layout of operations pages +- issue #13448 Add "format" query button in edit view form 4.7.3 (not yet released) - issue #13447 Large multi-line query removes Export operation and blanks query box options diff --git a/js/functions.js b/js/functions.js index 107daf8934..3789aa158d 100644 --- a/js/functions.js +++ b/js/functions.js @@ -4721,21 +4721,21 @@ AJAX.registerOnload('functions.js', function () { }); // end $(document).on() } - syntaxHighlighter = PMA_getSQLEditor($('textarea[name="view[as]"]')); + codemirror_editor = PMA_getSQLEditor($('textarea[name="view[as]"]')); }); function PMA_createViewDialog($this) { var $msg = PMA_ajaxShowMessage(); - var syntaxHighlighter = null; + var codemirror_editor = null; $.get($this.attr('href') + '&ajax_request=1&ajax_dialog=1', function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxRemoveMessage($msg); var buttonOptions = {}; buttonOptions[PMA_messages.strGo] = function () { if (typeof CodeMirror !== 'undefined') { - syntaxHighlighter.save(); + codemirror_editor.save(); } $msg = PMA_ajaxShowMessage(); $.post('view_create.php', $('#createViewDialog').find('form').serialize(), function (data) { @@ -4763,7 +4763,7 @@ function PMA_createViewDialog($this) } }); // Attach syntax highlighted editor - syntaxHighlighter = PMA_getSQLEditor($dialog.find('textarea')); + codemirror_editor = PMA_getSQLEditor($dialog.find('textarea')); $('input:visible[type=text]', $dialog).first().focus(); } else { PMA_ajaxShowMessage(data.error); diff --git a/templates/view_create.twig b/templates/view_create.twig new file mode 100644 index 0000000000..45ac37767e --- /dev/null +++ b/templates/view_create.twig @@ -0,0 +1,123 @@ + +