Skip to content

Commit

Permalink
Progress bar for Foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Kampert committed Aug 18, 2014
1 parent 9fd74ab commit fa1bf4e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/themes/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ JSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({
if(!input.errmsg) return;
input.group.className = input.group.className.replace(/ error/g,'');
input.errmsg.style.display = 'none';
},
getProgressBar: function() {
var progressBar = document.createElement('div');
progressBar.className = 'progress';

var meter = document.createElement('span');
meter.className = 'meter';
meter.style.width = '0%';
progressBar.appendChild(meter);
return progressBar;
},
updateProgressBar: function(progressBar, progress) {
if (!progressBar) return;
progressBar.firstChild.style.width = progress + '%';
},
updateProgressBarUnknown: function(progressBar) {
if (!progressBar) return;
progressBar.firstChild.style.width = '100%';
}
});

Expand Down

0 comments on commit fa1bf4e

Please sign in to comment.