mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
updates to input_binding_actionbutton.js and got rid of isIcon function (substituted by simple check instead)
This commit is contained in:
@@ -25,11 +25,13 @@ $.extend(actionButtonInputBinding, {
|
||||
return { value: this.getValue(el) };
|
||||
},
|
||||
receiveMessage: function(el, data) {
|
||||
var $el = $(el);
|
||||
|
||||
// retrieve current label and icon
|
||||
var label = $(el).text();
|
||||
var label = $el.text();
|
||||
var icon = '';
|
||||
if ($(el).children().length===1) {
|
||||
var icon_html = $(el).children()[0];
|
||||
if ($el.find('i.fa, i.glyphicon').length > 0) {
|
||||
var icon_html = $el.find('i.fa, i.glyphicon')[0];
|
||||
icon = $(icon_html).prop('outerHTML');
|
||||
}
|
||||
|
||||
@@ -42,8 +44,7 @@ $.extend(actionButtonInputBinding, {
|
||||
}
|
||||
|
||||
// produce new html
|
||||
$(el).html(icon + ' ' + label);
|
||||
$(el).trigger('change');
|
||||
$el.html(icon + ' ' + label);
|
||||
},
|
||||
unsubscribe: function(el) {
|
||||
$(el).off(".actionButtonInputBinding");
|
||||
|
||||
Reference in New Issue
Block a user