mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
merge with upstream. Fixed confict in pad.html
This commit is contained in:
parent
3248ca4cbb
commit
254046454d
91 changed files with 1674 additions and 1363 deletions
|
@ -472,12 +472,10 @@ table#otheruserstable { display: none; }
|
|||
background: url(../../static/img/connectingbar.gif) no-repeat center 60px;
|
||||
height: 100px;
|
||||
}
|
||||
.modaldialog.cboxreconnecting {
|
||||
background: #fed;
|
||||
}
|
||||
.modaldialog.cboxreconnecting,
|
||||
.modaldialog.cboxconnecting,
|
||||
.modaldialog.cboxdisconnected {
|
||||
background: #fdd;
|
||||
background: #8FCDE0;
|
||||
}
|
||||
.cboxdisconnected #connectionboxinner div { display: none; }
|
||||
.cboxdisconnected_userdup #connectionboxinner #disconnected_userdup { display: block; }
|
||||
|
@ -1005,7 +1003,7 @@ position: relative;
|
|||
padding: 10px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
height:170px;
|
||||
height:190px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1032,7 @@ position: relative;
|
|||
|
||||
#importexportline{
|
||||
border: dotted 1px;
|
||||
height: 165px;
|
||||
height: 185px;
|
||||
position:absolute;
|
||||
width:0px;
|
||||
left:260px;
|
||||
|
@ -1070,6 +1068,10 @@ position: relative;
|
|||
background-position: 2px -49px;
|
||||
}
|
||||
|
||||
#exportdokuwiki{
|
||||
background-position: 2px -144px;
|
||||
}
|
||||
|
||||
#export a{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -1146,17 +1148,103 @@ width:33px !important;
|
|||
color: #999;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#editbar ul li {
|
||||
padding: 4px 1px;
|
||||
}
|
||||
label[for=readonlyinput] {
|
||||
margin: 0 10px 0 2px;
|
||||
}
|
||||
|
||||
#embedreadonlyqr{
|
||||
padding-top:20px;
|
||||
margin-left:100px;
|
||||
|
||||
#qr_center {
|
||||
margin: 10px 10px auto 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#qrcode{
|
||||
margin-left:10px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
.modaldialog {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
width: 80%;
|
||||
top: 40px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#editbar ul li {
|
||||
padding: 4px 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-device-width: 320px) and (max-device-width: 720px) {
|
||||
#editbar ul li {
|
||||
padding: 4px 3px;
|
||||
}
|
||||
#editbar ul#menu_right > li {
|
||||
padding: 4px 8px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
#chaticon {
|
||||
opacity: .8;
|
||||
}
|
||||
#users {
|
||||
right: 4px;
|
||||
}
|
||||
#mycolorpicker {
|
||||
left: -72px; /* #mycolorpicker:width - #users:width */
|
||||
}
|
||||
#editorcontainer {
|
||||
margin-bottom: 33px;
|
||||
}
|
||||
#editbar ul#menu_right {
|
||||
background: #f7f7f7;
|
||||
background: -moz-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -ms-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -o-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 32px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
#editbar ul#menu_right li:not(:last-child) {
|
||||
display: none;
|
||||
}
|
||||
#editbar ul#menu_right li:last-child {
|
||||
height: 24px;
|
||||
border-radius: 0;
|
||||
margin-top: 0;
|
||||
border: 0;
|
||||
float: right;
|
||||
}
|
||||
#chaticon {
|
||||
bottom: 0;
|
||||
right: 55px;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
background: #f7f7f7;
|
||||
background: -moz-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -ms-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -o-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%);
|
||||
border: 0;
|
||||
}
|
||||
#chatbox {
|
||||
bottom: 32px;
|
||||
right: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
#editbar ul li a span {
|
||||
top: -3px;
|
||||
}
|
||||
#usericonback {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
.rtl{
|
||||
direction:RTL;
|
||||
}
|
||||
|
|
|
@ -195,6 +195,11 @@ float:right;
|
|||
color: #222;
|
||||
}
|
||||
|
||||
#importexport{
|
||||
top:103px;
|
||||
width:185px;
|
||||
}
|
||||
|
||||
ul { margin-left: 1.5em; }
|
||||
ul ul { margin-left: 0 !important; }
|
||||
ul.list-bullet1 { margin-left: 1.5em; }
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -1,6 +1,8 @@
|
|||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>Etherpad Lite</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<style>
|
||||
*{ margin:0;padding:0; }
|
||||
body {
|
||||
|
@ -13,13 +15,12 @@
|
|||
background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||
background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||
overflow-x: hidden;
|
||||
border-top: 8px solid rgba(51,51,51,.8)
|
||||
border-top: 8px solid rgba(51,51,51,.8);
|
||||
}
|
||||
#container {
|
||||
text-shadow: 0 1px 1px #fff;
|
||||
border-top: 1px solid #999;
|
||||
margin-top: 160px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
background: #eee;
|
||||
|
@ -28,7 +29,7 @@
|
|||
background: -ms-linear-gradient(#fff,#ccc);
|
||||
background: -o-linear-gradient(#fff,#ccc);
|
||||
opacity: .9;
|
||||
box-shadow: 0px 1px 8px rgba(0,0,0,0.3)
|
||||
box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
#button {
|
||||
margin: 0 auto;
|
||||
|
@ -45,7 +46,7 @@
|
|||
background: -moz-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
|
||||
background: -ms-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
|
||||
background: -o-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
|
||||
box-shadow: inset 0 1px 3px rgba(0,0,0,0.9)
|
||||
box-shadow: inset 0 1px 3px rgba(0,0,0,0.9);
|
||||
}
|
||||
#button:hover {
|
||||
cursor: pointer;
|
||||
|
@ -53,21 +54,21 @@
|
|||
background: -webkit-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
|
||||
background: -moz-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
|
||||
background: -ms-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
|
||||
background: -o-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747)
|
||||
background: -o-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
|
||||
}
|
||||
#button:active {
|
||||
box-shadow: inset 0 1px 12px rgba(0,0,0,0.9);
|
||||
background: #444
|
||||
background: #444;
|
||||
}
|
||||
#label {
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
width: 300px
|
||||
width: 300px;
|
||||
}
|
||||
input {
|
||||
vertical-align: middle;
|
||||
font-weight: bold;
|
||||
font-size: 15px
|
||||
font-size: 15px;
|
||||
}
|
||||
input[type="text"] {
|
||||
width: 243px;
|
||||
|
@ -76,23 +77,43 @@
|
|||
border: 1px solid #bbb;
|
||||
outline: none;
|
||||
border-radius: 3px;
|
||||
text-shadow: 0 0 1px #fff
|
||||
text-shadow: 0 0 1px #fff;
|
||||
}
|
||||
input[type="submit"] {
|
||||
width: 45px;
|
||||
margin-left: -50px;
|
||||
padding: 8px
|
||||
padding: 8px;
|
||||
}
|
||||
input[type="submit"]::-moz-focus-inner { border: 0 }
|
||||
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
|
||||
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
|
||||
@media only screen and (min-device-width: 320px) and (max-device-width: 600px) {
|
||||
body {
|
||||
background: #bbb;
|
||||
background: -webkit-linear-gradient(#aaa,#eee 60%) center fixed;
|
||||
height: 100%;
|
||||
}
|
||||
#container {
|
||||
margin-top: 0;
|
||||
text-align: left;
|
||||
}
|
||||
#button, #label {
|
||||
text-align: center;
|
||||
width: 95%;
|
||||
}
|
||||
form {
|
||||
text-align: center;
|
||||
}
|
||||
input[type=text] {
|
||||
width: 75%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<body onload="document.mainform.padname.focus();">
|
||||
<link href="static/custom/index.css" rel="stylesheet">
|
||||
<script src="static/custom/index.js"></script>
|
||||
<div id="container">
|
||||
<div id="button" onclick="go2Random()">New Pad</div><br><div id="label">or create/open a Pad with the name</div>
|
||||
<form action="#" name="mainform" onsubmit="go2Name();return false;">
|
||||
<input type="text" name="padname" id="padname" autofocus>
|
||||
<div id="button" onclick="go2Random()" class="translate">New Pad</div><br><div id="label" class="translate">or create/open a Pad with the name</div>
|
||||
<form action="#" onsubmit="go2Name();return false;">
|
||||
<input type="text" id="padname" autofocus>
|
||||
<input type="submit" value="OK">
|
||||
</form>
|
||||
</div>
|
||||
|
@ -124,5 +145,4 @@
|
|||
//start the costum js
|
||||
if(typeof costumStart == "function") costumStart();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -142,4 +148,4 @@ function htmlPrettyEscape(str)
|
|||
if (typeof exports !== "undefined")
|
||||
{
|
||||
exports.map = map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -79,6 +85,11 @@ function OUTER(gscope)
|
|||
var doesWrap = true;
|
||||
var hasLineNumbers = true;
|
||||
var isStyled = true;
|
||||
|
||||
// check for mobile os presence
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var isAndroid = ua.indexOf("android") > -1;
|
||||
var isMobileSafari = ua.indexOf("mobile") > -1;
|
||||
|
||||
// space around the innermost iframe element
|
||||
var iframePadLeft = MIN_LINEDIV_WIDTH + LINE_NUMBER_PADDING_RIGHT + EDIT_BODY_PADDING_LEFT;
|
||||
|
@ -1099,6 +1110,8 @@ function OUTER(gscope)
|
|||
else if (k == "showslinenumbers")
|
||||
{
|
||||
hasLineNumbers = !! value;
|
||||
// disable line numbers on mobile devices
|
||||
if(isAndroid || isMobileSafari) hasLineNumbers = false;
|
||||
setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers);
|
||||
fixView();
|
||||
}
|
||||
|
@ -1127,6 +1140,10 @@ function OUTER(gscope)
|
|||
{
|
||||
setTextSize(value);
|
||||
}
|
||||
else if (k == 'rtlistrue')
|
||||
{
|
||||
setClassPresence(root, "rtl", !! value);
|
||||
}
|
||||
}
|
||||
|
||||
editorInfo.ace_setBaseText = function(txt)
|
||||
|
@ -4069,8 +4086,6 @@ function OUTER(gscope)
|
|||
catch (e)
|
||||
{}
|
||||
if (!origSelectionRange) return false;
|
||||
var selectionParent = origSelectionRange.parentElement();
|
||||
if (selectionParent.ownerDocument != doc) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5779,31 +5794,17 @@ function OUTER(gscope)
|
|||
{
|
||||
var newNumLines = rep.lines.length();
|
||||
if (newNumLines < 1) newNumLines = 1;
|
||||
if (newNumLines != lineNumbersShown)
|
||||
{
|
||||
var container = sideDivInner;
|
||||
var odoc = outerWin.document;
|
||||
while (lineNumbersShown < newNumLines)
|
||||
{
|
||||
lineNumbersShown++;
|
||||
var n = lineNumbersShown;
|
||||
var div = odoc.createElement("DIV");
|
||||
div.appendChild(odoc.createTextNode(String(n)));
|
||||
container.appendChild(div);
|
||||
}
|
||||
while (lineNumbersShown > newNumLines)
|
||||
{
|
||||
container.removeChild(container.lastChild);
|
||||
lineNumbersShown--;
|
||||
}
|
||||
}
|
||||
|
||||
//update height of all current line numbers
|
||||
if (currentCallStack && currentCallStack.domClean)
|
||||
{
|
||||
var a = sideDivInner.firstChild;
|
||||
var b = doc.body.firstChild;
|
||||
var n = 0;
|
||||
while (a && b)
|
||||
{
|
||||
if(n > lineNumbersShown) //all updated, break
|
||||
break;
|
||||
|
||||
var h = (b.clientHeight || b.offsetHeight);
|
||||
if (b.nextSibling)
|
||||
{
|
||||
|
@ -5817,10 +5818,42 @@ function OUTER(gscope)
|
|||
if (h)
|
||||
{
|
||||
var hpx = h + "px";
|
||||
if (a.style.height != hpx) a.style.height = hpx;
|
||||
if (a.style.height != hpx) {
|
||||
a.style.height = hpx;
|
||||
}
|
||||
}
|
||||
a = a.nextSibling;
|
||||
b = b.nextSibling;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
if (newNumLines != lineNumbersShown)
|
||||
{
|
||||
var container = sideDivInner;
|
||||
var odoc = outerWin.document;
|
||||
var fragment = odoc.createDocumentFragment();
|
||||
while (lineNumbersShown < newNumLines)
|
||||
{
|
||||
lineNumbersShown++;
|
||||
var n = lineNumbersShown;
|
||||
var div = odoc.createElement("DIV");
|
||||
//calculate height for new line number
|
||||
var h = (b.clientHeight || b.offsetHeight);
|
||||
if (b.nextSibling)
|
||||
h = b.nextSibling.offsetTop - b.offsetTop;
|
||||
if(h) // apply style to div
|
||||
div.style.height = h +"px";
|
||||
|
||||
div.appendChild(odoc.createTextNode(String(n)));
|
||||
fragment.appendChild(div);
|
||||
b = b.nextSibling;
|
||||
}
|
||||
container.appendChild(fragment);
|
||||
while (lineNumbersShown > newNumLines)
|
||||
{
|
||||
container.removeChild(container.lastChild);
|
||||
lineNumbersShown--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc., 2011 Peter 'Pita' Martischka (Primary Technology Ltd)
|
||||
*
|
||||
|
@ -16,21 +22,33 @@
|
|||
|
||||
var chat = (function()
|
||||
{
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var isAndroid = ua.indexOf("android") > -1;
|
||||
var isMobileSafari = ua.indexOf("mobile") > -1;
|
||||
var bottomMargin = "0px";
|
||||
var sDuration = 500;
|
||||
var hDuration = 750;
|
||||
var chatMentions = 0;
|
||||
var title = document.title;
|
||||
if (isAndroid || isMobileSafari){
|
||||
sDuration = 0;
|
||||
hDuration = 0;
|
||||
}
|
||||
var self = {
|
||||
show: function ()
|
||||
{
|
||||
$("#chaticon").hide("slide", {
|
||||
direction: "down"
|
||||
}, 500, function ()
|
||||
}, hDuration, function ()
|
||||
{
|
||||
$("#chatbox").show("slide", {
|
||||
direction: "down"
|
||||
}, 750, self.scrollDown);
|
||||
}, sDuration, self.scrollDown);
|
||||
$("#chatbox").resizable(
|
||||
{
|
||||
handles: 'nw',
|
||||
minHeight: 40,
|
||||
minWidth: 80,
|
||||
start: function (event, ui)
|
||||
{
|
||||
$("#focusprotector").show();
|
||||
|
@ -39,7 +57,10 @@ var chat = (function()
|
|||
{
|
||||
$("#focusprotector").hide();
|
||||
|
||||
$("#chatbox").css({right: "20px", bottom: "0px", left: "", top: ""});
|
||||
if(isAndroid || isMobileSafari)
|
||||
bottommargin = "32px";
|
||||
|
||||
$("#chatbox").css({right: "20px", bottom: bottomMargin, left: "", top: ""});
|
||||
|
||||
self.scrollDown();
|
||||
}
|
||||
|
@ -51,9 +72,9 @@ var chat = (function()
|
|||
hide: function ()
|
||||
{
|
||||
$("#chatcounter").text("0");
|
||||
$("#chatbox").hide("slide", { direction: "down" }, 750, function()
|
||||
$("#chatbox").hide("slide", { direction: "down" }, sDuration, function()
|
||||
{
|
||||
$("#chaticon").show("slide", { direction: "down" }, 500);
|
||||
$("#chaticon").show("slide", { direction: "down" }, hDuration);
|
||||
});
|
||||
},
|
||||
scrollDown: function()
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/colorutils.js
|
||||
// THIS FILE IS ALSO SERVED AS CLIENT-SIDE JS
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.contentcollector
|
||||
// %APPJET%: import("etherpad.collab.ace.easysync2.Changeset");
|
||||
// %APPJET%: import("etherpad.admin.plugins");
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/cssmanager.js
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.domline
|
||||
// %APPJET%: import("etherpad.admin.plugins");
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/domline.js
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.domline
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.easysync2
|
||||
// %APPJET%: jimport("com.etherpad.Easysync2Support");
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/easysync2.js
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.easysync2
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.linestylefilter
|
||||
// %APPJET%: import("etherpad.collab.ace.easysync2.Changeset");
|
||||
// %APPJET%: import("etherpad.admin.plugins");
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/linestylefilter.js
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.linestylefilter
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc., 2011 Peter 'Pita' Martischka (Primary Technology Ltd)
|
||||
*
|
||||
|
@ -21,6 +27,8 @@ var LineNumbersDisabled = false;
|
|||
var noColors = false;
|
||||
var useMonospaceFontGlobal = false;
|
||||
var globalUserName = false;
|
||||
var hideQRCode = false;
|
||||
var rtlIsTrue = false;
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
@ -86,12 +94,15 @@ function getParams()
|
|||
var showLineNumbers = params["showLineNumbers"];
|
||||
var useMonospaceFont = params["useMonospaceFont"];
|
||||
var IsnoColors = params["noColors"];
|
||||
var hideQRCode = params["hideQRCode"];
|
||||
var rtl = params["rtl"];
|
||||
|
||||
if(IsnoColors)
|
||||
{
|
||||
if(IsnoColors == "true")
|
||||
{
|
||||
noColors = true;
|
||||
$('#clearAuthorship').hide();
|
||||
}
|
||||
}
|
||||
if(showControls)
|
||||
|
@ -102,7 +113,6 @@ function getParams()
|
|||
$('#editorcontainer').css({"top":"0px"});
|
||||
}
|
||||
}
|
||||
|
||||
if(showChat)
|
||||
{
|
||||
if(showChat == "false")
|
||||
|
@ -110,7 +120,6 @@ function getParams()
|
|||
$('#chaticon').hide();
|
||||
}
|
||||
}
|
||||
|
||||
if(showLineNumbers)
|
||||
{
|
||||
if(showLineNumbers == "false")
|
||||
|
@ -118,7 +127,6 @@ function getParams()
|
|||
LineNumbersDisabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(useMonospaceFont)
|
||||
{
|
||||
if(useMonospaceFont == "true")
|
||||
|
@ -126,13 +134,22 @@ function getParams()
|
|||
useMonospaceFontGlobal = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(userName)
|
||||
{
|
||||
// If the username is set as a parameter we should set a global value that we can call once we have initiated the pad.
|
||||
globalUserName = unescape(userName);
|
||||
}
|
||||
if(hideQRCode)
|
||||
{
|
||||
$('#qrcode').hide();
|
||||
}
|
||||
if(rtl)
|
||||
{
|
||||
if(rtl == "true")
|
||||
{
|
||||
rtlIsTrue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlVars()
|
||||
|
@ -177,7 +194,7 @@ function handshake()
|
|||
padId = decodeURIComponent(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
|
||||
|
||||
if(!isReconnect)
|
||||
document.title = document.title + " | " + padId;
|
||||
document.title = document.title + " | " + padId.replace(/_+/g, ' ');
|
||||
|
||||
var token = readCookie("token");
|
||||
if (token == null)
|
||||
|
@ -291,6 +308,11 @@ function handshake()
|
|||
{
|
||||
pad.changeViewOption('noColors', true);
|
||||
}
|
||||
|
||||
if (rtlIsTrue == true)
|
||||
{
|
||||
pad.changeViewOption('rtl', true);
|
||||
}
|
||||
|
||||
// If the Monospacefont value is set to true then change it to monospace.
|
||||
if (useMonospaceFontGlobal == true)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -151,7 +157,7 @@ var padeditbar = (function()
|
|||
}, cmd, true);
|
||||
}
|
||||
}
|
||||
padeditor.ace.focus();
|
||||
if(padeditor.ace) padeditor.ace.focus();
|
||||
},
|
||||
toogleDropDown: function(moduleName)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -89,6 +95,7 @@ var padeditor = (function()
|
|||
|
||||
self.ace.setProperty("showsauthorcolors", noColors);
|
||||
|
||||
self.ace.setProperty("rtlIsTrue", rtlIsTrue);
|
||||
},
|
||||
initViewZoom: function()
|
||||
{
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -230,10 +236,16 @@ var padimpexp = (function()
|
|||
var self = {
|
||||
init: function()
|
||||
{
|
||||
//get /p/padname
|
||||
var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname)
|
||||
//get http://example.com/p/padname
|
||||
var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path)
|
||||
|
||||
// build the export links
|
||||
$("#exporthtmla").attr("href", document.location.pathname + "/export/html");
|
||||
$("#exportplaina").attr("href", document.location.pathname + "/export/txt");
|
||||
$("#exportwordlea").attr("href", document.location.pathname + "/export/wordle");
|
||||
$("#exporthtmla").attr("href", pad_root_path + "/export/html");
|
||||
$("#exportplaina").attr("href", pad_root_path + "/export/txt");
|
||||
$("#exportwordlea").attr("href", pad_root_path + "/export/wordle");
|
||||
$("#exportdokuwikia").attr("href", pad_root_path + "/export/dokuwiki");
|
||||
|
||||
//hide stuff thats not avaible if abiword is disabled
|
||||
if(clientVars.abiwordAvailable == "no")
|
||||
|
@ -241,29 +253,29 @@ var padimpexp = (function()
|
|||
$("#exportworda").remove();
|
||||
$("#exportpdfa").remove();
|
||||
$("#exportopena").remove();
|
||||
$("#importexport").css({"height":"95px"});
|
||||
$("#importexportline").css({"height":"95px"});
|
||||
$("#importexport").css({"height":"115px"});
|
||||
$("#importexportline").css({"height":"115px"});
|
||||
$("#import").html("Import is not available");
|
||||
}
|
||||
else if(clientVars.abiwordAvailable == "withoutPDF")
|
||||
{
|
||||
$("#exportpdfa").remove();
|
||||
|
||||
$("#exportworda").attr("href", document.location.pathname + "/export/doc");
|
||||
$("#exportopena").attr("href", document.location.pathname + "/export/odt");
|
||||
$("#exportworda").attr("href", pad_root_path + "/export/doc");
|
||||
$("#exportopena").attr("href", pad_root_path + "/export/odt");
|
||||
|
||||
$("#importexport").css({"height":"142px"});
|
||||
$("#importexportline").css({"height":"142px"});
|
||||
|
||||
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
||||
$("#importform").attr('action', pad_root_url + "/import");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#exportworda").attr("href", document.location.pathname + "/export/doc");
|
||||
$("#exportpdfa").attr("href", document.location.pathname + "/export/pdf");
|
||||
$("#exportopena").attr("href", document.location.pathname + "/export/odt");
|
||||
$("#exportworda").attr("href", pad_root_path + "/export/doc");
|
||||
$("#exportpdfa").attr("href", pad_root_path + "/export/pdf");
|
||||
$("#exportopena").attr("href", pad_root_path + "/export/odt");
|
||||
|
||||
$("#importform").get(0).setAttribute('action', document.location.pathname + "/import");
|
||||
$("#importform").attr('action', pad_root_path + "/import");
|
||||
}
|
||||
|
||||
$("#impexp-close").click(function()
|
||||
|
@ -301,7 +313,7 @@ var padimpexp = (function()
|
|||
},
|
||||
export2Wordle: function()
|
||||
{
|
||||
var padUrl = document.location.href + "/export/txt";
|
||||
var padUrl = $('#exportwordlea').attr('href').replace(/\/wordle$/, '/txt')
|
||||
|
||||
$.get(padUrl, function(data)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -711,7 +717,14 @@ var paduserlist = (function()
|
|||
}
|
||||
|
||||
$("#myswatch").css({'background-color': myUserInfo.colorId});
|
||||
$("#usericon").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId});
|
||||
|
||||
if ($.browser.msie && parseInt($.browser.version) <= 8) {
|
||||
$("#usericon").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId,'background-color': myUserInfo.colorId});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#usericon").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId});
|
||||
}
|
||||
}
|
||||
};
|
||||
return self;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
plugins = {
|
||||
callHook: function(hookName, args)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<title>Etherpad Lite</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<!-- CSS -->
|
||||
<link href="../static/css/pad.css" rel="stylesheet">
|
||||
<!-- javascript -->
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var clientVars = {}; // ]]>
|
||||
var clientVars = {};
|
||||
// ]]>
|
||||
</script>
|
||||
<script src="../socket.io/socket.io.js"></script>
|
||||
<script src="../minified/pad.js"></script>
|
||||
|
@ -23,60 +25,60 @@
|
|||
<div id="editbar">
|
||||
|
||||
<ul id="menu_left">
|
||||
<li onClick="window.pad&&pad.editbarClick('bold');return false" >
|
||||
<li onClick="window.pad&&pad.editbarClick('bold');return false" >
|
||||
<a title="Bold (ctrl-B)">
|
||||
<div class="buttonicon" style="background-position:0px -116px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('italic'); return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('italic'); return false;" >
|
||||
<a title="Italics (ctrl-I)">
|
||||
<div class="buttonicon" style="background-position:0px 0px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
||||
<a title="Underline (ctrl-U)">
|
||||
<div class="buttonicon" style="background-position:0px -236px;margin-top:1px;"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('strikethrough');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('strikethrough');return false;" >
|
||||
<a title="Strikethrough">
|
||||
<div class="buttonicon" style="background-position:0px -200px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;" >
|
||||
<a title="Toggle Ordered List">
|
||||
<div class="buttonicon" style="background-position:0px -436px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;" >
|
||||
<a title="Toggle Bullet List">
|
||||
<div class="buttonicon" style="background-position:0px -34px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('indent');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('indent');return false;" >
|
||||
<a title="Indent">
|
||||
<div class="buttonicon" style="background-position:0px -52px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('outdent');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('outdent');return false;" >
|
||||
<a title="Unindent">
|
||||
<div class="buttonicon" style="background-position:0px -134px"></div>
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li onClick="window.pad&&pad.editbarClick('undo');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('undo');return false;" >
|
||||
<a title="Undo (ctrl-Z)">
|
||||
<div class="buttonicon" style="background-position:0px -255px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('redo');return false;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('redo');return false;" >
|
||||
<a title="Redo (ctrl-Y)">
|
||||
<div class="buttonicon" style="background-position:0px -166px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li onClick="window.pad&&pad.editbarClick('clearauthorship');return false;" >
|
||||
<li id="clearAuthorship" onClick="window.pad&&pad.editbarClick('clearauthorship');return false;" >
|
||||
<a title="Clear Authorship Colors">
|
||||
<div class="buttonicon" style="background-position:0px -86px"></div>
|
||||
</a>
|
||||
|
@ -85,12 +87,12 @@
|
|||
|
||||
<ul id="menu_right">
|
||||
|
||||
<li onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
||||
<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;" >
|
||||
<li onClick="window.pad&&pad.editbarClick('embed');return false;" >
|
||||
<a id="embedlink" title="Share and Embed this pad">
|
||||
<div class="buttonicon" style="background-position:0px -18px"></div>
|
||||
</a>
|
||||
|
@ -101,7 +103,7 @@
|
|||
<div class="buttonicon" style="background-position:0px -218px"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" >
|
||||
<li id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" >
|
||||
<a title="Show connected users">
|
||||
<div class="buttonicon" id="usericonback" style="background-position:0px -184px;display:inline-block;"></div>
|
||||
<span id="online_count">1</span>
|
||||
|
@ -208,9 +210,10 @@
|
|||
<a id="exportworda" target="_blank" class="exportlink"><div class="exporttype" id="exportword">Microsoft Word</div></a>
|
||||
<a id="exportpdfa" target="_blank" class="exportlink"><div class="exporttype" id="exportpdf">PDF</div></a>
|
||||
<a id="exportopena" target="_blank" class="exportlink"><div class="exporttype" id="exportopen">OpenDocument</div></a>
|
||||
<a id="exportdokuwikia" target="_blank" class="exportlink"><div class="exporttype" id="exportdokuwiki">DokuWiki text</div></a>
|
||||
<a id="exportwordlea" target="_blank" onClick="padimpexp.export2Wordle();return false;" class="exportlink"><div class="exporttype" id="exportwordle">Wordle</div></a>
|
||||
<form id="wordlepost" name="wall" action="http://wordle.net/advanced" method="POST" style="margin-left:0px;">
|
||||
<div id="hidetext" style=""><textarea id="text" name="text" id="text" style="display:none;">Coming soon!</textarea></div>
|
||||
<div id="hidetext" style=""><textarea id="text" name="text" style="display:none;">Coming soon!</textarea></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -230,7 +233,7 @@
|
|||
</div><br/>
|
||||
<div id="qrcode">
|
||||
<label for="embedreadonlyqr">QR code:</label><br/>
|
||||
<img id="embedreadonlyqr">
|
||||
<div id="qr_center"><img id="embedreadonlyqr"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
return "t." + randomstring;
|
||||
}
|
||||
|
||||
var socket, token, padId;
|
||||
var socket, token, padId, export_links;
|
||||
|
||||
$(document).ready(function ()
|
||||
{
|
||||
|
@ -65,7 +65,7 @@
|
|||
padId = decodeURIComponent(urlParts[urlParts.length-2]);
|
||||
|
||||
//set the title
|
||||
document.title = document.title + " | " + padId;
|
||||
document.title = document.title + " | " + padId.replace(/_+/g, ' ');
|
||||
|
||||
//ensure we have a token
|
||||
token = readCookie("token");
|
||||
|
@ -110,6 +110,9 @@
|
|||
$("body").html("<h2>You have no permission to access this pad</h2>")
|
||||
}
|
||||
});
|
||||
|
||||
//get all the export links
|
||||
export_links = $('#export > .exportlink')
|
||||
});
|
||||
|
||||
//sends a message over the socket
|
||||
|
@ -141,6 +144,19 @@
|
|||
loadBroadcastSliderJS();
|
||||
loadBroadcastRevisionsJS();
|
||||
loadBroadcastJS();
|
||||
|
||||
//initialize export ui
|
||||
padimpexp.init();
|
||||
|
||||
//change export urls when the slider moves
|
||||
var export_rev_regex = /(\/\d+)?\/export/
|
||||
BroadcastSlider.onSlider(function(revno)
|
||||
{
|
||||
export_links.each(function()
|
||||
{
|
||||
this.setAttribute('href', this.href.replace(export_rev_regex, '/' + revno + '/export'));
|
||||
});
|
||||
});
|
||||
|
||||
//fire all start functions of these scripts, formerly fired with window.load
|
||||
for(var i=0;i < fireWhenAllScriptsAreLoaded.length;i++)
|
||||
|
@ -269,6 +285,13 @@
|
|||
|
||||
<div id="editbarright" class="editbarright">
|
||||
<!-- termporary place holder-->
|
||||
<ul>
|
||||
<li onClick="window.padeditbar.toolbarClick('import_export');return false;">
|
||||
<a id="exportlink" title="Export to different document formats">
|
||||
<div class="buttonicon" style="background-position:0px -68px"></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a id = "returnbutton">Return to pad</a>
|
||||
<script>
|
||||
if(document.referrer.length > 0 && document.referrer.substring(document.referrer.lastIndexOf("/")-1,document.referrer.lastIndexOf("/")) === "p") {
|
||||
|
@ -320,6 +343,24 @@
|
|||
</div>
|
||||
|
||||
<div id="mainmodals"></div>
|
||||
|
||||
<!-- export code -->
|
||||
<div id="importexport">
|
||||
|
||||
<div id="export">
|
||||
Export current version as:
|
||||
<a id="exporthtmla" target="_blank" class="exportlink"><div class="exporttype" id="exporthtml">HTML</div></a>
|
||||
<a id="exportplaina" target="_blank" class="exportlink"><div class="exporttype" id="exportplain">Plain text</div></a>
|
||||
<a id="exportworda" target="_blank" class="exportlink"><div class="exporttype" id="exportword">Microsoft Word</div></a>
|
||||
<a id="exportpdfa" target="_blank" class="exportlink"><div class="exporttype" id="exportpdf">PDF</div></a>
|
||||
<a id="exportopena" target="_blank" class="exportlink"><div class="exporttype" id="exportopen">OpenDocument</div></a>
|
||||
<a id="exportdokuwikia" target="_blank" class="exportlink"><div class="exporttype" id="exportdokuwiki">DokuWiki text</div></a>
|
||||
<a id="exportwordlea" target="_blank" onClick="padimpexp.export2Wordle();return false;" class="exportlink"><div class="exporttype" id="exportwordle">Wordle</div></a>
|
||||
<form id="wordlepost" name="wall" action="http://wordle.net/advanced" method="POST" style="margin-left:0px;">
|
||||
<div id="hidetext" style=""><textarea id="text" name="text" id="text" style="display:none;">Coming soon!</textarea></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue