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-04-02 08:31:23 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-04-02 08:31:23 +0300
commit57e21caab1eb1fff11c4f79501a9b8dd94dd91d8 (patch)
treecb4335c15f7c5a4845774a3fde410e3a82c44e60 /js/transformations
parent850788d2b15c4340bb32e684a4a235f7c2a697d2 (diff)
bug #4828 JavaScript is loaded in wrong order
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/transformations')
-rw-r--r--js/transformations/json.js10
-rw-r--r--js/transformations/xml.js8
2 files changed, 7 insertions, 11 deletions
diff --git a/js/transformations/json.js b/js/transformations/json.js
index d2cd111ee3..98c4b33c40 100644
--- a/js/transformations/json.js
+++ b/js/transformations/json.js
@@ -3,18 +3,16 @@
* JSON syntax highlighting transformation plugin
*/
AJAX.registerOnload('transformations/json.js', function() {
- var $elm = $('#page_content').find('code.json');
- $elm.each(function () {
+ var $elm = $('#page_content').find('code.json');
+ $elm.each(function () {
var $json = $(this);
var $pre = $json.find('pre');
/* We only care about visible elements to avoid double processing */
if ($pre.is(":visible")) {
var $highlight = $('<div class="json-highlight cm-s-default"></div>');
$json.append($highlight);
- if (typeof CodeMirror != 'undefined') {
- CodeMirror.runMode($json.text(), 'application/json', $highlight[0]);
- $pre.hide();
- }
+ CodeMirror.runMode($json.text(), 'application/json', $highlight[0]);
+ $pre.hide();
}
});
}); \ No newline at end of file
diff --git a/js/transformations/xml.js b/js/transformations/xml.js
index c6ed64b1f1..dd4eef6602 100644
--- a/js/transformations/xml.js
+++ b/js/transformations/xml.js
@@ -3,7 +3,7 @@
* XML syntax highlighting transformation plugin
*/
AJAX.registerOnload('transformations/xml.js', function() {
- var $elm = $('#page_content').find('code.xml');
+ var $elm = $('#page_content').find('code.xml');
$elm.each(function () {
var $json = $(this);
var $pre = $json.find('pre');
@@ -11,10 +11,8 @@ AJAX.registerOnload('transformations/xml.js', function() {
if ($pre.is(":visible")) {
var $highlight = $('<div class="xml-highlight cm-s-default"></div>');
$json.append($highlight);
- if (typeof CodeMirror != 'undefined') {
- CodeMirror.runMode($json.text(), 'application/xml', $highlight[0]);
- $pre.hide();
- }
+ CodeMirror.runMode($json.text(), 'application/xml', $highlight[0]);
+ $pre.hide();
}
});
});