mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Remove read only link and place all functionality into embed option sorts issue #246
This commit is contained in:
parent
19ee4865f4
commit
90d36471b1
3 changed files with 19 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue