From 19ee4865f476caa4d926ca4ec1f75a11e8792b6f Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Nov 2011 20:39:47 +0000 Subject: [PATCH 1/3] Make the title changes Pita wanted which were show an increment and also fix the bug where it would keep increasing the title this is part of issue #125 --- static/js/chat.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 { From 90d36471b142cbdaf86ebf4ef0befb3b90495907 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Nov 2011 21:04:11 +0000 Subject: [PATCH 2/3] Remove read only link and place all functionality into embed option sorts issue #246 --- static/css/pad.css | 9 +++++++++ static/js/pad_editbar.js | 12 +++--------- static/pad.html | 15 +++++++-------- 3 files changed, 19 insertions(+), 17 deletions(-) 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/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("