Skip to content

Commit 6d64b99

Browse files
author
Jason White
committed
Reverting with minor modification or two
1 parent 5cb7c78 commit 6d64b99

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/main/webapp/js/goatUtil.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -154,36 +154,36 @@ goat.utils = {
154154
ajaxifyAttackHref: function() {
155155
/* Jason I commented this implementation out
156156
* I think we should show the attack link on the lessons that need it by modifying the lesson
157-
* itself or we could add a new button up top for "show lesson link"
157+
* itself or we could add a new button up top for "show lesson link" */
158+
//re-enabling for now ... was breaking external links
158159
$.each($('a[href^="attack?"]'),
159-
function(i,el) {
160-
var url = $(el).attr('href');
161-
$(el).attr('href','#');
162-
$(el).attr('link',url);
163-
//TODO pull currentMenuId
164-
$(el).click(
165-
function() {
166-
var _url = $(el).attr('link');
167-
$.get(_url, {success:showResponse});
168-
}
169-
)
170-
}
171-
);
172-
*/
160+
function(i,el) {
161+
var url = $(el).attr('href');
162+
$(el).unbind('click').attr('href','#').attr('link',url);
163+
//TODO pull currentMenuId
164+
$(el).click(
165+
function() {
166+
var _url = $(el).attr('link');
167+
$.get(_url, {success:showResponse});
168+
}
169+
);
170+
});
171+
173172
// alternate implementation
174173
// unbind any bound events so we are safe to be called twice
174+
/*
175175
$('#lesson_content a').unbind('click');
176176
$('#lesson_content a').bind('click', function(event) {
177177
event.preventDefault();
178178
$.get(this.href, {}, function(response) {
179179
$('#lesson_content').html(response);
180180
});
181-
});
181+
});*/
182182
}
183183
};
184184

185185

186186
$(window).resize(function() {
187187
//$('#leftside-navigation').css('height',$('div.panel-body').height());
188188
console.log($(window).height());
189-
});
189+
});

0 commit comments

Comments
 (0)