Change data to attr in inline subscribe buttons

(imported from commit 72fef9dd3cb58ff15e74709b0470033a7f8796b4)
This commit is contained in:
Jason Michalski
2014-03-05 16:15:57 -05:00
parent 0494e40c39
commit 1a47683d32

View File

@@ -67,7 +67,7 @@ var exports = {};
$(function () { $(function () {
$('#main_div').delegate('.inline-subscribe-button', 'click', function (e) { $('#main_div').delegate('.inline-subscribe-button', 'click', function (e) {
var $button = $(e.target); var $button = $(e.target);
var stream_name = $button.closest('.inline-subscribe').data('stream-name'); var stream_name = $button.closest('.inline-subscribe').attr('data-stream-name');
var $status_message = $button.siblings('.inline-subscribe-error'); var $status_message = $button.siblings('.inline-subscribe-error');
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@@ -86,7 +86,7 @@ var exports = {};
if ($inline_subscribe.length === 0) { if ($inline_subscribe.length === 0) {
return; return;
} }
stream_name = $inline_subscribe.data('stream-name'); stream_name = $inline_subscribe.attr('data-stream-name');
$button = $inline_subscribe.find('.inline-subscribe-button'); $button = $inline_subscribe.find('.inline-subscribe-button');
if (inline_subscribe_id_map[stream_name]) { if (inline_subscribe_id_map[stream_name]) {