summaryrefslogtreecommitdiff
path: root/static/js/src/log.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2012-07-18 00:02:21 -0400
committerJules Laplace <jules@okfoc.us>2012-07-18 00:02:21 -0400
commitc4338d2ae878a167c409e91dea6d1783fc7e30ba (patch)
tree1e54fac722ac3153f9180a5a8332f2b19e11c00c /static/js/src/log.js
parentd891a7ae1b205716c086363fba17a3249a665deb (diff)
put away back
Diffstat (limited to 'static/js/src/log.js')
-rw-r--r--static/js/src/log.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/static/js/src/log.js b/static/js/src/log.js
new file mode 100644
index 0000000..e5a93d9
--- /dev/null
+++ b/static/js/src/log.js
@@ -0,0 +1,34 @@
+// Called upon loading /user/log
+
+function initLog(recips) {
+ Search.initInpage();
+ $('.logged-dump .content').each(function() {
+ var t = $(this);
+ t.html(buildMsgContent(t.text(), recips));
+ });
+ initLogThumb(".logged-dump .thumb", '.dump');
+}
+
+
+function initLogThumb(selector, parentSelector) {
+ $(selector).bind('mouseover mouseout',
+ function(e) {
+ var favorited = $(this).parents(parentSelector).hasClass("favorite") ? true : false;
+ if (e.type == "mouseover") {
+ if (favorited) {
+ $(this).attr("src", Imgs.logThumbOff);
+ } else {
+ $(this).attr("src", Imgs.logThumbBig);
+ $(this).stop().animate(Anim.logThumbBig, 'fast');
+ }
+ } else { // mouseout
+ if (favorited) {
+ $(this).attr("src", Imgs.logThumb);
+ $(this).stop().animate(Anim.logThumb, 'fast');
+ } else {
+ $(this).attr("src", Imgs.logThumbOff);
+ $(this).stop().animate(Anim.logThumb, 'fast');
+ }
+ }
+ })
+} \ No newline at end of file