Merge branch 'master' of git://github.com/Pita/etherpad-lite

This commit is contained in:
Peter 'Pita' Martischka 2011-11-28 11:16:33 -08:00
commit a2d3c6ddb2
4 changed files with 29 additions and 21 deletions

View file

@ -1151,3 +1151,12 @@ width:33px !important;
padding: 4px 1px;
}
}
#embedreadonlyqr{
padding-top:20px;
margin-left:100px;
}
#qrcode{
margin-left:10px;
}

View file

@ -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("<b>"+authorName+"</b>" + ": " + 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
{

View file

@ -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("<iframe src='" + readonlyLink + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' width=600 height=400>");
@ -222,9 +214,11 @@ var padeditbar = (function()
}
else
{
$('#qrcode').hide();
var padurl = window.location.href.split("?")[0];
$('#embedinput').val("<iframe src='" + padurl + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' width=600 height=400>");
$('#linkinput').val(padurl);
$('#embedreadonlyqr').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=H|0&chl=" + padurl);
}
}
};

View file

@ -80,18 +80,13 @@
<ul id="menu_right">
<li onClick="window.pad&&pad.editbarClick('readonly');return false;" >
<a id="readonlylink" title="Create a readonly link for this pad">
<div class="buttonicon" style="background-position:0px -150px"></div>
</a>
</li>
<li onClick="window.pad&&pad.editbarClick('import_export');return false;">
<a id="exportlink" title="Import/Export from/to different document formats">
<div class="buttonicon" style="background-position:0px -68px"></div>
</a>
</li>
<li onClick="window.pad&&pad.editbarClick('embed');return false;" >
<a id="embedlink" title="Embed this pad">
<a id="embedlink" title="Share and Embed this pad">
<div class="buttonicon" style="background-position:0px -18px"></div>
</a>
</li>
@ -223,10 +218,14 @@
Share:
<br/>
<div id="linkcode">
Link:<input id="linkinput" type="text" value="">
</div>
<label for="linkinput">Link:</label><input id="linkinput" type="text" value="">
</div><br/>
<div id="embedcode">
Embed code:<input id="embedinput" type="text" value="">
<label for="embedinput">Embed code:</label><input id="embedinput" type="text" value="">
</div><br/>
<div id="qrcode">
<label for="embedreadonlyqr">QR code:</label><br/>
<img id="embedreadonlyqr">
</div>
</div>