Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Show Raw JSON button will not be displayed on older browsers without …

…an implementation of the JSON object.
  • Loading branch information...
commit 9f4ff3ffbba9b1a06d6802125f27f7537dc8cc1b 1 parent 66394ec
@Hillgod Hillgod authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/es/widgets.js
View
6 lib/es/widgets.js
@@ -1473,9 +1473,11 @@
_searchSource_handler: function(src) {
var searchSourceDiv = this.el.find("DIV.es-searchSource");
- var showRawJSON = $({ tag: "BUTTON", type: "button", text: "Show Raw JSON", id: "showRawJSON", value: JSON.stringify(src), onclick: this._showRawJSON });
searchSourceDiv.empty().append(new es.JsonPretty({ obj: src }));
- searchSourceDiv.append(showRawJSON);
+ if(typeof JSON !== "undefined") {
+ var showRawJSON = $({ tag: "BUTTON", type: "button", text: "Show Raw JSON", id: "showRawJSON", value: JSON.stringify(src), onclick: this._showRawJSON });
+ searchSourceDiv.append(showRawJSON);
+ }
searchSourceDiv.show();
},
Please sign in to comment.
Something went wrong with that request. Please try again.