The branch, master has been updated via fc387fe531b6ca1e95f3ba1ad6fbcc499e0f2ccf (commit) from fbc2bbdc49865d8dc39f80e0ea70e5d26da39ec7 (commit)
- Log ----------------------------------------------------------------- commit fc387fe531b6ca1e95f3ba1ad6fbcc499e0f2ccf Author: Michal Čihař mcihar@suse.cz Date: Wed Jul 20 15:10:20 2011 +0200
Load codemirror only when needed
This needs verification with ajax requests.
-----------------------------------------------------------------------
Summary of changes: db_events.php | 2 ++ db_routines.php | 2 ++ db_sql.php | 2 ++ db_triggers.php | 2 ++ libraries/header_scripts.inc.php | 2 -- server_sql.php | 2 ++ tbl_sql.php | 2 ++ 7 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/db_events.php b/db_events.php index c4397e7..9991f83 100644 --- a/db_events.php +++ b/db_events.php @@ -19,6 +19,8 @@ $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js'; $GLOBALS['js_include'][] = 'jquery/timepicker.js'; $GLOBALS['js_include'][] = 'rte/common.js'; $GLOBALS['js_include'][] = 'rte/events.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/** * Include all other files diff --git a/db_routines.php b/db_routines.php index 739e69a..745d1f9 100644 --- a/db_routines.php +++ b/db_routines.php @@ -21,6 +21,8 @@ $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js'; $GLOBALS['js_include'][] = 'jquery/timepicker.js'; $GLOBALS['js_include'][] = 'rte/common.js'; $GLOBALS['js_include'][] = 'rte/routines.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/** * Include all other files diff --git a/db_sql.php b/db_sql.php index 26a6299..38074e9 100644 --- a/db_sql.php +++ b/db_sql.php @@ -16,6 +16,8 @@ require_once './libraries/common.inc.php'; $GLOBALS['js_include'][] = 'functions.js'; $GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
require './libraries/db_common.inc.php'; require_once './libraries/sql_query_form.lib.php'; diff --git a/db_triggers.php b/db_triggers.php index aef1642..4911f36 100644 --- a/db_triggers.php +++ b/db_triggers.php @@ -18,6 +18,8 @@ require_once './libraries/common.lib.php'; $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js'; $GLOBALS['js_include'][] = 'rte/common.js'; $GLOBALS['js_include'][] = 'rte/triggers.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/** * Include all other files diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php index 2e0a9ca..c25aa99 100644 --- a/libraries/header_scripts.inc.php +++ b/libraries/header_scripts.inc.php @@ -39,8 +39,6 @@ if (isset($GLOBALS['db'])) { $params['db'] = $GLOBALS['db']; } $GLOBALS['js_include'][] = 'messages.php' . PMA_generate_common_url($params); -$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; -$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/** * Here we add a timestamp when loading the file, so that users who diff --git a/server_sql.php b/server_sql.php index f8609f4..ddf90ed 100644 --- a/server_sql.php +++ b/server_sql.php @@ -16,6 +16,8 @@ require_once './libraries/common.inc.php'; $GLOBALS['js_include'][] = 'functions.js'; $GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
require_once './libraries/server_common.inc.php'; require_once './libraries/sql_query_form.lib.php'; diff --git a/tbl_sql.php b/tbl_sql.php index 0321395..70f2177 100644 --- a/tbl_sql.php +++ b/tbl_sql.php @@ -16,6 +16,8 @@ require_once './libraries/common.inc.php'; $GLOBALS['js_include'][] = 'functions.js'; $GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js'; +$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; +$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
require './libraries/tbl_common.php'; $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php';
hooks/post-receive