Show QR code on read only and non read only options

This commit is contained in:
John McLear 2011-11-28 20:45:27 +00:00
parent 054af3da77
commit 769892a736
1 changed files with 1 additions and 2 deletions

View File

@ -206,15 +206,14 @@ 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>");
$('#linkinput').val(readonlyLink);
$('#embedreadonlyqr').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=H|0&chl=" + readonlyLink);
}
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);