Fixed the application not working on IE8 due to missing console object.
This commit is contained in:
parent
f52e3ad109
commit
bdcf202adb
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "JSON Editor",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "JSON Editor is a tool to view, edit, and format JSON. It shows your data in an editable treeview and in a code editor.",
|
||||
"app": {
|
||||
"urls": [
|
||||
|
|
|
@ -319,7 +319,10 @@ app.resize = function() {
|
|||
else {
|
||||
// both editor and formatter visible
|
||||
splitterLeft = width * value - splitterWidth / 2;
|
||||
domSplitterDrag.innerHTML = '⋮';
|
||||
|
||||
// TODO: find a character with vertical dots that works on IE8 too, or use an image
|
||||
var isIE8 = (jsoneditor.util.getInternetExplorerVersion() == 8);
|
||||
domSplitterDrag.innerHTML = (!isIE8) ? '⋮' : '|';
|
||||
domSplitterDrag.title = 'Drag left or right to change the width of the panels';
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
|
||||
<div id="footer">
|
||||
<div id="footer-inner">
|
||||
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.1.0</a>
|
||||
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.1.1</a>
|
||||
•
|
||||
<a href="changelog.txt" target="_blank" class="footer">Changelog</a>
|
||||
•
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
|
||||
<div id="footer">
|
||||
<div id="footer-inner">
|
||||
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.1.0</a>
|
||||
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.1.1</a>
|
||||
•
|
||||
<a href="../../changelog.txt" target="_blank" class="footer">Changelog</a>
|
||||
•
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<project name="jsoneditor-builder" default="main">
|
||||
<!-- the version number of must be updated here (according to changelog.txt) -->
|
||||
<property name="version" value="2.1.0"/>
|
||||
<property name="version" value="2.1.1"/>
|
||||
|
||||
<!-- compression tools -->
|
||||
<property name="compressor" value="tools/yuicompressor-2.4.7.jar" />
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
http://jsoneditoronline.org
|
||||
|
||||
|
||||
## 2013-03-11, version 2.1.1
|
||||
|
||||
- Fixed an issue with console outputs on IE8, causing the editor not to work
|
||||
at all on IE8.
|
||||
|
||||
|
||||
## 2013-03-08, version 2.1.0
|
||||
|
||||
- Replaced the plain text editor with code editor Ace, which brings in syntax
|
||||
|
|
|
@ -46,6 +46,13 @@ if (!Array.prototype.forEach) {
|
|||
}
|
||||
}
|
||||
|
||||
// Old browsers do not have a console, so create a fake one in that case.
|
||||
if (typeof console === 'undefined') {
|
||||
console = {
|
||||
log: function () {}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse JSON using the parser built-in in the browser.
|
||||
* On exception, the jsonString is validated and a detailed error is thrown.
|
||||
|
|
Loading…
Reference in New Issue