Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2015-05-21 04:41:57 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-05-21 04:41:57 +0300
commit070e549a820e60445d330a8da82827679fb84302 (patch)
tree30609dfe854ce89ef2b883f7bec1d6b928f36a71 /js/functions.js
parenta9cd7d5604a2b86fe8f18e63344d79e3317f1368 (diff)
Make CodeMirror editors resizable
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/functions.js')
-rw-r--r--js/functions.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/js/functions.js b/js/functions.js
index 97b9665088..b6cc7f729a 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1863,8 +1863,16 @@ function bindCodeMirrorToInlineEditor() {
mode: "text/x-mysql",
lineWrapping: true
});
+ $(codemirror_inline_editor.getWrapperElement())
+ .css('resize', 'vertical')
+ .resizable({
+ handles: 'n, s',
+ resize: function() {
+ codemirror_inline_editor.setSize($(this).width(), $(this).height());
+ }
+ });
codemirror_inline_editor.on("inputRead", codemirrorAutocompleteOnInputRead);
- codemirror_inline_editor.getScrollerElement().style.height = height;
+ codemirror_inline_editor.getWrapperElement().style.height = height;
codemirror_inline_editor.refresh();
codemirror_inline_editor.focus();
$(codemirror_inline_editor.getWrapperElement()).bind(
@@ -4069,6 +4077,14 @@ AJAX.registerOnload('functions.js', function () {
mode: "text/x-mysql",
lineWrapping: true
});
+ $(codemirror_editor.getWrapperElement())
+ .css('resize', 'vertical')
+ .resizable({
+ handles: 'n, s',
+ resize: function() {
+ codemirror_editor.setSize($(this).width(), $(this).height());
+ }
+ });
codemirror_editor.on("inputRead", codemirrorAutocompleteOnInputRead);
codemirror_editor.on("blur", updateQueryParameters);
codemirror_editor.focus();