mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-04 23:00:31 +01:00
fixed delegate syntax
This commit is contained in:
@@ -22,10 +22,10 @@ define('admin/extend/rewards', function() {
|
||||
});
|
||||
|
||||
$('#active')
|
||||
.on('[data-selected]', 'change', function() {
|
||||
.on('change', '[data-selected]', function() {
|
||||
update($(this));
|
||||
})
|
||||
.on('.delete', 'click', function() {
|
||||
.on('click', '.delete', function() {
|
||||
var parent = $(this).parents('[data-id]'),
|
||||
id = parent.attr('data-id');
|
||||
|
||||
@@ -40,7 +40,7 @@ define('admin/extend/rewards', function() {
|
||||
parent.remove();
|
||||
return false;
|
||||
})
|
||||
.on('.toggle', 'click', function() {
|
||||
.on('click', '.toggle', function() {
|
||||
var btn = $(this),
|
||||
disabled = btn.html() === 'Enable',
|
||||
id = $(this).parents('[data-id]').attr('data-id');
|
||||
@@ -142,8 +142,6 @@ define('admin/extend/rewards', function() {
|
||||
rewards: available
|
||||
};
|
||||
|
||||
var ul = $('#active');
|
||||
|
||||
templates.parse('admin/extend/rewards', 'active', data, function(li) {
|
||||
li = $(li);
|
||||
li.find('[name="rid"]').val('');
|
||||
|
||||
Reference in New Issue
Block a user