aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/scripts3.js61
-rw-r--r--web/style3.css22
2 files changed, 55 insertions, 28 deletions
diff --git a/web/scripts3.js b/web/scripts3.js
index 2b12bfbd..1513b375 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -37,7 +37,7 @@ function wsSendKeepAlive() {
ws.send(' ');
}
}
-*/
+ */
/******************************************************************************/
/******************************************************************************/
@@ -129,25 +129,46 @@ function showMessageLinksDialog(mid,rid) {
hlink+="#"+rid;
mlink+="/"+rid;
}
- $('#dialogl').html(hlink);
- $('#dialogn').html(mlink);
-
- $('#dialogw li>a').click(function(event) {
- event.preventDefault();
- openSocialWindow($(this).attr('href'));
- });
var hlinkenc=encodeURIComponent(hlink);
- $('#sharefb').attr('href','https://www.facebook.com/sharer/sharer.php?u='+hlinkenc);
- $('#sharetw').attr('href','https://twitter.com/intent/tweet?url='+hlinkenc);
- $('#sharevk').attr('href','https://vk.com/share.php?url='+hlinkenc);
- $('#sharegp').attr('href','https://plus.google.com/share?url='+hlinkenc);
-
- var w=$('#dialogw');
- var b=$('#dialogb');
- w.css("top", Math.max(0, ((b.height() - w.outerHeight()) / 2) + b.scrollTop()) + "px");
- w.css("left", Math.max(0, ((b.width() - w.outerWidth()) / 2) + b.scrollLeft()) + "px");
- b.show();
- w.show();
+
+ var html="<div class=\"dialogshare\">Ссылка на сообщение:";
+ html+="<div onclick=\"$(this).selectText()\" class=\"dialogl\">"+hlink+"</div>";
+ html+="Номер сообщения:";
+ html+="<div onclick=\"$(this).selectText()\" class=\"dialogl\">"+mlink+"</div>";
+ html+="Поделиться:<ul>";
+ html+="<li><a href=\"#\" onclick=\"return openSocialWindow('https://www.facebook.com/sharer/sharer.php?u="+hlinkenc+"')\"></a></li>";
+ html+="<li><a href=\"#\" onclick=\"return openSocialWindow('https://twitter.com/intent/tweet?url="+hlinkenc+"')\" style=\"background-position: -32px 0;\"></a></li>";
+ html+="<li><a href=\"#\" onclick=\"return openSocialWindow('https://vk.com/share.php?url="+hlinkenc+"')\" style=\"background-position: -64px 0;\"></a></li>";
+ html+="<li><a href=\"#\" onclick=\"return openSocialWindow('https://plus.google.com/share?url="+hlinkenc+"')\" style=\"background-position: -96px 0;\"></a></li>";
+ html+="</ul></div>";
+
+ openDialog(html);
+}
+
+function showPhotoDialog(fname) {
+ var width=$(window).width();
+ if(width<640) {
+ return true;
+ } else if(width<1280) {
+ openDialog("<a href=\"//i.juick.com/photos-1024/"+fname+"\"><img src=\"//i.juick.com/photos-512/"+fname+"\"/></a>");
+ return false;
+ } else {
+ openDialog("<a href=\"//i.juick.com/p/"+fname+"\"><img src=\"//i.juick.com/photos-1024/"+fname+"\"/></a>");
+ return false;
+ }
+}
+
+function openDialog(html) {
+ var dhtml="<div id=\"dialogb\" onclick=\"closeDialog()\"></div>";
+ dhtml+="<table id=\"dialogt\"><tr><td><div id=\"dialogw\"><div id=\"dialogc\" onclick=\"closeDialog()\"></div>";
+ dhtml+=html;
+ dhtml+="</div></td></tr></table>";
+ $('body').append(dhtml);
+}
+
+function closeDialog() {
+ $('#dialogb').remove();
+ $('#dialogt').remove();
}
function openSocialWindow(url) {
@@ -183,7 +204,7 @@ jQuery.fn.selectText = function(){
/*
* jQuery.fn.autoResize 1.14
-*/
+ */
(function($){
diff --git a/web/style3.css b/web/style3.css
index 268e1061..2fdcb5e3 100644
--- a/web/style3.css
+++ b/web/style3.css
@@ -46,6 +46,10 @@ article>header.t { width: 140px; text-align: right; float: right; }
article time { color: #999; font-size: 10pt; border-bottom: 1px dotted #999; }
article p { overflow: hidden; margin: 10px 0 15px 0; }
article p.i { text-align: center; }
+article p.ir { float: right; margin-left: 10px; margin-bottom: 10px; }
+article p.ir a { cursor: -webkit-zoom-in; cursor: -moz-zoom-in; }
+article p.ir img { max-width: 200px; max-height: 200px; }
+article .irbr { clear: right; }
article>nav.l { display: inline-block; font-size: 10pt; }
article>nav.l a { color: #888; border-bottom: 1px dotted #AAA; margin-right: 15px; }
article>nav.s { display: inline-block; text-align: right; float: right; }
@@ -134,14 +138,16 @@ blockquote { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-lef
/********/
-#dialogb { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; background: #000; z-index: 10; }
-#dialogw { display: none; position: fixed; top: 40%; left: 30%; width: 350px; padding: 20px; background: #EEEEE5; border: 1px solid #999; z-index: 11; }
-#dialogl,#dialogn { padding: 5px; margin: 3px 0 20px; border: 1px solid #DDD; background: #F5F5E9; }
-#dialogw li { float: left; margin: 5px 10px 0 0; }
-#dialogw a { display: block; width: 32px; height: 32px; background-image: url(//static.juick.com/sharesocial.png); }
-#sharetw { background-position: -32px 0; }
-#sharevk { background-position: -64px 0; }
-#sharegp { background-position: -96px 0; }
+#dialogb { position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.6; background: #000; z-index: 10; }
+#dialogt { position: fixed; top: 0; left: 0; width: 100%; height: 100%; }
+#dialogt td { vertical-align: middle; text-align: center; }
+#dialogw { position: relative; display: inline-block; text-align: left; z-index: 11; }
+#dialogc { position: absolute; top: -15px; right: -15px; width: 30px; height: 30px; z-index: 12; cursor: pointer; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAEEElEQVQ4y32Va2yTVRzGf23fd10vUNqxsY1dGIyba7BsTgiwhcRkgxHkFkJAuQzIggY0IXGYkKA4DeAQMQTIiIB+MyRAJn7hAxJRJKIRiJgQIhESZxYFEuja9f74oe1aoPh/vrx5z3nO/3qeA0+aBSvW+UaT2VBUb+91HXY3FDUUNZnzDaxYsfBcs2DDpHjqqC1ln07YU79t0oGX+mY1V3dWv1/VWVrqphgTW+EDLBjYS91tZZ/5v+34d1/sijIWv/bw2IXFy2urfKVu7BjP0q0YOCaMWVlzfF7wdJY2mLybzH4/+mpq3cxKrwcHBtanvTqrfK/X97+avCvFUn2xtjDBNJp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ogshare { padding: 20px; background: #EEEEE5; border: 1px solid #999; min-width: 300px; overflow: auto; }
+.dialogl { padding: 5px; margin: 3px 0 20px; border: 1px solid #DDD; background: #F5F5E9; }
+.dialogshare li { float: left; margin: 5px 10px 0 0; }
+.dialogshare a { display: block; width: 32px; height: 32px; background-image: url(//static.juick.com/sharesocial.png); }
/********/