mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-09 08:25:00 -04:00
Merge 74047b77cc
into 96eb8ac004
This commit is contained in:
commit
fa9f5376fc
1 changed files with 24 additions and 9 deletions
|
@ -20,6 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var readCookie = require('./pad_utils').readCookie;
|
||||||
var padutils = require('./pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
var padeditor = require('./pad_editor').padeditor;
|
var padeditor = require('./pad_editor').padeditor;
|
||||||
var padsavedrevs = require('./pad_savedrevs');
|
var padsavedrevs = require('./pad_savedrevs');
|
||||||
|
@ -233,20 +234,34 @@ var padeditbar = (function()
|
||||||
{
|
{
|
||||||
if ($('#readonlyinput').is(':checked'))
|
if ($('#readonlyinput').is(':checked'))
|
||||||
{
|
{
|
||||||
var basePath = document.location.href.substring(0, document.location.href.indexOf("/p/"));
|
if (readCookie("parentUriReadOnly"))
|
||||||
var readonlyLink = basePath + "/ro/" + clientVars.readOnlyId;
|
{
|
||||||
$('#embedinput').val("<iframe name='embed_readonly' src='" + readonlyLink + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' width=600 height=400>");
|
var padLink = decodeURIComponent(readCookie("parentUriReadOnly"));
|
||||||
$('#linkinput').val(readonlyLink);
|
var embedLink = padLink;
|
||||||
$('#embedreadonlyqr').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl=" + readonlyLink);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var padurl = window.location.href.split("?")[0];
|
var padLink = document.location.href.substring(0, document.location.href.indexOf("/p/")) + "/ro/" + clientVars.readOnlyId;
|
||||||
$('#embedinput').val("<iframe name='embed_readwrite' src='" + padurl + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' width=600 height=400>");
|
var embedLink = padLink + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false";
|
||||||
$('#linkinput').val(padurl);
|
|
||||||
$('#embedreadonlyqr').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl=" + padurl);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (readCookie("parentUri"))
|
||||||
|
{
|
||||||
|
var padLink = decodeURIComponent(readCookie("parentUri"));
|
||||||
|
var embedLink = padLink;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var padLink = document.location.href.split("?")[0];
|
||||||
|
var embedLink = padLink + "?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#embedinput').val("<iframe name='embed_readonly' src='" + embedLink + "' width=600 height=400>");
|
||||||
|
$('#linkinput').val(padLink);
|
||||||
|
$('#embedreadonlyqr').attr("src","https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl=" + padLink);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return self;
|
return self;
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue