diff --git a/static/css/pad.css b/static/css/pad.css index 94ac1e351..9b676ab26 100644 --- a/static/css/pad.css +++ b/static/css/pad.css @@ -1151,3 +1151,12 @@ width:33px !important; padding: 4px 1px; } } + +#embedreadonlyqr{ + padding-top:20px; + margin-left:100px; +} + +#qrcode{ + margin-left:10px; +} diff --git a/static/js/chat.js b/static/js/chat.js index 1f6267be7..1bc44d201 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -16,6 +16,8 @@ var chat = (function() { + var chatMentions = 0; + var title = document.title; var self = { show: function () { @@ -43,6 +45,8 @@ var chat = (function() } }); }); + chatMentions = 0; + document.title = title; }, hide: function () { @@ -54,8 +58,6 @@ var chat = (function() }, scrollDown: function() { - //console.log($('#chatbox').css("display")); - if($('#chatbox').css("display") != "none") $('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow"); }, @@ -112,9 +114,13 @@ var chat = (function() // chat throb stuff -- Just make it throw for twice as long if(wasMentioned) { // If the user was mentioned show for twice as long and flash the browser window + if (chatMentions == 0){ + title = document.title; + } $('#chatthrob').html(""+authorName+"" + ": " + text); $('#chatthrob').effect("pulsate", {times:1,mode:"hide"},4000); - document.title = "You were mentioned in a chat: " + document.title; + chatMentions++; + document.title = "("+chatMentions+") " + title; } else { diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index d1a606156..7cea3c1af 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -109,15 +109,6 @@ var padeditbar = (function() self.toogleDropDown("importexport"); } - else if (cmd == 'readonly') - { - var basePath = document.location.href.substring(0, document.location.href.indexOf("/p/")); - var readonlyLink = basePath + "/ro/" + clientVars.readOnlyId; - $('#readonlyImage').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=H|0&chl=" + readonlyLink); - $('#readonlyInput').val(readonlyLink); - self.toogleDropDown("readonly"); - $('#readonlyInput').focus().select(); - } else if (cmd == 'save') { padsavedrevs.saveNow(); @@ -215,6 +206,7 @@ var padeditbar = (function() { if ($('#readonlyinput').is(':checked')) { + $('#qrcode').show(); var basePath = document.location.href.substring(0, document.location.href.indexOf("/p/")); var readonlyLink = basePath + "/ro/" + clientVars.readOnlyId; $('#embedinput').val("