Commit 8b4a5640 authored by Romain Courteaud's avatar Romain Courteaud

Drop erp5_bespin bt5.

This editor has been deprecated and is not supported anymore.
parent 10a0ef83
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_bespin</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_bespin</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
.bespin-completion-panel {
font-family: Helvetica, Arial, sans-serif;
position: absolute;
cursor: default;
line-height: normal;
-moz-user-select: none;
-webkit-user-select: none;
}
.bespin-completion-pointer {
position: absolute;
z-index: 2;
height: 21px;
width: 21px;
}
.bespin-completion-pointer-up {
top: 1px;
border-top: solid #555 1px;
border-left: solid #555 1px;
background-image: -moz-linear-gradient(top left, #333333, #333333 50%, transparent 50%, transparent);
background-image: -webkit-gradient(linear, left top, right bottom, from(#333333), color-stop(0.5, #333333), color-stop(0.5, transparent), to(transparent));
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.bespin-completion-pointer-down {
bottom: 1px;
border-top: solid #000 1px;
border-left: solid #000 1px;
background-image: -moz-linear-gradient(top left, #000, #000 50%, transparent 50%, transparent);
background-image: -webkit-gradient(linear, left top, right bottom, from(#000), color-stop(0.5, #000), color-stop(0.5, transparent), to(transparent));
-moz-transform: rotate(225deg);
-webkit-transform: rotate(225deg);
}
.bespin-completion-bubble-outer {
position: relative;
z-index: 1;
margin: 11px 0px 11px 0px;
border-top: solid #555 1px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
.bespin-completion-bubble-inner {
position: relative;
z-index: 3;
padding: 6px;
background: -moz-linear-gradient(top, #333333, #000000);
background: -webkit-gradient(linear, center top, center bottom, from(#333333), to(#000000));
color: #ffffff;
font-size: 10.5pt;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-moz-box-shadow: 0px 6px 16px 2px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0px 6px 16px 2px rgba(0, 0, 0, 0.5);
}
.bespin-completion-panel ul {
list-style: none;
margin: 0px;
padding: 0px;
}
.bespin-completion-panel li {
text-indent: 0px;
margin: 0px;
padding: 6px 16px;
}
.bespin-completion-highlight {
position: absolute;
z-index: -1;
background-image: -moz-linear-gradient(top, #3e59be, #312d80);
background-image: -webkit-gradient(linear, center top, center bottom, from(#3e59be), to(#312d80));
border: solid rgba(37, 34, 91, 1.0) 1px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
.bespin-completion-kind {
display: block;
float: left;
top: 0px;
left: 0px;
width: 8px;
height: 8px;
padding: 2px;
margin: 0px 5px 0px 0px;
font-size: 6.5pt;
font-weight: bold;
text-transform: uppercase;
text-align: center;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.bespin-completion-kind-m {
background-color: maroon;
}
.bespin-completion-kind-f {
background-color: green;
}
.bespin-completion-top-row {
position: relative;
}
.bespin-completion-second-row {
margin: 6px 0px 0px 17px;
display: none;
}
.bespin-completion-ident {
font-weight: bold;
}
.bespin-completion-container {
color: #a0a0a0;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>BespinEmbedded.css</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>BespinEmbedded.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>BespinMain.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
;bespin.tiki.register("::python", {
name: "python",
dependencies: { "syntax_manager": "0.0.0" }
});
bespin.tiki.module("python:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
* Scott Ellis (mail@scottellis.com.au)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "Python syntax highlighter",
"dependencies": { "syntax_manager": "0.0.0" },
"environments": { "worker": true },
"provides": [
{
"ep": "syntax",
"name": "py",
"pointer": "#PySyntax",
"fileexts": [ "py" ]
}
]
});
"end";
//var SC = require('sproutcore/runtime').SC;
//var Promise = require('bespin:promise').Promise;
//var StandardSyntax = require('syntax_manager:controllers/standardsyntax').StandardSyntax;
var StandardSyntax = require('standard_syntax').StandardSyntax;
var states = {
start: [
{
regex: /^(?:and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)(?![a-zA-Z0-9_])/,
tag: 'keyword'
},
{
regex: /^[A-Za-z_][A-Za-z0-9_]*/,
tag: 'identifier'
},
{
regex: /^[^'"#\/ \tA-Za-z0-9_]+/,
tag: 'plain'
},
{
regex: /^[ \t]+/,
tag: 'plain'
},
{
regex: /^"""/,
tag: 'string',
then: 'qqqstring'
},
{
regex: /^'/,
tag: 'string',
then: 'qstring'
},
{
regex: /^"/,
tag: 'string',
then: 'qqstring'
},
{
regex: /^#.*/,
tag: 'comment'
},
{
regex: /^./,
tag: 'plain'
}
],
qstring: [
{
regex: /^'/,
tag: 'string',
then: 'start'
},
{
regex: /^(?:\\.|[^'\\])+/,
tag: 'string'
}
],
qqstring: [
{
regex: /^"/,
tag: 'string',
then: 'start'
},
{
regex: /^(?:\\.|[^"\\])+/,
tag: 'string'
}
],
qqqstring: [
{
regex: /^"""/,
tag: 'string',
then: 'start'
},
{
regex: /^./,
tag: 'string'
}
]
};
exports.PySyntax = new StandardSyntax(states);
});
;bespin.tiki.register("::syntax_worker", {
name: "syntax_worker",
dependencies: { "syntax_directory": "0.0.0", "underscore": "0.0.0" }
});
bespin.tiki.module("syntax_worker:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "Coordinates multiple syntax engines",
"environments": { "worker": true },
"dependencies": { "syntax_directory": "0.0.0", "underscore": "0.0.0" }
});
"end";
var promise = require('bespin:promise');
var _ = require('underscore')._;
var console = require('bespin:console').console;
var syntaxDirectory = require('syntax_directory').syntaxDirectory;
var syntaxWorker = {
engines: {},
annotate: function(state, lines, range) {
function splitParts(str) { return str.split(":"); }
function saveState() {
states.push(_(stateStack).invoke('join', ":").join(" "));
}
var engines = this.engines;
var states = [], attrs = [], symbols = [];
var stateStack = _(state.split(" ")).map(splitParts);
_(lines).each(function(line, offset) {
saveState();
var lineAttrs = [], lineSymbols = {};
var col = 0;
while (col < line.length) {
// Check for the terminator string.
// FIXME: This is wrong. It should check *inside* the token
// that was just parsed as well.
var curState;
while (true) {
curState = _(stateStack).last();
if (curState.length < 3) {
break;
}
var term = curState[2];
if (line.substring(col, col + term.length) !== term) {
break;
}
stateStack.pop();
}
var context = curState[0];
var result = engines[context].get(curState, line, col);
var token;
if (result == null) {
token = {
state: 'plain',
tag: 'plain',
start: col,
end: line.length
};
} else {
stateStack[stateStack.length - 1] = result.state;
if (result.hasOwnProperty('newContext')) {
stateStack.push(result.newContext);
}
token = result.token;
var sym = result.symbol;
if (sym != null) {
lineSymbols["-" + sym[0]] = sym[1];
}
}
lineAttrs.push(token);
col = token.end;
}
attrs.push(lineAttrs);
symbols.push(lineSymbols);
});
saveState();
return { states: states, attrs: attrs, symbols: symbols };
},
loadSyntax: function(syntaxName) {
var pr = new promise.Promise;
var engines = this.engines;
if (engines.hasOwnProperty(syntaxName)) {
pr.resolve();
return pr;
}
var info = syntaxDirectory.get(syntaxName);
if (info == null) {
throw new Error('No syntax engine installed for syntax "' +
syntaxName + '".');
}
info.extension.load().then(function(engine) {
engines[syntaxName] = engine;
var subsyntaxes = engine.subsyntaxes;
if (subsyntaxes == null) {
pr.resolve();
return;
}
var pr2 = promise.group(_(subsyntaxes).map(this.loadSyntax, this));
pr2.then(_(pr.resolve).bind(pr));
}.bind(this));
return pr;
}
};
exports.syntaxWorker = syntaxWorker;
});
;bespin.tiki.register("::stylesheet", {
name: "stylesheet",
dependencies: { "standard_syntax": "0.0.0" }
});
bespin.tiki.module("stylesheet:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "CSS syntax highlighter",
"dependencies": {
"standard_syntax": "0.0.0"
},
"environments": {
"worker": true
},
"provides": [
{
"ep": "syntax",
"name": "css",
"pointer": "#CSSSyntax",
"fileexts": [ "css", "less" ]
}
]
});
"end";
var Promise = require('bespin:promise').Promise;
var StandardSyntax = require('standard_syntax').StandardSyntax;
var COMMENT_REGEXP = {
regex: /^\/\/.*/,
tag: 'comment'
};
var createCommentState = function(jumpBackState) {
return [
{
regex: /^[^*\/]+/,
tag: 'comment'
},
{
regex: /^\*\//,
tag: 'comment',
then: jumpBackState
},
{
regex: /^[*\/]/,
tag: 'comment'
}
];
};
var states = {
start: [
{
//style names
regex: /^([a-zA-Z-\s]*)(?:\:)/,
tag: 'identifier',
then: 'style'
},
{
//tags
regex: /^([\w]+)(?![a-zA-Z0-9_:])([,|{]*?)(?!;)(?!(;|%))/,
tag: 'keyword',
then: 'header'
},
{
//id
regex: /^#([a-zA-Z]*)(?=.*{*?)/,
tag: 'keyword',
then: 'header'
},
{
//classes
regex: /^\.([a-zA-Z]*)(?=.*{*?)/,
tag: 'keyword',
then: 'header'
},
COMMENT_REGEXP,
{
regex: /^\/\*/,
tag: 'comment',
then: 'comment'
},
{
regex: /^./,
tag: 'plain'
}
],
header: [
{
regex: /^[^{|\/\/|\/\*]*/,
tag: 'keyword',
then: 'start'
},
COMMENT_REGEXP,
{
regex: /^\/\*/,
tag: 'comment',
then: 'comment_header'
}
],
style: [
{
regex: /^[^;|}|\/\/|\/\*]+/,
tag: 'plain'
},
{
regex: /^;|}/,
tag: 'plain',
then: 'start'
},
COMMENT_REGEXP,
{
regex: /^\/\*/,
tag: 'comment',
then: 'comment_style'
}
],
comment: createCommentState('start'),
comment_header: createCommentState('header'),
comment_style: createCommentState('style')
};
exports.CSSSyntax = new StandardSyntax(states);
});
;bespin.tiki.register("::html", {
name: "html",
dependencies: { "standard_syntax": "0.0.0" }
});
bespin.tiki.module("html:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "HTML syntax highlighter",
"dependencies": { "standard_syntax": "0.0.0" },
"environments": { "worker": true },
"provides": [
{
"ep": "syntax",
"name": "html",
"pointer": "#HTMLSyntax",
"fileexts": [ "htm", "html" ]
}
]
});
"end";
var StandardSyntax = require('standard_syntax').StandardSyntax;
var states = {};
//
// This parser is modeled on the WHATWG HTML 5 specification, with some
// simplifications to improve performance. See the relevant spec here:
//
// http://www.whatwg.org/specs/web-apps/current-work/
//
var createTagStates = function(prefix, interiorActions) {
states[prefix + '_beforeAttrName'] = [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^\//,
tag: 'operator',
then: prefix + '_selfClosingStartTag'
},
{
regex: /^>/,
tag: 'operator',
then: interiorActions
},
{
regex: /^./,
tag: 'keyword',
then: prefix + '_attrName'
}
];
// 10.2.4.35 Attribute name state
states[prefix + '_attrName'] = [
{
regex: /^\s+/,
tag: 'plain',
then: prefix + '_afterAttrName'
},
{
regex: /^\//,
tag: 'operator',
then: prefix + '_selfClosingStartTag'
},
{
regex: /^=/,
tag: 'operator',
then: prefix + '_beforeAttrValue'
},
{
regex: /^>/,
tag: 'operator',
then: interiorActions
},
{
regex: /^["'<]+/,
tag: 'error'
},
{
regex: /^[^ \t\n\/=>"'<]+/,
tag: 'keyword'
}
];
states[prefix + '_afterAttrName'] = [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^\//,
tag: 'operator',
then: prefix + '_selfClosingStartTag'
},
{
regex: /^=/,
tag: 'operator',
then: prefix + '_beforeAttrValue'
},
{
regex: /^>/,
tag: 'operator',
then: interiorActions
},
{
regex: /^./,
tag: 'keyword',
then: prefix + '_attrName'
}
];
states[prefix + '_beforeAttrValue'] = [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^"/,
tag: 'string',
then: prefix + '_attrValueQQ'
},
{
regex: /^(?=&)/,
tag: 'plain',
then: prefix + '_attrValueU'
},
{
regex: /^'/,
tag: 'string',
then: prefix + '_attrValueQ'
},
{
regex: /^>/,
tag: 'error',
then: interiorActions
},
{
regex: /^./,
tag: 'string',
then: prefix + '_attrValueU'
}
];
states[prefix + '_attrValueQQ'] = [
{
regex: /^"/,
tag: 'string',
then: prefix + '_afterAttrValueQ'
},
{
regex: /^[^"]+/,
tag: 'string'
}
];
states[prefix + '_attrValueQ'] = [
{
regex: /^'/,
tag: 'string',
then: prefix + '_afterAttrValueQ'
},
{
regex: /^[^']+/,
tag: 'string'
}
];
states[prefix + '_attrValueU'] = [
{
regex: /^\s/,
tag: 'string',
then: prefix + '_beforeAttrName'
},
{
regex: /^>/,
tag: 'operator',
then: interiorActions
},
{
regex: /[^ \t\n>]+/,
tag: 'string'
}
];
states[prefix + '_afterAttrValueQ'] = [
{
regex: /^\s/,
tag: 'plain',
then: prefix + '_beforeAttrName'
},
{
regex: /^\//,
tag: 'operator',
then: prefix + '_selfClosingStartTag'
},
{
regex: /^>/,
tag: 'operator',
then: interiorActions
},
{
regex: /^(?=.)/,
tag: 'operator',
then: prefix + '_beforeAttrName'
}
];
// 10.2.4.43 Self-closing start tag state
states[prefix + '_selfClosingStartTag'] = [
{
regex: /^>/,
tag: 'operator',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: prefix + '_beforeAttrName'
}
];
};
states = {
// 10.2.4.1 Data state
start: [
{
regex: /^[^<]+/,
tag: 'plain'
},
{
regex: /^<!--/,
tag: 'comment',
then: 'commentStart'
},
{
regex: /^<!/,
tag: 'directive',
then: 'markupDeclarationOpen'
},
{
regex: /^<\?/,
tag: 'comment',
then: 'bogusComment'
},
{
regex: /^</,
tag: 'operator',
then: 'tagOpen'
}
],
// 10.2.4.8 Tag open state
tagOpen: [
{
regex: /^\//,
tag: 'operator',
then: 'endTagOpen'
},
{
regex: /^script/i,
tag: 'keyword',
then: 'script_beforeAttrName'
},
{
regex: /^[a-zA-Z]/,
tag: 'keyword',
then: 'tagName'
},
{
regex: /^(?=.)/,
tag: 'plain',
then: 'start'
}
],
// 10.2.4.6 Script data state
scriptData: [
{
regex: /^<(?=\/script>)/i,
tag: 'operator',
then: 'tagOpen'
},
{
regex: /^[^<]+/,
tag: 'plain'
}
],
// 10.2.4.9 End tag open state
endTagOpen: [
{
regex: /^[a-zA-Z]/,
tag: 'keyword',
then: 'tagName'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: 'bogusComment'
}
],
// 10.2.4.10 Tag name state
tagName: [
{
regex: /^\s+/,
tag: 'plain',
then: 'normal_beforeAttrName'
},
{
regex: /^\//,
tag: 'operator',
then: 'normal_selfClosingStartTag'
},
{
regex: /^>/,
tag: 'operator',
then: 'start'
},
{
regex: /^[^ \t\n\/>]+/,
tag: 'keyword'
}
],
// 10.2.4.44 Bogus comment state
bogusComment: [
{
regex: /^[^>]+/,
tag: 'comment'
},
{
regex: /^>/,
tag: 'comment',
then: 'start'
}
],
// 10.2.4.45 Markup declaration open state
markupDeclarationOpen: [
{
regex: /^doctype/i,
tag: 'directive',
then: 'doctype'
},
{
regex: /^(?=.)/,
tag: 'comment',
then: 'bogusComment'
}
],
// 10.2.4.46 Comment start state
commentStart: [
{
regex: /^-->/,
tag: 'comment',
then: 'start'
},
{
regex: /^[^-]+/,
tag: 'comment'
}
],
// 10.2.4.53 DOCTYPE state
doctype: [
{
regex: /^\s/,
tag: 'plain',
then: 'beforeDoctypeName'
},
{
regex: /^./,
tag: 'error',
then: 'beforeDoctypeName'
}
],
// 10.2.4.54 Before DOCTYPE name state
beforeDoctypeName: [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^./,
tag: 'directive',
then: 'doctypeName'
}
],
// 10.2.4.55 DOCTYPE name state
doctypeName: [
{
regex: /^\s/,
tag: 'plain',
then: 'afterDoctypeName'
},
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^[^ \t\n>]+/,
tag: 'directive'
}
],
// 10.2.4.56 After DOCTYPE name state
afterDoctypeName: [
{
regex: /^\s+/,
tag: 'directive'
},
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^public/i,
tag: 'directive',
then: 'afterDoctypePublicKeyword'
},
{
regex: /^system/i,
tag: 'directive',
then: 'afterDoctypeSystemKeyword'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.57 After DOCTYPE public keyword state
afterDoctypePublicKeyword: [
{
regex: /^\s+/,
tag: 'plain',
then: 'beforeDoctypePublicId'
},
{
regex: /^"/,
tag: 'error',
then: 'doctypePublicIdQQ'
},
{
regex: /^'/,
tag: 'error',
then: 'doctypePublicIdQ'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.58 Before DOCTYPE public identifier
beforeDoctypePublicId: [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^"/,
tag: 'string',
then: 'doctypePublicIdQQ'
},
{
regex: /^'/,
tag: 'string',
then: 'doctypePublicIdQ'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.59 DOCTYPE public identifier (double-quoted) state
doctypePublicIdQQ: [
{
regex: /^"/,
tag: 'string',
then: 'afterDoctypePublicId'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^[^>"]+/,
tag: 'string'
}
],
// 10.2.4.60 DOCTYPE public identifier (single-quoted) state
doctypePublicIdQ: [
{
regex: /^'/,
tag: 'string',
then: 'afterDoctypePublicId'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^[^>']+/,
tag: 'string'
}
],
// 10.2.4.61 After DOCTYPE public identifier state
afterDoctypePublicId: [
{
regex: /^\s/,
tag: 'plain',
then: 'betweenDoctypePublicAndSystemIds'
},
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^"/,
tag: 'error',
then: 'doctypeSystemIdQQ'
},
{
regex: /^'/,
tag: 'error',
then: 'doctypeSystemIdQ'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.62 Between DOCTYPE public and system identifiers state
betweenDoctypePublicAndSystemIds: [
{
regex: /^\s+/,
tag: 'plain',
then: 'betweenDoctypePublicAndSystemIds'
},
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^"/,
tag: 'string',
then: 'doctypeSystemIdQQ'
},
{
regex: /^'/,
tag: 'string',
then: 'doctypeSystemIdQ'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.63 After DOCTYPE system keyword state
afterDoctypeSystemKeyword: [
{
regex: /^\s/,
tag: 'plain',
then: 'beforeDoctypeSystemId'
},
{
regex: /^"/,
tag: 'error',
then: 'doctypeSystemIdQQ'
},
{
regex: /^'/,
tag: 'error',
then: 'doctypeSystemIdQ'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.64 Before DOCTYPE system identifier state
beforeDoctypeSystemId: [
{
regex: /^\s+/,
tag: 'plain',
then: 'beforeDoctypeSystemId'
},
{
regex: /^"/,
tag: 'string',
then: 'doctypeSystemIdQQ'
},
{
regex: /^'/,
tag: 'string',
then: 'doctypeSystemIdQ'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.65 DOCTYPE system identifier (double-quoted) state
doctypeSystemIdQQ: [
{
regex: /^"/,
tag: 'string',
then: 'afterDoctypeSystemId'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^[^">]+/,
tag: 'string'
}
],
// 10.2.4.66 DOCTYPE system identifier (single-quoted) state
doctypeSystemIdQ: [
{
regex: /^'/,
tag: 'string',
then: 'afterDoctypeSystemId'
},
{
regex: /^>/,
tag: 'error',
then: 'start'
},
{
regex: /^[^'>]+/,
tag: 'string'
}
],
// 10.2.4.67 After DOCTYPE system identifier state
afterDoctypeSystemId: [
{
regex: /^\s+/,
tag: 'plain'
},
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^./,
tag: 'error',
then: 'bogusDoctype'
}
],
// 10.2.4.68 Bogus DOCTYPE state
bogusDoctype: [
{
regex: /^>/,
tag: 'directive',
then: 'start'
},
{
regex: /^[^>]+/,
tag: 'directive'
}
]
};
createTagStates('normal', 'start');
createTagStates('script', 'start js:start:</script>');
/**
* This syntax engine exposes an HTML parser modeled on the WHATWG HTML 5
* specification.
*/
exports.HTMLSyntax = new StandardSyntax(states, [ 'js' ]);
});
;bespin.tiki.register("::js_syntax", {
name: "js_syntax",
dependencies: { "standard_syntax": "0.0.0" }
});
bespin.tiki.module("js_syntax:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "JavaScript syntax highlighter",
"dependencies": { "standard_syntax": "0.0.0" },
"environments": { "worker": true },
"provides": [
{
"ep": "syntax",
"name": "js",
"pointer": "#JSSyntax",
"fileexts": [ "js", "json" ]
}
]
});
"end";
var StandardSyntax = require('standard_syntax').StandardSyntax;
var states = {
start: [
{
regex: /^var(?=\s*([A-Za-z_$][A-Za-z0-9_$]*)\s*=\s*require\s*\(\s*['"]([^'"]*)['"]\s*\)\s*[;,])/,
tag: 'keyword',
symbol: '$1:$2'
},
{
regex: /^(?:break|case|catch|continue|default|delete|do|else|false|finally|for|function|if|in|instanceof|let|new|null|return|switch|this|throw|true|try|typeof|var|void|while|with)(?![a-zA-Z0-9_])/,
tag: 'keyword'
},
{
regex: /^[A-Za-z_][A-Za-z0-9_]*/,
tag: 'plain'
},
{
regex: /^[^'"\/ \tA-Za-z0-9_]+/,
tag: 'plain'
},
{
regex: /^[ \t]+/,
tag: 'plain'
},
{
regex: /^'(?=.)/,
tag: 'string',
then: 'qstring'
},
{
regex: /^"(?=.)/,
tag: 'string',
then: 'qqstring'
},
{
regex: /^\/\/.*/,
tag: 'comment'
},
{
regex: /^\/\*/,
tag: 'comment',
then: 'comment'
},
{
regex: /^./,
tag: 'plain'
}
],
qstring: [
{
regex: /^(?:\\.|[^'\\])*'?/,
tag: 'string',
then: 'start'
}
],
qqstring: [
{
regex: /^(?:\\.|[^"\\])*"?/,
tag: 'string',
then: 'start'
}
],
comment: [
{
regex: /^[^*\/]+/,
tag: 'comment'
},
{
regex: /^\*\//,
tag: 'comment',
then: 'start'
},
{
regex: /^[*\/]/,
tag: 'comment'
}
]
};
exports.JSSyntax = new StandardSyntax(states);
});
;bespin.tiki.register("::standard_syntax", {
name: "standard_syntax",
dependencies: { "syntax_worker": "0.0.0", "syntax_directory": "0.0.0", "underscore": "0.0.0" }
});
bespin.tiki.module("standard_syntax:index",function(require,exports,module) {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
"define metadata";
({
"description": "Easy-to-use basis for syntax engines",
"environments": { "worker": true },
"dependencies": {
"syntax_directory": "0.0.0",
"underscore": "0.0.0",
"syntax_worker": "0.0.0"
}
});
"end";
var promise = require('bespin:promise');
var _ = require('underscore')._;
var console = require('bespin:console').console;
var syntaxDirectory = require('syntax_directory').syntaxDirectory;
exports.StandardSyntax = function(states, subsyntaxes) {
this.states = states;
this.subsyntaxes = subsyntaxes;
};
/** This syntax controller exposes a simple regex- and line-based parser. */
exports.StandardSyntax.prototype = {
get: function(fullState, line, col) {
var context = fullState[0], state = fullState[1];
if (!this.states.hasOwnProperty(state)) {
throw new Error('StandardSyntax: no such state "' + state + '"');
}
var str = line.substring(col); // TODO: sticky flag where available
var token = { start: col, state: fullState };
var result = null;
_(this.states[state]).each(function(alt) {
var regex = alt.regex;
var match = regex.exec(str);
if (match == null) {
return;
}
var len = match[0].length;
token.end = col + len;
token.tag = alt.tag;
var newSymbol = null;
if (alt.hasOwnProperty('symbol')) {
var replace = function(_, n) { return match[n]; };
var symspec = alt.symbol.replace(/\$([0-9]+)/g, replace);
var symMatch = /^([^:]+):(.*)/.exec(symspec);
newSymbol = [ symMatch[1], symMatch[2] ];
}
var nextState, newContext = null;
if (alt.hasOwnProperty('then')) {
var then = alt.then.split(" ");
nextState = [ context, then[0] ];
if (then.length > 1) {
newContext = then[1].split(":");
}
} else if (len === 0) {
throw new Error("StandardSyntax: Infinite loop detected: " +
"zero-length match that didn't change state");
} else {
nextState = fullState;
}
result = { state: nextState, token: token, symbol: newSymbol };
if (newContext != null) {
result.newContext = newContext;
}
_.breakLoop();
});
return result;
}
};
});
bespin.metadata = {"python": {"resourceURL": "resources/python/", "name": "python", "environments": {"worker": true}, "dependencies": {"syntax_manager": "0.0.0"}, "testmodules": [], "provides": [{"pointer": "#PySyntax", "ep": "syntax", "fileexts": ["py"], "name": "py"}], "type": "plugins/thirdparty", "description": "Python syntax highlighter"}, "syntax_worker": {"resourceURL": "resources/syntax_worker/", "description": "Coordinates multiple syntax engines", "environments": {"worker": true}, "dependencies": {"syntax_directory": "0.0.0", "underscore": "0.0.0"}, "testmodules": [], "type": "plugins/supported", "name": "syntax_worker"}, "stylesheet": {"resourceURL": "resources/stylesheet/", "name": "stylesheet", "environments": {"worker": true}, "dependencies": {"standard_syntax": "0.0.0"}, "testmodules": [], "provides": [{"pointer": "#CSSSyntax", "ep": "syntax", "fileexts": ["css", "less"], "name": "css"}], "type": "plugins/supported", "description": "CSS syntax highlighter"}, "html": {"resourceURL": "resources/html/", "name": "html", "environments": {"worker": true}, "dependencies": {"standard_syntax": "0.0.0"}, "testmodules": [], "provides": [{"pointer": "#HTMLSyntax", "ep": "syntax", "fileexts": ["htm", "html"], "name": "html"}], "type": "plugins/supported", "description": "HTML syntax highlighter"}, "js_syntax": {"resourceURL": "resources/js_syntax/", "name": "js_syntax", "environments": {"worker": true}, "dependencies": {"standard_syntax": "0.0.0"}, "testmodules": [], "provides": [{"pointer": "#JSSyntax", "ep": "syntax", "fileexts": ["js", "json"], "name": "js"}], "type": "plugins/supported", "description": "JavaScript syntax highlighter"}, "standard_syntax": {"resourceURL": "resources/standard_syntax/", "description": "Easy-to-use basis for syntax engines", "environments": {"worker": true}, "dependencies": {"syntax_worker": "0.0.0", "syntax_directory": "0.0.0", "underscore": "0.0.0"}, "testmodules": [], "type": "plugins/supported", "name": "standard_syntax"}};/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
if (typeof(window) !== 'undefined') {
throw new Error('"worker.js can only be loaded in a web worker. Use the ' +
'"worker_manager" plugin to instantiate web workers.');
}
var messageQueue = [];
var target = null;
if (typeof(bespin) === 'undefined') {
bespin = {};
}
function pump() {
if (messageQueue.length === 0) {
return;
}
var msg = messageQueue[0];
switch (msg.op) {
case 'load':
var base = msg.base;
bespin.base = base;
if (!bespin.hasOwnProperty('tiki')) {
importScripts(base + "tiki.js");
}
if (!bespin.bootLoaded) {
importScripts(base + "plugin/register/boot");
bespin.bootLoaded = true;
}
var require = bespin.tiki.require;
require.loader.sources[0].xhr = true;
require.ensurePackage('::bespin', function() {
var catalog = require('bespin:plugins').catalog;
var Promise = require('bespin:promise').Promise;
var pr;
if (!bespin.hasOwnProperty('metadata')) {
pr = catalog.loadMetadataFromURL("plugin/register/worker");
} else {
catalog.registerMetadata(bespin.metadata);
pr = new Promise();
pr.resolve();
}
pr.then(function() {
require.ensurePackage(msg.pkg, function() {
var module = require(msg.module);
target = module[msg.target];
messageQueue.shift();
pump();
});
});
});
break;
case 'invoke':
function finish(result) {
var resp = { op: 'finish', id: msg.id, result: result };
postMessage(JSON.stringify(resp));
messageQueue.shift();
pump();
}
if (!target.hasOwnProperty(msg.method)) {
throw new Error("No such method: " + msg.method);
}
var rv = target[msg.method].apply(target, msg.args);
if (typeof(rv) === 'object' && rv.isPromise) {
rv.then(finish, function(e) { throw e; });
} else {
finish(rv);
}
break;
}
}
onmessage = function(ev) {
messageQueue.push(JSON.parse(ev.data));
if (messageQueue.length === 1) {
pump();
}
};
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>BespinWorker.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>bespin_support</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define='cleaninput python: inputvalue;
name python: inputname;
site_root python: here.getWebSiteValue() or here.getPortalObject();
portal_url python: site_root.absolute_url();
cols python: field.get_value("width");
rows python: field.get_value("height");
extra python: "%s" % field.get_value("extra")
'>
<script type="text/javascript" tal:attributes="src string:${portal_url}/BespinEmbedded.js" />
<script type="text/javascript" tal:attributes="src string:${portal_url}/BespinPython.js" />
<textarea class="bespin"
tal:attributes="cols cols;
rows rows;
name name;
data-bespinoptions extra"
tal:content="cleaninput">
</textarea>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>resources</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>completion</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>screen_theme</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>images</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>bespin-s.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>70</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>73</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>check-selected.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>24</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>24</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>lines.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>200</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>300</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>scroll-down.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>11</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>11</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>scroll-left.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>11</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>11</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>scroll-right.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>11</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>11</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>scroll-up.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>11</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>11</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Bespin.
*
* The Initial Developer of the Original Code is
* Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bespin Team (bespin@mozilla.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
.bespin {
.container {
font-family: @container_font;
font-size: @container_font_size;
color: @container_color;
background: @container_bg;
line-height: @container_line_height;
display: -moz-box;
-moz-box-orient: vertical;
display: -webkit-box;
-webkit-box-orient: vertical;
width: 100%;
height: 100%;
margin: 0;
}
.container .north {
-moz-box-ordinal-group: 1;
-webkit-box-ordinal-group: 1;
}
.container .center-container {
display: -moz-box;
-moz-box-orient: horizontal;
-moz-box-ordinal-group: 2;
-moz-box-flex: 1;
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-ordinal-group: 2;
-webkit-box-flex: 1;
}
.container .south {
-moz-box-ordinal-group: 3;
-webkit-box-ordinal-group: 3;
}
.container .center-container .west {
-moz-box-ordinal-group: 1;
-webkit-box-ordinal-group: 1;
}
.container .center-container .center {
-moz-box-flex: 1;
-moz-box-ordinal-group: 2;
-webkit-box-flex: 1;
-webkit-box-ordinal-group: 2;
}
.container .center-container .east {
-moz-box-ordinal-group: 3;
-webkit-box-ordinal-group: 3;
}
input, textarea {
display: block;
border: 0px;
width: 200px;
padding: 4px;
color: @control_color;
background: @control_bg;
border: @control_border;
font-size: 8pt;
-moz-border-radius: @control_border_radius;
-webkit-border-radius: @control_border_radius;
box-shadow:
rgba(255,255,255,0.3) 0px 0px 2px,
inset rgba(0,0,0,0.3) 0px 0px 4px;
-moz-box-shadow:
rgba(255,255,255,0.3) 0px 0px 2px,
inset rgba(0,0,0,0.3) 0px 0px 4px;
-webkit-box-shadow:
rgba(255,255,255,0.3) 0px 0px 2px,
inset rgba(0,0,0,0.3) 0px 0px 4px;
}
input:focus, textarea:focus {
color: @control_active_color;
border: @control_active_border;
background: @control_active_bg;
outline: none;
box-shadow: opacity(@control_active_inset_color, 0.6) 0px 0px 2px,
inset opacity(@control_active_inset_color, 0.3) 0px 0px 6px;
-moz-box-shadow: opacity(@control_active_inset_color, 0.6) 0px 0px 2px,
inset opacity(@control_active_inset_color, 0.3) 0px 0px 6px;
-webkit-box-shadow: opacity(@control_active_inset_color, 0.6) 0px 0px 2px,
inset opacity(@control_active_inset_color, 0.3) 0px 0px 6px;
}
input[type=submit], input[type=button] {
font-family: @button_font;
font-size: @button_font_size;
text-shadow: 1px 1px rgba(0, 0, 0, 0.4);
padding: 8px 12px;
margin-left: 8px;
color: @button_color;
background: transparent -moz-linear-gradient(top, @button_bg, @button_bg2);
background: transparent -webkit-gradient(linear, 50% 0%, 50% 100%, from(@button_bg), to(@button_bg2));
border: 1px solid @button_border;
-moz-border-radius: @control_border_radius;
-webkit-border-radius: @control_border_radius;
-moz-box-shadow:
inset rgba(255, 255, 255, 0.2) 0 1px 0px,
inset rgba(0, 0, 0, 0.2) 0 -1px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 2px;
-webkit-box-shadow:
inset rgba(255, 255, 255, 0.2) 0 1px 0px,
inset rgba(0, 0, 0, 0.2) 0 -1px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 2px;
box-shadow:
inset rgba(255, 255, 255, 0.2) 0 1px 0px,
inset rgba(0, 0, 0, 0.2) 0 -1px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 2px;
}
.pane {
font-size: @pane_font_size;
font-family: @pane_font;
border-top: 1px solid rgba(255,255,255,0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-right: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
background-color: @pane_bg;
overflow: visible;
padding: 15px;
color: @pane_color;
line-height: @pane_line_height;
margin-bottom: 6px;
margin-top: 6px;
text-shadow: @pane_text_shadow;
-moz-border-radius: @pane_border_radius;
-webkit-border-radius: @pane_border_radius;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px;
a {
color: @pane_a_color;
}
h1 {
font-family: @pane_h1_font;
font-size: @pane_h1_font_size;
color: @pane_h1_color;
letter-spacing: -1.25px;
line-height: 1.0;
margin-top: 0px;
margin-left: 10px;
margin-bottom: 25px;
margin-top: 10px;
text-shadow: @pane_text_shadow;
}
p {
margin-left: 10px;
}
}
.form {
font-family: @form_font;
font-size: @form_font_size;
line-height: @form_line_height;
color: @form_color;
text-shadow: @form_text_shadow;
fieldset, p {
color: @form_color;
margin-bottom: 6px;
margin-top: 6px;
text-shadow: form_text_shadow;
}
}
/*
* The state classes are a little bit complex, because of the doubble class bug in IE6
* The state class looks like this:
*
* .ui-radio-state[-checked][-disabled][-hover] or .ui-checkbox-state[-checked][-disabled][-hover]
*
* Examples:
*
* .ui-radio-state-checked (simply checked)
* .ui-radio-state-checked-hover (checked and hovered/focused)
* .ui-radio-state-hover (unchecked and hovered/focused)
*
* If you don´t have to deal with the doubble class bug of IE6 you can also use the simple ui-checkbox-checked, ui-checkbox-disabled, ui-checkbox-hover state-classnames (or: ui-radio-checked...)
* and the ui-radio/ui-checkbox role-classnames.
*
*/
span.ui-checkbox,
span.ui-radio {
display: block;
float: left;
width: 24px;
height: 24px;
background: url(images/radio-unselected.png) no-repeat;
}
span.ui-checkbox {
background: url(images/check-unselected.png) no-repeat;
}
span.ui-helper-hidden {
display: none;
}
span.ui-checkbox-state-checked,
span.ui-checkbox-state-checked-hover {
background: url(images/check-selected.png) no-repeat;
}
span.ui-radio-state-checked,
span.ui-radio-state-checked-hover {
background: url(images/radio-selected.png) no-repeat;
}
.ui-helper-hidden-accessible {
position: absolute;
left: -999em;
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLDocument" module="OFS.DTMLDocument"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>theme.less</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-08-15 rafael
* The initial version.
\ No newline at end of file
Still Experimental
\ No newline at end of file
Copyright (c) 2010 Nexedi SA
\ No newline at end of file
erp5_view_style
\ No newline at end of file
Files for integration of Bespin Text Editor (http://mozillalabs.com/bespin) with ERP5
\ No newline at end of file
GPL
\ No newline at end of file
rafael
\ No newline at end of file
erp5_bespin | View
\ No newline at end of file
erp5_bespin
\ No newline at end of file
erp5_bespin
\ No newline at end of file
1.0
\ No newline at end of file
...@@ -71,7 +71,6 @@ class EditorWidget(Widget.TextAreaWidget): ...@@ -71,7 +71,6 @@ class EditorWidget(Widget.TextAreaWidget):
size=1, size=1,
items=[('Standard Text Area', 'text_area'), items=[('Standard Text Area', 'text_area'),
('FCK Editor', 'fck_editor'), ('FCK Editor', 'fck_editor'),
('Bespin Editor', 'bespin'),
('Xinha Editor', 'xinha'), ('Xinha Editor', 'xinha'),
('SVG Editor', 'svg_editor'), ('SVG Editor', 'svg_editor'),
('Spreadsheet Editor', 'spreadsheet_editor'), ('Spreadsheet Editor', 'spreadsheet_editor'),
...@@ -84,19 +83,7 @@ class EditorWidget(Widget.TextAreaWidget): ...@@ -84,19 +83,7 @@ class EditorWidget(Widget.TextAreaWidget):
""" """
here = REQUEST['here'] here = REQUEST['here']
text_editor = field.get_value('text_editor') text_editor = field.get_value('text_editor')
if text_editor == 'bespin': if text_editor == "xinha":
# XXX The usage of bespin editor depends of erp5_bespin bt5
# installed and still experimental. If erp5_bespin is not installed, it
# render standard an standard editor field.
bespin_support = getattr(here, 'bespin_support',None)
if bespin_support is not None:
return bespin_support.pt_render(
extra_context= {
'field' : field,
'inputvalue' : value,
'inputname' : key
})
elif text_editor == "xinha":
xinha_support = getattr(here, 'xinha_support', None) xinha_support = getattr(here, 'xinha_support', None)
if xinha_support is not None: if xinha_support is not None:
return xinha_support.pt_render( return xinha_support.pt_render(
......
...@@ -56,7 +56,7 @@ class TestNamingConvention(ERP5TypeTestCase): ...@@ -56,7 +56,7 @@ class TestNamingConvention(ERP5TypeTestCase):
'erp5_public_accounting_budget', 'erp5_publication', 'erp5_run_my_doc', 'erp5_public_accounting_budget', 'erp5_publication', 'erp5_run_my_doc',
'erp5_short_message', 'erp5_simplified_invoicing', 'erp5_trade_knowledge_pad', 'erp5_short_message', 'erp5_simplified_invoicing', 'erp5_trade_knowledge_pad',
'erp5_trade_ui_test', 'erp5_ace_editor', 'erp5_trade_ui_test', 'erp5_ace_editor',
'erp5_authentication_policy', 'erp5_bearer_token', 'erp5_bespin', 'erp5_authentication_policy', 'erp5_bearer_token'
'erp5_certificate_authority', 'erp5_code_mirror', 'erp5_computer_immobilisation', 'erp5_certificate_authority', 'erp5_code_mirror', 'erp5_computer_immobilisation',
'erp5_credential_oauth2', 'erp5_data_protection', 'erp5_data_set', 'erp5_credential_oauth2', 'erp5_data_protection', 'erp5_data_set',
'erp5_development_wizard', 'erp5_dhtml_style', 'erp5_direct_debit_payment', 'erp5_development_wizard', 'erp5_dhtml_style', 'erp5_direct_debit_payment',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment