Skip to content

Commit

Permalink
Possibility to specify a theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Kampert committed Aug 18, 2014
1 parent 85dc5ab commit b7e5837
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ <h1>JSON Editor Upload Example</h1>
<button id='submit'>Submit (console.log)</button>

<script>
// Specify theme
JSONEditor.defaults.options.theme = 'html';

// Specify upload handler
JSONEditor.defaults.options.upload = function(type, file, cbs) {
var tick = 0;
Expand All @@ -22,7 +25,7 @@ <h1>JSON Editor Upload Example</h1>

if (tick < 100) {
cbs.updateProgress(tick);
window.setTimeout(tickFunction, 10)
window.setTimeout(tickFunction, 50)
} else if (tick == 100) {
cbs.updateProgress();
window.setTimeout(tickFunction, 500)
Expand All @@ -31,7 +34,7 @@ <h1>JSON Editor Upload Example</h1>
}
};

window.setTimeout(tickFunction, 50)
window.setTimeout(tickFunction)
};

// Initialize the editor with a JSON schema
Expand Down

0 comments on commit b7e5837

Please sign in to comment.