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

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>
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ometa</string> </value>
<value> <string>addon</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>contrib</string> </value>
<value> <string>comment</string> </value>
</item>
<item>
<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 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>csharp</string> </value>
<value> <string>dialog</string> </value>
</item>
<item>
<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 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts87948228.92</string> </value>
<value> <string>ts93404951.61</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ometacolors.css</string> </value>
<value> <string>continuelist.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>html {\n
cursor: text;\n
}\n
<value> <string encoding="cdata"><![CDATA[
(function() {\n
\'use strict\';\n
\n
.editbox {\n
margin: .4em;\n
padding: 0;\n
font-family: monospace;\n
font-size: 10pt;\n
color: black;\n
}\n
var listRE = /^(\\s*)([*+-]|(\\d+)\\.)(\\s*)/,\n
unorderedBullets = \'*+-\';\n
\n
pre.code, .editbox {\n
color: #666666;\n
}\n
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n
if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
\n
.editbox p {\n
margin: 0;\n
}\n
var pos = cm.getCursor(),\n
inList = cm.getStateAfter(pos.line).list !== false,\n
match;\n
\n
span.js-punctuation {\n
color: #666666;\n
}\n
if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {\n
cm.execCommand(\'newlineAndIndent\');\n
return;\n
}\n
\n
span.js-operator {\n
color: #E1570F;\n
}\n
var indent = match[1], after = match[4];\n
var bullet = unorderedBullets.indexOf(match[2]) >= 0\n
? match[2]\n
: (parseInt(match[3], 10) + 1) + \'.\';\n
\n
span.js-keyword {\n
color: #770088;\n
}\n
cm.replaceSelection(\'\\n\' + indent + bullet + after, \'end\');\n
};\n
\n
span.js-atom {\n
color: #228811;\n
}\n
\n
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>
}());\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
......@@ -91,7 +59,7 @@ span.ometa-binding {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>642</int> </value>
<value> <int>725</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
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