Use new message format for progress reporting

This commit is contained in:
Winston Chang
2014-07-23 12:47:17 -05:00
parent d36317c563
commit 7319c88674
2 changed files with 8 additions and 3 deletions

View File

@@ -419,7 +419,12 @@ ShinySession <- setRefClass(
.progressKeys <<- c(.progressKeys, id)
json <- toJSON(list(progress=list(id)))
json <- toJSON(list(
progress = list(
type = 'binding',
id = id
)
))
.write(json)
},

View File

@@ -887,8 +887,8 @@
addMessageHandler('progress', function(message) {
$(document.documentElement).addClass('shiny-busy');
for (var i = 0; i < message.length; i++) {
var key = message[i];
if (message.type === 'binding') {
var key = message.id;
var binding = this.$bindings[key];
if (binding && binding.showProgress) {
binding.showProgress(true);