Commit 6560ac6d authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_code_mirror: Update to 3.22.

parent 9240d498
<?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>AUTHORS</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>raw</string> </key>
<value> <string>List of CodeMirror contributors. Updated before every release.\n
\n
4r2r\n
Aaron Brooks\n
Abe Fettig\n
Adam King\n
adanlobato\n
Adán Lobato\n
aeroson\n
Ahmad Amireh\n
Ahmad M. Zawawi\n
ahoward\n
Akeksandr Motsjonov\n
Alberto Pose\n
Albert Xing\n
Alexander Pavlov\n
Alexander Schepanovski\n
Alexander Solovyov\n
alexey-k\n
Alex Piggott\n
Amsul\n
Amy\n
Ananya Sen\n
anaran\n
AndersMad\n
Anderson Mesquita\n
Andre von Houck\n
Andrey Lushnikov\n
Andy Joslin\n
Andy Kimball\n
Andy Li\n
angelozerr\n
angelo.zerr@gmail.com\n
Ankit Ahuja\n
Ansel Santosa\n
Anthony Grimes\n
Anton Kovalyov\n
areos\n
AtomicPages LLC\n
Atul Bhouraskar\n
Aurelian Oancea\n
Bastian Müller\n
benbro\n
Beni Cherniavsky-Paskin\n
Benjamin DeCoste\n
Ben Keen\n
Bernhard Sirlinger\n
Billy Moon\n
Blaine G\n
boomyjee\n
borawjm\n
Brandon Frohs\n
Brandon Wamboldt\n
Brett Zamir\n
Brian Sletten\n
Bruce Mitchener\n
Chandra Sekhar Pydi\n
Charles Skelton\n
Chris Coyier\n
Chris Granger\n
Chris Houseknecht\n
Chris Morgan\n
Christopher Brown\n
ciaranj\n
CodeAnimal\n
ComFreek\n
Curtis Gagliardi\n
dagsta\n
Dan Heberden\n
Daniel, Dao Quang Minh\n
Daniel Faust\n
Daniel Huigens\n
Daniel KJ\n
Daniel Neel\n
Daniel Parnell\n
Danny Yoo\n
Darius Roberts\n
David Mignot\n
David Pathakjee\n
deebugger\n
Deep Thought\n
domagoj412\n
Dominator008\n
Domizio Demichelis\n
Drew Bratcher\n
Drew Hintz\n
Drew Khoury\n
Dror BG\n
duralog\n
eborden\n
edsharp\n
ekhaled\n
Enam Mijbah Noor\n
Eric Allam\n
eustas\n
Fabien O\'Carroll\n
Fabio Zendhi Nagao\n
Fauntleroy\n
fbuchinger\n
feizhang365\n
Felipe Lalanne\n
Felix Raab\n
Filip Noetzel\n
flack\n
ForbesLindesay\n
Forbes Lindesay\n
Ford_Lawnmower\n
Frank Wiegand\n
Gabriel Nahmias\n
galambalazs\n
Gautam Mehta\n
Glenn Jorde\n
Glenn Ruehle\n
Golevka\n
Gordon Smith\n
Grant Skinner\n
greengiant\n
Guillaume Massé\n
Guillaume Massé\n
Hans Engel\n
Hardest\n
Hasan Karahan\n
hitsthings\n
Hocdoc\n
Ian Beck\n
Ian Dickinson\n
Ian Wehrman\n
Ian Wetherbee\n
Ice White\n
ICHIKAWA, Yuji\n
ilvalle\n
Ingo Richter\n
Irakli Gozalishvili\n
Ivan Kurnosov\n
Jacob Lee\n
Jakob Miland\n
Jakub Vrana\n
James Campos\n
James Thorne\n
Jamie Hill\n
Jan Jongboom\n
jankeromnes\n
Jan Keromnes\n
Jan Odvarko\n
Jan T. Sott\n
Jason\n
Jason Grout\n
Jason Johnston\n
Jason San Jose\n
Jason Siefken\n
Jean Boussier\n
jeffkenton\n
Jeff Pickhardt\n
jem (graphite)\n
Jochen Berger\n
Johan Ask\n
John Connor\n
John Lees-Miller\n
John Snelson\n
John Van Der Loo\n
Jonathan Malmaud\n
jongalloway\n
Jon Malmaud\n
Joost-Wim Boekesteijn\n
Joseph Pecoraro\n
Joshua Newman\n
jots\n
jsoojeon\n
Juan Benavides Romero\n
Jucovschi Constantin\n
Juho Vuori\n
jwallers@gmail.com\n
kaniga\n
Ken Newman\n
Ken Rockot\n
Kevin Sawicki\n
Klaus Silveira\n
Koh Zi Han, Cliff\n
komakino\n
Konstantin Lopuhin\n
koops\n
ks-ifware\n
kubelsmieci\n
Lanny\n
Laszlo Vidacs\n
leaf corcoran\n
Leonya Khachaturov\n
Liam Newman\n
LM\n
Lorenzo Stoakes\n
Luciano Longo\n
lynschinzer\n
Maksim Lin\n
Maksym Taran\n
Manuel Rego Casasnovas\n
Marat Dreizin\n
Marco Aurélio\n
Marco Munizaga\n
Marijn Haverbeke\n
Mario Pietsch\n
Mark Lentczner\n
Marko Bonaci\n
Martin Balek\n
Martín Gaitán\n
Martin Hasoň\n
Mason Malone\n
Mateusz Paprocki\n
mats cronqvist\n
Matthew Beale\n
Matthias BUSSONNIER\n
Matt McDonald\n
Matt Pass\n
Matt Sacks\n
Maximilian Hils\n
Maxim Kraev\n
Max Kirsch\n
mbarkhau\n
Metatheos\n
Micah Dubinko\n
Michael Lehenbauer\n
Michael Zhou\n
Mighty Guava\n
Miguel Castillo\n
Mike\n
Mike Brevoort\n
Mike Diaz\n
Mike Ivanov\n
Mike Kadin\n
MinRK\n
Miraculix87\n
misfo\n
mloginov\n
mps\n
mtaran-google\n
Narciso Jaramillo\n
Nathan Williams\n
ndr\n
nerbert\n
nextrevision\n
nguillaumin\n
Nicholas Bollweg\n
Niels van Groningen\n
Nikita Beloglazov\n
Nikita Vasilyev\n
Nikolay Kostov\n
nlwillia\n
pablo\n
Page\n
Patrick Strawderman\n
Paul Garvin\n
Paul Ivanov\n
Pavel Feldman\n
Pavel Strashkin\n
Paweł Bartkiewicz\n
peteguhl\n
peterkroon\n
Peter Kroon\n
prasanthj\n
Prasanth J\n
Rahul\n
Randy Edmunds\n
Rasmus Erik Voel Jensen\n
Richard Z.H. Wang\n
robertop23\n
Robert Plummer\n
Ruslan Osmanov\n
Ryan Prior\n
sabaca\n
Samuel Ainsworth\n
sandeepshetty\n
santec\n
Sascha Peilicke\n
satchmorun\n
sathyamoorthi\n
SCLINIC\\jdecker\n
Sebastian Zaha\n
shaund\n
shaun gilchrist\n
Shawn A\n
sheopory\n
Shiv Deepak\n
Shmuel Englard\n
soliton4\n
sonson\n
spastorelli\n
Stanislav Oaserele\n
Stas Kobzar\n
Stefan Borsje\n
Steffen Beyer\n
Steve O\'Hara\n
stoskov\n
Taha Jahangir\n
Tarmil\n
tfjgeorge\n
Thaddee Tyl\n
think\n
Thomas Dvornik\n
Thomas Schmid\n
Tim Baumann\n
Timothy Farrell\n
Timothy Hatcher\n
TobiasBg\n
Tomas-A\n
Tomas Varaneckas\n
Tom Erik Støwer\n
Tom MacWright\n
Tony Jian\n
Travis Heppe\n
Triangle717\n
Vestimir Markov\n
vf\n
Volker Mische\n
wenli\n
Wesley Wiser\n
William Jamieson\n
Wojtek Ptak\n
Xavier Mendez\n
YNH Webdev\n
Yunchi Luo\n
Yuvi Panda\n
Zachary Dremann\n
zziuni\n
魏鹏刚\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>CONTRIBUTING.md</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>raw</string> </key>
<value> <string># How to contribute\n
\n
- [Getting help](#getting-help-)\n
- [Submitting bug reports](#submitting-bug-reports-)\n
- [Contributing code](#contributing-code-)\n
\n
## Getting help\n
\n
Community discussion, questions, and informal bug reporting is done on the\n
[CodeMirror Google group](http://groups.google.com/group/codemirror).\n
\n
## Submitting bug reports\n
\n
The preferred way to report bugs is to use the\n
[GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before\n
reporting a bug, read these pointers.\n
\n
**Note:** The issue tracker is for *bugs*, not requests for help. Questions\n
should be asked on the\n
[CodeMirror Google group](http://groups.google.com/group/codemirror) instead.\n
\n
### Reporting bugs effectively\n
\n
- CodeMirror is maintained by volunteers. They don\'t owe you anything, so be\n
polite. Reports with an indignant or belligerent tone tend to be moved to the\n
bottom of the pile.\n
\n
- Include information about **the browser in which the problem occurred**. Even\n
if you tested several browsers, and the problem occurred in all of them,\n
mention this fact in the bug report. Also include browser version numbers and\n
the operating system that you\'re on.\n
\n
- Mention which release of CodeMirror you\'re using. Preferably, try also with\n
the current development snapshot, to ensure the problem has not already been\n
fixed.\n
\n
- Mention very precisely what went wrong. "X is broken" is not a good bug\n
report. What did you expect to happen? What happened instead? Describe the\n
exact steps a maintainer has to take to make the problem occur. We can not\n
fix something that we can not observe.\n
\n
- If the problem can not be reproduced in any of the demos included in the\n
CodeMirror distribution, please provide an HTML document that demonstrates\n
the problem. The best way to do this is to go to\n
[jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and\n
include the resulting link in your bug report.\n
\n
## Contributing code\n
\n
- Make sure you have a [GitHub Account](https://github.com/signup/free)\n
- Fork [CodeMirror](https://github.com/marijnh/CodeMirror/)\n
([how to fork a repo](https://help.github.com/articles/fork-a-repo))\n
- Make your changes\n
- If your changes are easy to test or likely to regress, add tests.\n
Tests for the core go into `test/test.js`, some modes have their own\n
test suite under `mode/XXX/test.js`. Feel free to add new test\n
suites to modes that don\'t have one yet (be sure to link the new\n
tests into `test/index.html`).\n
- Follow the general code style of the rest of the project (see\n
below). Run `bin/lint` to verify that the linter is happy.\n
- Make sure all tests pass. Visit `test/index.html` in your browser to\n
run them.\n
- Submit a pull request\n
([how to create a pull request](https://help.github.com/articles/fork-a-repo))\n
\n
### Coding standards\n
\n
- 2 spaces per indentation level, no tabs.\n
- Include semicolons after statements.\n
- Note that the linter (`bin/lint`) which is run after each commit\n
complains about unused variables and functions. Prefix their names\n
with an underscore to muffle it.\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>LICENSE</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>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> and others\n
\n
Permission is hereby granted, free of charge, to any person obtaining a copy\n
of this software and associated documentation files (the "Software"), to deal\n
in the Software without restriction, including without limitation the rights\n
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n
copies of the Software, and to permit persons to whom the Software is\n
furnished to do so, subject to the following conditions:\n
\n
The above copyright notice and this permission notice shall be included in\n
all copies or substantial portions of the Software.\n
\n
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n
THE SOFTWARE.\n
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>README.md</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>raw</string> </key>
<value> <string># CodeMirror\n
[![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror)\n
[![NPM version](https://badge.fury.io/js/codemirror.png)](http://badge.fury.io/js/codemirror)\n
\n
CodeMirror is a JavaScript component that provides a code editor in\n
the browser. When a mode is available for the language you are coding\n
in, it will color your code, and optionally help with indentation.\n
\n
The project page is http://codemirror.net \n
The manual is at http://codemirror.net/doc/manual.html \n
The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md)\n
</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>addon</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>contrib</string> </value> <value> <string>comment</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.99</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>comment.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
var noOptions = {};\n
var nonWS = /[^\\s\\u00a0]/;\n
var Pos = CodeMirror.Pos;\n
\n
function firstNonWS(str) {\n
var found = str.search(nonWS);\n
return found == -1 ? 0 : found;\n
}\n
\n
CodeMirror.commands.toggleComment = function(cm) {\n
var from = cm.getCursor("start"), to = cm.getCursor("end");\n
cm.uncomment(from, to) || cm.lineComment(from, to);\n
};\n
\n
CodeMirror.defineExtension("lineComment", function(from, to, options) {\n
if (!options) options = noOptions;\n
var self = this, mode = self.getModeAt(from);\n
var commentString = options.lineComment || mode.lineComment;\n
if (!commentString) {\n
if (options.blockCommentStart || mode.blockCommentStart) {\n
options.fullLines = true;\n
self.blockComment(from, to, options);\n
}\n
return;\n
}\n
var firstLine = self.getLine(from.line);\n
if (firstLine == null) return;\n
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);\n
var pad = options.padding == null ? " " : options.padding;\n
var blankLines = options.commentBlankLines || from.line == to.line;\n
\n
self.operation(function() {\n
if (options.indent) {\n
var baseString = firstLine.slice(0, firstNonWS(firstLine));\n
for (var i = from.line; i < end; ++i) {\n
var line = self.getLine(i), cut = baseString.length;\n
if (!blankLines && !nonWS.test(line)) continue;\n
if (line.slice(0, cut) != baseString) cut = firstNonWS(line);\n
self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));\n
}\n
} else {\n
for (var i = from.line; i < end; ++i) {\n
if (blankLines || nonWS.test(self.getLine(i)))\n
self.replaceRange(commentString + pad, Pos(i, 0));\n
}\n
}\n
});\n
});\n
\n
CodeMirror.defineExtension("blockComment", function(from, to, options) {\n
if (!options) options = noOptions;\n
var self = this, mode = self.getModeAt(from);\n
var startString = options.blockCommentStart || mode.blockCommentStart;\n
var endString = options.blockCommentEnd || mode.blockCommentEnd;\n
if (!startString || !endString) {\n
if ((options.lineComment || mode.lineComment) && options.fullLines != false)\n
self.lineComment(from, to, options);\n
return;\n
}\n
\n
var end = Math.min(to.line, self.lastLine());\n
if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;\n
\n
var pad = options.padding == null ? " " : options.padding;\n
if (from.line > end) return;\n
\n
self.operation(function() {\n
if (options.fullLines != false) {\n
var lastLineHasText = nonWS.test(self.getLine(end));\n
self.replaceRange(pad + endString, Pos(end));\n
self.replaceRange(startString + pad, Pos(from.line, 0));\n
var lead = options.blockCommentLead || mode.blockCommentLead;\n
if (lead != null) for (var i = from.line + 1; i <= end; ++i)\n
if (i != end || lastLineHasText)\n
self.replaceRange(lead + pad, Pos(i, 0));\n
} else {\n
self.replaceRange(endString, to);\n
self.replaceRange(startString, from);\n
}\n
});\n
});\n
\n
CodeMirror.defineExtension("uncomment", function(from, to, options) {\n
if (!options) options = noOptions;\n
var self = this, mode = self.getModeAt(from);\n
var end = Math.min(to.line, self.lastLine()), start = Math.min(from.line, end);\n
\n
// Try finding line comments\n
var lineString = options.lineComment || mode.lineComment, lines = [];\n
var pad = options.padding == null ? " " : options.padding, didSomething;\n
lineComment: {\n
if (!lineString) break lineComment;\n
for (var i = start; i <= end; ++i) {\n
var line = self.getLine(i);\n
var found = line.indexOf(lineString);\n
if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;\n
if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;\n
if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;\n
lines.push(line);\n
}\n
self.operation(function() {\n
for (var i = start; i <= end; ++i) {\n
var line = lines[i - start];\n
var pos = line.indexOf(lineString), endPos = pos + lineString.length;\n
if (pos < 0) continue;\n
if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;\n
didSomething = true;\n
self.replaceRange("", Pos(i, pos), Pos(i, endPos));\n
}\n
});\n
if (didSomething) return true;\n
}\n
\n
// Try block comments\n
var startString = options.blockCommentStart || mode.blockCommentStart;\n
var endString = options.blockCommentEnd || mode.blockCommentEnd;\n
if (!startString || !endString) return false;\n
var lead = options.blockCommentLead || mode.blockCommentLead;\n
var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);\n
var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);\n
if (close == -1 && start != end) {\n
endLine = self.getLine(--end);\n
close = endLine.lastIndexOf(endString);\n
}\n
if (open == -1 || close == -1 ||\n
!/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||\n
!/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))\n
return false;\n
\n
self.operation(function() {\n
self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n
Pos(end, close + endString.length));\n
var openEnd = open + startString.length;\n
if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;\n
self.replaceRange("", Pos(start, open), Pos(start, openEnd));\n
if (lead) for (var i = start + 1; i <= end; ++i) {\n
var line = self.getLine(i), found = line.indexOf(lead);\n
if (found == -1 || nonWS.test(line.slice(0, found))) continue;\n
var foundEnd = found + lead.length;\n
if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;\n
self.replaceRange("", Pos(i, found), Pos(i, foundEnd));\n
}\n
});\n
return true;\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6207</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.86</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>continuecomment.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
var modes = ["clike", "css", "javascript"];\n
\n
for (var i = 0; i < modes.length; ++i)\n
CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});\n
\n
function continueComment(cm) {\n
var pos = cm.getCursor(), token = cm.getTokenAt(pos);\n
if (token.type != "comment" || cm.getOption("disableInput")) return CodeMirror.Pass;\n
var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode;\n
\n
var insert;\n
if (mode.blockCommentStart && mode.blockCommentContinue) {\n
var end = token.string.indexOf(mode.blockCommentEnd);\n
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;\n
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {\n
// Comment ended, don\'t continue it\n
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {\n
insert = full.slice(0, token.start);\n
if (!/^\\s*$/.test(insert)) {\n
insert = "";\n
for (var i = 0; i < token.start; ++i) insert += " ";\n
}\n
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&\n
found + mode.blockCommentContinue.length > token.start &&\n
/^\\s*$/.test(full.slice(0, found))) {\n
insert = full.slice(0, found);\n
}\n
if (insert != null) insert += mode.blockCommentContinue;\n
}\n
if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {\n
var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);\n
if (found > -1) {\n
insert = line.slice(0, found);\n
if (/\\S/.test(insert)) insert = null;\n
else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\\s*/)[0];\n
}\n
}\n
\n
if (insert != null)\n
cm.replaceSelection("\\n" + insert, "end");\n
else\n
return CodeMirror.Pass;\n
}\n
\n
function continueLineCommentEnabled(cm) {\n
var opt = cm.getOption("continueComments");\n
if (opt && typeof opt == "object")\n
return opt.continueLineComment !== false;\n
return true;\n
}\n
\n
CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {\n
if (prev && prev != CodeMirror.Init)\n
cm.removeKeyMap("continueComment");\n
if (val) {\n
var key = "Enter";\n
if (typeof val == "string")\n
key = val;\n
else if (typeof val == "object" && val.key)\n
key = val.key;\n
var map = {name: "continueComment"};\n
map[key] = continueComment;\n
cm.addKeyMap(map);\n
}\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2529</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>csharp</string> </value> <value> <string>dialog</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?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>dialog.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>raw</string> </key>
<value> <string>.CodeMirror-dialog {\n
position: absolute;\n
left: 0; right: 0;\n
background: white;\n
z-index: 15;\n
padding: .1em .8em;\n
overflow: hidden;\n
color: #333;\n
}\n
\n
.CodeMirror-dialog-top {\n
border-bottom: 1px solid #eee;\n
top: 0;\n
}\n
\n
.CodeMirror-dialog-bottom {\n
border-top: 1px solid #eee;\n
bottom: 0;\n
}\n
\n
.CodeMirror-dialog input {\n
border: none;\n
outline: none;\n
background: transparent;\n
width: 20em;\n
color: inherit;\n
font-family: monospace;\n
}\n
\n
.CodeMirror-dialog button {\n
font-size: 70%;\n
}\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403073.64</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>dialog.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
// Open simple dialogs on top of an editor. Relies on dialog.css.\n
\n
(function() {\n
function dialogDiv(cm, template, bottom) {\n
var wrap = cm.getWrapperElement();\n
var dialog;\n
dialog = wrap.appendChild(document.createElement("div"));\n
if (bottom) {\n
dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";\n
} else {\n
dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";\n
}\n
if (typeof template == "string") {\n
dialog.innerHTML = template;\n
} else { // Assuming it\'s a detached DOM element.\n
dialog.appendChild(template);\n
}\n
return dialog;\n
}\n
\n
function closeNotification(cm, newVal) {\n
if (cm.state.currentNotificationClose)\n
cm.state.currentNotificationClose();\n
cm.state.currentNotificationClose = newVal;\n
}\n
\n
CodeMirror.defineExtension("openDialog", function(template, callback, options) {\n
closeNotification(this, null);\n
var dialog = dialogDiv(this, template, options && options.bottom);\n
var closed = false, me = this;\n
function close() {\n
if (closed) return;\n
closed = true;\n
dialog.parentNode.removeChild(dialog);\n
}\n
var inp = dialog.getElementsByTagName("input")[0], button;\n
if (inp) {\n
if (options && options.value) inp.value = options.value;\n
CodeMirror.on(inp, "keydown", function(e) {\n
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n
if (e.keyCode == 13 || e.keyCode == 27) {\n
inp.blur();\n
CodeMirror.e_stop(e);\n
close();\n
me.focus();\n
if (e.keyCode == 13) callback(inp.value);\n
}\n
});\n
if (options && options.onKeyUp) {\n
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});\n
}\n
if (options && options.value) inp.value = options.value;\n
inp.focus();\n
CodeMirror.on(inp, "blur", close);\n
} else if (button = dialog.getElementsByTagName("button")[0]) {\n
CodeMirror.on(button, "click", function() {\n
close();\n
me.focus();\n
});\n
button.focus();\n
CodeMirror.on(button, "blur", close);\n
}\n
return close;\n
});\n
\n
CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {\n
closeNotification(this, null);\n
var dialog = dialogDiv(this, template, options && options.bottom);\n
var buttons = dialog.getElementsByTagName("button");\n
var closed = false, me = this, blurring = 1;\n
function close() {\n
if (closed) return;\n
closed = true;\n
dialog.parentNode.removeChild(dialog);\n
me.focus();\n
}\n
buttons[0].focus();\n
for (var i = 0; i < buttons.length; ++i) {\n
var b = buttons[i];\n
(function(callback) {\n
CodeMirror.on(b, "click", function(e) {\n
CodeMirror.e_preventDefault(e);\n
close();\n
if (callback) callback(me);\n
});\n
})(callbacks[i]);\n
CodeMirror.on(b, "blur", function() {\n
--blurring;\n
setTimeout(function() { if (blurring <= 0) close(); }, 200);\n
});\n
CodeMirror.on(b, "focus", function() { ++blurring; });\n
}\n
});\n
\n
/*\n
* openNotification\n
* Opens a notification, that can be closed with an optional timer\n
* (default 5000ms timer) and always closes on click.\n
*\n
* If a notification is opened while another is opened, it will close the\n
* currently opened one and open the new one immediately.\n
*/\n
CodeMirror.defineExtension("openNotification", function(template, options) {\n
closeNotification(this, close);\n
var dialog = dialogDiv(this, template, options && options.bottom);\n
var duration = options && (options.duration === undefined ? 5000 : options.duration);\n
var closed = false, doneTimer;\n
\n
function close() {\n
if (closed) return;\n
closed = true;\n
clearTimeout(doneTimer);\n
dialog.parentNode.removeChild(dialog);\n
}\n
\n
CodeMirror.on(dialog, \'click\', function(e) {\n
CodeMirror.e_preventDefault(e);\n
close();\n
});\n
if (duration)\n
doneTimer = setTimeout(close, options.duration);\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4087</int> </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>display</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="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>fullscreen.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>raw</string> </key>
<value> <string>.CodeMirror-fullscreen {\n
position: fixed;\n
top: 0; left: 0; right: 0; bottom: 0;\n
height: auto;\n
z-index: 9;\n
}\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.22</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>fullscreen.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>(function() {\n
"use strict";\n
\n
CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {\n
if (old == CodeMirror.Init) old = false;\n
if (!old == !val) return;\n
if (val) setFullscreen(cm);\n
else setNormal(cm);\n
});\n
\n
function setFullscreen(cm) {\n
var wrap = cm.getWrapperElement();\n
cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,\n
width: wrap.style.width, height: wrap.style.height};\n
wrap.style.width = "";\n
wrap.style.height = "auto";\n
wrap.className += " CodeMirror-fullscreen";\n
document.documentElement.style.overflow = "hidden";\n
cm.refresh();\n
}\n
\n
function setNormal(cm) {\n
var wrap = cm.getWrapperElement();\n
wrap.className = wrap.className.replace(/\\s*CodeMirror-fullscreen\\b/, "");\n
document.documentElement.style.overflow = "";\n
var info = cm.state.fullScreenRestore;\n
wrap.style.width = info.width; wrap.style.height = info.height;\n
window.scrollTo(info.scrollLeft, info.scrollTop);\n
cm.refresh();\n
}\n
})();\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1069</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.53</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>placeholder.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
CodeMirror.defineOption("placeholder", "", function(cm, val, old) {\n
var prev = old && old != CodeMirror.Init;\n
if (val && !prev) {\n
cm.on("blur", onBlur);\n
cm.on("change", onChange);\n
onChange(cm);\n
} else if (!val && prev) {\n
cm.off("blur", onBlur);\n
cm.off("change", onChange);\n
clearPlaceholder(cm);\n
var wrapper = cm.getWrapperElement();\n
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");\n
}\n
\n
if (val && !cm.hasFocus()) onBlur(cm);\n
});\n
\n
function clearPlaceholder(cm) {\n
if (cm.state.placeholder) {\n
cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);\n
cm.state.placeholder = null;\n
}\n
}\n
function setPlaceholder(cm) {\n
clearPlaceholder(cm);\n
var elt = cm.state.placeholder = document.createElement("pre");\n
elt.style.cssText = "height: 0; overflow: visible";\n
elt.className = "CodeMirror-placeholder";\n
elt.appendChild(document.createTextNode(cm.getOption("placeholder")));\n
cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);\n
}\n
\n
function onBlur(cm) {\n
if (isEmpty(cm)) setPlaceholder(cm);\n
}\n
function onChange(cm) {\n
var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);\n
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");\n
\n
if (empty) setPlaceholder(cm);\n
else clearPlaceholder(cm);\n
}\n
\n
function isEmpty(cm) {\n
return (cm.lineCount() === 1) && (cm.getLine(0) === "");\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1546</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.09</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>rulers.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
CodeMirror.defineOption("rulers", false, function(cm, val, old) {\n
if (old && old != CodeMirror.Init) {\n
clearRulers(cm);\n
cm.off("refresh", refreshRulers);\n
}\n
if (val && val.length) {\n
setRulers(cm);\n
cm.on("refresh", refreshRulers);\n
}\n
});\n
\n
function clearRulers(cm) {\n
for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) {\n
var node = cm.display.lineSpace.childNodes[i];\n
if (/(^|\\s)CodeMirror-ruler($|\\s)/.test(node.className))\n
node.parentNode.removeChild(node);\n
}\n
}\n
\n
function setRulers(cm) {\n
var val = cm.getOption("rulers");\n
var cw = cm.defaultCharWidth();\n
var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;\n
var bot = -cm.display.scroller.offsetHeight;\n
for (var i = 0; i < val.length; i++) {\n
var elt = document.createElement("div");\n
var col, cls = null;\n
if (typeof val[i] == "number") {\n
col = val[i];\n
} else {\n
col = val[i].column;\n
cls = val[i].className;\n
}\n
elt.className = "CodeMirror-ruler" + (cls ? " " + cls : "");\n
elt.style.cssText = "left: " + (left + col * cw) + "px; top: -50px; bottom: " + bot + "px";\n
cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);\n
}\n
}\n
\n
function refreshRulers(cm) {\n
clearRulers(cm);\n
setRulers(cm);\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1400</int> </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>edit</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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.33</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>closebrackets.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
var DEFAULT_BRACKETS = "()[]{}\'\'\\"\\"";\n
var DEFAULT_EXPLODE_ON_ENTER = "[]{}";\n
var SPACE_CHAR_REGEX = /\\s/;\n
\n
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {\n
if (old != CodeMirror.Init && old)\n
cm.removeKeyMap("autoCloseBrackets");\n
if (!val) return;\n
var pairs = DEFAULT_BRACKETS, explode = DEFAULT_EXPLODE_ON_ENTER;\n
if (typeof val == "string") pairs = val;\n
else if (typeof val == "object") {\n
if (val.pairs != null) pairs = val.pairs;\n
if (val.explode != null) explode = val.explode;\n
}\n
var map = buildKeymap(pairs);\n
if (explode) map.Enter = buildExplodeHandler(explode);\n
cm.addKeyMap(map);\n
});\n
\n
function charsAround(cm, pos) {\n
var str = cm.getRange(CodeMirror.Pos(pos.line, pos.ch - 1),\n
CodeMirror.Pos(pos.line, pos.ch + 1));\n
return str.length == 2 ? str : null;\n
}\n
\n
function buildKeymap(pairs) {\n
var map = {\n
name : "autoCloseBrackets",\n
Backspace: function(cm) {\n
if (cm.somethingSelected() || cm.getOption("disableInput")) return CodeMirror.Pass;\n
var cur = cm.getCursor(), around = charsAround(cm, cur);\n
if (around && pairs.indexOf(around) % 2 == 0)\n
cm.replaceRange("", CodeMirror.Pos(cur.line, cur.ch - 1), CodeMirror.Pos(cur.line, cur.ch + 1));\n
else\n
return CodeMirror.Pass;\n
}\n
};\n
var closingBrackets = "";\n
for (var i = 0; i < pairs.length; i += 2) (function(left, right) {\n
if (left != right) closingBrackets += right;\n
function surround(cm) {\n
var selection = cm.getSelection();\n
cm.replaceSelection(left + selection + right);\n
}\n
function maybeOverwrite(cm) {\n
var cur = cm.getCursor(), ahead = cm.getRange(cur, CodeMirror.Pos(cur.line, cur.ch + 1));\n
if (ahead != right || cm.somethingSelected()) return CodeMirror.Pass;\n
else cm.execCommand("goCharRight");\n
}\n
map["\'" + left + "\'"] = function(cm) {\n
if (left == "\'" && cm.getTokenAt(cm.getCursor()).type == "comment" ||\n
cm.getOption("disableInput"))\n
return CodeMirror.Pass;\n
if (cm.somethingSelected()) return surround(cm);\n
if (left == right && maybeOverwrite(cm) != CodeMirror.Pass) return;\n
var cur = cm.getCursor(), ahead = CodeMirror.Pos(cur.line, cur.ch + 1);\n
var line = cm.getLine(cur.line), nextChar = line.charAt(cur.ch), curChar = cur.ch > 0 ? line.charAt(cur.ch - 1) : "";\n
if (left == right && CodeMirror.isWordChar(curChar))\n
return CodeMirror.Pass;\n
if (line.length == cur.ch || closingBrackets.indexOf(nextChar) >= 0 || SPACE_CHAR_REGEX.test(nextChar))\n
cm.replaceSelection(left + right, {head: ahead, anchor: ahead});\n
else\n
return CodeMirror.Pass;\n
};\n
if (left != right) map["\'" + right + "\'"] = maybeOverwrite;\n
})(pairs.charAt(i), pairs.charAt(i + 1));\n
return map;\n
}\n
\n
function buildExplodeHandler(pairs) {\n
return function(cm) {\n
var cur = cm.getCursor(), around = charsAround(cm, cur);\n
if (!around || pairs.indexOf(around) % 2 != 0 || cm.getOption("disableInput"))\n
return CodeMirror.Pass;\n
cm.operation(function() {\n
var newPos = CodeMirror.Pos(cur.line + 1, 0);\n
cm.replaceSelection("\\n\\n", {anchor: newPos, head: newPos}, "+input");\n
cm.indentLine(cur.line + 1, null, true);\n
cm.indentLine(cur.line + 2, null, true);\n
});\n
};\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3497</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.5</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>closetag.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/**\n
* Tag-closer extension for CodeMirror.\n
*\n
* This extension adds an "autoCloseTags" option that can be set to\n
* either true to get the default behavior, or an object to further\n
* configure its behavior.\n
*\n
* These are supported options:\n
*\n
* `whenClosing` (default true)\n
* Whether to autoclose when the \'/\' of a closing tag is typed.\n
* `whenOpening` (default true)\n
* Whether to autoclose the tag when the final \'>\' of an opening\n
* tag is typed.\n
* `dontCloseTags` (default is empty tags for HTML, none for XML)\n
* An array of tag names that should not be autoclosed.\n
* `indentTags` (default is block tags for HTML, none for XML)\n
* An array of tag names that should, when opened, cause a\n
* blank line to be added inside the tag, and the blank line and\n
* closing line to be indented.\n
*\n
* See demos/closetag.html for a usage example.\n
*/\n
\n
(function() {\n
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {\n
if (old != CodeMirror.Init && old)\n
cm.removeKeyMap("autoCloseTags");\n
if (!val) return;\n
var map = {name: "autoCloseTags"};\n
if (typeof val != "object" || val.whenClosing)\n
map["\'/\'"] = function(cm) { return autoCloseSlash(cm); };\n
if (typeof val != "object" || val.whenOpening)\n
map["\'>\'"] = function(cm) { return autoCloseGT(cm); };\n
cm.addKeyMap(map);\n
});\n
\n
var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",\n
"source", "track", "wbr"];\n
var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",\n
"h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];\n
\n
function autoCloseGT(cm) {\n
var pos = cm.getCursor(), tok = cm.getTokenAt(pos);\n
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n
if (inner.mode.name != "xml" || !state.tagName || cm.getOption("disableInput")) return CodeMirror.Pass;\n
\n
var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html";\n
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);\n
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);\n
\n
var tagName = state.tagName;\n
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n
var lowerTagName = tagName.toLowerCase();\n
// Don\'t process the \'>\' at the end of an end-tag or self-closing tag\n
if (!tagName ||\n
tok.type == "string" && (tok.end != pos.ch || !/[\\"\\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n
tok.type == "tag" && state.type == "closeTag" ||\n
tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />\n
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n
CodeMirror.scanForClosingTag && CodeMirror.scanForClosingTag(cm, pos, tagName,\n
Math.min(cm.lastLine() + 1, pos.line + 50)))\n
return CodeMirror.Pass;\n
\n
var doIndent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n
var curPos = doIndent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1);\n
cm.replaceSelection(">" + (doIndent ? "\\n\\n" : "") + "</" + tagName + ">",\n
{head: curPos, anchor: curPos});\n
if (doIndent) {\n
cm.indentLine(pos.line + 1, null, true);\n
cm.indentLine(pos.line + 2, null);\n
}\n
}\n
\n
function autoCloseSlash(cm) {\n
var pos = cm.getCursor(), tok = cm.getTokenAt(pos);\n
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n
if (tok.type == "string" || tok.string.charAt(0) != "<" ||\n
tok.start != pos.ch - 1 || inner.mode.name != "xml" ||\n
cm.getOption("disableInput"))\n
return CodeMirror.Pass;\n
\n
var tagName = state.context && state.context.tagName;\n
if (tagName) cm.replaceSelection("/" + tagName + ">", "end");\n
else return CodeMirror.Pass;\n
}\n
\n
function indexOf(collection, elt) {\n
if (collection.indexOf) return collection.indexOf(elt);\n
for (var i = 0, e = collection.length; i < e; ++i)\n
if (collection[i] == elt) return i;\n
return -1;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4385</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,82 +8,50 @@ ...@@ -8,82 +8,50 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts87948228.92</string> </value> <value> <string>ts93404951.61</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>ometacolors.css</string> </value> <value> <string>continuelist.js</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value> <value> <string>application/javascript</string> </value>
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>html {\n <value> <string encoding="cdata"><![CDATA[
cursor: text;\n
}\n (function() {\n
\'use strict\';\n
\n \n
.editbox {\n var listRE = /^(\\s*)([*+-]|(\\d+)\\.)(\\s*)/,\n
margin: .4em;\n unorderedBullets = \'*+-\';\n
padding: 0;\n
font-family: monospace;\n
font-size: 10pt;\n
color: black;\n
}\n
\n \n
pre.code, .editbox {\n CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n
color: #666666;\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
}\n
\n \n
.editbox p {\n var pos = cm.getCursor(),\n
margin: 0;\n inList = cm.getStateAfter(pos.line).list !== false,\n
}\n match;\n
\n \n
span.js-punctuation {\n if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {\n
color: #666666;\n cm.execCommand(\'newlineAndIndent\');\n
}\n return;\n
}\n
\n \n
span.js-operator {\n var indent = match[1], after = match[4];\n
color: #E1570F;\n var bullet = unorderedBullets.indexOf(match[2]) >= 0\n
}\n ? match[2]\n
: (parseInt(match[3], 10) + 1) + \'.\';\n
\n \n
span.js-keyword {\n cm.replaceSelection(\'\\n\' + indent + bullet + after, \'end\');\n
color: #770088;\n };\n
}\n
\n \n
span.js-atom {\n }());\n
color: #228811;\n
}\n
\n ]]></string> </value>
span.js-variable {\n
color: black;\n
}\n
\n
span.js-variabledef {\n
color: #0000FF;\n
}\n
\n
span.js-localvariable {\n
color: #004499;\n
}\n
\n
span.js-property {\n
color: black;\n
}\n
\n
span.js-comment {\n
color: #AA7700;\n
}\n
\n
span.js-string {\n
color: #AA2222;\n
}\n
\n
span.ometa-binding {\n
color: #FF0000;\n
}\n
</string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -91,7 +59,7 @@ span.ometa-binding {\n ...@@ -91,7 +59,7 @@ span.ometa-binding {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>642</int> </value> <value> <int>725</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.7</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>matchbrackets.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n
(document.documentMode == null || document.documentMode < 8);\n
\n
var Pos = CodeMirror.Pos;\n
\n
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};\n
function findMatchingBracket(cm, where, strict) {\n
var state = cm.state.matchBrackets;\n
var maxScanLen = (state && state.maxScanLineLength) || 10000;\n
var maxScanLines = (state && state.maxScanLines) || 100;\n
\n
var cur = where || cm.getCursor(), line = cm.getLineHandle(cur.line), pos = cur.ch - 1;\n
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n
if (!match) return null;\n
var forward = match.charAt(1) == ">", d = forward ? 1 : -1;\n
if (strict && forward != (pos == cur.ch)) return null;\n
var style = cm.getTokenTypeAt(Pos(cur.line, pos + 1));\n
\n
var stack = [line.text.charAt(pos)], re = /[(){}[\\]]/;\n
function scan(line, lineNo, start) {\n
if (!line.text) return;\n
var pos = forward ? 0 : line.text.length - 1, end = forward ? line.text.length : -1;\n
if (line.text.length > maxScanLen) return null;\n
if (start != null) pos = start + d;\n
for (; pos != end; pos += d) {\n
var ch = line.text.charAt(pos);\n
if (re.test(ch) && cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style) {\n
var match = matching[ch];\n
if (match.charAt(1) == ">" == forward) stack.push(ch);\n
else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};\n
else if (!stack.length) return {pos: pos, match: true};\n
}\n
}\n
}\n
for (var i = cur.line, found, e = forward ? Math.min(i + maxScanLines, cm.lineCount()) : Math.max(-1, i - maxScanLines); i != e; i+=d) {\n
if (i == cur.line) found = scan(line, i, pos);\n
else found = scan(cm.getLineHandle(i), i);\n
if (found) break;\n
}\n
return {from: Pos(cur.line, pos), to: found && Pos(i, found.pos),\n
match: found && found.match, forward: forward};\n
}\n
\n
function matchBrackets(cm, autoclear) {\n
// Disable brace matching in long lines, since it\'ll cause hugely slow updates\n
var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n
var found = findMatchingBracket(cm);\n
if (!found || cm.getLine(found.from.line).length > maxHighlightLen ||\n
found.to && cm.getLine(found.to.line).length > maxHighlightLen)\n
return;\n
\n
var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";\n
var one = cm.markText(found.from, Pos(found.from.line, found.from.ch + 1), {className: style});\n
var two = found.to && cm.markText(found.to, Pos(found.to.line, found.to.ch + 1), {className: style});\n
// Kludge to work around the IE bug from issue #1193, where text\n
// input stops going to the textarea whenever this fires.\n
if (ie_lt8 && cm.state.focused) cm.display.input.focus();\n
var clear = function() {\n
cm.operation(function() { one.clear(); two && two.clear(); });\n
};\n
if (autoclear) setTimeout(clear, 800);\n
else return clear;\n
}\n
\n
var currentlyHighlighted = null;\n
function doMatchBrackets(cm) {\n
cm.operation(function() {\n
if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n
if (!cm.somethingSelected()) currentlyHighlighted = matchBrackets(cm, false);\n
});\n
}\n
\n
CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {\n
if (old && old != CodeMirror.Init)\n
cm.off("cursorActivity", doMatchBrackets);\n
if (val) {\n
cm.state.matchBrackets = typeof val == "object" ? val : {};\n
cm.on("cursorActivity", doMatchBrackets);\n
}\n
});\n
\n
CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});\n
CodeMirror.defineExtension("findMatchingBracket", function(pos, strict){\n
return findMatchingBracket(this, pos, strict);\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3918</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,77 +8,76 @@ ...@@ -8,77 +8,76 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts87948228.96</string> </value> <value> <string>ts93404951.83</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>tokenize.js</string> </value> <value> <string>matchtags.js</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value> <value> <string>application/javascript</string> </value>
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// A framework for simple tokenizers. Takes care of newlines and\n (function() {\n
// white-space, and of getting the text from the source stream into\n "use strict";\n
// the token object. A state is a function of two arguments -- a\n
// string stream and a setState function. The second can be used to\n
// change the tokenizer\'s state, and can be ignored for stateless\n
// tokenizers. This function should advance the stream over a token\n
// and return a string or object containing information about the next\n
// token, or null to pass and have the (new) state be called to finish\n
// the token. When a string is given, it is wrapped in a {style, type}\n
// object. In the resulting object, the characters consumed are stored\n
// under the content property. Any whitespace following them is also\n
// automatically consumed, and added to the value property. (Thus,\n
// content is the actual meaningful part of the token, while value\n
// contains all the text it spans.)\n
\n \n
function tokenizer(source, state) {\n CodeMirror.defineOption("matchTags", false, function(cm, val, old) {\n
// Newlines are always a separate token.\n if (old && old != CodeMirror.Init) {\n
function isWhiteSpace(ch) {\n cm.off("cursorActivity", doMatchTags);\n
// The messy regexp is because IE\'s regexp matcher is of the\n cm.off("viewportChange", maybeUpdateMatch);\n
// opinion that non-breaking spaces are no whitespace.\n clear(cm);\n
return ch != "\\n" && /^[\\s\\u00a0]*$/.test(ch);\n }\n
}\n if (val) {\n
\n cm.state.matchBothTags = typeof val == "object" && val.bothTags;\n
var tokenizer = {\n cm.on("cursorActivity", doMatchTags);\n
state: state,\n cm.on("viewportChange", maybeUpdateMatch);\n
\n doMatchTags(cm);\n
take: function(type) {\n }\n
if (typeof(type) == "string")\n });\n
type = {style: type, type: type};\n
\n
type.content = (type.content || "") + source.get();\n
if (!/\\n$/.test(type.content))\n
source.nextWhile(isWhiteSpace);\n
type.value = type.content + source.get();\n
return type;\n
},\n
\n \n
next: function () {\n function clear(cm) {\n
if (!source.more()) throw StopIteration;\n if (cm.state.tagHit) cm.state.tagHit.clear();\n
if (cm.state.tagOther) cm.state.tagOther.clear();\n
cm.state.tagHit = cm.state.tagOther = null;\n
}\n
\n \n
var type;\n function doMatchTags(cm) {\n
if (source.equals("\\n")) {\n cm.state.failedTagMatch = false;\n
source.next();\n cm.operation(function() {\n
return this.take("whitespace");\n clear(cm);\n
if (cm.somethingSelected()) return;\n
var cur = cm.getCursor(), range = cm.getViewport();\n
range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);\n
var match = CodeMirror.findMatchingTag(cm, cur, range);\n
if (!match) return;\n
if (cm.state.matchBothTags) {\n
var hit = match.at == "open" ? match.open : match.close;\n
if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});\n
}\n }\n
\n var other = match.at == "close" ? match.open : match.close;\n
if (source.applies(isWhiteSpace))\n if (other)\n
type = "whitespace";\n cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});\n
else\n else\n
while (!type)\n cm.state.failedTagMatch = true;\n
type = this.state(source, function(s) {tokenizer.state = s;});\n });\n
}\n
\n
function maybeUpdateMatch(cm) {\n
if (cm.state.failedTagMatch) doMatchTags(cm);\n
}\n
\n \n
return this.take(type);\n CodeMirror.commands.toMatchingTag = function(cm) {\n
var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n
if (found) {\n
var other = found.at == "close" ? found.open : found.close;\n
if (other) cm.setSelection(other.to, other.from);\n
}\n }\n
};\n };\n
return tokenizer;\n })();\n
}\n
]]></string> </value> ]]></string> </value>
...@@ -89,7 +88,7 @@ function tokenizer(source, state) {\n ...@@ -89,7 +88,7 @@ function tokenizer(source, state) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2006</int> </value> <value> <int>1878</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404941.22</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>trailingspace.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {\n
if (prev == CodeMirror.Init) prev = false;\n
if (prev && !val)\n
cm.removeOverlay("trailingspace");\n
else if (!prev && val)\n
cm.addOverlay({\n
token: function(stream) {\n
for (var l = stream.string.length, i = l; i && /\\s/.test(stream.string.charAt(i - 1)); --i) {}\n
if (i > stream.pos) { stream.pos = i; return null; }\n
stream.pos = l;\n
return "trailingspace";\n
},\n
name: "trailingspace"\n
});\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>528</int> </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>fold</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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.67</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>brace-fold.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
CodeMirror.registerHelper("fold", "brace", function(cm, start) {\n
var line = start.line, lineText = cm.getLine(line);\n
var startCh, tokenType;\n
\n
function findOpening(openCh) {\n
for (var at = start.ch, pass = 0;;) {\n
var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);\n
if (found == -1) {\n
if (pass == 1) break;\n
pass = 1;\n
at = lineText.length;\n
continue;\n
}\n
if (pass == 1 && found < start.ch) break;\n
tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));\n
if (!/^(comment|string)/.test(tokenType)) return found + 1;\n
at = found - 1;\n
}\n
}\n
\n
var startToken = "{", endToken = "}", startCh = findOpening("{");\n
if (startCh == null) {\n
startToken = "[", endToken = "]";\n
startCh = findOpening("[");\n
}\n
\n
if (startCh == null) return;\n
var count = 1, lastLine = cm.lastLine(), end, endCh;\n
outer: for (var i = line; i <= lastLine; ++i) {\n
var text = cm.getLine(i), pos = i == line ? startCh : 0;\n
for (;;) {\n
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);\n
if (nextOpen < 0) nextOpen = text.length;\n
if (nextClose < 0) nextClose = text.length;\n
pos = Math.min(nextOpen, nextClose);\n
if (pos == text.length) break;\n
if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {\n
if (pos == nextOpen) ++count;\n
else if (!--count) { end = i; endCh = pos; break outer; }\n
}\n
++pos;\n
}\n
}\n
if (end == null || line == end && endCh == startCh) return;\n
return {from: CodeMirror.Pos(line, startCh),\n
to: CodeMirror.Pos(end, endCh)};\n
});\n
CodeMirror.braceRangeFinder = CodeMirror.fold.brace; // deprecated\n
\n
CodeMirror.registerHelper("fold", "import", function(cm, start) {\n
function hasImport(line) {\n
if (line < cm.firstLine() || line > cm.lastLine()) return null;\n
var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n
if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n
if (start.type != "keyword" || start.string != "import") return null;\n
// Now find closing semicolon, return its position\n
for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {\n
var text = cm.getLine(i), semi = text.indexOf(";");\n
if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};\n
}\n
}\n
\n
var start = start.line, has = hasImport(start), prev;\n
if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1))\n
return null;\n
for (var end = has.end;;) {\n
var next = hasImport(end.line + 1);\n
if (next == null) break;\n
end = next.end;\n
}\n
return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};\n
});\n
CodeMirror.importRangeFinder = CodeMirror.fold["import"]; // deprecated\n
\n
CodeMirror.registerHelper("fold", "include", function(cm, start) {\n
function hasInclude(line) {\n
if (line < cm.firstLine() || line > cm.lastLine()) return null;\n
var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n
if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n
if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;\n
}\n
\n
var start = start.line, has = hasInclude(start);\n
if (has == null || hasInclude(start - 1) != null) return null;\n
for (var end = start;;) {\n
var next = hasInclude(end + 1);\n
if (next == null) break;\n
++end;\n
}\n
return {from: CodeMirror.Pos(start, has + 1),\n
to: cm.clipPos(CodeMirror.Pos(end))};\n
});\n
CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3653</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.24</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>comment-fold.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n
return mode.blockCommentStart && mode.blockCommentEnd;\n
}, function(cm, start) {\n
var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;\n
if (!startToken || !endToken) return;\n
var line = start.line, lineText = cm.getLine(line);\n
\n
var startCh;\n
for (var at = start.ch, pass = 0;;) {\n
var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);\n
if (found == -1) {\n
if (pass == 1) return;\n
pass = 1;\n
at = lineText.length;\n
continue;\n
}\n
if (pass == 1 && found < start.ch) return;\n
if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {\n
startCh = found + startToken.length;\n
break;\n
}\n
at = found - 1;\n
}\n
\n
var depth = 1, lastLine = cm.lastLine(), end, endCh;\n
outer: for (var i = line; i <= lastLine; ++i) {\n
var text = cm.getLine(i), pos = i == line ? startCh : 0;\n
for (;;) {\n
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);\n
if (nextOpen < 0) nextOpen = text.length;\n
if (nextClose < 0) nextClose = text.length;\n
pos = Math.min(nextOpen, nextClose);\n
if (pos == text.length) break;\n
if (pos == nextOpen) ++depth;\n
else if (!--depth) { end = i; endCh = pos; break outer; }\n
++pos;\n
}\n
}\n
if (end == null || line == end && endCh == startCh) return;\n
return {from: CodeMirror.Pos(line, startCh),\n
to: CodeMirror.Pos(end, endCh)};\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1538</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.02</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>foldcode.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
function doFold(cm, pos, options, force) {\n
var finder = options && (options.call ? options : options.rangeFinder);\n
if (!finder) finder = CodeMirror.fold.auto;\n
if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);\n
var minSize = options && options.minFoldSize || 0;\n
\n
function getRange(allowFolded) {\n
var range = finder(cm, pos);\n
if (!range || range.to.line - range.from.line < minSize) return null;\n
var marks = cm.findMarksAt(range.from);\n
for (var i = 0; i < marks.length; ++i) {\n
if (marks[i].__isFold && force !== "fold") {\n
if (!allowFolded) return null;\n
range.cleared = true;\n
marks[i].clear();\n
}\n
}\n
return range;\n
}\n
\n
var range = getRange(true);\n
if (options && options.scanUp) while (!range && pos.line > cm.firstLine()) {\n
pos = CodeMirror.Pos(pos.line - 1, 0);\n
range = getRange(false);\n
}\n
if (!range || range.cleared || force === "unfold") return;\n
\n
var myWidget = makeWidget(options);\n
CodeMirror.on(myWidget, "mousedown", function() { myRange.clear(); });\n
var myRange = cm.markText(range.from, range.to, {\n
replacedWith: myWidget,\n
clearOnEnter: true,\n
__isFold: true\n
});\n
myRange.on("clear", function(from, to) {\n
CodeMirror.signal(cm, "unfold", cm, from, to);\n
});\n
CodeMirror.signal(cm, "fold", cm, range.from, range.to);\n
}\n
\n
function makeWidget(options) {\n
var widget = (options && options.widget) || "\\u2194";\n
if (typeof widget == "string") {\n
var text = document.createTextNode(widget);\n
widget = document.createElement("span");\n
widget.appendChild(text);\n
widget.className = "CodeMirror-foldmarker";\n
}\n
return widget;\n
}\n
\n
// Clumsy backwards-compatible interface\n
CodeMirror.newFoldFunction = function(rangeFinder, widget) {\n
return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };\n
};\n
\n
// New-style interface\n
CodeMirror.defineExtension("foldCode", function(pos, options, force) {\n
doFold(this, pos, options, force);\n
});\n
\n
CodeMirror.defineExtension("isFolded", function(pos) {\n
var marks = this.findMarksAt(pos);\n
for (var i = 0; i < marks.length; ++i)\n
if (marks[i].__isFold) return true;\n
});\n
\n
CodeMirror.commands.fold = function(cm) {\n
cm.foldCode(cm.getCursor());\n
};\n
\n
CodeMirror.registerHelper("fold", "combine", function() {\n
var funcs = Array.prototype.slice.call(arguments, 0);\n
return function(cm, start) {\n
for (var i = 0; i < funcs.length; ++i) {\n
var found = funcs[i](cm, start);\n
if (found) return found;\n
}\n
};\n
});\n
\n
CodeMirror.registerHelper("fold", "auto", function(cm, start) {\n
var helpers = cm.getHelpers(start, "fold");\n
for (var i = 0; i < helpers.length; i++) {\n
var cur = helpers[i](cm, start);\n
if (cur) return cur;\n
}\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2941</int> </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="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>foldgutter.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>raw</string> </key>
<value> <string>.CodeMirror-foldmarker {\n
color: blue;\n
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n
font-family: arial;\n
line-height: .3;\n
cursor: pointer;\n
}\n
.CodeMirror-foldgutter {\n
width: .7em;\n
}\n
.CodeMirror-foldgutter-open,\n
.CodeMirror-foldgutter-folded {\n
color: #555;\n
cursor: pointer;\n
}\n
.CodeMirror-foldgutter-open:after {\n
content: "\\25BE";\n
}\n
.CodeMirror-foldgutter-folded:after {\n
content: "\\25B8";\n
}\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.13</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>foldgutter.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {\n
if (old && old != CodeMirror.Init) {\n
cm.clearGutter(cm.state.foldGutter.options.gutter);\n
cm.state.foldGutter = null;\n
cm.off("gutterClick", onGutterClick);\n
cm.off("change", onChange);\n
cm.off("viewportChange", onViewportChange);\n
cm.off("fold", onFold);\n
cm.off("unfold", onFold);\n
cm.off("swapDoc", updateInViewport);\n
}\n
if (val) {\n
cm.state.foldGutter = new State(parseOptions(val));\n
updateInViewport(cm);\n
cm.on("gutterClick", onGutterClick);\n
cm.on("change", onChange);\n
cm.on("viewportChange", onViewportChange);\n
cm.on("fold", onFold);\n
cm.on("unfold", onFold);\n
cm.on("swapDoc", updateInViewport);\n
}\n
});\n
\n
var Pos = CodeMirror.Pos;\n
\n
function State(options) {\n
this.options = options;\n
this.from = this.to = 0;\n
}\n
\n
function parseOptions(opts) {\n
if (opts === true) opts = {};\n
if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";\n
if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";\n
if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";\n
return opts;\n
}\n
\n
function isFolded(cm, line) {\n
var marks = cm.findMarksAt(Pos(line));\n
for (var i = 0; i < marks.length; ++i)\n
if (marks[i].__isFold && marks[i].find().from.line == line) return true;\n
}\n
\n
function marker(spec) {\n
if (typeof spec == "string") {\n
var elt = document.createElement("div");\n
elt.className = spec;\n
return elt;\n
} else {\n
return spec.cloneNode(true);\n
}\n
}\n
\n
function updateFoldInfo(cm, from, to) {\n
var opts = cm.state.foldGutter.options, cur = from;\n
cm.eachLine(from, to, function(line) {\n
var mark = null;\n
if (isFolded(cm, cur)) {\n
mark = marker(opts.indicatorFolded);\n
} else {\n
var pos = Pos(cur, 0), func = opts.rangeFinder || CodeMirror.fold.auto;\n
var range = func && func(cm, pos);\n
if (range && range.from.line + 1 < range.to.line)\n
mark = marker(opts.indicatorOpen);\n
}\n
cm.setGutterMarker(line, opts.gutter, mark);\n
++cur;\n
});\n
}\n
\n
function updateInViewport(cm) {\n
var vp = cm.getViewport(), state = cm.state.foldGutter;\n
if (!state) return;\n
cm.operation(function() {\n
updateFoldInfo(cm, vp.from, vp.to);\n
});\n
state.from = vp.from; state.to = vp.to;\n
}\n
\n
function onGutterClick(cm, line, gutter) {\n
var opts = cm.state.foldGutter.options;\n
if (gutter != opts.gutter) return;\n
cm.foldCode(Pos(line, 0), opts.rangeFinder);\n
}\n
\n
function onChange(cm) {\n
var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;\n
state.from = state.to = 0;\n
clearTimeout(state.changeUpdate);\n
state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);\n
}\n
\n
function onViewportChange(cm) {\n
var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;\n
clearTimeout(state.changeUpdate);\n
state.changeUpdate = setTimeout(function() {\n
var vp = cm.getViewport();\n
if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {\n
updateInViewport(cm);\n
} else {\n
cm.operation(function() {\n
if (vp.from < state.from) {\n
updateFoldInfo(cm, vp.from, state.from);\n
state.from = vp.from;\n
}\n
if (vp.to > state.to) {\n
updateFoldInfo(cm, state.to, vp.to);\n
state.to = vp.to;\n
}\n
});\n
}\n
}, opts.updateViewportTimeSpan || 400);\n
}\n
\n
function onFold(cm, from) {\n
var state = cm.state.foldGutter, line = from.line;\n
if (line >= state.from && line < state.to)\n
updateFoldInfo(cm, line, line + 1);\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3874</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,111 +8,53 @@ ...@@ -8,111 +8,53 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts87948228.94</string> </value> <value> <string>ts93403077.31</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>xqcolors-dark.css</string> </value> <value> <string>indent-fold.js</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value> <value> <string>application/javascript</string> </value>
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>\n <value> <string encoding="cdata"><![CDATA[
.editbox {\n
margin: .4em;\n CodeMirror.registerHelper("fold", "indent", function(cm, start) {\n
padding: 0;\n var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);\n
font-family: monospace;\n if (!/\\S/.test(firstLine)) return;\n
font-size: 10pt;\n var getIndent = function(line) {\n
color: white;\n return CodeMirror.countColumn(line, null, tabSize);\n
background-color: black;\n };\n
line-height: 16px;\n var myIndent = getIndent(firstLine);\n
}\n var lastLineInFold = null;\n
\n // Go through lines until we find a line that definitely doesn\'t belong in\n
span.word {\n // the block we\'re folding, or to the end.\n
color:white;\n for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {\n
}\n var curLine = cm.getLine(i);\n
\n var curIndent = getIndent(curLine);\n
span.xqueryKeyword {\n if (curIndent > myIndent) {\n
color: #ffbd40; \n // Lines with a greater indent are considered part of the block.\n
/* font-weight: bold; */\n lastLineInFold = i;\n
}\n } else if (!/\\S/.test(curLine)) {\n
\n // Empty lines might be breaks within the block we\'re trying to fold.\n
span.xqueryComment {\n } else {\n
color: #CDCDCD;\n // A non-empty line at an indent equal to or less than ours marks the\n
font-style:italic;\n // start of another block.\n
}\n break;\n
\n }\n
span.xqueryModifier {\n }\n
color:#6c8cd5;\n if (lastLineInFold) return {\n
font-weight: bold;\n from: CodeMirror.Pos(start.line, firstLine.length),\n
}\n to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n
\n };\n
span.xqueryType {\n });\n
color:#6c8cd5;\n CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated\n
font-weight: bold;\n
}\n
\n ]]></string> </value>
span.xqueryAtom {\n
color:#6c8cd5;\n
font-weight: bold; \n
}\n
\n
span.xqueryString {\n
color: #9fee00;\n
}\n
\n
span.xqueryRegexp {\n
color: rgb(128,0,64);\n
}\n
\n
span.xqueryNumber {\n
color: rgb(255,0,0); \n
}\n
\n
span.xqueryVariable {\n
\n
}\n
\n
span.xqueryFunction {\n
color:#FFF700;\n
}\n
\n
span.xqueryLocalvariable {\n
color: white;\n
}\n
\n
span.xqueryProperty\n
{\n
color: white;\n
}\n
\n
span.xqueryOperator {\n
color: orange;\n
}\n
\n
span.xqueryPunctuation {\n
color: white;\n
}\n
\n
span.xquery-doc-directive {\n
color: white; \n
}\n
\n
span.xml-tagname {\n
color: #ffbd40; ;\n
}\n
\n
span.xml-attribute {\n
color: #FFF700;\n
}\n
\n
span.xml-attribute-value {\n
color: #FFF700;\n
font-style:italic;\n
}</string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -120,7 +62,7 @@ span.xml-attribute-value {\n ...@@ -120,7 +62,7 @@ span.xml-attribute-value {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1091</int> </value> <value> <int>1235</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.79</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>markdown-fold.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n
var maxDepth = 100;\n
\n
function isHeader(lineNo) {\n
var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));\n
return tokentype && /\\bheader\\b/.test(tokentype);\n
}\n
\n
function headerLevel(lineNo, line, nextLine) {\n
var match = line && line.match(/^#+/);\n
if (match && isHeader(lineNo)) return match[0].length;\n
match = nextLine && nextLine.match(/^[=\\-]+\\s*$/);\n
if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2;\n
return maxDepth;\n
}\n
\n
var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1);\n
var level = headerLevel(start.line, firstLine, nextLine);\n
if (level === maxDepth) return undefined;\n
\n
var lastLineNo = cm.lastLine();\n
var end = start.line, nextNextLine = cm.getLine(end + 2);\n
while (end < lastLineNo) {\n
if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break;\n
++end;\n
nextLine = nextNextLine;\n
nextNextLine = cm.getLine(end + 2);\n
}\n
\n
return {\n
from: CodeMirror.Pos(start.line, firstLine.length),\n
to: CodeMirror.Pos(end, cm.getLine(end).length)\n
};\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1144</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.92</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>xml-fold.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
var Pos = CodeMirror.Pos;\n
function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }\n
\n
var nameStartChar = "A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD";\n
var nameChar = nameStartChar + "\\-\\:\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040";\n
var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");\n
\n
function Iter(cm, line, ch, range) {\n
this.line = line; this.ch = ch;\n
this.cm = cm; this.text = cm.getLine(line);\n
this.min = range ? range.from : cm.firstLine();\n
this.max = range ? range.to - 1 : cm.lastLine();\n
}\n
\n
function tagAt(iter, ch) {\n
var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));\n
return type && /\\btag\\b/.test(type);\n
}\n
\n
function nextLine(iter) {\n
if (iter.line >= iter.max) return;\n
iter.ch = 0;\n
iter.text = iter.cm.getLine(++iter.line);\n
return true;\n
}\n
function prevLine(iter) {\n
if (iter.line <= iter.min) return;\n
iter.text = iter.cm.getLine(--iter.line);\n
iter.ch = iter.text.length;\n
return true;\n
}\n
\n
function toTagEnd(iter) {\n
for (;;) {\n
var gt = iter.text.indexOf(">", iter.ch);\n
if (gt == -1) { if (nextLine(iter)) continue; else return; }\n
if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }\n
var lastSlash = iter.text.lastIndexOf("/", gt);\n
var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n
iter.ch = gt + 1;\n
return selfClose ? "selfClose" : "regular";\n
}\n
}\n
function toTagStart(iter) {\n
for (;;) {\n
var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;\n
if (lt == -1) { if (prevLine(iter)) continue; else return; }\n
if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }\n
xmlTagStart.lastIndex = lt;\n
iter.ch = lt;\n
var match = xmlTagStart.exec(iter.text);\n
if (match && match.index == lt) return match;\n
}\n
}\n
\n
function toNextTag(iter) {\n
for (;;) {\n
xmlTagStart.lastIndex = iter.ch;\n
var found = xmlTagStart.exec(iter.text);\n
if (!found) { if (nextLine(iter)) continue; else return; }\n
if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }\n
iter.ch = found.index + found[0].length;\n
return found;\n
}\n
}\n
function toPrevTag(iter) {\n
for (;;) {\n
var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;\n
if (gt == -1) { if (prevLine(iter)) continue; else return; }\n
if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }\n
var lastSlash = iter.text.lastIndexOf("/", gt);\n
var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n
iter.ch = gt + 1;\n
return selfClose ? "selfClose" : "regular";\n
}\n
}\n
\n
function findMatchingClose(iter, tag) {\n
var stack = [];\n
for (;;) {\n
var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);\n
if (!next || !(end = toTagEnd(iter))) return;\n
if (end == "selfClose") continue;\n
if (next[1]) { // closing tag\n
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {\n
stack.length = i;\n
break;\n
}\n
if (i < 0 && (!tag || tag == next[2])) return {\n
tag: next[2],\n
from: Pos(startLine, startCh),\n
to: Pos(iter.line, iter.ch)\n
};\n
} else { // opening tag\n
stack.push(next[2]);\n
}\n
}\n
}\n
function findMatchingOpen(iter, tag) {\n
var stack = [];\n
for (;;) {\n
var prev = toPrevTag(iter);\n
if (!prev) return;\n
if (prev == "selfClose") { toTagStart(iter); continue; }\n
var endLine = iter.line, endCh = iter.ch;\n
var start = toTagStart(iter);\n
if (!start) return;\n
if (start[1]) { // closing tag\n
stack.push(start[2]);\n
} else { // opening tag\n
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {\n
stack.length = i;\n
break;\n
}\n
if (i < 0 && (!tag || tag == start[2])) return {\n
tag: start[2],\n
from: Pos(iter.line, iter.ch),\n
to: Pos(endLine, endCh)\n
};\n
}\n
}\n
}\n
\n
CodeMirror.registerHelper("fold", "xml", function(cm, start) {\n
var iter = new Iter(cm, start.line, 0);\n
for (;;) {\n
var openTag = toNextTag(iter), end;\n
if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;\n
if (!openTag[1] && end != "selfClose") {\n
var start = Pos(iter.line, iter.ch);\n
var close = findMatchingClose(iter, openTag[2]);\n
return close && {from: start, to: close.from};\n
}\n
}\n
});\n
CodeMirror.tagRangeFinder = CodeMirror.fold.xml; // deprecated\n
\n
CodeMirror.findMatchingTag = function(cm, pos, range) {\n
var iter = new Iter(cm, pos.line, pos.ch, range);\n
if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;\n
var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n
var start = end && toTagStart(iter);\n
if (!end || end == "selfClose" || !start || cmp(iter, pos) > 0) return;\n
var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n
\n
if (start[1]) { // closing tag\n
return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};\n
} else { // opening tag\n
iter = new Iter(cm, to.line, to.ch, range);\n
return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};\n
}\n
};\n
\n
CodeMirror.findEnclosingTag = function(cm, pos, range) {\n
var iter = new Iter(cm, pos.line, pos.ch, range);\n
for (;;) {\n
var open = findMatchingOpen(iter);\n
if (!open) break;\n
var forward = new Iter(cm, pos.line, pos.ch, range);\n
var close = findMatchingClose(forward, open.tag);\n
if (close) return {open: open, close: close};\n
}\n
};\n
\n
// Used by addon/edit/closetag.js\n
CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n
var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n
return !!findMatchingClose(iter, name);\n
};\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6161</int> </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>hint</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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.24</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>anyword-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
var WORD = /[\\w$]+/, RANGE = 500;\n
\n
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {\n
var word = options && options.word || WORD;\n
var range = options && options.range || RANGE;\n
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n
var start = cur.ch, end = start;\n
while (end < curLine.length && word.test(curLine.charAt(end))) ++end;\n
while (start && word.test(curLine.charAt(start - 1))) --start;\n
var curWord = start != end && curLine.slice(start, end);\n
\n
var list = [], seen = {};\n
var re = new RegExp(word.source, "g");\n
for (var dir = -1; dir <= 1; dir += 2) {\n
var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;\n
for (; line != endLine; line += dir) {\n
var text = editor.getLine(line), m;\n
while (m = re.exec(text)) {\n
if (line == cur.line && m[0] === curWord) continue;\n
if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {\n
seen[m[0]] = true;\n
list.push(m[0]);\n
}\n
}\n
}\n
}\n
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n
});\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1304</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.76</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>css-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>(function () {\n
"use strict";\n
\n
var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,\n
"first-letter": 1, "first-line": 1, "first-child": 1,\n
before: 1, after: 1, lang: 1};\n
\n
CodeMirror.registerHelper("hint", "css", function(cm) {\n
var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n
var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n
if (inner.mode.name != "css") return;\n
\n
var word = token.string, start = token.start, end = token.end;\n
if (/[^\\w$_-]/.test(word)) {\n
word = ""; start = end = cur.ch;\n
}\n
\n
var spec = CodeMirror.resolveMode("text/css");\n
\n
var result = [];\n
function add(keywords) {\n
for (var name in keywords)\n
if (!word || name.lastIndexOf(word, 0) == 0)\n
result.push(name);\n
}\n
\n
var st = token.state.state;\n
if (st == "pseudo" || token.type == "variable-3") {\n
add(pseudoClasses);\n
} else if (st == "block" || st == "maybeprop") {\n
add(spec.propertyKeywords);\n
} else if (st == "prop" || st == "parens" || st == "at" || st == "params") {\n
add(spec.valueKeywords);\n
add(spec.colorKeywords);\n
} else if (st == "media" || st == "media_parens") {\n
add(spec.mediaTypes);\n
add(spec.mediaFeatures);\n
}\n
\n
if (result.length) return {\n
list: result,\n
from: CodeMirror.Pos(cur.line, start),\n
to: CodeMirror.Pos(cur.line, end)\n
};\n
});\n
})();\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1455</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.83</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>javascript-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function () {\n
var Pos = CodeMirror.Pos;\n
\n
function forEach(arr, f) {\n
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n
}\n
\n
function arrayContains(arr, item) {\n
if (!Array.prototype.indexOf) {\n
var i = arr.length;\n
while (i--) {\n
if (arr[i] === item) {\n
return true;\n
}\n
}\n
return false;\n
}\n
return arr.indexOf(item) != -1;\n
}\n
\n
function scriptHint(editor, keywords, getToken, options) {\n
// Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n
if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;\n
\n
// If it\'s not a \'word-style\' token, ignore the token.\n
if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
type: token.string == "." ? "property" : null};\n
}\n
// If it is a property, find out what it is a property of.\n
while (tprop.type == "property") {\n
tprop = getToken(editor, Pos(cur.line, tprop.start));\n
if (tprop.string != ".") return;\n
tprop = getToken(editor, Pos(cur.line, tprop.start));\n
if (!context) var context = [];\n
context.push(tprop);\n
}\n
return {list: getCompletions(token, context, keywords, options),\n
from: Pos(cur.line, token.start),\n
to: Pos(cur.line, token.end)};\n
}\n
\n
function javascriptHint(editor, options) {\n
return scriptHint(editor, javascriptKeywords,\n
function (e, cur) {return e.getTokenAt(cur);},\n
options);\n
};\n
CodeMirror.javascriptHint = javascriptHint; // deprecated\n
CodeMirror.registerHelper("hint", "javascript", javascriptHint);\n
\n
function getCoffeeScriptToken(editor, cur) {\n
// This getToken, it is for coffeescript, imitates the behavior of\n
// getTokenAt method in javascript.js, that is, returning "property"\n
// type and treat "." as indepenent token.\n
var token = editor.getTokenAt(cur);\n
if (cur.ch == token.start + 1 && token.string.charAt(0) == \'.\') {\n
token.end = token.start;\n
token.string = \'.\';\n
token.type = "property";\n
}\n
else if (/^\\.[\\w$_]*$/.test(token.string)) {\n
token.type = "property";\n
token.start++;\n
token.string = token.string.replace(/\\./, \'\');\n
}\n
return token;\n
}\n
\n
function coffeescriptHint(editor, options) {\n
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n
}\n
CodeMirror.coffeescriptHint = coffeescriptHint; // deprecated\n
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);\n
\n
var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +\n
"toUpperCase toLowerCase split concat match replace search").split(" ");\n
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +\n
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");\n
var funcProps = "prototype apply call bind".split(" ");\n
var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " +\n
"if in instanceof new null return switch throw true try typeof var void while with").split(" ");\n
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +\n
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");\n
\n
function getCompletions(token, context, keywords, options) {\n
var found = [], start = token.string;\n
function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n
function gatherCompletions(obj) {\n
if (typeof obj == "string") forEach(stringProps, maybeAdd);\n
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n
else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n
for (var name in obj) maybeAdd(name);\n
}\n
\n
if (context && context.length) {\n
// If this is a property, see if it belongs to some object we can\n
// find in the current environment.\n
var obj = context.pop(), base;\n
if (obj.type && obj.type.indexOf("variable") === 0) {\n
if (options && options.additionalContext)\n
base = options.additionalContext[obj.string];\n
base = base || window[obj.string];\n
} else if (obj.type == "string") {\n
base = "";\n
} else if (obj.type == "atom") {\n
base = 1;\n
} else if (obj.type == "function") {\n
if (window.jQuery != null && (obj.string == \'$\' || obj.string == \'jQuery\') &&\n
(typeof window.jQuery == \'function\'))\n
base = window.jQuery();\n
else if (window._ != null && (obj.string == \'_\') && (typeof window._ == \'function\'))\n
base = window._();\n
}\n
while (base != null && context.length)\n
base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n
} else {\n
// If not, just look in the window object and any local scope\n
// (reading into JS mode internals to get at the local and global variables)\n
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n
gatherCompletions(window);\n
forEach(keywords, maybeAdd);\n
}\n
return found;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5572</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.21</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>pig-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function () {\n
"use strict";\n
\n
function forEach(arr, f) {\n
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n
}\n
\n
function arrayContains(arr, item) {\n
if (!Array.prototype.indexOf) {\n
var i = arr.length;\n
while (i--) {\n
if (arr[i] === item) {\n
return true;\n
}\n
}\n
return false;\n
}\n
return arr.indexOf(item) != -1;\n
}\n
\n
function scriptHint(editor, _keywords, getToken) {\n
// Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n
// If it\'s not a \'word-style\' token, ignore the token.\n
\n
if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
className: token.string == ":" ? "pig-type" : null};\n
}\n
\n
if (!context) var context = [];\n
context.push(tprop);\n
\n
var completionList = getCompletions(token, context);\n
completionList = completionList.sort();\n
//prevent autocomplete for last word, instead show dropdown with one word\n
if(completionList.length == 1) {\n
completionList.push(" ");\n
}\n
\n
return {list: completionList,\n
from: CodeMirror.Pos(cur.line, token.start),\n
to: CodeMirror.Pos(cur.line, token.end)};\n
}\n
\n
function pigHint(editor) {\n
return scriptHint(editor, pigKeywordsU, function (e, cur) {return e.getTokenAt(cur);});\n
}\n
CodeMirror.pigHint = pigHint; // deprecated\n
CodeMirror.registerHelper("hint", "pig", pigHint);\n
\n
var pigKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP "\n
+ "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL "\n
+ "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE "\n
+ "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE "\n
+ "NEQ MATCHES TRUE FALSE";\n
var pigKeywordsU = pigKeywords.split(" ");\n
var pigKeywordsL = pigKeywords.toLowerCase().split(" ");\n
\n
var pigTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP";\n
var pigTypesU = pigTypes.split(" ");\n
var pigTypesL = pigTypes.toLowerCase().split(" ");\n
\n
var pigBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL "\n
+ "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS "\n
+ "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG "\n
+ "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN "\n
+ "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER "\n
+ "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS "\n
+ "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA "\n
+ "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE "\n
+ "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG "\n
+ "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER";\n
var pigBuiltinsU = pigBuiltins.split(" ").join("() ").split(" ");\n
var pigBuiltinsL = pigBuiltins.toLowerCase().split(" ").join("() ").split(" ");\n
var pigBuiltinsC = ("BagSize BinStorage Bloom BuildBloom ConstantSize CubeDimensions DoubleAbs "\n
+ "DoubleAvg DoubleBase DoubleMax DoubleMin DoubleRound DoubleSum FloatAbs FloatAvg FloatMax "\n
+ "FloatMin FloatRound FloatSum GenericInvoker IntAbs IntAvg IntMax IntMin IntSum "\n
+ "InvokeForDouble InvokeForFloat InvokeForInt InvokeForLong InvokeForString Invoker "\n
+ "IsEmpty JsonLoader JsonMetadata JsonStorage LongAbs LongAvg LongMax LongMin LongSum MapSize "\n
+ "MonitoredUDF Nondeterministic OutputSchema PigStorage PigStreaming StringConcat StringMax "\n
+ "StringMin StringSize TextLoader TupleSize Utf8StorageConverter").split(" ").join("() ").split(" ");\n
\n
function getCompletions(token, context) {\n
var found = [], start = token.string;\n
function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n
\n
function gatherCompletions(obj) {\n
if(obj == ":") {\n
forEach(pigTypesL, maybeAdd);\n
}\n
else {\n
forEach(pigBuiltinsU, maybeAdd);\n
forEach(pigBuiltinsL, maybeAdd);\n
forEach(pigBuiltinsC, maybeAdd);\n
forEach(pigTypesU, maybeAdd);\n
forEach(pigTypesL, maybeAdd);\n
forEach(pigKeywordsU, maybeAdd);\n
forEach(pigKeywordsL, maybeAdd);\n
}\n
}\n
\n
if (context) {\n
// If this is a property, see if it belongs to some object we can\n
// find in the current environment.\n
var obj = context.pop(), base;\n
\n
if (obj.type == "variable")\n
base = obj.string;\n
else if(obj.type == "variable-3")\n
base = ":" + obj.string;\n
\n
while (base != null && context.length)\n
base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n
}\n
return found;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5117</int> </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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.08</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>python-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function () {\n
function forEach(arr, f) {\n
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n
}\n
\n
function arrayContains(arr, item) {\n
if (!Array.prototype.indexOf) {\n
var i = arr.length;\n
while (i--) {\n
if (arr[i] === item) {\n
return true;\n
}\n
}\n
return false;\n
}\n
return arr.indexOf(item) != -1;\n
}\n
\n
function scriptHint(editor, _keywords, getToken) {\n
// Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n
// If it\'s not a \'word-style\' token, ignore the token.\n
\n
if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
className: token.string == ":" ? "python-type" : null};\n
}\n
\n
if (!context) var context = [];\n
context.push(tprop);\n
\n
var completionList = getCompletions(token, context);\n
completionList = completionList.sort();\n
\n
return {list: completionList,\n
from: CodeMirror.Pos(cur.line, token.start),\n
to: CodeMirror.Pos(cur.line, token.end)};\n
}\n
\n
function pythonHint(editor) {\n
return scriptHint(editor, pythonKeywordsU, function (e, cur) {return e.getTokenAt(cur);});\n
}\n
CodeMirror.pythonHint = pythonHint; // deprecated\n
CodeMirror.registerHelper("hint", "python", pythonHint);\n
\n
var pythonKeywords = "and del from not while as elif global or with assert else if pass yield"\n
+ "break except import print class exec in raise continue finally is return def for lambda try";\n
var pythonKeywordsL = pythonKeywords.split(" ");\n
var pythonKeywordsU = pythonKeywords.toUpperCase().split(" ");\n
\n
var pythonBuiltins = "abs divmod input open staticmethod all enumerate int ord str "\n
+ "any eval isinstance pow sum basestring execfile issubclass print super"\n
+ "bin file iter property tuple bool filter len range type"\n
+ "bytearray float list raw_input unichr callable format locals reduce unicode"\n
+ "chr frozenset long reload vars classmethod getattr map repr xrange"\n
+ "cmp globals max reversed zip compile hasattr memoryview round __import__"\n
+ "complex hash min set apply delattr help next setattr buffer"\n
+ "dict hex object slice coerce dir id oct sorted intern ";\n
var pythonBuiltinsL = pythonBuiltins.split(" ").join("() ").split(" ");\n
var pythonBuiltinsU = pythonBuiltins.toUpperCase().split(" ").join("() ").split(" ");\n
\n
function getCompletions(token, context) {\n
var found = [], start = token.string;\n
function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n
\n
function gatherCompletions(_obj) {\n
forEach(pythonBuiltinsL, maybeAdd);\n
forEach(pythonBuiltinsU, maybeAdd);\n
forEach(pythonKeywordsL, maybeAdd);\n
forEach(pythonKeywordsU, maybeAdd);\n
}\n
\n
if (context) {\n
// If this is a property, see if it belongs to some object we can\n
// find in the current environment.\n
var obj = context.pop(), base;\n
\n
if (obj.type == "variable")\n
base = obj.string;\n
else if(obj.type == "variable-3")\n
base = ":" + obj.string;\n
\n
while (base != null && context.length)\n
base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n
}\n
return found;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3331</int> </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="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>show-hint.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>raw</string> </key>
<value> <string>.CodeMirror-hints {\n
position: absolute;\n
z-index: 10;\n
overflow: hidden;\n
list-style: none;\n
\n
margin: 0;\n
padding: 2px;\n
\n
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n
box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n
border-radius: 3px;\n
border: 1px solid silver;\n
\n
background: white;\n
font-size: 90%;\n
font-family: monospace;\n
\n
max-height: 20em;\n
overflow-y: auto;\n
}\n
\n
.CodeMirror-hint {\n
margin: 0;\n
padding: 0 4px;\n
border-radius: 2px;\n
max-width: 19em;\n
overflow: hidden;\n
white-space: pre;\n
color: black;\n
cursor: pointer;\n
}\n
\n
.CodeMirror-hint-active {\n
background: #08f;\n
color: white;\n
}\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.98</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>xml-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function() {\n
"use strict";\n
\n
var Pos = CodeMirror.Pos;\n
\n
function getHints(cm, options) {\n
var tags = options && options.schemaInfo;\n
var quote = (options && options.quoteChar) || \'"\';\n
if (!tags) return;\n
var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n
var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n
if (inner.mode.name != "xml") return;\n
var result = [], replaceToken = false, prefix;\n
var isTag = token.string.charAt(0) == "<";\n
if (!inner.state.tagName || isTag) { // Tag completion\n
if (isTag) {\n
prefix = token.string.slice(1);\n
replaceToken = true;\n
}\n
var cx = inner.state.context, curTag = cx && tags[cx.tagName];\n
var childList = cx ? curTag && curTag.children : tags["!top"];\n
if (childList) {\n
for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)\n
result.push("<" + childList[i]);\n
} else {\n
for (var name in tags) if (tags.hasOwnProperty(name) && name != "!top" && (!prefix || name.lastIndexOf(prefix, 0) == 0))\n
result.push("<" + name);\n
}\n
if (cx && (!prefix || ("/" + cx.tagName).lastIndexOf(prefix, 0) == 0))\n
result.push("</" + cx.tagName + ">");\n
} else {\n
// Attribute completion\n
var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs;\n
if (!attrs) return;\n
if (token.type == "string" || token.string == "=") { // A value\n
var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)),\n
Pos(cur.line, token.type == "string" ? token.start : token.end));\n
var atName = before.match(/([^\\s\\u00a0=<>\\"\\\']+)=$/), atValues;\n
if (!atName || !attrs.hasOwnProperty(atName[1]) || !(atValues = attrs[atName[1]])) return;\n
if (typeof atValues == \'function\') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget\n
if (token.type == "string") {\n
prefix = token.string;\n
if (/[\'"]/.test(token.string.charAt(0))) {\n
quote = token.string.charAt(0);\n
prefix = token.string.slice(1);\n
}\n
replaceToken = true;\n
}\n
for (var i = 0; i < atValues.length; ++i) if (!prefix || atValues[i].lastIndexOf(prefix, 0) == 0)\n
result.push(quote + atValues[i] + quote);\n
} else { // An attribute name\n
if (token.type == "attribute") {\n
prefix = token.string;\n
replaceToken = true;\n
}\n
for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || attr.lastIndexOf(prefix, 0) == 0))\n
result.push(attr);\n
}\n
}\n
return {\n
list: result,\n
from: replaceToken ? Pos(cur.line, token.start) : cur,\n
to: replaceToken ? Pos(cur.line, token.end) : cur\n
};\n
}\n
\n
CodeMirror.xmlHint = getHints; // deprecated\n
CodeMirror.registerHelper("hint", "xml", getHints);\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2964</int> </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>lint</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>merge</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>css</string> </value> <value> <string>dep</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
This diff is collapsed.
This diff is collapsed.
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