diff options
author | Ugnich Anton | 2013-11-26 15:32:49 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-11-26 15:32:49 +0700 |
commit | 19425425c418c080fd8db265907a8579c2e13a7c (patch) | |
tree | de540cca3c44550b528327bccd7e84dd36876751 | |
parent | 11b8004d621d69b4e65b2efefc526b9900515738 (diff) |
-video
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 7 | ||||
-rw-r--r-- | src/java/com/juick/http/www/UserThread.java | 18 | ||||
-rw-r--r-- | web/scripts3.js | 13 |
3 files changed, 4 insertions, 34 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index d3733305..5b5681e0 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -52,7 +52,6 @@ public class PageTemplates { out.print("<head>"); out.print("<link rel=\"stylesheet\" href=\"/style.2013102404.css\"/>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\" defer=\"defer\"></script>"); - out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>"); out.print("<script type=\"text/javascript\" src=\"/scripts.2013102404.js\" defer=\"defer\"></script>"); if (headers != null) { out.print(headers); @@ -458,11 +457,7 @@ public class PageTemplates { out.print(" <div class=\"msg-txt\">" + txt + "</div>"); if (msg.AttachmentType != null) { - if (msg.AttachmentType.equals("mp4")) { - out.println(" <div class=\"msg-media\"><div id=\"video-" + msg.MID + "\"><a href=\"//i.juick.com/video/" + msg.MID + ".mp4\" onclick=\"inlinevideo(" + msg.MID + "); return false\"><img src=\"//i.juick.com/thumbs/" + msg.MID + ".jpg\" alt=\"\"/></a></div></div>"); - } else { - out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/photos-1024/" + msg.MID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); - } + out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/photos-1024/" + msg.MID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); } msg.ReadOnly |= blUIDs.contains(msg.User.UID); diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index c7158f39..4862bd6c 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -136,11 +136,7 @@ public class UserThread { out.println(" <div class=\"msg-txt\">" + txt + "</div>"); if (msg.AttachmentType != null) { - if (msg.AttachmentType.equals("mp4")) { - out.println(" <div class=\"msg-media\"><div id=\"video-" + mid + "\"><a href=\"//i.juick.com/video/" + mid + ".mp4\" onclick=\"inlinevideo(" + mid + "); return false\"><img src=\"//i.juick.com/thumbs/" + mid + ".jpg\" alt=\"\"/></a></div></div>"); - } else { - out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + mid + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + mid + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); - } + out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + mid + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + mid + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); } boolean visitorInBL = false; @@ -305,11 +301,7 @@ public class UserThread { out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>"); out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>"); if (msg.AttachmentType != null) { - if (msg.AttachmentType.equals("mp4")) { - out.println(" <div class=\"msg-media\"><div id=\"video-" + msg.MID + "-" + msg.RID + "\"><a href=\"//i.juick.com/video/" + msg.MID + "-" + msg.RID + ".mp4\" onclick=\"inlinevideo('" + msg.MID + "-" + msg.RID + "'); return false\"><img src=\"//i.juick.com/thumbs/" + msg.MID + "-" + msg.RID + ".jpg\" alt=\"\"/></a></div></div>"); - } else { - out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); - } + out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); } if (msg.VisitorCanComment) { out.println(" <div class=\"msg-links\"><a href=\"#\" onclick=\"return showCommentForm(" + msg.MID + "," + msg.RID + ")\">" + rb.getString("Comment") + "</a></div>"); @@ -347,11 +339,7 @@ public class UserThread { out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>"); out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>"); if (msg.AttachmentType != null) { - if (msg.AttachmentType.equals("mp4")) { - out.println(" <div class=\"msg-media\"><div id=\"video-" + msg.MID + "-" + msg.RID + "\"><a href=\"//i.juick.com/video/" + msg.MID + "-" + msg.RID + ".mp4\" onclick=\"inlinevideo('" + msg.MID + "-" + msg.RID + "'); return false\"><img src=\"//i.juick.com/thumbs/" + msg.MID + "-" + msg.RID + ".jpg\" alt=\"\"/></a></div></div>"); - } else { - out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); - } + out.println(" <div class=\"msg-media\"><a href=\"//i.juick.com/p/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "-" + msg.RID + "." + msg.AttachmentType + "\" alt=\"\"/></a></div>"); } out.print(" <div class=\"msg-links\">/" + msg.RID); if (msg.ReplyTo > 0) { diff --git a/web/scripts3.js b/web/scripts3.js index 3517ee56..087a2d66 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -394,19 +394,6 @@ function sendPM() { /******************************************************************************/ /******************************************************************************/ -function inlinevideo(mid) { - var flashvars={ - file:'http://i.juick.com/video/'+mid+'.mp4', - image:'http://i.juick.com/thumbs/'+mid+'.jpg', - skin:'http://static.juick.com/glow.zip', - autostart:'true' - }; - var params={ - allowfullscreen:'true' - }; - swfobject.embedSWF('//static.juick.com/player.swf','video-'+mid,'512','384','9.0.115','false',flashvars,params,null); -} - function postformListener(formEl,ev) { if(ev.ctrlKey && (ev.keyCode==10 || ev.keyCode==13)) formEl.submit(); } |