summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstatic/css/dump.css99
-rw-r--r--static/img/zoom.gifbin0 -> 193 bytes
-rw-r--r--static/js/pichat.js62
-rw-r--r--template/chat.st5
4 files changed, 100 insertions, 66 deletions
diff --git a/static/css/dump.css b/static/css/dump.css
index 13bcf68..eb3959d 100755
--- a/static/css/dump.css
+++ b/static/css/dump.css
@@ -608,11 +608,25 @@ width:100;
background-position:bottom right;
background-attachment:fixed;
display: inline-block;
+ position: relative;
}
.msg-hover{
- background-color:#fff;
+ background-color:#fff;
+}
+
+.msg-image-zoom {
+ position: absolute;
+ bottom: 0px;
+ right: 0px;
+ opacity: 50%;
+}
+
+.msg-image-zoom img {
+ height: 48px;
+ width: 48px;
+ opacity: 100%;
}
.msgDiv.favorite{
@@ -625,46 +639,49 @@ width:100;
div.content img:hover{background-color:white;}
.nick{background-color:white;margin-right:3px;}
.msgDiv dump{background-color:white;}
- /*searchstuff*/
+
+/*searchstuff*/
#searchbox{
-position:absolute;
-top:18px;
-right:36px;
+ position:absolute;
+ top:18px;
+ right:36px;
}
+
#search-query{
-background: white;
-border: 1px solid #999;
-color: #C0C8D3;
-font-size: 13px;
-padding: 3px 12px 3px 37px;
-padding-left: 37px;
-text-indent:5px;
- border-radius: 50px;
- -webkit-border-radius: 50px;
- -moz-border-radius: 50px;
+ background: white;
+ border: 1px solid #999;
+ color: #C0C8D3;
+ font-size: 13px;
+ padding: 3px 12px 3px 37px;
+ padding-left: 37px;
+ text-indent:5px;
+ border-radius: 50px;
+ -webkit-border-radius: 50px;
+ -moz-border-radius: 50px;
}
+
.search_icon {
-background:url("http://dump.fm/static/img/hourglass.png") no-repeat scroll center center transparent;
-bottom:3px;
-cursor:pointer;
-left:6px;
-opacity:0.8;
-border-right:1px solid #C0C8D3;
-position:absolute;
-top:3px;
-width:32px;
+ background:url("http://dump.fm/static/img/hourglass.png") no-repeat scroll center center transparent;
+ bottom:3px;
+ cursor:pointer;
+ left:6px;
+ opacity:0.8;
+ border-right:1px solid #C0C8D3;
+ position:absolute;
+ top:3px;
+ width:32px;
}
#searchresults{
top:50px;
overflow:auto;
- position:fixed;background-image:url(/static/img/bg.dither.gif);
-background-color:#eee;
-width:100%;
-min-width:600px;
-border-bottom:1px solid #000;
-left:-1px;
-margin-top:-1px;
+ position:fixed;background-image:url(/static/img/bg.dither.gif);
+ background-color:#eee;
+ width:100%;
+ min-width:600px;
+ border-bottom:1px solid #000;
+ left:-1px;
+ margin-top:-1px;
}
#searchresults img{
max-width:300px;
@@ -1031,23 +1048,25 @@ padding-bottom:1;
color:#000;
border:1px solid #000;border-right:0px;
}
-.msgDiv img{
+.msgDiv img {
max-width:650px;
width: expression(this.width > 650 ? 650: true);
max-height:400px;
height: expression(this.width > 400 ? 400: true);
max-width:400px;
-margin:-2;
- z-index: 1;
-opacity:1;
--webkit-transition: opacity;
--webkit-transition-timing-function: ease-out;
--webkit-transition-duration: 500ms;
-
+ margin:-2;
+ z-index: 1;
+ opacity:1;
+ -webkit-transition: opacity;
+ -webkit-transition-timing-function: ease-out;
+ -webkit-transition-duration: 500ms;
+
}
-.msgDiv {padding:2px;
+.msgDiv {
+ padding:2px;
}
+
.oldmsg {
color: #666;
}
diff --git a/static/img/zoom.gif b/static/img/zoom.gif
new file mode 100644
index 0000000..9ffe149
--- /dev/null
+++ b/static/img/zoom.gif
Binary files differ
diff --git a/static/js/pichat.js b/static/js/pichat.js
index a169090..32727f1 100644
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -1038,32 +1038,48 @@ $(function() {
OrigTitle = $('title').text();
});
-$('.msgDiv .content').live('mouseover', function(e) {
- $(this).addClass('msg-hover');
-});
+function initChatMsgs() {
+ $('.msgDiv .content').live('mouseenter', function(e) {
+ $(this).addClass('msg-hover');
+ });
-$('.msgDiv .content').live('mouseout', function(e) {
- $(this).removeClass('msg-hover');
-});
+ $('.msgDiv .content').live('mouseleave', function(e) {
+ $(this).removeClass('msg-hover');
+ });
+ $('.msgDiv .content .img-wrapper').live('mouseenter', function(e) {
+ var imgurl = $(this).find('img').attr('src');
+ var zoomlink = $('<a>')
+ .attr({'href': imgurl })
+ .addClass('msg-image-zoom')
+ .append($('<img>').attr('src', 'http://dump.fm/static/img/zoom.gif'))
+ .click(function() { window.open(imgurl); return false; });
+ $(this).append(zoomlink);
+ });
-$('.content').live('click', function(e) {
- var tagName = e.target.tagName;
- if (tagName == 'A') {
- return;
- }
- var msg = $(this).parent('.msgDiv');
- var wasFavorited = msg.hasClass("favorite");
- var button = msg.find('.chat-thumb');
- if (wasFavorited) {
- $(button).attr("src", Imgs.chatThumbOff);
- } else {
- $(button).attr("src", Imgs.chatThumbBig);
- $(button).stop().animate(Anim.chatThumbBig, 'fast').animate(Anim.chatThumb, 'fast', 'swing');
- }
- Tag.favorite(button);
- return false;
-});
+ $('.msgDiv .content .img-wrapper').live('mouseleave', function(e) {
+ $(this).find('.msg-image-zoom').remove();
+ });
+
+
+ $('.content').live('click', function(e) {
+ var tagName = e.target.tagName;
+ if (tagName == 'A') {
+ return true;
+ }
+ var msg = $(this).parent('.msgDiv');
+ var wasFavorited = msg.hasClass("favorite");
+ var button = msg.find('.chat-thumb');
+ if (wasFavorited) {
+ $(button).attr("src", Imgs.chatThumbOff);
+ } else {
+ $(button).attr("src", Imgs.chatThumbBig);
+ $(button).stop().animate(Anim.chatThumbBig, 'fast').animate(Anim.chatThumb, 'fast', 'swing');
+ }
+ Tag.favorite(button);
+ return false;
+ });
+}
// sha1.js
diff --git a/template/chat.st b/template/chat.st
index 77e5e86..53206ec 100644
--- a/template/chat.st
+++ b/template/chat.st
@@ -47,9 +47,8 @@ $endif$
newwindow=window.open(url,'name','height=50,width=400,left=20,top=20,location=0,status=0,scrollbar=0,resizable=0');
if (window.focus) {newwindow.focus()}
}
- jQuery(document).ready(startTitleUpdater);
-
-
+ jQuery(startTitleUpdater);
+ jQuery(initChatMsgs);
</script>
<style>
#chat-wrapper {