mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-26 17:10:11 -04:00
- moved event hookups into functions
This commit is contained in:
parent
0857a03e47
commit
6fb1879256
38
js/common.js
38
js/common.js
@ -187,15 +187,8 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
if (localStorage.Results !== "undefined" && localStorage.SearchResults !== "undefined") {
|
||||
$("#resultwrap").html(localStorage.Results);
|
||||
$("#searchresultswrap").html(localStorage.SearchResults);
|
||||
$("#resultwrap").find(".hiddenlink").click(function(e) {
|
||||
Util.HandleHiddenLink(e);
|
||||
});
|
||||
$("#resultwrap").find(".removeresult").click(function(e) {
|
||||
Util.RemoveResult(e);
|
||||
});
|
||||
$("#searchresultswrap").find(".link").click(function(e) {
|
||||
Util.HandleLink(e);
|
||||
});
|
||||
Bible.AttachEvents($("#resultwrap"));
|
||||
Words.AttachEvents($("#searchresultswrap"));
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -252,7 +245,7 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
$("#result").css("font-family", fontfamily);
|
||||
this.Save();
|
||||
},
|
||||
ChangeDisplayStrongsInDialog: function(fontfamily) {
|
||||
ChangeDisplayStrongsInDialog: function() {
|
||||
this.Save();
|
||||
},
|
||||
SaveResults: function() {
|
||||
@ -298,12 +291,8 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
}
|
||||
var t = $("<div class='passage result'><a href='javascript:void();' class='removeresult' style='border: 0;'><img style='border: 0px;' src='images/delete.png' width='48' height='48' /></a><span class='resultbody'>" + "<h2><a href='http://www.dynamicbible.com/?r="+ ref.toString() + "'>" + ref.toString() + "</a></h2>" + r + "</span><br clear='all' /></div>");
|
||||
|
||||
t.find(".hiddenlink").click(function(e) {
|
||||
Util.HandleHiddenLink(e);
|
||||
});
|
||||
t.find(".removeresult").click(function(e) {
|
||||
Util.RemoveResult(e);
|
||||
});
|
||||
Bible.AttachEvents(t);
|
||||
|
||||
$("#result").prepend(t);
|
||||
}
|
||||
catch (err) {
|
||||
@ -379,6 +368,14 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
Util.HandleError(err);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
AttachEvents: function(t){
|
||||
t.find(".hiddenlink").click(function(e) {
|
||||
Util.HandleHiddenLink(e);
|
||||
});
|
||||
t.find(".removeresult").click(function(e) {
|
||||
Util.RemoveResult(e);
|
||||
});
|
||||
}
|
||||
};
|
||||
var Strongs = {
|
||||
@ -590,9 +587,7 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
|
||||
var t = $(txt);
|
||||
|
||||
t.find(".link").click(function(e) {
|
||||
Util.HandleLink(e);
|
||||
});
|
||||
Words.AttachEvents(t);
|
||||
|
||||
$("#searchresults").html(t);
|
||||
$("#searchTotal").html(results.length);
|
||||
@ -1018,6 +1013,11 @@ define(['jquery', 'reference', 'jquery.ui'],
|
||||
Util.HandleError(err);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
AttachEvents: function(t){
|
||||
t.find(".link").click(function(e) {
|
||||
Util.HandleLink(e);
|
||||
});
|
||||
}
|
||||
};
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user