Permalink
Browse files

Remove codepress, never used anymore.

  • Loading branch information...
1 parent 6981e27 commit 27dfcac22e605979bd6adb377ea14ff8c79a482c @cdujeu cdujeu committed Sep 23, 2016
Showing with 0 additions and 2,804 deletions.
  1. +0 −113 core/src/plugins/editor.codepress/class.CodePressEditor.js
  2. +0 −7 core/src/plugins/editor.codepress/codepress/codepress.css
  3. +0 −34 core/src/plugins/editor.codepress/codepress/codepress.html
  4. +0 −147 core/src/plugins/editor.codepress/codepress/codepress.js
  5. +0 −240 core/src/plugins/editor.codepress/codepress/engines/gecko.js
  6. 0 core/src/plugins/editor.codepress/codepress/engines/khtml.js
  7. +0 −263 core/src/plugins/editor.codepress/codepress/engines/msie.js
  8. 0 core/src/plugins/editor.codepress/codepress/engines/older.js
  9. +0 −259 core/src/plugins/editor.codepress/codepress/engines/opera.js
  10. +0 −297 core/src/plugins/editor.codepress/codepress/engines/webkit.js
  11. BIN core/src/plugins/editor.codepress/codepress/images/line-numbers.png
  12. +0 −437 core/src/plugins/editor.codepress/codepress/index.html
  13. +0 −10 core/src/plugins/editor.codepress/codepress/languages/css.css
  14. +0 −23 core/src/plugins/editor.codepress/codepress/languages/css.js
  15. +0 −9 core/src/plugins/editor.codepress/codepress/languages/generic.css
  16. +0 −25 core/src/plugins/editor.codepress/codepress/languages/generic.js
  17. +0 −13 core/src/plugins/editor.codepress/codepress/languages/html.css
  18. +0 −59 core/src/plugins/editor.codepress/codepress/languages/html.js
  19. +0 −7 core/src/plugins/editor.codepress/codepress/languages/java.css
  20. +0 −24 core/src/plugins/editor.codepress/codepress/languages/java.js
  21. +0 −8 core/src/plugins/editor.codepress/codepress/languages/javascript.css
  22. +0 −30 core/src/plugins/editor.codepress/codepress/languages/javascript.js
  23. +0 −11 core/src/plugins/editor.codepress/codepress/languages/perl.css
  24. +0 −27 core/src/plugins/editor.codepress/codepress/languages/perl.js
  25. +0 −12 core/src/plugins/editor.codepress/codepress/languages/php.css
  26. +0 −60 core/src/plugins/editor.codepress/codepress/languages/php.js
  27. +0 −10 core/src/plugins/editor.codepress/codepress/languages/ruby.css
  28. +0 −26 core/src/plugins/editor.codepress/codepress/languages/ruby.js
  29. +0 −10 core/src/plugins/editor.codepress/codepress/languages/sql.css
  30. +0 −30 core/src/plugins/editor.codepress/codepress/languages/sql.js
  31. +0 −5 core/src/plugins/editor.codepress/codepress/languages/text.css
  32. +0 −9 core/src/plugins/editor.codepress/codepress/languages/text.js
  33. +0 −458 core/src/plugins/editor.codepress/codepress/license.txt
  34. +0 −24 core/src/plugins/editor.codepress/i18n/conf/cs.php
  35. +0 −24 core/src/plugins/editor.codepress/i18n/conf/de.php
  36. +0 −24 core/src/plugins/editor.codepress/i18n/conf/en.php
  37. +0 −24 core/src/plugins/editor.codepress/i18n/conf/fr.php
  38. +0 −24 core/src/plugins/editor.codepress/i18n/conf/it.php
  39. +0 −20 core/src/plugins/editor.codepress/manifest.xml
  40. +0 −1 core/src/plugins/editor.codepress/plugin_doc.html
  41. BIN core/src/plugins/editor.codepress/source_edit.png
@@ -1,113 +0,0 @@
-/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
- * This file is part of Pydio.
- *
- * Pydio is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Pydio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Pydio. If not, see <http://www.gnu.org/licenses/>.
- *
- * The latest code can be found at <https://pydio.com>.
- */
-Class.create("CodePressEditor", TextEditor, {
-
- initialize: function($super, oFormObject, options)
- {
- $super(oFormObject, options);
- },
-
-
- open : function($super, node){
- this.inputNode = node;
- var fileName = node.getPath();
- // CREATE GUI
- var cpStyle = this.codePressStyle(getBaseName(fileName));
- var textarea;
- this.textareaContainer = document.createElement('div');
- this.textarea = $(document.createElement('textarea'));
- var hidden = document.createElement('input');
- hidden.type = 'hidden';
- hidden.name = hidden.id = 'content';
- this.element.appendChild(hidden);
- this.textarea.name = this.textarea.id = 'cpCode';
- $(this.textarea).addClassName('codepress');
- $(this.textarea).addClassName(cpStyle);
- //$(this.textarea).addClassName('linenumbers-on');
- this.currentUseCp = true;
- this.contentMainContainer = this.textarea.parentNode;
- this.element.observe("editor:resize", function(event){
- var cpIframe = $(this.contentMainContainer).select('iframe')[0];
- if(!cpIframe) return;
- if(event.memo && Object.isNumber(event.memo)){
- cpIframe.setStyle({height:event.memo});
- }else{
- cpIframe.setStyle({width:'100%'});
- fitHeightToBottom(cpIframe, this.element);
- }
- }.bind(this));
- this.element.observe("editor:enterFS", function(e){this.textarea.value = this.element.select('iframe')[0].getCode();}.bind(this) );
- this.element.observe("editor:exitFS", function(e){this.textarea.value = this.element.select('iframe')[0].getCode();}.bind(this) );
- this.textarea.setStyle({width:'100%'});
- this.textarea.setAttribute('wrap', 'off');
- this.element.appendChild(this.textareaContainer);
- this.textareaContainer.appendChild(this.textarea);
- fitHeightToBottom($(this.textarea), $(modal.elementName));
- // LOAD FILE NOW
- this.loadFileContent(fileName);
- if(window.ajxpMobile){
- this.setFullScreen();
- attachMobileScroll(this.textarea, "vertical");
- }
- },
-
- saveFile : function(){
- var connexion = this.prepareSaveConnexion();
- var value;
- value = this.element.select('iframe')[0].getCode();
- this.textarea.value = value;
- connexion.addParameter('content', value);
- connexion.sendAsync();
- },
-
- parseTxt : function(transport){
- this.textarea.value = transport.responseText;
- var contentObserver = function(el, value){
- this.setModified(true);
- }.bind(this);
-
- this.textarea.id = 'cpCode_cp';
- var code = new CodePress(this.textarea, contentObserver);
- this.cpCodeObject = code;
- this.textarea.parentNode.insertBefore(code, this.textarea);
- this.contentMainContainer = this.textarea.parentNode;
- this.element.observe("editor:close", function(){
- this.cpCodeObject.close();
- modal.clearContent(modal.dialogContent);
- }, this );
- this.removeOnLoad(this.textareaContainer);
-
- },
-
- codePressStyle : function(fileName)
- {
- if(Prototype.Browser.Opera) return "";
- if(fileName.search('\.php$|\.php3$|\.php5$|\.phtml$') > -1) return "php";
- else if (fileName.search("\.js$") > -1) return "javascript";
- else if (fileName.search("\.java$") > -1) return "java";
- else if (fileName.search("\.pl$") > -1) return "perl";
- else if (fileName.search("\.sql$") > -1) return "sql";
- else if (fileName.search("\.htm$|\.html$|\.xml$") > -1) return "html";
- else if (fileName.search("\.css$") > -1) return "css";
- else return "";
- }
-
-
-});
@@ -1,7 +0,0 @@
-body {margin-top:13px;_margin-top:14px;background:white;font-family:monospace;font-size:13px;margin-left:32px;white-space:pre;background-image:url("images/line-numbers.png");background-repeat:repeat-y;background-position:0 3px;line-height:16px;}
-html>body{background-position:0 2px;}
-P {margin:0;padding:0;border:0;outline:0;display:block;white-space:pre;}
-b, i, s, u, a, em, tt, ins, big, cite, strong {text-decoration:none;font-weight:normal;font-style:normal;font-size:13px;}
-
-body.hide-line-numbers {background:white;margin-left:16px;}
-body.show-line-numbers {background-image:url("images/line-numbers.png");margin-left:32px;}
@@ -1,34 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
- <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
- <meta name="description" content="CodePress - source code editor window" />
-
- <script type="text/javascript">
- var language = 'generic';
- var engine = 'older';
- var ua = navigator.userAgent;
- var ts = (new Date).getTime(); // timestamp to avoid cache
- var lh = location.href;
-
- if(ua.match('MSIE')) engine = 'msie';
- else if(ua.match('AppleWebKit')) engine = 'webkit';
- else if(ua.match('Opera')) engine = 'opera';
- else if(ua.match('Gecko')) engine = 'gecko';
-
- if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
-
- document.write('<link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />');
- document.write('<link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />');
- document.write('<scr'+'ipt type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></scr'+'ipt>');
- document.write('<scr'+'ipt type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></scr'+'ipt>');
- </script>
-
-</head>
-
-<script type="text/javascript">
-if(engine == "msie" || engine == "gecko" || engine == "webkit") document.write('<body><pre> </pre></body>');
-else if(engine == "opera") document.write('<body></body>');
-</script>
-
-</html>
@@ -1,147 +0,0 @@
-/*
- * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
- *
- * Copyright (C) 2006 Fernando M.A.d.S. <fermads@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the
- * GNU Lesser General Public License as published by the Free Software Foundation.
- *
- * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
- */
-
-CodePress = function(obj, contentObserver) {
- var self = document.createElement('iframe');
- self.textarea = obj;
- self.textarea.disabled = true;
- self.textarea.style.overflow = 'hidden';
- self.style.height = self.textarea.clientHeight +'px';
- self.style.width = self.textarea.clientWidth +'px';
- self.textarea.style.overflow = 'auto';
- self.style.border = '1px solid gray';
- self.frameBorder = 0; // remove IE internal iframe border
- self.style.visibility = 'hidden';
- self.style.position = 'absolute';
- self.options = self.textarea.className;
- self.contentObserver = contentObserver;
-
- self.initialize = function() {
- self.editor = self.contentWindow.CodePress;
- self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
- self.editor.setCode(self.textarea.value);
- self.setOptions();
- self.editor.syntaxHighlight('init');
- self.textarea.style.display = 'none';
- self.style.position = 'static';
- self.style.visibility = 'visible';
- self.style.display = 'inline';
- if(self.contentObserver){
- self.pe = new PeriodicalExecuter(function(pe){
- if(self.interrupt){pe.stop();return;}
- var crtCode = self.getCode();
- if(!self.prevCode){ self.prevCode = crtCode; return;}
- if(self.prevCode != crtCode) self.contentObserver();
- self.prevCode = crtCode;
- return;
- }, 0.2);
- }
- } ;
-
- self.close = function(){
- self.interrupt = true;
- } ;
-
- self.edit = function(id,language) {
- if(id) self.textarea.value = document.getElementById(id).value;
- if(!self.textarea.disabled) return;
- self.language = language ? language : self.options.replace(/ ?codepress ?| ?readonly-on ?| ?autocomplete-off ?| ?linenumbers-off ?/g,'');
- if(!CodePress.languages[self.language]) self.language = 'generic';
- self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
- if(self.attachEvent) self.attachEvent('onload',self.initialize);
- else self.addEventListener('load',self.initialize,false);
- } ;
-
- self.setOptions = function() {
- if(self.options.match('autocomplete-off')) self.toggleAutoComplete();
- if(self.options.match('readonly-on')) self.toggleReadOnly();
- if(self.options.match('linenumbers-off')) self.toggleLineNumbers();
- };
-
- self.getCode = function() {
- return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
- };
-
- self.setCode = function(code) {
- self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
- };
-
- self.toggleAutoComplete = function() {
- self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
- };
-
- self.toggleReadOnly = function() {
- self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
- if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
- self.editor.readOnly(self.textarea.readOnly ? true : false);
- };
-
- self.toggleLineNumbers = function() {
- var cn = self.editor.body.className;
- self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
- };
-
- self.toggleEditor = function() {
- if(self.textarea.disabled) {
- self.textarea.value = self.getCode();
- self.textarea.disabled = false;
- self.style.display = 'none';
- self.textarea.style.display = 'inline';
- }
- else {
- self.textarea.disabled = true;
- self.setCode(self.textarea.value);
- self.editor.syntaxHighlight('init');
- self.style.display = 'inline';
- self.textarea.style.display = 'none';
- }
- };
-
- self.edit();
- return self;
-};
-
-CodePress.languages = {
- css : 'CSS',
- generic : 'Generic',
- html : 'HTML',
- java : 'Java',
- javascript : 'JavaScript',
- perl : 'Perl',
- ruby : 'Ruby',
- php : 'PHP',
- text : 'Text',
- sql : 'SQL'
-};
-
-CodePress.path = 'plugins/editor.codepress/codepress/';
-/*
-CodePress.run = function() {
- s = document.getElementsByTagName('script');
- for(var i=0,n=s.length;i<n;i++) {
- if(s[i].src.match('codepress.js')) {
- CodePress.path = s[i].src.replace('codepress.js','');
- }
- }
- t = document.getElementsByTagName('textarea');
- for(var i=0,n=t.length;i<n;i++) {
- if(t[i].className.match('codepress')) {
- id = t[i].id;
- t[i].id = id+'_cp';
- eval(id+' = new CodePress(t[i])');
- t[i].parentNode.insertBefore(eval(id), t[i]);
- }
- }
-} ;
-
-if(window.attachEvent) window.attachEvent('onload',CodePress.run);
-else window.addEventListener('DOMContentLoaded',CodePress.run,false);
-*/
Oops, something went wrong.

0 comments on commit 27dfcac

Please sign in to comment.