aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-12-16 12:01:39 +0700
committerGravatar Ugnich Anton2012-12-16 12:01:39 +0700
commit52f88dbb3c2e81e1b658b95ff91236db1a1fe03a (patch)
treef3cde3e04f175fd079416bdfc5d93bd43595c0f4 /web
parent52c8d049af6c0963b63dd1e70f66128527a7cba5 (diff)
message number dialog
Diffstat (limited to 'web')
-rw-r--r--web/scripts3.js33
-rw-r--r--web/style3.css13
2 files changed, 46 insertions, 0 deletions
diff --git a/web/scripts3.js b/web/scripts3.js
index 1a5ffd66..a1afb433 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -63,6 +63,39 @@ function unfoldReply() {
}
}
+function showMessageLinksDialog(mid,rid) {
+ var hlink="http://juick.com/"+mid;
+ var mlink="#"+mid;
+ if(rid>0) {
+ 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();
+}
+
+function openSocialWindow(url) {
+ var w=window.open(url,'juickshare','width=640,height=400');
+ if(window.focus) w.focus();
+}
+
/*
* jQuery.fn.autoResize 1.14
*/
diff --git a/web/style3.css b/web/style3.css
index 2649de77..d04c5487 100644
--- a/web/style3.css
+++ b/web/style3.css
@@ -45,6 +45,8 @@ img { border: none; }
#content .msg-avatar { float: left; }
#content .msg-avatar img { width: 48px; height: 48px; vertical-align: top; }
#content .msg-ts { float: right; font-size: small; vertical-align: top; }
+#content .msg-menu { margin: 0 0 0 6px; padding: 2px 0; }
+#content .msg-menu img { vertical-align: top; }
#content .msg-header { margin-left: 58px; overflow: hidden; }
#content .msg-place { font-size: small; margin: 8px 0 8px 58px; }
#content .msg-txt { margin: 8px 0 8px 58px; overflow: hidden; }
@@ -97,6 +99,17 @@ table.users img { width: 32px; height: 32px; vertical-align: middle; margin-righ
/********/
+#dialogb { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; background: #000; }
+#dialogw { display: none; position: fixed; top: 40%; left: 30%; width: 350px; padding: 20px; background: #EEEEE5; border: 1px solid #999; }
+#dialogl,#dialogn { padding: 5px; margin: 3px 0 20px; border: 1px solid #DDD; background: #F5F5E9; }
+#dialogw li { float: left; margin: 5px 10px 0 0; }
+#dialogw li>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; }
+
+/********/
+
#footer { clear: both; width: 600px; margin: 0 auto; font-size: small; padding: 15px 0 10px 0; }
#footer-right { float: right; }