diff options
| -rwxr-xr-x | static/css/header.css | 1 | ||||
| -rw-r--r-- | static/js/pichat.js | 36 | ||||
| -rw-r--r-- | template/chat.st | 4 |
3 files changed, 22 insertions, 19 deletions
diff --git a/static/css/header.css b/static/css/header.css index fdfd932..e43ec4c 100755 --- a/static/css/header.css +++ b/static/css/header.css @@ -272,6 +272,7 @@ font-weight:bold; } img.chat-thumb { + cursor:pointer; position: absolute; /*margin-top: -10px;*/ width: 16px; diff --git a/static/js/pichat.js b/static/js/pichat.js index 7351fb4..50dd8b0 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -5,6 +5,25 @@ var RawFavs = {} var MaxImagePosts = 40 +// todo: preload these. also, look into image sprites (no go on animating their sizes tho) +Imgs = { + "chatThumb": "/static/img/thumbs/color.right.gif", + "chatThumbBig": "/static/img/thumbs/color.right.4x.gif", + "chatThumbOff": "/static/img/thumbs/bw.right.gif", + "chatThumbDot": "/static/img/thumbs/pink.circle.gif", + "logThumb": "/static/img/thumbs/color.left.gif", + "logThumbBig": "/static/img/thumbs/color.left.4x.gif", + "logThumbOff": "/static/img/thumbs/bw.left.gif" +} + +Anim = { + "chatThumbBig": {"width": "56px", "height": "60px", "right": "-35px", "bottom": "-10px"}, + "chatThumbTiny": {"width": "8px", "height": "8px", "right": "8px", "bottom": "8px"}, + "chatThumb": {"width": "16px", "height": "16px", "right": "4px", "bottom": "4px"}, + "logThumb": {"width": "16px", "height": "16px", "marginLeft": "0px", "marginTop": "0px"}, + "logThumbBig": {"width": "56px", "height": "60px", "marginLeft": "-40px", "marginTop": "-27px"} +} + // Utils /*Object.size = function(obj) { @@ -425,24 +444,7 @@ function initLog() { initLogThumb(); } -// todo: preload these. also, look into image sprites (no go on animating their sizes tho) -Imgs = { - "chatThumb": "/static/img/thumbs/color.right.gif", - "chatThumbBig": "/static/img/thumbs/color.right.4x.gif", - "chatThumbOff": "/static/img/thumbs/bw.right.gif", - "chatThumbDot": "/static/img/thumbs/pink.circle.gif", - "logThumb": "/static/img/thumbs/color.left.gif", - "logThumbBig": "/static/img/thumbs/color.left.4x.gif", - "logThumbOff": "/static/img/thumbs/bw.left.gif" -} -Anim = { - "chatThumbBig": {"width": "56px", "height": "60px", "right": "-35px", "bottom": "-10px"}, - "chatThumbTiny": {"width": "8px", "height": "8px", "right": "8px", "bottom": "8px"}, - "chatThumb": {"width": "16px", "height": "16px", "right": "4px", "bottom": "4px"}, - "logThumb": {"width": "16px", "height": "16px", "marginLeft": "0px", "marginTop": "0px"}, - "logThumbBig": {"width": "56px", "height": "60px", "marginLeft": "-40px", "marginTop": "-27px"} -} // jesus this logic is ugly function initLogThumb(){ diff --git a/template/chat.st b/template/chat.st index 2ab2369..4d75df5 100644 --- a/template/chat.st +++ b/template/chat.st @@ -62,9 +62,9 @@ $messages: { m | <span class="nick"> <b><a href="/u/$m.nick$">$m.nick$</a></b> $if(m.favorited)$ - <img src="/static/img/thumbs/color.right.gif" class="thumb chat-thumb" onclick="Tag.favorite(this)"> + <img src="/static/img/thumbs/color.right.gif" class="chat-thumb" onclick="Tag.favorite(this)"> $else$ - <img src="/static/img/thumbs/pink.circle.gif" class="thumb chat-thumb" onclick="Tag.favorite(this)"> + <img src="/static/img/thumbs/pink.circle.gif" class="chat-thumb" onclick="Tag.favorite(this)"> $endif$ </span> <span class="content">$m.content$<span> |
