From e940b76189bfd11158eeeb44a33a7cdfe143cfc0 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 8 Jun 2010 17:49:23 +0200 Subject: removed old files --- .../src/etherpad/collab/ace/contentcollector.js | 527 --------------------- .../src/etherpad/collab/ace/linestylefilter.js | 253 ---------- trunk/etherpad/src/static/js/ace.js | 29 -- .../src/static/js/linestylefilter_client.js | 252 ---------- .../src/templates/email/eepnet_license_info.ejs | 72 --- trunk/etherpad/src/templates/pad/pad_content.ejs | 297 ------------ trunk/etherpad/src/templates/pad/padfull_body.ejs | 32 -- .../templates/pro/admin/pne-license-manager.ejs | 132 ------ 8 files changed, 1594 deletions(-) delete mode 100644 trunk/etherpad/src/etherpad/collab/ace/contentcollector.js delete mode 100644 trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js delete mode 100644 trunk/etherpad/src/static/js/ace.js delete mode 100644 trunk/etherpad/src/static/js/linestylefilter_client.js delete mode 100644 trunk/etherpad/src/templates/email/eepnet_license_info.ejs delete mode 100644 trunk/etherpad/src/templates/pad/pad_content.ejs delete mode 100644 trunk/etherpad/src/templates/pad/padfull_body.ejs delete mode 100644 trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs diff --git a/trunk/etherpad/src/etherpad/collab/ace/contentcollector.js b/trunk/etherpad/src/etherpad/collab/ace/contentcollector.js deleted file mode 100644 index 5dd4f9c..0000000 --- a/trunk/etherpad/src/etherpad/collab/ace/contentcollector.js +++ /dev/null @@ -1,527 +0,0 @@ -// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/contentcollector.js -import("etherpad.collab.ace.easysync2.Changeset") - -/** - * Copyright 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var _MAX_LIST_LEVEL = 8; - -function sanitizeUnicode(s) { - return s.replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?'); -} - -function makeContentCollector(collectStyles, browser, apool, domInterface, - className2Author) { - browser = browser || {}; - - var dom = domInterface || { - isNodeText: function(n) { - return (n.nodeType == 3); - }, - nodeTagName: function(n) { - return n.tagName; - }, - nodeValue: function(n) { - return n.nodeValue; - }, - nodeNumChildren: function(n) { - return n.childNodes.length; - }, - nodeChild: function(n, i) { - return n.childNodes.item(i); - }, - nodeProp: function(n, p) { - return n[p]; - }, - nodeAttr: function(n, a) { - return n.getAttribute(a); - }, - optNodeInnerHTML: function(n) { - return n.innerHTML; - } - }; - - var _blockElems = { "div":1, "p":1, "pre":1, "li":1 }; - function isBlockElement(n) { - return !!_blockElems[(dom.nodeTagName(n) || "").toLowerCase()]; - } - function textify(str) { - return sanitizeUnicode( - str.replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' ')); - } - function getAssoc(node, name) { - return dom.nodeProp(node, "_magicdom_"+name); - } - - var lines = (function() { - var textArray = []; - var attribsArray = []; - var attribsBuilder = null; - var op = Changeset.newOp('+'); - var self = { - length: function() { return textArray.length; }, - atColumnZero: function() { - return textArray[textArray.length-1] === ""; - }, - startNew: function() { - textArray.push(""); - self.flush(true); - attribsBuilder = Changeset.smartOpAssembler(); - }, - textOfLine: function(i) { return textArray[i]; }, - appendText: function(txt, attrString) { - textArray[textArray.length-1] += txt; - //dmesg(txt+" / "+attrString); - op.attribs = attrString; - op.chars = txt.length; - attribsBuilder.append(op); - }, - textLines: function() { return textArray.slice(); }, - attribLines: function() { return attribsArray; }, - // call flush only when you're done - flush: function(withNewline) { - if (attribsBuilder) { - attribsArray.push(attribsBuilder.toString()); - attribsBuilder = null; - } - } - }; - self.startNew(); - return self; - }()); - var cc = {}; - function _ensureColumnZero(state) { - if (! lines.atColumnZero()) { - _startNewLine(state); - } - } - var selection, startPoint, endPoint; - var selStart = [-1,-1], selEnd = [-1,-1]; - var blockElems = { "div":1, "p":1, "pre":1 }; - function _isEmpty(node, state) { - // consider clean blank lines pasted in IE to be empty - if (dom.nodeNumChildren(node) == 0) return true; - if (dom.nodeNumChildren(node) == 1 && - getAssoc(node, "shouldBeEmpty") && dom.optNodeInnerHTML(node) == " " - && ! getAssoc(node, "unpasted")) { - if (state) { - var child = dom.nodeChild(node, 0); - _reachPoint(child, 0, state); - _reachPoint(child, 1, state); - } - return true; - } - return false; - } - function _pointHere(charsAfter, state) { - var ln = lines.length()-1; - var chr = lines.textOfLine(ln).length; - if (chr == 0 && state.listType && state.listType != 'none') { - chr += 1; // listMarker - } - chr += charsAfter; - return [ln, chr]; - } - function _reachBlockPoint(nd, idx, state) { - if (! dom.isNodeText(nd)) _reachPoint(nd, idx, state); - } - function _reachPoint(nd, idx, state) { - if (startPoint && nd == startPoint.node && startPoint.index == idx) { - selStart = _pointHere(0, state); - } - if (endPoint && nd == endPoint.node && endPoint.index == idx) { - selEnd = _pointHere(0, state); - } - } - function _incrementFlag(state, flagName) { - state.flags[flagName] = (state.flags[flagName] || 0)+1; - } - function _decrementFlag(state, flagName) { - state.flags[flagName]--; - } - function _incrementAttrib(state, attribName) { - if (! state.attribs[attribName]) { - state.attribs[attribName] = 1; - } - else { - state.attribs[attribName]++; - } - _recalcAttribString(state); - } - function _decrementAttrib(state, attribName) { - state.attribs[attribName]--; - _recalcAttribString(state); - } - function _enterList(state, listType) { - var oldListType = state.listType; - state.listLevel = (state.listLevel || 0)+1; - if (listType != 'none') { - state.listNesting = (state.listNesting || 0)+1; - } - state.listType = listType; - _recalcAttribString(state); - return oldListType; - } - function _exitList(state, oldListType) { - state.listLevel--; - if (state.listType != 'none') { - state.listNesting--; - } - state.listType = oldListType; - _recalcAttribString(state); - } - function _enterAuthor(state, author) { - var oldAuthor = state.author; - state.authorLevel = (state.authorLevel || 0)+1; - state.author = author; - _recalcAttribString(state); - return oldAuthor; - } - function _exitAuthor(state, oldAuthor) { - state.authorLevel--; - state.author = oldAuthor; - _recalcAttribString(state); - } - function _recalcAttribString(state) { - var lst = []; - for(var a in state.attribs) { - if (state.attribs[a]) { - lst.push([a,'true']); - } - } - if (state.authorLevel > 0) { - var authorAttrib = ['author', state.author]; - if (apool.putAttrib(authorAttrib, true) >= 0) { - // require that author already be in pool - // (don't add authors from other documents, etc.) - lst.push(authorAttrib); - } - } - state.attribString = Changeset.makeAttribsString('+', lst, apool); - } - function _produceListMarker(state) { - lines.appendText('*', Changeset.makeAttribsString( - '+', [['list', state.listType], - ['insertorder', 'first']], - apool)); - } - function _startNewLine(state) { - if (state) { - var atBeginningOfLine = lines.textOfLine(lines.length()-1).length == 0; - if (atBeginningOfLine && state.listType && state.listType != 'none') { - _produceListMarker(state); - } - } - lines.startNew(); - } - cc.notifySelection = function (sel) { - if (sel) { - selection = sel; - startPoint = selection.startPoint; - endPoint = selection.endPoint; - } - }; - cc.collectContent = function (node, state) { - if (! state) { - state = {flags: {/*name -> nesting counter*/}, - attribs: {/*name -> nesting counter*/}, - attribString: ''}; - } - var isBlock = isBlockElement(node); - var isEmpty = _isEmpty(node, state); - if (isBlock) _ensureColumnZero(state); - var startLine = lines.length()-1; - _reachBlockPoint(node, 0, state); - if (dom.isNodeText(node)) { - var txt = dom.nodeValue(node); - var rest = ''; - var x = 0; // offset into original text - if (txt.length == 0) { - if (startPoint && node == startPoint.node) { - selStart = _pointHere(0, state); - } - if (endPoint && node == endPoint.node) { - selEnd = _pointHere(0, state); - } - } - while (txt.length > 0) { - var consumed = 0; - if (state.flags.preMode) { - var firstLine = txt.split('\n',1)[0]; - consumed = firstLine.length+1; - rest = txt.substring(consumed); - txt = firstLine; - } - else { /* will only run this loop body once */ } - if (startPoint && node == startPoint.node && - startPoint.index-x <= txt.length) { - selStart = _pointHere(startPoint.index-x, state); - } - if (endPoint && node == endPoint.node && - endPoint.index-x <= txt.length) { - selEnd = _pointHere(endPoint.index-x, state); - } - var txt2 = txt; - if ((! state.flags.preMode) && /^[\r\n]*$/.exec(txt)) { - // prevents textnodes containing just "\n" from being significant - // in safari when pasting text, now that we convert them to - // spaces instead of removing them, because in other cases - // removing "\n" from pasted HTML will collapse words together. - txt2 = ""; - } - var atBeginningOfLine = lines.textOfLine(lines.length()-1).length == 0; - if (atBeginningOfLine) { - // newlines in the source mustn't become spaces at beginning of line box - txt2 = txt2.replace(/^\n*/, ''); - } - if (atBeginningOfLine && state.listType && state.listType != 'none') { - _produceListMarker(state); - } - lines.appendText(textify(txt2), state.attribString); - x += consumed; - txt = rest; - if (txt.length > 0) { - _startNewLine(state); - } - } - } - else { - var tname = (dom.nodeTagName(node) || "").toLowerCase(); - if (tname == "br") { - _startNewLine(state); - } - else if (tname == "script" || tname == "style") { - // ignore - } - else if (! isEmpty) { - var styl = dom.nodeAttr(node, "style"); - var cls = dom.nodeProp(node, "className"); - - var isPre = (tname == "pre"); - if ((! isPre) && browser.safari) { - isPre = (styl && /\bwhite-space:\s*pre\b/i.exec(styl)); - } - if (isPre) _incrementFlag(state, 'preMode'); - var attribs = null; - var oldListTypeOrNull = null; - var oldAuthorOrNull = null; - if (collectStyles) { - function doAttrib(na) { - attribs = (attribs || []); - attribs.push(na); - _incrementAttrib(state, na); - } - if (tname == "b" || (styl && /\bfont-weight:\s*bold\b/i.exec(styl)) || - tname == "strong") { - doAttrib("bold"); - } - if (tname == "i" || (styl && /\bfont-style:\s*italic\b/i.exec(styl)) || - tname == "em") { - doAttrib("italic"); - } - if (tname == "u" || (styl && /\btext-decoration:\s*underline\b/i.exec(styl)) || - tname == "ins") { - doAttrib("underline"); - } - if (tname == "s" || (styl && /\btext-decoration:\s*line-through\b/i.exec(styl)) || - tname == "del") { - doAttrib("strikethrough"); - } - if (tname == "h1") { - doAttrib("h1"); - } - if (tname == "h2") { - doAttrib("h2"); - } - if (tname == "h3") { - doAttrib("h3"); - } - if (tname == "h4") { - doAttrib("h4"); - } - if (tname == "h5") { - doAttrib("h5"); - } - if (tname == "h6") { - doAttrib("h6"); - } - if (tname == "ul") { - var type; - var rr = cls && /(?:^| )list-(bullet[12345678])\b/.exec(cls); - type = rr && rr[1] || "bullet"+ - String(Math.min(_MAX_LIST_LEVEL, (state.listNesting||0)+1)); - oldListTypeOrNull = (_enterList(state, type) || 'none'); - } - else if ((tname == "div" || tname == "p") && cls && - cls.match(/(?:^| )ace-line\b/)) { - oldListTypeOrNull = (_enterList(state, type) || 'none'); - } - if (className2Author && cls) { - var classes = cls.match(/\S+/g); - if (classes && classes.length > 0) { - for(var i=0;i=0; i--) { - var oldString = lineStrings[i]; - var oldAttribString = lineAttribs[i]; - if (oldString.length > lineLimit+buffer) { - var newStrings = []; - var newAttribStrings = []; - while (oldString.length > lineLimit) { - //var semiloc = oldString.lastIndexOf(';', lineLimit-1); - //var lengthToTake = (semiloc >= 0 ? (semiloc+1) : lineLimit); - lengthToTake = lineLimit; - newStrings.push(oldString.substring(0, lengthToTake)); - oldString = oldString.substring(lengthToTake); - newAttribStrings.push(Changeset.subattribution(oldAttribString, - 0, lengthToTake)); - oldAttribString = Changeset.subattribution(oldAttribString, - lengthToTake); - } - if (oldString.length > 0) { - newStrings.push(oldString); - newAttribStrings.push(oldAttribString); - } - function fixLineNumber(lineChar) { - if (lineChar[0] < 0) return; - var n = lineChar[0]; - var c = lineChar[1]; - if (n > i) { - n += (newStrings.length-1); - } - else if (n == i) { - var a = 0; - while (c > newStrings[a].length) { - c -= newStrings[a].length; - a++; - } - n += a; - } - lineChar[0] = n; - lineChar[1] = c; - } - fixLineNumber(ss); - fixLineNumber(se); - linesWrapped++; - numLinesAfter += newStrings.length; - - newStrings.unshift(i, 1); - lineStrings.splice.apply(lineStrings, newStrings); - newAttribStrings.unshift(i, 1); - lineAttribs.splice.apply(lineAttribs, newAttribStrings); - } - } - return {linesWrapped:linesWrapped, numLinesAfter:numLinesAfter}; - } - var wrapData = fixLongLines(); - - return { selStart: ss, selEnd: se, linesWrapped: wrapData.linesWrapped, - numLinesAfter: wrapData.numLinesAfter, - lines: lineStrings, lineAttribs: lineAttribs }; - } - - return cc; -} diff --git a/trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js b/trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js deleted file mode 100644 index c7f79a5..0000000 --- a/trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js +++ /dev/null @@ -1,253 +0,0 @@ -// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/linestylefilter.js -import("etherpad.collab.ace.easysync2.Changeset"); - -/** - * Copyright 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// requires: easysync2.Changeset - -var linestylefilter = {}; - -linestylefilter.ATTRIB_CLASSES = { - 'bold':'tag:b', - 'italic':'tag:i', - 'underline':'tag:u', - 'strikethrough':'tag:s', - 'h1':'tag:h1', - 'h2':'tag:h2', - 'h3':'tag:h3', - 'h4':'tag:h4', - 'h5':'tag:h5', - 'h6':'tag:h6' -}; - -linestylefilter.getAuthorClassName = function(author) { - return "author-"+author.replace(/[^a-y0-9]/g, function(c) { - if (c == ".") return "-"; - return 'z'+c.charCodeAt(0)+'z'; - }); -}; - -// lineLength is without newline; aline includes newline, -// but may be falsy if lineLength == 0 -linestylefilter.getLineStyleFilter = function(lineLength, aline, - textAndClassFunc, apool) { - - if (lineLength == 0) return textAndClassFunc; - - var nextAfterAuthorColors = textAndClassFunc; - - var authorColorFunc = (function() { - var lineEnd = lineLength; - var curIndex = 0; - var extraClasses; - var leftInAuthor; - - function attribsToClasses(attribs) { - var classes = ''; - Changeset.eachAttribNumber(attribs, function(n) { - var key = apool.getAttribKey(n); - if (key) { - var value = apool.getAttribValue(n); - if (value) { - if (key == 'author') { - classes += ' '+linestylefilter.getAuthorClassName(value); - } - else if (key == 'list') { - classes += ' list:'+value; - } - else if (linestylefilter.ATTRIB_CLASSES[key]) { - classes += ' '+linestylefilter.ATTRIB_CLASSES[key]; - } - } - } - }); - return classes.substring(1); - } - - var attributionIter = Changeset.opIterator(aline); - var nextOp, nextOpClasses; - function goNextOp() { - nextOp = attributionIter.next(); - nextOpClasses = (nextOp.opcode && attribsToClasses(nextOp.attribs)); - } - goNextOp(); - function nextClasses() { - if (curIndex < lineEnd) { - extraClasses = nextOpClasses; - leftInAuthor = nextOp.chars; - goNextOp(); - while (nextOp.opcode && nextOpClasses == extraClasses) { - leftInAuthor += nextOp.chars; - goNextOp(); - } - } - } - nextClasses(); - - return function(txt, cls) { - while (txt.length > 0) { - if (leftInAuthor <= 0) { - // prevent infinite loop if something funny's going on - return nextAfterAuthorColors(txt, cls); - } - var spanSize = txt.length; - if (spanSize > leftInAuthor) { - spanSize = leftInAuthor; - } - var curTxt = txt.substring(0, spanSize); - txt = txt.substring(spanSize); - nextAfterAuthorColors(curTxt, (cls&&cls+" ")+extraClasses); - curIndex += spanSize; - leftInAuthor -= spanSize; - if (leftInAuthor == 0) { - nextClasses(); - } - } - }; - })(); - return authorColorFunc; -}; - -linestylefilter.getAtSignSplitterFilter = function(lineText, - textAndClassFunc) { - var at = /@/g; - at.lastIndex = 0; - var splitPoints = null; - var execResult; - while ((execResult = at.exec(lineText))) { - if (! splitPoints) { - splitPoints = []; - } - splitPoints.push(execResult.index); - } - - if (! splitPoints) return textAndClassFunc; - - return linestylefilter.textAndClassFuncSplitter(textAndClassFunc, - splitPoints); -}; - -linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/; -linestylefilter.REGEX_URLCHAR = new RegExp('('+/[-:@a-zA-Z0-9_.,~%+\/\\?=&#;()$]/.source+'|'+linestylefilter.REGEX_WORDCHAR.source+')'); -linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt):\/\/|mailto:)/.source+linestylefilter.REGEX_URLCHAR.source+'*(?![:.,;])'+linestylefilter.REGEX_URLCHAR.source, 'g'); - -linestylefilter.getURLFilter = function(lineText, textAndClassFunc) { - linestylefilter.REGEX_URL.lastIndex = 0; - var urls = null; - var splitPoints = null; - var execResult; - while ((execResult = linestylefilter.REGEX_URL.exec(lineText))) { - if (! urls) { - urls = []; - splitPoints = []; - } - var startIndex = execResult.index; - var url = execResult[0]; - urls.push([startIndex, url]); - splitPoints.push(startIndex, startIndex + url.length); - } - - if (! urls) return textAndClassFunc; - - function urlForIndex(idx) { - for(var k=0; k= u[0] && idx < u[0]+u[1].length) { - return u[1]; - } - } - return false; - } - - var handleUrlsAfterSplit = (function() { - var curIndex = 0; - return function(txt, cls) { - var txtlen = txt.length; - var newCls = cls; - var url = urlForIndex(curIndex); - if (url) { - newCls += " url:"+url; - } - textAndClassFunc(txt, newCls); - curIndex += txtlen; - }; - })(); - - return linestylefilter.textAndClassFuncSplitter(handleUrlsAfterSplit, - splitPoints); -}; - -linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) { - var nextPointIndex = 0; - var idx = 0; - - // don't split at 0 - while (splitPointsOpt && - nextPointIndex < splitPointsOpt.length && - splitPointsOpt[nextPointIndex] == 0) { - nextPointIndex++; - } - - function spanHandler(txt, cls) { - if ((! splitPointsOpt) || nextPointIndex >= splitPointsOpt.length) { - func(txt, cls); - idx += txt.length; - } - else { - var splitPoints = splitPointsOpt; - var pointLocInSpan = splitPoints[nextPointIndex] - idx; - var txtlen = txt.length; - if (pointLocInSpan >= txtlen) { - func(txt, cls); - idx += txt.length; - if (pointLocInSpan == txtlen) { - nextPointIndex++; - } - } - else { - if (pointLocInSpan > 0) { - func(txt.substring(0, pointLocInSpan), cls); - idx += pointLocInSpan; - } - nextPointIndex++; - // recurse - spanHandler(txt.substring(pointLocInSpan), cls); - } - } - } - return spanHandler; -}; - -// domLineObj is like that returned by domline.createDomLine -linestylefilter.populateDomLine = function(textLine, aline, apool, - domLineObj) { - // remove final newline from text if any - var text = textLine; - if (text.slice(-1) == '\n') { - text = text.substring(0, text.length-1); - } - - function textAndClassFunc(tokenText, tokenClass) { - domLineObj.appendSpan(tokenText, tokenClass); - } - - var func = textAndClassFunc; - func = linestylefilter.getURLFilter(text, func); - func = linestylefilter.getLineStyleFilter(text.length, aline, - func, apool); - func(text, ''); -}; diff --git a/trunk/etherpad/src/static/js/ace.js b/trunk/etherpad/src/static/js/ace.js deleted file mode 100644 index 6766cee..0000000 --- a/trunk/etherpad/src/static/js/ace.js +++ /dev/null @@ -1,29 +0,0 @@ -Ace2Editor.registry={nextId:1};function Ace2Editor(){var K="Ace2Editor";var F=Ace2Editor;var B={};var A={editor:B,id:(F.registry.nextId++)}; -var D=false;var E=[];function C(R,Q){return function(){var T=this;var S=arguments;function U(){R.apply(T,S); -}if(Q){Q.apply(T,S);}if(D){U();}else{E.push(U);}};}function I(){for(var Q=0;Q'; -};var J=function(Q){return'\x3cscript type="text/javascript" src="'+Q+'">\x3c/script>';};var M=J;var N=H; -var L=function(Q){return'\''";};var G=function(Q){return'\'\\x3cscript type="text/javascript" src="'+Q+"\">\\x3c/script>'"; -};var P=G;var O=L;B.destroy=C(function(){A.ace_dispose();A.frame.parentNode.removeChild(A.frame);delete F.registry[A.id]; -A=null;});B.init=function(Q,S,R){B.importText(S);A.onEditorReady=function(){D=true;I();R();};(function(){var W=''; -var T=["'"+W+"'"];T.push(("('\\n\'');T.push('\' \''); -var X='editorId = "'+A.id+'"; editorInfo = parent.'+K+'.registry[editorId]; window.onload = function() { window.onload = null; setTimeout(function() { var iframe = document.createElement("IFRAME"); iframe.scrolling = "no"; var outerdocbody = document.getElementById("outerdocbody"); iframe.frameBorder = 0; iframe.allowTransparency = true; outerdocbody.insertBefore(iframe, outerdocbody.firstChild); iframe.ace_outerWin = window; readyFunc = function() { editorInfo.onEditorReady(); readyFunc = null; editorInfo = null; }; var doc = iframe.contentWindow.document; doc.open(); doc.write('+T.join("+")+"); doc.close(); }, 0); }"; -var Y=[W,"",(''),'',"\x3cscript>",X,"\x3c/script>",'
x
']; -var U=document.createElement("IFRAME");U.frameBorder=0;A.frame=U;document.getElementById(Q).appendChild(U); -var V=U.contentWindow.document;V.open();V.write(Y.join(""));V.close();B.adjustSize();})();};return B; -} \ No newline at end of file diff --git a/trunk/etherpad/src/static/js/linestylefilter_client.js b/trunk/etherpad/src/static/js/linestylefilter_client.js deleted file mode 100644 index ca60296..0000000 --- a/trunk/etherpad/src/static/js/linestylefilter_client.js +++ /dev/null @@ -1,252 +0,0 @@ -// DO NOT EDIT THIS FILE, edit infrastructure/ace/www/linestylefilter.js - -/** - * Copyright 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// requires: easysync2.Changeset - -var linestylefilter = {}; - -linestylefilter.ATTRIB_CLASSES = { - 'bold':'tag:b', - 'italic':'tag:i', - 'underline':'tag:u', - 'strikethrough':'tag:s', - 'h1':'tag:h1', - 'h2':'tag:h2', - 'h3':'tag:h3', - 'h4':'tag:h4', - 'h5':'tag:h5', - 'h6':'tag:h6' -}; - -linestylefilter.getAuthorClassName = function(author) { - return "author-"+author.replace(/[^a-y0-9]/g, function(c) { - if (c == ".") return "-"; - return 'z'+c.charCodeAt(0)+'z'; - }); -}; - -// lineLength is without newline; aline includes newline, -// but may be falsy if lineLength == 0 -linestylefilter.getLineStyleFilter = function(lineLength, aline, - textAndClassFunc, apool) { - - if (lineLength == 0) return textAndClassFunc; - - var nextAfterAuthorColors = textAndClassFunc; - - var authorColorFunc = (function() { - var lineEnd = lineLength; - var curIndex = 0; - var extraClasses; - var leftInAuthor; - - function attribsToClasses(attribs) { - var classes = ''; - Changeset.eachAttribNumber(attribs, function(n) { - var key = apool.getAttribKey(n); - if (key) { - var value = apool.getAttribValue(n); - if (value) { - if (key == 'author') { - classes += ' '+linestylefilter.getAuthorClassName(value); - } - else if (key == 'list') { - classes += ' list:'+value; - } - else if (linestylefilter.ATTRIB_CLASSES[key]) { - classes += ' '+linestylefilter.ATTRIB_CLASSES[key]; - } - } - } - }); - return classes.substring(1); - } - - var attributionIter = Changeset.opIterator(aline); - var nextOp, nextOpClasses; - function goNextOp() { - nextOp = attributionIter.next(); - nextOpClasses = (nextOp.opcode && attribsToClasses(nextOp.attribs)); - } - goNextOp(); - function nextClasses() { - if (curIndex < lineEnd) { - extraClasses = nextOpClasses; - leftInAuthor = nextOp.chars; - goNextOp(); - while (nextOp.opcode && nextOpClasses == extraClasses) { - leftInAuthor += nextOp.chars; - goNextOp(); - } - } - } - nextClasses(); - - return function(txt, cls) { - while (txt.length > 0) { - if (leftInAuthor <= 0) { - // prevent infinite loop if something funny's going on - return nextAfterAuthorColors(txt, cls); - } - var spanSize = txt.length; - if (spanSize > leftInAuthor) { - spanSize = leftInAuthor; - } - var curTxt = txt.substring(0, spanSize); - txt = txt.substring(spanSize); - nextAfterAuthorColors(curTxt, (cls&&cls+" ")+extraClasses); - curIndex += spanSize; - leftInAuthor -= spanSize; - if (leftInAuthor == 0) { - nextClasses(); - } - } - }; - })(); - return authorColorFunc; -}; - -linestylefilter.getAtSignSplitterFilter = function(lineText, - textAndClassFunc) { - var at = /@/g; - at.lastIndex = 0; - var splitPoints = null; - var execResult; - while ((execResult = at.exec(lineText))) { - if (! splitPoints) { - splitPoints = []; - } - splitPoints.push(execResult.index); - } - - if (! splitPoints) return textAndClassFunc; - - return linestylefilter.textAndClassFuncSplitter(textAndClassFunc, - splitPoints); -}; - -linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/; -linestylefilter.REGEX_URLCHAR = new RegExp('('+/[-:@a-zA-Z0-9_.,~%+\/\\?=&#;()$]/.source+'|'+linestylefilter.REGEX_WORDCHAR.source+')'); -linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt):\/\/|mailto:)/.source+linestylefilter.REGEX_URLCHAR.source+'*(?![:.,;])'+linestylefilter.REGEX_URLCHAR.source, 'g'); - -linestylefilter.getURLFilter = function(lineText, textAndClassFunc) { - linestylefilter.REGEX_URL.lastIndex = 0; - var urls = null; - var splitPoints = null; - var execResult; - while ((execResult = linestylefilter.REGEX_URL.exec(lineText))) { - if (! urls) { - urls = []; - splitPoints = []; - } - var startIndex = execResult.index; - var url = execResult[0]; - urls.push([startIndex, url]); - splitPoints.push(startIndex, startIndex + url.length); - } - - if (! urls) return textAndClassFunc; - - function urlForIndex(idx) { - for(var k=0; k= u[0] && idx < u[0]+u[1].length) { - return u[1]; - } - } - return false; - } - - var handleUrlsAfterSplit = (function() { - var curIndex = 0; - return function(txt, cls) { - var txtlen = txt.length; - var newCls = cls; - var url = urlForIndex(curIndex); - if (url) { - newCls += " url:"+url; - } - textAndClassFunc(txt, newCls); - curIndex += txtlen; - }; - })(); - - return linestylefilter.textAndClassFuncSplitter(handleUrlsAfterSplit, - splitPoints); -}; - -linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) { - var nextPointIndex = 0; - var idx = 0; - - // don't split at 0 - while (splitPointsOpt && - nextPointIndex < splitPointsOpt.length && - splitPointsOpt[nextPointIndex] == 0) { - nextPointIndex++; - } - - function spanHandler(txt, cls) { - if ((! splitPointsOpt) || nextPointIndex >= splitPointsOpt.length) { - func(txt, cls); - idx += txt.length; - } - else { - var splitPoints = splitPointsOpt; - var pointLocInSpan = splitPoints[nextPointIndex] - idx; - var txtlen = txt.length; - if (pointLocInSpan >= txtlen) { - func(txt, cls); - idx += txt.length; - if (pointLocInSpan == txtlen) { - nextPointIndex++; - } - } - else { - if (pointLocInSpan > 0) { - func(txt.substring(0, pointLocInSpan), cls); - idx += pointLocInSpan; - } - nextPointIndex++; - // recurse - spanHandler(txt.substring(pointLocInSpan), cls); - } - } - } - return spanHandler; -}; - -// domLineObj is like that returned by domline.createDomLine -linestylefilter.populateDomLine = function(textLine, aline, apool, - domLineObj) { - // remove final newline from text if any - var text = textLine; - if (text.slice(-1) == '\n') { - text = text.substring(0, text.length-1); - } - - function textAndClassFunc(tokenText, tokenClass) { - domLineObj.appendSpan(tokenText, tokenClass); - } - - var func = textAndClassFunc; - func = linestylefilter.getURLFilter(text, func); - func = linestylefilter.getLineStyleFilter(text.length, aline, - func, apool); - func(text, ''); -}; diff --git a/trunk/etherpad/src/templates/email/eepnet_license_info.ejs b/trunk/etherpad/src/templates/email/eepnet_license_info.ejs deleted file mode 100644 index 85556c7..0000000 --- a/trunk/etherpad/src/templates/email/eepnet_license_info.ejs +++ /dev/null @@ -1,72 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %><% - var parts = licenseKey.split(":"); - var name = parts[0]; - var org = parts[1]; - var key = parts[2]; - - if ((key.length % 2) != 0) { - key = key + "+"; - } - var keyLine1 = key.substr(0, key.length/2); - var keyLine2 = key.substr(key.length/2, key.length); -%> -Dear <%= userName %>, - -Thank you for downloading EtherPad Private Network Edition. -This is an automated email containing your license information. - -<% if (isEvaluation) { %> -NOTE: This is an EVALUATION license, which will expire on -<%= expiresDate.toString() %>. -<% } %> - -**************************************** -NAME: - - <%= name %> - -**************************************** -ORGANIZATION: - - <%= org %> - -**************************************** -LICENSE KEY: - - <%= keyLine1 %> - <%= keyLine2 %> - -**************************************** -INSTRUCTIONS: - - http://<%= request.host %>/ep/pne-manual - -**************************************** -DOWNLOAD LINK: - - http://<%= request.host %><%= isEvaluation ? "/ep/store/eepnet-download" : "/ep/store/eepnet-download-nextsteps" %> - -<% if (isEvaluation) { %> --- - -This email was sent automatically from pad.spline.inf.fu-berlin.de because you signed -up for EtherPad PNE. If you did not sign up for -this, then you can safely just ignore this email. - -<% } else { %> --- - -Thanks for buying EtherPad! -<% } %> \ No newline at end of file diff --git a/trunk/etherpad/src/templates/pad/pad_content.ejs b/trunk/etherpad/src/templates/pad/pad_content.ejs deleted file mode 100644 index 4e25c7f..0000000 --- a/trunk/etherpad/src/templates/pad/pad_content.ejs +++ /dev/null @@ -1,297 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %><% - function checkboxPref(name, label) { - var r = ['
']; - r.push(''); - r.push(''); - r.push(''); - r.push(''); - r.push(''); - r.push('
', label, '
'); - r.push('
'); - return r.join(''); - } - - function exportOption(type, label, requiresOffice, url, title) { - url = url || '/ep/pad/export/'+padId+'/latest?format='+type; - var classes = [ "exportlink", "exporthref"+type ]; - if (requiresOffice && !hasOffice) { - classes.push("disabledexport"); - } else if (requiresOffice) { - classes.push("requiresoffice"); - } - var aStartArr = [' 0) { - aStartArr.push(' class="'+classes.join(' ')+'"'); - } - aStartArr.push(' target="_blank" href="', url, '">'); - var aStart = aStartArr.join(''); - var r = [''); - return r.join(''); - } -%> - - - - - -
- - - - - - - - - - -
-
Connecting...
-
 
- - « show side bar - -
- - hide » - -
-
-
- Loading... -
-
-   -   -   -   -   -
Pad:    (rename)OK
-   -
-
-
-
View Zoom:
-
View Font:
-
-
-
- -
-
- -
- -<% if (request.params.djs) { %> -
 
-<% } %> - -
- Powered by AppJet - AppJet -
- - - - diff --git a/trunk/etherpad/src/templates/pad/padfull_body.ejs b/trunk/etherpad/src/templates/pad/padfull_body.ejs deleted file mode 100644 index 5f85b4e..0000000 --- a/trunk/etherpad/src/templates/pad/padfull_body.ejs +++ /dev/null @@ -1,32 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %>
- -

Pad is Full!

- -
- -
-

http://<%= request.host %>/<%= padId %>

-
- -

Sorry, only <%= maxUsersPerPad %> people are allowed to edit a -single pad at the same time in the free version of EtherPad.

- -

Please see our pricing plans for -information about having more than <%= maxUsersPerPad %> -collaborators.

- -
- -
diff --git a/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs b/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs deleted file mode 100644 index 42594b8..0000000 --- a/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs +++ /dev/null @@ -1,132 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %><% helpers.setHtmlTitle("EtherPad PNE License Manager"); %> -<% helpers.includeJQuery() %> -<% helpers.includeJs("etherpad.js") %> - -
- - <% if (isExpired) { %> - -
-

Your evaluation license has expired!

-

Please contact <%= helpers.oemail("sales") %> or visit the pricing page on pad.spline.inf.fu-berlin.de - to purchase a license key.

-
- - <% } %> - - <% if (isTooOld) { %> - -
-

The version of EtherPad you are running (<%= runningVersionString %>) is too old. - Please update to version <%= licenseVersionString %> or newer by downloading the latest version on - pad.spline.inf.fu-berlin.de.

-
- - <% } %> - - <% if (errorMessage) { %> -
-

<%= errorMessage %>

-
- <% } %> - - <% if (licenseInfo && !edit) { %> - -

License Info:

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
Licensed To: <%= licenseInfo.personName %>
Organization: <%= licenseInfo.organizationName %>
Software Edition: <%= licenseInfo.editionName %>
Maximum Users: <%= licenseInfo.userQuota %>
Expires: <%= licenseInfo.expiresDate ? licenseInfo.expiresDate.toString() : "never" %>
- -
- -
-
- -
-
- - <% } %> - - <% if (isExpired || !licenseInfo || edit) { %> - -

Enter New License Info:

- - <% if (isUnlicensed) { %> -

Before you can use this copy of EtherPad Private Network Edition, you must first - enter a valid license. Free trial licenses can be obtained obtained here. -

- <% } %> - -
-
- -

Name:

- " /> - -

Organization:

- " /> - -

License Key:

- - -
- -
- - -
-
- - <% } %> - -
- -- cgit v1.2.3