Merge remote-tracking branch 'origin/QA_3_5'

This commit is contained in:
Pootle server 2012-02-01 12:09:22 +01:00
commit 14001295a1
3 changed files with 22 additions and 2 deletions

View File

@ -1150,8 +1150,25 @@ $(document).ready(function(){
new_content += "<input type=\"button\" class=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\">\n";
new_content += "<input type=\"button\" class=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">\n";
$inner_sql.replaceWith(new_content);
// These settings are duplicated from the .ready()function in functions.js
var height = $('#sql_query_edit').css('height');
codemirror_editor = CodeMirror.fromTextArea($('textarea[name="sql_query_edit"]')[0], {
lineNumbers: true,
matchBrackets: true,
indentUnit: 4,
mode: "text/x-mysql",
lineWrapping: true
});
codemirror_editor.getScrollerElement().style.height = height;
codemirror_editor.refresh();
$(".btnSave").click(function(){
var sql_query = $(this).prev().val();
if (codemirror_editor !== undefined) {
var sql_query = codemirror_editor.getValue();
} else {
var sql_query = $(this).prev().val();
}
var $fake_form = $('<form>', {action: 'import.php', method: 'post'})
.append($form.find("input[name=server], input[name=db], input[name=table], input[name=token]").clone())
.append($('<input>', {type: 'hidden', name: 'show_query', value: 1}))

View File

@ -20,6 +20,10 @@ $GLOBALS['js_include'][] = 'tbl_change.js';
// the next one needed because sql.php may do a "goto" to tbl_structure.php
$GLOBALS['js_include'][] = 'tbl_structure.js';
$GLOBALS['js_include'][] = 'gis_data_editor.js';
$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
if (isset($_SESSION['profiling'])) {
$GLOBALS['js_include'][] = 'highcharts/highcharts.js';

View File

@ -1,4 +1,3 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**