mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-27 09:29:59 -04:00
Merge in upstream changes.
This commit is contained in:
commit
34de294ed1
78
js/common.js
78
js/common.js
@ -187,15 +187,8 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
if (localStorage.Results !== "undefined" && localStorage.SearchResults !== "undefined") {
|
if (localStorage.Results !== "undefined" && localStorage.SearchResults !== "undefined") {
|
||||||
$("#resultwrap").html(localStorage.Results);
|
$("#resultwrap").html(localStorage.Results);
|
||||||
$("#searchresultswrap").html(localStorage.SearchResults);
|
$("#searchresultswrap").html(localStorage.SearchResults);
|
||||||
$("#resultwrap").find(".hiddenlink").click(function(e) {
|
Bible.AttachEvents($("#resultwrap"));
|
||||||
Util.HandleHiddenLink(e);
|
Words.AttachEvents($("#searchresultswrap"));
|
||||||
});
|
|
||||||
$("#resultwrap").find(".removeresult").click(function(e) {
|
|
||||||
Util.RemoveResult(e);
|
|
||||||
});
|
|
||||||
$("#searchresultswrap").find(".link").click(function(e) {
|
|
||||||
Util.HandleLink(e);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -252,7 +245,7 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
$("#result").css("font-family", fontfamily);
|
$("#result").css("font-family", fontfamily);
|
||||||
this.Save();
|
this.Save();
|
||||||
},
|
},
|
||||||
ChangeDisplayStrongsInDialog: function(fontfamily) {
|
ChangeDisplayStrongsInDialog: function() {
|
||||||
this.Save();
|
this.Save();
|
||||||
},
|
},
|
||||||
SaveResults: function() {
|
SaveResults: function() {
|
||||||
@ -299,35 +292,7 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
// TODO(jwall): hover should show tags for the verse.
|
// TODO(jwall): hover should show tags for the verse.
|
||||||
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>");
|
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) {
|
Bible.AttachEvents(t, ref);
|
||||||
Util.HandleHiddenLink(e);
|
|
||||||
});
|
|
||||||
t.find(".removeresult").click(function(e) {
|
|
||||||
Util.RemoveResult(e);
|
|
||||||
});
|
|
||||||
// TODO(jwall): support longtouch events on mobile?
|
|
||||||
t.find(".resultbody h2").tooltip({
|
|
||||||
items: ".resultbody h2",
|
|
||||||
content: function(tt) {
|
|
||||||
tagging.GetTags(
|
|
||||||
ref.toString(), {
|
|
||||||
success: function(data) {
|
|
||||||
var tags = data ?
|
|
||||||
(data.data ?
|
|
||||||
data.data.tagList : null) : null;
|
|
||||||
var hoverContent =
|
|
||||||
$("<div>Tags: </div>");
|
|
||||||
hoverContent.append(
|
|
||||||
tags ? tags.join(", ") : "N/A");
|
|
||||||
tt(hoverContent);
|
|
||||||
}});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
t.find(".hiddenlink").tooltip(
|
|
||||||
{
|
|
||||||
items: ".hiddenlink"
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$("#result").prepend(t);
|
$("#result").prepend(t);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
@ -403,6 +368,32 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
Util.HandleError(err);
|
Util.HandleError(err);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
},
|
||||||
|
AttachEvents: function(t, ref){
|
||||||
|
t.find(".hiddenlink").click(function(e) {
|
||||||
|
Util.HandleHiddenLink(e);
|
||||||
|
});
|
||||||
|
t.find(".removeresult").click(function(e) {
|
||||||
|
Util.RemoveResult(e);
|
||||||
|
});
|
||||||
|
// TODO(jwall): support longtouch events on mobile?
|
||||||
|
t.find(".resultbody h2").tooltip({
|
||||||
|
items: ".resultbody h2",
|
||||||
|
content: function(tt) {
|
||||||
|
tagging.GetTags(
|
||||||
|
ref.toString(), {
|
||||||
|
success: function(data) {
|
||||||
|
var tags = data ?
|
||||||
|
(data.data ?
|
||||||
|
data.data.tagList : null) : null;
|
||||||
|
var hoverContent =
|
||||||
|
$("<div>Tags: </div>");
|
||||||
|
hoverContent.append(
|
||||||
|
tags ? tags.join(", ") : "N/A");
|
||||||
|
tt(hoverContent);
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Strongs = {
|
var Strongs = {
|
||||||
@ -614,9 +605,7 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
|
|
||||||
var t = $(txt);
|
var t = $(txt);
|
||||||
|
|
||||||
t.find(".link").click(function(e) {
|
Words.AttachEvents(t);
|
||||||
Util.HandleLink(e);
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#searchresults").html(t);
|
$("#searchresults").html(t);
|
||||||
$("#searchTotal").html(results.length);
|
$("#searchTotal").html(results.length);
|
||||||
@ -1042,6 +1031,11 @@ define(['jquery', 'reference', 'tagging', 'jquery.ui'],
|
|||||||
Util.HandleError(err);
|
Util.HandleError(err);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
},
|
||||||
|
AttachEvents: function(t){
|
||||||
|
t.find(".link").click(function(e) {
|
||||||
|
Util.HandleLink(e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
|
@ -3,6 +3,9 @@ var tagStore = 'tags';
|
|||||||
define(
|
define(
|
||||||
['db', 'reference'], function(db, reference) {
|
['db', 'reference'], function(db, reference) {
|
||||||
return {
|
return {
|
||||||
|
Capable: function() {
|
||||||
|
return db.Capable();
|
||||||
|
},
|
||||||
// UpdateTags updates a given references tags asynchronously.
|
// UpdateTags updates a given references tags asynchronously.
|
||||||
// ref should be a Reference object.
|
// ref should be a Reference object.
|
||||||
// tags should be a list of strings representing the tags for this
|
// tags should be a list of strings representing the tags for this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user