Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Replace existing modal callback with new callback. #743

Merged
merged 1 commit into from
Sep 24, 2015

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Sep 23, 2015

Fix a subtle issue such that each render adds a new modal callback to
the table. Instead, on render, remove the previous callback if present
before adding the new one.

Related to #734.

Fix a subtle issue such that each render adds a new modal callback to
the table. Instead, on render, remove the previous callback if present
before adding the new one.
@@ -275,7 +276,8 @@ function modalRenderFactory(template, fetch) {
$modal.appendTo($main);
$table.find('tr').attr('tabindex', 0);

$table.on('click keypress', '.js-panel-toggle tr.' + MODAL_TRIGGER_CLASS, function(e) {
$table.off('click keypress', '.js-panel-toggle tr.' + MODAL_TRIGGER_CLASS, callback);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@@ -313,7 +315,8 @@ function modalRenderFactory(template, fetch) {
});
}
}
});
};
$table.on('click keypress', '.js-panel-toggle tr.' + MODAL_TRIGGER_CLASS, callback);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

noahmanger pushed a commit that referenced this pull request Sep 24, 2015
Replace existing modal callback with new callback.
@noahmanger noahmanger merged commit 680a602 into fecgov:develop Sep 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants