changed existing refresh method to reload. changed the data check to trigger a refresh on the element based on the already bound data attr

This commit is contained in:
Peter Lada
2015-01-28 18:27:16 -08:00
parent e6a35f38e4
commit 9a86044f90
5 changed files with 11 additions and 13 deletions

View File

@@ -12091,8 +12091,8 @@ var linkAction = function(el, event) {
// dont do "nothing" if user try to reload the page by clicking the same link twice
if (el.href === window.location.href.split("#")[0]) {
el.setAttribute(attrClick, "refresh")
this.refresh()
el.setAttribute(attrClick, "reload")
this.reload()
return
}
@@ -12409,8 +12409,8 @@ tape("test attach link prototype method", function(t) {
attachLink.call({
options: {},
refresh: function() {
t.equal(a.getAttribute(attr), "refresh", "triggering exact same url refresh the page")
reload: function() {
t.equal(a.getAttribute(attr), "reload", "triggering exact same url reload the page")
},
loadUrl: function() {
t.equal(a.getAttribute(attr), "load", "triggering a internal link actually load the page")
@@ -12444,7 +12444,7 @@ tape("test attach link prototype method", function(t) {
a.href = internalUri
trigger(a, "click")
// see refresh defined above
// see reload defined above
a.href = window.location.protocol + "//" + window.location.host + "/internal"
trigger(a, "click")