attach data to pjaxified links so they can't be pjaxified twice. add simple refresh method

This commit is contained in:
Peter Lada
2015-01-21 00:11:59 -08:00
parent 3d50ae9131
commit e6a35f38e4
4 changed files with 14 additions and 1 deletions

View File

@@ -1,7 +1,10 @@
module.exports = function(el) {
switch (el.tagName.toLowerCase()) {
case "a":
this.attachLink(el)
// only attach link if el does not already have link attached
if (!el.getAttribute("data-pjax-enabled")) {
this.attachLink(el)
}
break
case "form":