Replace makeStaticLoader with a grunt task

'grunt build' builds modules/ve/test/index.php, demos/ve/index.php
and .docs/eg-iframe.html from the associated *.template files.

Got rid of the JS-based SVG/PNG switching logic. Instead, we now
just use SVG unconditionally. We'd already dropped browser support
for browsers that don't support SVG anyway.

Change-Id: Iba2e68f17904687cb13e793a410e095f28f1b13c
This commit is contained in:
Roan Kattouw 2013-12-14 15:04:08 -08:00 committed by Timo Tijhof
parent abd85fda36
commit 88c4888872
13 changed files with 1244 additions and 696 deletions

267
.docs/eg-iframe.html Normal file
View file

@ -0,0 +1,267 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>VisualEditor Examples</title>
<!-- oojs-ui -->
<link rel=stylesheet href="../modules/oojs-ui/oojs-ui.svg.css">
<!-- jquery.uls.grid -->
<link rel=stylesheet href="../modules/jquery.uls/css/jquery.uls.grid.css">
<!-- jquery.uls.compact -->
<link rel=stylesheet href="../modules/jquery.uls/css/jquery.uls.compact.css">
<!-- jquery.uls -->
<link rel=stylesheet href="../modules/jquery.uls/css/jquery.uls.css">
<link rel=stylesheet href="../modules/jquery.uls/css/jquery.uls.lcd.css">
<!-- visualEditor.standalone -->
<link rel=stylesheet href="../modules/ve/init/sa/styles/ve.init.sa.css">
<!-- visualEditor.core -->
<link rel=stylesheet href="../modules/ve/ce/styles/ve.ce.Node.css">
<link rel=stylesheet href="../modules/ve/ce/styles/ve.ce.Surface.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Context.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Inspector.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Surface.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Tool.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Toolbar.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Widget.css">
<link rel=stylesheet href="../modules/ve/ui/styles/ve.ui.Icons-vector.css">
<script>
function loadInlineExample( code, options, callback ) {
try {
eval( code );
callback && callback( true );
} catch (e) {
document.body.appendChild( document.createTextNode( e ) );
callback && callback( false, e );
}
}
</script>
<style>
body {
margin: 0;
padding: 0;
overflow-y: scroll;
background: #fff;
font: normal 1em/1.5 sans-serif;
}
</style>
</head>
<body>
<!-- jquery -->
<script src="../modules/jquery/jquery.js"></script>
<!-- oojs -->
<script src="../modules/oojs/oojs.js"></script>
<!-- oojs-ui -->
<script src="../modules/oojs-ui/oojs-ui.js"></script>
<!-- rangy -->
<script src="../modules/rangy/rangy-core-1.3.js"></script>
<script src="../modules/rangy/rangy-position-1.3.js"></script>
<script src="../modules/rangy/rangy-export.js"></script>
<!-- unicodejs -->
<script src="../modules/unicodejs/unicodejs.js"></script>
<script src="../modules/unicodejs/unicodejs.textstring.js"></script>
<script src="../modules/unicodejs/unicodejs.graphemebreakproperties.js"></script>
<script src="../modules/unicodejs/unicodejs.graphemebreak.js"></script>
<script src="../modules/unicodejs/unicodejs.wordbreakproperties.js"></script>
<script src="../modules/unicodejs/unicodejs.wordbreak.js"></script>
<!-- jquery.uls.data -->
<script src="../modules/jquery.uls/src/jquery.uls.data.js"></script>
<script src="../modules/jquery.uls/src/jquery.uls.data.utils.js"></script>
<!-- jquery.uls -->
<script src="../modules/jquery.uls/src/jquery.uls.core.js"></script>
<script src="../modules/jquery.uls/src/jquery.uls.lcd.js"></script>
<script src="../modules/jquery.uls/src/jquery.uls.languagefilter.js"></script>
<script src="../modules/jquery.uls/src/jquery.uls.regionfilter.js"></script>
<!-- jquery.i18n -->
<script src="../modules/jquery.i18n/src/jquery.i18n.js"></script>
<script src="../modules/jquery.i18n/src/jquery.i18n.messagestore.js"></script>
<script src="../modules/jquery.i18n/src/jquery.i18n.parser.js"></script>
<script src="../modules/jquery.i18n/src/jquery.i18n.emitter.js"></script>
<script src="../modules/jquery.i18n/src/jquery.i18n.language.js"></script>
<script src="../modules/jquery.i18n/src/jquery.i18n.fallbacks.js"></script>
<script src="../modules/jquery.i18n/src/languages/bs.js"></script>
<script src="../modules/jquery.i18n/src/languages/dsb.js"></script>
<script src="../modules/jquery.i18n/src/languages/fi.js"></script>
<script src="../modules/jquery.i18n/src/languages/ga.js"></script>
<script src="../modules/jquery.i18n/src/languages/he.js"></script>
<script src="../modules/jquery.i18n/src/languages/hsb.js"></script>
<script src="../modules/jquery.i18n/src/languages/hu.js"></script>
<script src="../modules/jquery.i18n/src/languages/hy.js"></script>
<script src="../modules/jquery.i18n/src/languages/la.js"></script>
<script src="../modules/jquery.i18n/src/languages/ml.js"></script>
<script src="../modules/jquery.i18n/src/languages/os.js"></script>
<script src="../modules/jquery.i18n/src/languages/ru.js"></script>
<script src="../modules/jquery.i18n/src/languages/sl.js"></script>
<script src="../modules/jquery.i18n/src/languages/uk.js"></script>
<!-- visualEditor.base -->
<script src="../modules/ve/ve.js"></script>
<script src="../modules/ve/ve.track.js"></script>
<script src="../modules/ve/init/ve.init.js"></script>
<script src="../modules/ve/init/ve.init.Platform.js"></script>
<script src="../modules/ve/init/ve.init.Target.js"></script>
<!-- visualEditor.standalone -->
<script src="../modules/ve/init/sa/ve.init.sa.js"></script>
<script src="../modules/ve/init/sa/ve.init.sa.Platform.js"></script>
<script src="../modules/ve/init/sa/ve.init.sa.Target.js"></script>
<!-- visualEditor.core -->
<script src="../modules/ve/ve.Range.js"></script>
<script src="../modules/ve/ve.Node.js"></script>
<script src="../modules/ve/ve.BranchNode.js"></script>
<script src="../modules/ve/ve.LeafNode.js"></script>
<script src="../modules/ve/ve.Document.js"></script>
<script src="../modules/ve/ve.EventSequencer.js"></script>
<script src="../modules/ve/dm/ve.dm.js"></script>
<script src="../modules/ve/dm/ve.dm.Model.js"></script>
<script src="../modules/ve/dm/ve.dm.ModelRegistry.js"></script>
<script src="../modules/ve/dm/ve.dm.NodeFactory.js"></script>
<script src="../modules/ve/dm/ve.dm.AnnotationFactory.js"></script>
<script src="../modules/ve/dm/ve.dm.AnnotationSet.js"></script>
<script src="../modules/ve/dm/ve.dm.MetaItemFactory.js"></script>
<script src="../modules/ve/dm/ve.dm.Node.js"></script>
<script src="../modules/ve/dm/ve.dm.BranchNode.js"></script>
<script src="../modules/ve/dm/ve.dm.LeafNode.js"></script>
<script src="../modules/ve/dm/ve.dm.Annotation.js"></script>
<script src="../modules/ve/dm/ve.dm.InternalList.js"></script>
<script src="../modules/ve/dm/ve.dm.MetaItem.js"></script>
<script src="../modules/ve/dm/ve.dm.MetaList.js"></script>
<script src="../modules/ve/dm/ve.dm.TransactionProcessor.js"></script>
<script src="../modules/ve/dm/ve.dm.Transaction.js"></script>
<script src="../modules/ve/dm/ve.dm.Surface.js"></script>
<script src="../modules/ve/dm/ve.dm.SurfaceFragment.js"></script>
<script src="../modules/ve/dm/ve.dm.DataString.js"></script>
<script src="../modules/ve/dm/ve.dm.Document.js"></script>
<script src="../modules/ve/dm/ve.dm.DocumentSlice.js"></script>
<script src="../modules/ve/dm/ve.dm.LinearData.js"></script>
<script src="../modules/ve/dm/ve.dm.DocumentSynchronizer.js"></script>
<script src="../modules/ve/dm/ve.dm.IndexValueStore.js"></script>
<script src="../modules/ve/dm/ve.dm.Converter.js"></script>
<script src="../modules/ve/dm/lineardata/ve.dm.FlatLinearData.js"></script>
<script src="../modules/ve/dm/lineardata/ve.dm.ElementLinearData.js"></script>
<script src="../modules/ve/dm/lineardata/ve.dm.MetaLinearData.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.GeneratedContentNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.AlienNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.BreakNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.CenterNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.DefinitionListItemNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.DefinitionListNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.DivNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.DocumentNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.HeadingNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.ImageNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.InternalItemNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.InternalListNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.ListItemNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.ListNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.ParagraphNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.PreformattedNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TableCaptionNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TableCellNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TableNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TableRowNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TableSectionNode.js"></script>
<script src="../modules/ve/dm/nodes/ve.dm.TextNode.js"></script>
<script src="../modules/ve/dm/annotations/ve.dm.LanguageAnnotation.js"></script>
<script src="../modules/ve/dm/annotations/ve.dm.LinkAnnotation.js"></script>
<script src="../modules/ve/dm/annotations/ve.dm.TextStyleAnnotation.js"></script>
<script src="../modules/ve/dm/metaitems/ve.dm.AlienMetaItem.js"></script>
<script src="../modules/ve/ce/ve.ce.js"></script>
<script src="../modules/ve/ce/ve.ce.DomRange.js"></script>
<script src="../modules/ve/ce/ve.ce.AnnotationFactory.js"></script>
<script src="../modules/ve/ce/ve.ce.NodeFactory.js"></script>
<script src="../modules/ve/ce/ve.ce.Document.js"></script>
<script src="../modules/ve/ce/ve.ce.View.js"></script>
<script src="../modules/ve/ce/ve.ce.Annotation.js"></script>
<script src="../modules/ve/ce/ve.ce.Node.js"></script>
<script src="../modules/ve/ce/ve.ce.BranchNode.js"></script>
<script src="../modules/ve/ce/ve.ce.ContentBranchNode.js"></script>
<script src="../modules/ve/ce/ve.ce.LeafNode.js"></script>
<script src="../modules/ve/ce/ve.ce.ProtectedNode.js"></script>
<script src="../modules/ve/ce/ve.ce.FocusableNode.js"></script>
<script src="../modules/ve/ce/ve.ce.RelocatableNode.js"></script>
<script src="../modules/ve/ce/ve.ce.ResizableNode.js"></script>
<script src="../modules/ve/ce/ve.ce.Surface.js"></script>
<script src="../modules/ve/ce/ve.ce.SurfaceObserver.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.AlienNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.BreakNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.CenterNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.DefinitionListItemNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.DefinitionListNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.DivNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.DocumentNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.HeadingNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.ImageNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.InternalItemNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.InternalListNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.ListItemNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.ListNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.ParagraphNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.PreformattedNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TableCaptionNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TableCellNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TableNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TableRowNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TableSectionNode.js"></script>
<script src="../modules/ve/ce/nodes/ve.ce.TextNode.js"></script>
<script src="../modules/ve/ce/annotations/ve.ce.LanguageAnnotation.js"></script>
<script src="../modules/ve/ce/annotations/ve.ce.LinkAnnotation.js"></script>
<script src="../modules/ve/ce/annotations/ve.ce.TextStyleAnnotation.js"></script>
<script src="../modules/ve/ui/ve.ui.js"></script>
<script src="../modules/ve/ui/ve.ui.Surface.js"></script>
<script src="../modules/ve/ui/ve.ui.Context.js"></script>
<script src="../modules/ve/ui/ve.ui.Dialog.js"></script>
<script src="../modules/ve/ui/ve.ui.Inspector.js"></script>
<script src="../modules/ve/ui/ve.ui.WindowSet.js"></script>
<script src="../modules/ve/ui/ve.ui.Toolbar.js"></script>
<script src="../modules/ve/ui/ve.ui.TargetToolbar.js"></script>
<script src="../modules/ve/ui/ve.ui.ToolFactory.js"></script>
<script src="../modules/ve/ui/ve.ui.Command.js"></script>
<script src="../modules/ve/ui/ve.ui.CommandRegistry.js"></script>
<script src="../modules/ve/ui/ve.ui.Trigger.js"></script>
<script src="../modules/ve/ui/ve.ui.TriggerRegistry.js"></script>
<script src="../modules/ve/ui/ve.ui.Action.js"></script>
<script src="../modules/ve/ui/ve.ui.ActionFactory.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.AnnotationAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.ContentAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.DialogAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.FormatAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.HistoryAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.IndentationAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.InspectorAction.js"></script>
<script src="../modules/ve/ui/actions/ve.ui.ListAction.js"></script>
<script src="../modules/ve/ui/widgets/ve.ui.SurfaceWidget.js"></script>
<script src="../modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.AnnotationTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.DialogTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.FormatTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.HistoryTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.IndentationTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.InspectorTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.LanguageInspectorTool.js"></script>
<script src="../modules/ve/ui/tools/ve.ui.ListTool.js"></script>
<script src="../modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js"></script>
<script src="../modules/ve/ui/inspectors/ve.ui.LinkInspector.js"></script>
<script src="../modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js"></script>
<script src="../modules/ve/ui/inspectors/ve.ui.LanguageInspector.js"></script>
<script src="../modules/ve/ui/widgets/ve.ui.GroupButtonWidget.js"></script>
<script src="../modules/ve/ui/inspectors/ve.ui.SpecialCharacterInspector.js"></script>
<script>ve.init.platform.setModulesUrl( '../modules' );</script>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>VisualEditor Examples</title>
<!-- STYLES -->
<script>
function loadInlineExample( code, options, callback ) {
try {
eval( code );
callback && callback( true );
} catch (e) {
document.body.appendChild( document.createTextNode( e ) );
callback && callback( false, e );
}
}
</script>
<style>
body {
margin: 0;
padding: 0;
overflow-y: scroll;
background: #fff;
font: normal 1em/1.5 sans-serif;
}
</style>
</head>
<body>
<!-- SCRIPTS -->
</body>
</html>

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>VisualEditor Examples</title>
{{VE-LOAD-HEAD}}
<script>
function loadInlineExample(code, options, callback) {
try {
eval(code);
callback && callback(true);
} catch (e) {
document.body.appendChild(document.createTextNode(e));
callback && callback(false, e);
}
}
</script>
<style>
body {
margin: 0;
padding: 0;
overflow-y: scroll;
background: #fff;
font: normal 1em/1.5 sans-serif;
}
</style>
</head>
<body>
{{VE-LOAD-BODY}}
</body>
</html>

View file

@ -7,16 +7,41 @@
/*jshint node:true */
module.exports = function ( grunt ) {
var fs = require( 'fs' ),
exec = require( 'child_process' ).exec;
exec = require( 'child_process' ).exec,
modules = grunt.file.readJSON( 'build/modules.json' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs-checker' );
grunt.loadTasks( 'build/tasks' );
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
buildloader: {
demo: {
src: 'demos/ve/index.php.template',
dest: 'demos/ve/index.php',
modules: modules,
pathPrefix: '../../',
indent: '\t\t'
},
test: {
src: 'modules/ve/test/index.php.template',
dest: 'modules/ve/test/index.php',
modules: modules,
pathPrefix: '../../../',
indent: '\t\t'
},
iframe: {
src: '.docs/eg-iframe.html.template',
dest: '.docs/eg-iframe.html',
modules: modules,
pathPrefix: '../',
indent: '\t'
}
},
jshint: {
options: JSON.parse( grunt.file.read( '.jshintrc' )
.replace( /\/\*(?:(?!\*\/)[\s\S])*\*\//g, '' ).replace( /\/\/[^\n\r]*/g, '' ) ),
@ -66,5 +91,6 @@ module.exports = function ( grunt ) {
grunt.registerTask( 'lint', ['jshint', 'jscs', 'csslint'] );
grunt.registerTask( 'unit', ['pre-qunit', 'qunit'] );
grunt.registerTask( 'test', ['lint', 'unit'] );
grunt.registerTask( 'default', 'test' );
grunt.registerTask( 'build', ['buildloader'] );
grunt.registerTask( 'default', ['build', 'test'] );
};

View file

@ -1,21 +1,6 @@
#!/usr/bin/env bash
cd $(cd $(dirname $0)/..; pwd)
(
while IFS='' read -r l
do
if [[ "$l" == "{{VE-LOAD-HEAD}}" ]]
then
php maintenance/makeStaticLoader.php --fixdir --section=head --ve-path=../modules/ $*
elif [[ "$l" == "{{VE-LOAD-BODY}}" ]]
then
php maintenance/makeStaticLoader.php --fixdir --section=body --ve-path=../modules/ $*
else
echo "$l"
fi
done
) < .docs/eg-iframe.tpl | php > .docs/eg-iframe.html
# allow custom path to jsduck, or custom version (eg JSDUCK=jsduck _4.10.4_)
JSDUCK=${JSDUCK:-jsduck}
@ -31,7 +16,6 @@ fi
$JSDUCK --config .docs/config.json $jsduckopt --processes 0 --color --warnings-exit-nonzero
ec=$?
rm .docs/eg-iframe.html
cd - > /dev/null
# Exit with exit code of jsduck command

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
cd $(cd $(dirname $0)/..; pwd)
php maintenance/makeStaticLoader.php --target demo --write-file demos/ve/index.php
php maintenance/makeStaticLoader.php --target test --write-file modules/ve/test/index.php

265
build/modules.json Normal file
View file

@ -0,0 +1,265 @@
{
"jquery": {
"scripts": [
"modules/jquery/jquery.js"
]
},
"oojs": {
"scripts": [
"modules/oojs/oojs.js"
]
},
"oojs-ui": {
"scripts": [
"modules/oojs-ui/oojs-ui.js"
],
"styles": [
"modules/oojs-ui/oojs-ui.svg.css"
]
},
"rangy": {
"scripts": [
"modules/rangy/rangy-core-1.3.js",
"modules/rangy/rangy-position-1.3.js",
"modules/rangy/rangy-export.js"
]
},
"unicodejs": {
"scripts": [
"modules/unicodejs/unicodejs.js",
"modules/unicodejs/unicodejs.textstring.js",
"modules/unicodejs/unicodejs.graphemebreakproperties.js",
"modules/unicodejs/unicodejs.graphemebreak.js",
"modules/unicodejs/unicodejs.wordbreakproperties.js",
"modules/unicodejs/unicodejs.wordbreak.js"
]
},
"jquery.uls.grid": {
"styles": [
"modules/jquery.uls/css/jquery.uls.grid.css"
]
},
"jquery.uls.data": {
"scripts": [
"modules/jquery.uls/src/jquery.uls.data.js",
"modules/jquery.uls/src/jquery.uls.data.utils.js"
]
},
"jquery.uls.compact": {
"styles": [
"modules/jquery.uls/css/jquery.uls.compact.css"
]
},
"jquery.uls": {
"scripts": [
"modules/jquery.uls/src/jquery.uls.core.js",
"modules/jquery.uls/src/jquery.uls.lcd.js",
"modules/jquery.uls/src/jquery.uls.languagefilter.js",
"modules/jquery.uls/src/jquery.uls.regionfilter.js"
],
"styles": [
"modules/jquery.uls/css/jquery.uls.css",
"modules/jquery.uls/css/jquery.uls.lcd.css"
]
},
"jquery.i18n": {
"scripts": [
"modules/jquery.i18n/src/jquery.i18n.js",
"modules/jquery.i18n/src/jquery.i18n.messagestore.js",
"modules/jquery.i18n/src/jquery.i18n.parser.js",
"modules/jquery.i18n/src/jquery.i18n.emitter.js",
"modules/jquery.i18n/src/jquery.i18n.language.js",
"modules/jquery.i18n/src/jquery.i18n.fallbacks.js",
"modules/jquery.i18n/src/languages/bs.js",
"modules/jquery.i18n/src/languages/dsb.js",
"modules/jquery.i18n/src/languages/fi.js",
"modules/jquery.i18n/src/languages/ga.js",
"modules/jquery.i18n/src/languages/he.js",
"modules/jquery.i18n/src/languages/hsb.js",
"modules/jquery.i18n/src/languages/hu.js",
"modules/jquery.i18n/src/languages/hy.js",
"modules/jquery.i18n/src/languages/la.js",
"modules/jquery.i18n/src/languages/ml.js",
"modules/jquery.i18n/src/languages/os.js",
"modules/jquery.i18n/src/languages/ru.js",
"modules/jquery.i18n/src/languages/sl.js",
"modules/jquery.i18n/src/languages/uk.js"
]
},
"visualEditor.base": {
"scripts": [
"modules/ve/ve.js",
"modules/ve/ve.track.js",
"modules/ve/init/ve.init.js",
"modules/ve/init/ve.init.Platform.js",
"modules/ve/init/ve.init.Target.js"
]
},
"visualEditor.standalone": {
"scripts": [
"modules/ve/init/sa/ve.init.sa.js",
"modules/ve/init/sa/ve.init.sa.Platform.js",
"modules/ve/init/sa/ve.init.sa.Target.js"
],
"styles": [
"modules/ve/init/sa/styles/ve.init.sa.css"
]
},
"visualEditor.core": {
"scripts": [
"modules/ve/ve.Range.js",
"modules/ve/ve.Node.js",
"modules/ve/ve.BranchNode.js",
"modules/ve/ve.LeafNode.js",
"modules/ve/ve.Document.js",
"modules/ve/ve.EventSequencer.js",
"modules/ve/dm/ve.dm.js",
"modules/ve/dm/ve.dm.Model.js",
"modules/ve/dm/ve.dm.ModelRegistry.js",
"modules/ve/dm/ve.dm.NodeFactory.js",
"modules/ve/dm/ve.dm.AnnotationFactory.js",
"modules/ve/dm/ve.dm.AnnotationSet.js",
"modules/ve/dm/ve.dm.MetaItemFactory.js",
"modules/ve/dm/ve.dm.Node.js",
"modules/ve/dm/ve.dm.BranchNode.js",
"modules/ve/dm/ve.dm.LeafNode.js",
"modules/ve/dm/ve.dm.Annotation.js",
"modules/ve/dm/ve.dm.InternalList.js",
"modules/ve/dm/ve.dm.MetaItem.js",
"modules/ve/dm/ve.dm.MetaList.js",
"modules/ve/dm/ve.dm.TransactionProcessor.js",
"modules/ve/dm/ve.dm.Transaction.js",
"modules/ve/dm/ve.dm.Surface.js",
"modules/ve/dm/ve.dm.SurfaceFragment.js",
"modules/ve/dm/ve.dm.DataString.js",
"modules/ve/dm/ve.dm.Document.js",
"modules/ve/dm/ve.dm.DocumentSlice.js",
"modules/ve/dm/ve.dm.LinearData.js",
"modules/ve/dm/ve.dm.DocumentSynchronizer.js",
"modules/ve/dm/ve.dm.IndexValueStore.js",
"modules/ve/dm/ve.dm.Converter.js",
"modules/ve/dm/lineardata/ve.dm.FlatLinearData.js",
"modules/ve/dm/lineardata/ve.dm.ElementLinearData.js",
"modules/ve/dm/lineardata/ve.dm.MetaLinearData.js",
"modules/ve/dm/nodes/ve.dm.GeneratedContentNode.js",
"modules/ve/dm/nodes/ve.dm.AlienNode.js",
"modules/ve/dm/nodes/ve.dm.BreakNode.js",
"modules/ve/dm/nodes/ve.dm.CenterNode.js",
"modules/ve/dm/nodes/ve.dm.DefinitionListItemNode.js",
"modules/ve/dm/nodes/ve.dm.DefinitionListNode.js",
"modules/ve/dm/nodes/ve.dm.DivNode.js",
"modules/ve/dm/nodes/ve.dm.DocumentNode.js",
"modules/ve/dm/nodes/ve.dm.HeadingNode.js",
"modules/ve/dm/nodes/ve.dm.ImageNode.js",
"modules/ve/dm/nodes/ve.dm.InternalItemNode.js",
"modules/ve/dm/nodes/ve.dm.InternalListNode.js",
"modules/ve/dm/nodes/ve.dm.ListItemNode.js",
"modules/ve/dm/nodes/ve.dm.ListNode.js",
"modules/ve/dm/nodes/ve.dm.ParagraphNode.js",
"modules/ve/dm/nodes/ve.dm.PreformattedNode.js",
"modules/ve/dm/nodes/ve.dm.TableCaptionNode.js",
"modules/ve/dm/nodes/ve.dm.TableCellNode.js",
"modules/ve/dm/nodes/ve.dm.TableNode.js",
"modules/ve/dm/nodes/ve.dm.TableRowNode.js",
"modules/ve/dm/nodes/ve.dm.TableSectionNode.js",
"modules/ve/dm/nodes/ve.dm.TextNode.js",
"modules/ve/dm/annotations/ve.dm.LanguageAnnotation.js",
"modules/ve/dm/annotations/ve.dm.LinkAnnotation.js",
"modules/ve/dm/annotations/ve.dm.TextStyleAnnotation.js",
"modules/ve/dm/metaitems/ve.dm.AlienMetaItem.js",
"modules/ve/ce/ve.ce.js",
"modules/ve/ce/ve.ce.DomRange.js",
"modules/ve/ce/ve.ce.AnnotationFactory.js",
"modules/ve/ce/ve.ce.NodeFactory.js",
"modules/ve/ce/ve.ce.Document.js",
"modules/ve/ce/ve.ce.View.js",
"modules/ve/ce/ve.ce.Annotation.js",
"modules/ve/ce/ve.ce.Node.js",
"modules/ve/ce/ve.ce.BranchNode.js",
"modules/ve/ce/ve.ce.ContentBranchNode.js",
"modules/ve/ce/ve.ce.LeafNode.js",
"modules/ve/ce/ve.ce.ProtectedNode.js",
"modules/ve/ce/ve.ce.FocusableNode.js",
"modules/ve/ce/ve.ce.RelocatableNode.js",
"modules/ve/ce/ve.ce.ResizableNode.js",
"modules/ve/ce/ve.ce.Surface.js",
"modules/ve/ce/ve.ce.SurfaceObserver.js",
"modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js",
"modules/ve/ce/nodes/ve.ce.AlienNode.js",
"modules/ve/ce/nodes/ve.ce.BreakNode.js",
"modules/ve/ce/nodes/ve.ce.CenterNode.js",
"modules/ve/ce/nodes/ve.ce.DefinitionListItemNode.js",
"modules/ve/ce/nodes/ve.ce.DefinitionListNode.js",
"modules/ve/ce/nodes/ve.ce.DivNode.js",
"modules/ve/ce/nodes/ve.ce.DocumentNode.js",
"modules/ve/ce/nodes/ve.ce.HeadingNode.js",
"modules/ve/ce/nodes/ve.ce.ImageNode.js",
"modules/ve/ce/nodes/ve.ce.InternalItemNode.js",
"modules/ve/ce/nodes/ve.ce.InternalListNode.js",
"modules/ve/ce/nodes/ve.ce.ListItemNode.js",
"modules/ve/ce/nodes/ve.ce.ListNode.js",
"modules/ve/ce/nodes/ve.ce.ParagraphNode.js",
"modules/ve/ce/nodes/ve.ce.PreformattedNode.js",
"modules/ve/ce/nodes/ve.ce.TableCaptionNode.js",
"modules/ve/ce/nodes/ve.ce.TableCellNode.js",
"modules/ve/ce/nodes/ve.ce.TableNode.js",
"modules/ve/ce/nodes/ve.ce.TableRowNode.js",
"modules/ve/ce/nodes/ve.ce.TableSectionNode.js",
"modules/ve/ce/nodes/ve.ce.TextNode.js",
"modules/ve/ce/annotations/ve.ce.LanguageAnnotation.js",
"modules/ve/ce/annotations/ve.ce.LinkAnnotation.js",
"modules/ve/ce/annotations/ve.ce.TextStyleAnnotation.js",
"modules/ve/ui/ve.ui.js",
"modules/ve/ui/ve.ui.Surface.js",
"modules/ve/ui/ve.ui.Context.js",
"modules/ve/ui/ve.ui.Dialog.js",
"modules/ve/ui/ve.ui.Inspector.js",
"modules/ve/ui/ve.ui.WindowSet.js",
"modules/ve/ui/ve.ui.Toolbar.js",
"modules/ve/ui/ve.ui.TargetToolbar.js",
"modules/ve/ui/ve.ui.ToolFactory.js",
"modules/ve/ui/ve.ui.Command.js",
"modules/ve/ui/ve.ui.CommandRegistry.js",
"modules/ve/ui/ve.ui.Trigger.js",
"modules/ve/ui/ve.ui.TriggerRegistry.js",
"modules/ve/ui/ve.ui.Action.js",
"modules/ve/ui/ve.ui.ActionFactory.js",
"modules/ve/ui/actions/ve.ui.AnnotationAction.js",
"modules/ve/ui/actions/ve.ui.ContentAction.js",
"modules/ve/ui/actions/ve.ui.DialogAction.js",
"modules/ve/ui/actions/ve.ui.FormatAction.js",
"modules/ve/ui/actions/ve.ui.HistoryAction.js",
"modules/ve/ui/actions/ve.ui.IndentationAction.js",
"modules/ve/ui/actions/ve.ui.InspectorAction.js",
"modules/ve/ui/actions/ve.ui.ListAction.js",
"modules/ve/ui/widgets/ve.ui.SurfaceWidget.js",
"modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js",
"modules/ve/ui/tools/ve.ui.AnnotationTool.js",
"modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js",
"modules/ve/ui/tools/ve.ui.DialogTool.js",
"modules/ve/ui/tools/ve.ui.FormatTool.js",
"modules/ve/ui/tools/ve.ui.HistoryTool.js",
"modules/ve/ui/tools/ve.ui.IndentationTool.js",
"modules/ve/ui/tools/ve.ui.InspectorTool.js",
"modules/ve/ui/tools/ve.ui.LanguageInspectorTool.js",
"modules/ve/ui/tools/ve.ui.ListTool.js",
"modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js",
"modules/ve/ui/inspectors/ve.ui.LinkInspector.js",
"modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js",
"modules/ve/ui/inspectors/ve.ui.LanguageInspector.js",
"modules/ve/ui/widgets/ve.ui.GroupButtonWidget.js",
"modules/ve/ui/inspectors/ve.ui.SpecialCharacterInspector.js"
],
"styles": [
"modules/ve/ce/styles/ve.ce.Node.css",
"modules/ve/ce/styles/ve.ce.Surface.css",
"modules/ve/ui/styles/ve.ui.Context.css",
"modules/ve/ui/styles/ve.ui.Inspector.css",
"modules/ve/ui/styles/ve.ui.Surface.css",
"modules/ve/ui/styles/ve.ui.Tool.css",
"modules/ve/ui/styles/ve.ui.Toolbar.css",
"modules/ve/ui/styles/ve.ui.Widget.css",
"modules/ve/ui/styles/ve.ui.Icons-vector.css"
]
}
}

View file

@ -0,0 +1,54 @@
/*!
* Build a static loader file from a template
*/
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.registerMultiTask( 'buildloader', function () {
var module,
styles = '',
scripts = '',
dest = this.data.dest,
src = this.data.src,
pathPrefix = this.data.pathPrefix || '',
indent = this.data.indent || '',
modules = this.data.modules,
text = grunt.file.read( __dirname + '/../../' + src );
function scriptTag( file ) {
return indent + '<script src="' + pathPrefix + file + '"></script>';
}
function styleTag( file ) {
return indent + '<link rel=stylesheet href="' + pathPrefix + file + '">';
}
for ( module in modules ) {
if ( modules[module].scripts ) {
scripts += indent + '<!-- ' + module + ' -->\n';
scripts += modules[module].scripts.map( scriptTag ).join( '\n' ) + '\n';
scripts += '\n';
}
if ( modules[module].styles ) {
styles += indent + '<!-- ' + module + ' -->\n';
styles += modules[module].styles.map( styleTag ).join( '\n' ) + '\n';
styles += '\n';
}
}
scripts += indent + '<script>ve.init.platform.setModulesUrl( \'' + pathPrefix +
'modules\' );</script>';
// Strip last 2 line breaks since we only want them between sections
styles = styles.slice( 0, -2 );
text = text
.replace( /^\s*<!-- STYLES -->[^\S\n]*$/m, styles )
.replace( /^\s*<!-- SCRIPTS -->[^\S\n]*$/m, scripts );
grunt.file.write( dest, text );
grunt.log.ok( 'File "' + dest + '" written.' );
} );
};

View file

@ -3,19 +3,23 @@
* VisualEditor standalone demo
*
* @file
* @ingroup Extensions
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
// Find all .html files in the pages directory
$path = __DIR__ . '/pages';
$pages = glob( $path . '/*.html' );
$page = current( $pages );
// If the ?page= parameter is set, and that page exists, load it
if ( isset( $_GET['page'] ) && in_array( $path . '/' . $_GET['page'] . '.html', $pages ) ) {
$page = $path . '/' . $_GET['page'] . '.html';
}
$html = file_get_contents( $page );
// TODO: get rid of the PHP-based loading system and make the demo purely HTML+JS
?>
<!DOCTYPE html>
@ -23,30 +27,23 @@ $html = file_get_contents( $page );
<head>
<meta charset="UTF-8">
<title>VisualEditor Standalone Demo</title>
<!-- Generated by maintenance/makeStaticLoader.php -->
<!-- oojs-ui -->
<link rel=stylesheet href="../../modules/oojs-ui/oojs-ui.svg.css">
<!-- ext.visualEditor.standalone -->
<!-- jquery.uls.grid -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.grid.css">
<!-- jquery.uls.compact -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.compact.css">
<!-- jquery.uls -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.css">
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.lcd.css">
<!-- visualEditor.standalone -->
<link rel=stylesheet href="../../modules/ve/init/sa/styles/ve.init.sa.css">
<!-- Standalone init -->
<script>
if (
document.createElementNS &&
document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect
) {
document.write(
'<link rel="stylesheet" ' +
'href="../../modules/ve/ui/styles/ve.ui.Icons-vector.css">'
);
} else {
document.write(
'<link rel="stylesheet" ' +
'href="../../modules/ve/ui/styles/ve.ui.Icons-raster.css">'
);
}
</script>
<!-- ext.visualEditor.core -->
<!-- visualEditor.core -->
<link rel=stylesheet href="../../modules/ve/ce/styles/ve.ce.Node.css">
<link rel=stylesheet href="../../modules/ve/ce/styles/ve.ce.Surface.css">
<link rel=stylesheet href="../../modules/ve/ui/styles/ve.ui.Context.css">
@ -55,15 +52,9 @@ $html = file_get_contents( $page );
<link rel=stylesheet href="../../modules/ve/ui/styles/ve.ui.Tool.css">
<link rel=stylesheet href="../../modules/ve/ui/styles/ve.ui.Toolbar.css">
<link rel=stylesheet href="../../modules/ve/ui/styles/ve.ui.Widget.css">
<!-- jquery.uls.grid -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.grid.css">
<!-- jquery.uls.compact -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.compact.css">
<!-- jquery.uls -->
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.css">
<link rel=stylesheet href="../../modules/jquery.uls/css/jquery.uls.lcd.css">
<link rel=stylesheet href="../../modules/ve/ui/styles/ve.ui.Icons-vector.css">
<!-- demo -->
<!-- demo styles -->
<link rel="stylesheet" href="demo.css">
</head>
<body>
@ -79,28 +70,38 @@ $html = file_get_contents( $page );
endforeach; ?>
</ul>
<div class="ve-demo-editor"></div>
<!-- Generated by maintenance/makeStaticLoader.php -->
<!-- jquery -->
<script src="../../modules/jquery/jquery.js"></script>
<!-- oojs -->
<script src="../../modules/oojs/oojs.js"></script>
<!-- oojs-ui -->
<script src="../../modules/oojs-ui/oojs-ui.js"></script>
<!-- unicodejs.wordbreak -->
<!-- rangy -->
<script src="../../modules/rangy/rangy-core-1.3.js"></script>
<script src="../../modules/rangy/rangy-position-1.3.js"></script>
<script src="../../modules/rangy/rangy-export.js"></script>
<!-- unicodejs -->
<script src="../../modules/unicodejs/unicodejs.js"></script>
<script src="../../modules/unicodejs/unicodejs.textstring.js"></script>
<script src="../../modules/unicodejs/unicodejs.graphemebreakproperties.js"></script>
<script src="../../modules/unicodejs/unicodejs.graphemebreak.js"></script>
<script src="../../modules/unicodejs/unicodejs.wordbreakproperties.js"></script>
<script src="../../modules/unicodejs/unicodejs.wordbreak.js"></script>
<!-- ext.visualEditor.base -->
<script src="../../modules/ve/ve.js"></script>
<script src="../../modules/ve/ve.track.js"></script>
<script src="../../modules/ve/init/ve.init.js"></script>
<script src="../../modules/ve/init/ve.init.Platform.js"></script>
<script src="../../modules/ve/init/ve.init.Target.js"></script>
<script src="../../modules/ve/ve.debug.js"></script>
<!-- jquery.uls.data -->
<script src="../../modules/jquery.uls/src/jquery.uls.data.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.data.utils.js"></script>
<!-- jquery.uls -->
<script src="../../modules/jquery.uls/src/jquery.uls.core.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.lcd.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.languagefilter.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.regionfilter.js"></script>
<!-- jquery.i18n -->
<script src="../../modules/jquery.i18n/src/jquery.i18n.js"></script>
<script src="../../modules/jquery.i18n/src/jquery.i18n.messagestore.js"></script>
@ -122,19 +123,20 @@ $html = file_get_contents( $page );
<script src="../../modules/jquery.i18n/src/languages/ru.js"></script>
<script src="../../modules/jquery.i18n/src/languages/sl.js"></script>
<script src="../../modules/jquery.i18n/src/languages/uk.js"></script>
<!-- ext.visualEditor.standalone -->
<!-- visualEditor.base -->
<script src="../../modules/ve/ve.js"></script>
<script src="../../modules/ve/ve.track.js"></script>
<script src="../../modules/ve/init/ve.init.js"></script>
<script src="../../modules/ve/init/ve.init.Platform.js"></script>
<script src="../../modules/ve/init/ve.init.Target.js"></script>
<!-- visualEditor.standalone -->
<script src="../../modules/ve/init/sa/ve.init.sa.js"></script>
<script src="../../modules/ve/init/sa/ve.init.sa.Platform.js"></script>
<script src="../../modules/ve/init/sa/ve.init.sa.Target.js"></script>
<!-- Standalone init -->
<script>
ve.init.platform.setModulesUrl( '../../modules' );
</script>
<!-- rangy -->
<script src="../../modules/rangy/rangy-core-1.3.js"></script>
<script src="../../modules/rangy/rangy-position-1.3.js"></script>
<script src="../../modules/rangy/rangy-export.js"></script>
<!-- ext.visualEditor.core -->
<!-- visualEditor.core -->
<script src="../../modules/ve/ve.Range.js"></script>
<script src="../../modules/ve/ve.Node.js"></script>
<script src="../../modules/ve/ve.BranchNode.js"></script>
@ -191,6 +193,7 @@ $html = file_get_contents( $page );
<script src="../../modules/ve/dm/nodes/ve.dm.TableRowNode.js"></script>
<script src="../../modules/ve/dm/nodes/ve.dm.TableSectionNode.js"></script>
<script src="../../modules/ve/dm/nodes/ve.dm.TextNode.js"></script>
<script src="../../modules/ve/dm/annotations/ve.dm.LanguageAnnotation.js"></script>
<script src="../../modules/ve/dm/annotations/ve.dm.LinkAnnotation.js"></script>
<script src="../../modules/ve/dm/annotations/ve.dm.TextStyleAnnotation.js"></script>
<script src="../../modules/ve/dm/metaitems/ve.dm.AlienMetaItem.js"></script>
@ -233,6 +236,7 @@ $html = file_get_contents( $page );
<script src="../../modules/ve/ce/nodes/ve.ce.TableRowNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.TableSectionNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.TextNode.js"></script>
<script src="../../modules/ve/ce/annotations/ve.ce.LanguageAnnotation.js"></script>
<script src="../../modules/ve/ce/annotations/ve.ce.LinkAnnotation.js"></script>
<script src="../../modules/ve/ce/annotations/ve.ce.TextStyleAnnotation.js"></script>
<script src="../../modules/ve/ui/ve.ui.js"></script>
@ -267,27 +271,18 @@ $html = file_get_contents( $page );
<script src="../../modules/ve/ui/tools/ve.ui.HistoryTool.js"></script>
<script src="../../modules/ve/ui/tools/ve.ui.IndentationTool.js"></script>
<script src="../../modules/ve/ui/tools/ve.ui.InspectorTool.js"></script>
<script src="../../modules/ve/ui/tools/ve.ui.LanguageInspectorTool.js"></script>
<script src="../../modules/ve/ui/tools/ve.ui.ListTool.js"></script>
<script src="../../modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js"></script>
<script src="../../modules/ve/ui/inspectors/ve.ui.LinkInspector.js"></script>
<script src="../../modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js"></script>
<script src="../../modules/ve/ui/inspectors/ve.ui.LanguageInspector.js"></script>
<script src="../../modules/ve/ui/widgets/ve.ui.GroupButtonWidget.js"></script>
<script src="../../modules/ve/ui/inspectors/ve.ui.SpecialCharacterInspector.js"></script>
<!-- jquery.uls.data -->
<script src="../../modules/jquery.uls/src/jquery.uls.data.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.data.utils.js"></script>
<!-- jquery.uls -->
<script src="../../modules/jquery.uls/src/jquery.uls.core.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.lcd.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.languagefilter.js"></script>
<script src="../../modules/jquery.uls/src/jquery.uls.regionfilter.js"></script>
<!-- ext.visualEditor.language -->
<script src="../../modules/ve/dm/annotations/ve.dm.LanguageAnnotation.js"></script>
<script src="../../modules/ve/ce/annotations/ve.ce.LanguageAnnotation.js"></script>
<script src="../../modules/ve/ui/inspectors/ve.ui.LanguageInspector.js"></script>
<script src="../../modules/ve/ui/tools/ve.ui.LanguageInspectorTool.js"></script>
<script src="../../modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js"></script>
<!-- demo -->
<script>ve.init.platform.setModulesUrl( '../../modules' );</script>
<!-- demo script -->
<script>
$( document ).ready( function () {
new ve.init.sa.Target(
@ -295,7 +290,6 @@ $html = file_get_contents( $page );
ve.createDocumentFromHtml( <?php echo json_encode( $html ) ?> )
);
$( '.ve-ce-documentNode' ).focus();
// ve.instances[0].getDialogs().open( 'meta' );
} );
</script>

231
demos/ve/index.php.template Normal file
View file

@ -0,0 +1,231 @@
<?php
/**
* VisualEditor standalone demo
*
* @file
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
// Find all .html files in the pages directory
$path = __DIR__ . '/pages';
$pages = glob( $path . '/*.html' );
$page = current( $pages );
// If the ?page= parameter is set, and that page exists, load it
if ( isset( $_GET['page'] ) && in_array( $path . '/' . $_GET['page'] . '.html', $pages ) ) {
$page = $path . '/' . $_GET['page'] . '.html';
}
$html = file_get_contents( $page );
// TODO: get rid of the PHP-based loading system and make the demo purely HTML+JS
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>VisualEditor Standalone Demo</title>
<!-- STYLES -->
<!-- demo styles -->
<link rel="stylesheet" href="demo.css">
</head>
<body>
<ul class="ve-demo-docs">
<?php
foreach ( $pages as $page ): ?>
<li>
<a href="./?page=<?php echo basename( $page, '.html' ); ?>">
<?php echo basename( $page, '.html' ); ?>
</a>
</li>
<?php
endforeach; ?>
</ul>
<div class="ve-demo-editor"></div>
<!-- SCRIPTS -->
<!-- demo script -->
<script>
$( document ).ready( function () {
new ve.init.sa.Target(
$( '.ve-demo-editor' ),
ve.createDocumentFromHtml( <?php echo json_encode( $html ) ?> )
);
$( '.ve-ce-documentNode' ).focus();
} );
</script>
<div class="ve-demo-utilities">
<p>
<div class="ve-demo-utilities-commands"></div>
</p>
<table id="ve-dump" class="ve-demo-dump">
<thead>
<th>Linear model</th>
<th>View tree</th>
<th>Model tree</th>
</thead>
<tbody>
<tr>
<td width="30%" id="ve-linear-model-dump"></td>
<td id="ve-view-tree-dump" style="vertical-align: top;"></td>
<td id="ve-model-tree-dump" style="vertical-align: top;"></td>
</tr>
</tbody>
</table>
</div>
<script>
$( function () {
// Widgets
var startTextInput = new OO.ui.TextInputWidget( { 'readOnly': true } ),
endTextInput = new OO.ui.TextInputWidget( { 'readOnly': true } ),
startTextInputLabel = new OO.ui.InputLabelWidget(
{ 'label': 'Start', 'input': startTextInput }
),
endTextInputLabel = new OO.ui.InputLabelWidget(
{ 'label': 'End', 'input': endTextInput }
),
getRangeButton = new OO.ui.PushButtonWidget( { 'label': 'Get selected range' } ),
logRangeButton = new OO.ui.PushButtonWidget(
{ 'label': 'Log to console', 'disabled': true }
),
dumpModelButton = new OO.ui.PushButtonWidget( { 'label': 'Dump model' } ),
validateButton = new OO.ui.PushButtonWidget( { 'label': 'Validate view and model' } );
// Initialization
$( '.ve-demo-utilities-commands' ).append(
getRangeButton.$element,
startTextInputLabel.$element,
startTextInput.$element,
endTextInputLabel.$element,
endTextInput.$element,
logRangeButton.$element,
$( '<span class="ve-demo-utilities-commands-divider">&nbsp;</span>' ),
dumpModelButton.$element,
validateButton.$element
);
// Events
getRangeButton.on( 'click', function () {
var range = ve.instances[0].view.model.getSelection();
startTextInput.setValue( range.start );
endTextInput.setValue( range.end );
logRangeButton.setDisabled( false );
} );
logRangeButton.on( 'click', function () {
var start = startTextInput.getValue(),
end = endTextInput.getValue();
// TODO: Validate input
console.dir( ve.instances[0].view.documentView.model.data.slice( start, end ) );
} );
dumpModelButton.on( 'click', function () {
// linear model dump
var i, $li, element, html, annotations,
$ol = $( '<ol start="0"></ol>' );
for ( i = 0; i < ve.instances[0].model.documentModel.data.getLength(); i++ ) {
$li = $( '<li>' );
$label = $( '<span>' );
element = ve.instances[0].model.documentModel.data.getData( i );
if ( element.type ) {
$label.addClass( 've-demo-dump-element' );
text = element.type;
annotations = element.annotations;
} else if ( ve.isArray( element ) ){
$label.addClass( 've-demo-dump-achar' );
text = element[0];
annotations = element[1];
} else {
$label.addClass( 've-demo-dump-char' );
text = element;
annotations = undefined;
}
$label.html( ( text.match( /\S/ ) ? text : '&nbsp;' ) + ' ' );
if ( annotations ) {
$label.append(
$( '<span>' ).text(
'[' + ve.instances[0].model.documentModel.store.values( annotations ).map( function( ann ) {
return ann.name;
} ).join( ', ' ) + ']'
)
);
}
$li.append( $label );
$ol.append( $li );
}
$( '#ve-linear-model-dump' ).html( $ol );
// tree dump
var getKids = function ( obj ) {
var $ol = $( '<ol start="0"></ol>' ),
$li;
for ( var i = 0; i < obj.children.length; i++ ) {
$li = $( '<li>' );
$label = $( '<span>' ).addClass( 've-demo-dump-element' );
if ( obj.children[i].length !== undefined ) {
$li.append(
$label
.text( obj.children[i].type )
.append(
$( '<span>' ).text( ' (' + obj.children[i].length + ')' )
)
);
} else {
$li.append( $label.text( obj.children[i].type ) );
}
if ( obj.children[i].children ) {
$li.append( getKids( obj.children[i] ) );
}
$ol.append( $li );
}
return $ol;
}
$( '#ve-model-tree-dump' ).html(
getKids( ve.instances[0].model.documentModel.getDocumentNode() )
);
$( '#ve-view-tree-dump' ).html(
getKids( ve.instances[0].view.documentView.getDocumentNode() )
);
$( '#ve-dump' ).show();
} );
validateButton.on( 'click', function () {
var failed = false;
$( '.ve-ce-branchNode' ).each( function ( index, element ) {
var $element = $( element ),
view = $element.data( 'view' );
if ( view.canContainContent() ) {
var nodeRange = view.model.getRange();
var textModel = ve.instances[0]
.view.model.getDocument().getText( nodeRange );
var textDom = ve.ce.getDomText( view.$element[0] );
if ( textModel !== textDom ) {
failed = true;
console.log( 'Inconsistent data', {
'textModel': textModel,
'textDom': textDom,
'element': element
} );
}
}
} );
if ( failed ) {
alert( 'Not valid - check JS console for details' );
} else {
alert( 'Valid' );
}
} );
} );
</script>
</body>
</html>

View file

@ -1,356 +0,0 @@
<?php
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
}
require_once $IP . '/maintenance/Maintenance.php';
/**
* A generator for creating a static HTML loading sequence
* for VisualEditor.
*
* Example usage:
*
* # Update our static files
* $ php maintenance/makeStaticLoader.php --target demo --write-file demos/ve/index.php
* $ php maintenance/makeStaticLoader.php --target test --write-file modules/ve/test/index.php
*
* @author Timo Tijhof, 2013
*/
class MakeStaticLoader extends Maintenance {
public function __construct() {
parent::__construct();
$this->addOption(
'target',
'Which target to use ("demo" or "test"). Default: demo',
false,
true
);
$this->addOption(
'indent',
'Indentation prefix to use (number of tabs or a string)',
false,
true
);
$this->addOption(
've-path',
'Override path to "VisualEditor/modules" (no trailing slash). Default by --target',
false,
true
);
$this->addOption(
'write-file',
'Automatically replace the "Generated by" sections in this file. Default: false',
false,
true
);
$this->addOption(
'fixdir',
'Embed the absolute path in require() statements. Defaults to relative path. '
. '(use this if you evaluate the resulting script in php-STDIN instead of from a file)',
false,
true
);
$this->addOption( 'section', 'head, body or both', false, true );
}
public function execute() {
global $wgResourceModules, $wgHtml5, $wgWellFormedXml;
$wgHtml5 = true;
$wgWellFormedXml = false;
$section = $this->getOption( 'section', 'both' );
$target = $this->getOption( 'target', 'demo' );
$indent = $this->getOption( 'indent', 2 );
$writeFile = $this->getOption( 'write-file', false );
if ( is_numeric( $indent ) ) {
$indent = str_repeat( "\t", $indent );
}
// Path to /modules/
$vePath = $this->getOption( 've-path',
$target === 'demo' ?
// From /demos/ve/index.php
'../../modules' :
// From /modules/ve/test/index.html
'../..'
);
// If we're running this script from STDIN,
// hardcode the full path
$i18nScript = $this->getOption( 'fixdir' ) ?
dirname( __DIR__ ) . '/VisualEditor.i18n.php' :
$vePath . '/../VisualEditor.i18n.php';
$self = isset( $_SERVER['PHP_SELF'] ) ? $_SERVER['PHP_SELF'] : ( lcfirst( __CLASS__ ) . '.php' );
$fakeModules = array(
// These are dependencies that exist in MediaWiki core (such as jquery.js), but we
// can't reference those modules as there is no reliable url to access them from
// standalone. This must also include dependencies like oojs and jquery.uls which
// are only registered by VisualEditor if they aren't registered by MediaWiki).
'jquery' => array(
'scripts' => array(
'jquery/jquery.js',
),
),
'jquery.client' => array(
'scripts' => array(
'jquery/jquery.client.js',
),
),
'oojs' => array(
'scripts' => array(
'oojs/oojs.js',
),
),
'oojs-ui' => array(
'scripts' => array(
'oojs-ui/oojs-ui.js',
),
'styles' => array(
'oojs-ui/oojs-ui.svg.css',
),
),
'jquery.uls.grid' => array(
'styles' => 'jquery.uls/css/jquery.uls.grid.css',
),
'jquery.uls.data' => array(
'scripts' => array(
'jquery.uls/src/jquery.uls.data.js',
'jquery.uls/src/jquery.uls.data.utils.js',
)
),
'jquery.uls.compact' => array(
'styles' => 'jquery.uls/css/jquery.uls.compact.css',
),
'jquery.uls' => array(
'scripts' => array(
'jquery.uls/src/jquery.uls.core.js',
'jquery.uls/src/jquery.uls.lcd.js',
'jquery.uls/src/jquery.uls.languagefilter.js',
'jquery.uls/src/jquery.uls.regionfilter.js',
),
'styles' => array(
'jquery.uls/css/jquery.uls.css',
'jquery.uls/css/jquery.uls.lcd.css',
),
),
'Standalone init' => array(
'headAdd' => '<script>
if (
document.createElementNS &&
document.createElementNS( \'http://www.w3.org/2000/svg\', \'svg\' ).createSVGRect
) {
document.write(
\'<link rel="stylesheet" \' +
\'href="' . $vePath . '/ve/ui/styles/ve.ui.Icons-vector.css">\'
);
} else {
document.write(
\'<link rel="stylesheet" \' +
\'href="' . $vePath . '/ve/ui/styles/ve.ui.Icons-raster.css">\'
);
}
</script>',
'bodyAdd' => '<script>
ve.init.platform.setModulesUrl( \'' . $vePath . '\' );
</script>'
),
'jquery.i18n' => array(
'scripts' => array(
'jquery.i18n/src/jquery.i18n.js',
'jquery.i18n/src/jquery.i18n.messagestore.js',
'jquery.i18n/src/jquery.i18n.parser.js',
'jquery.i18n/src/jquery.i18n.emitter.js',
'jquery.i18n/src/jquery.i18n.language.js',
// fallbacks.js is not in the real RL module, but we need it in the standalone
'jquery.i18n/src/jquery.i18n.fallbacks.js',
// We can't use languageScripts here because we don't know what the language
// will be in advance, so just include all of them
'jquery.i18n/src/languages/bs.js',
'jquery.i18n/src/languages/dsb.js',
'jquery.i18n/src/languages/fi.js',
'jquery.i18n/src/languages/ga.js',
'jquery.i18n/src/languages/he.js',
'jquery.i18n/src/languages/hsb.js',
'jquery.i18n/src/languages/hu.js',
'jquery.i18n/src/languages/hy.js',
'jquery.i18n/src/languages/la.js',
'jquery.i18n/src/languages/ml.js',
'jquery.i18n/src/languages/os.js',
'jquery.i18n/src/languages/ru.js',
'jquery.i18n/src/languages/sl.js',
'jquery.i18n/src/languages/uk.js',
),
)
);
$modules = array(
// Dependencies for ext.visualEditor.base:
'jquery',
'oojs',
'oojs-ui',
'unicodejs.wordbreak',
// Dependencies for ext.visualEditor.standalone:
'ext.visualEditor.base',
'jquery.i18n',
'ext.visualEditor.standalone',
'Standalone init',
// Dependencies for ext.visualEditor.core:
'rangy',
// Dependencies for ext.visualEditor.language
'ext.visualEditor.core',
'jquery.uls.grid',
'jquery.uls.data',
'jquery.uls.compact',
'jquery.uls',
'ext.visualEditor.language',
);
$head = $body = '';
$resourceLoader = new ResourceLoader();
foreach ( $modules as $module ) {
if ( isset( $fakeModules[ $module ] ) ) {
$registry = $fakeModules[ $module ];
} else {
$moduleObj = $resourceLoader->getModule( $module );
if ( !$moduleObj ) {
echo "\nError: Module $module\n not found!\n";
exit( 1 );
}
$registry = isset( $wgResourceModules[$module] ) ?
$wgResourceModules[$module] :
$moduleObj->getDefinitionSummary( ResourceLoaderContext::newDummyContext() );
}
$headAdd = $bodyAdd = '';
if ( isset( $registry['styles'] ) && $target !== 'test' ){
foreach ( (array)$registry['styles'] as $path ) {
$headAdd .= $indent . Html::element( 'link', array(
'rel' => 'stylesheet',
'href' => "$vePath/$path",
) ) . "\n";
}
}
if ( isset( $registry['scripts'] ) ) {
foreach ( (array)$registry['scripts'] as $path ) {
$bodyAdd .= $indent . Html::element( 'script', array( 'src' => "$vePath/$path" ) ) . "\n";
}
}
if ( isset( $registry['debugScripts'] ) ) {
foreach ( (array)$registry['debugScripts'] as $path ) {
$bodyAdd .= $indent . Html::element( 'script', array( 'src' => "$vePath/$path" ) ) . "\n";
}
}
if ( isset( $registry['headAdd'] ) ) {
$headAdd .= $indent . implode( "\n$indent", explode( "\n", $registry['headAdd'] ) ) . "\n";
}
if ( isset( $registry['bodyAdd'] ) ) {
$bodyAdd .= $indent . implode( "\n$indent", explode( "\n", $registry['bodyAdd'] ) ) . "\n";
}
if ( $headAdd ) {
$head .= "$indent<!-- $module -->\n$headAdd";
}
if ( $bodyAdd ) {
$body .= "$indent<!-- $module -->\n$bodyAdd";
}
}
$head = rtrim( $head );
$body = rtrim( $body );
// Output
if ( $writeFile ) {
$contents = is_readable( $writeFile ) ? file_get_contents( $writeFile ) : false;
if ( !$contents ) {
echo "\nError: Write file not readable or empty!\n";
exit( 1 );
}
$lines = explode( "\n", $contents . "\n" );
$inHead = $inBody = $inGenerated = false;
foreach ( $lines as $i => &$line ) {
$text = trim( $line );
if ( $text === '<head>' ) {
$inHead = true;
$inBody = false;
$inGenerated = false;
} elseif ( $text === '<body>' ) {
$inHead = false;
$inBody = true;
$inGenerated = false;
} elseif ( strpos( $text, '<!-- Generated by' ) === 0 ) {
// Only set $inGenerated if we're in a generated section
// that we want to replace (--section=body, don't replace head).
if ( $inHead ) {
if ( $section === 'both' || $section === 'head' ) {
$inGenerated = true;
if ( !$head ) {
$line = '';
} else {
$line = "$indent<!-- Generated by $self -->\n$head";
}
}
} elseif ( $inBody ) {
if ( $section === 'both' || $section === 'body' ) {
$inGenerated = true;
if ( !$body ) {
$line = '';
} else {
$line = "$indent<!-- Generated by $self -->\n$body";
}
}
}
} elseif ( $text === '' ) {
$inGenerated = false;
} else {
// Strip the lines directly connected to the "<!-- Generated by"
if ( $inGenerated ) {
unset( $lines[$i] );
}
}
}
if ( !file_put_contents( $writeFile, trim( implode( "\n", $lines ) ) . "\n" ) ) {
echo "\nError: Write to file failed!\n";
exit( 1 );
}
echo "Done!\n";
} else {
if ( $head ) {
if ( $section === 'both' ) {
echo "<head>\n\n$indent<!-- Generated by $self -->\n$head\n\n</head>";
} elseif ( $section === 'head' ) {
echo $head;
}
}
if ( $body ) {
if ( $section === 'both' ) {
echo "<body>\n\n$indent<!-- Generated by $self -->\n$body\n\n</body>\n";
} elseif ( $section === 'body' ) {
echo $body;
}
}
}
}
}
$maintClass = 'MakeStaticLoader';
require_once RUN_MAINTENANCE_IF_MAIN;

View file

@ -11,233 +11,220 @@
<link rel="stylesheet" href="../../qunit/qunit.css">
<script src="../../qunit/qunit.js"></script>
<!-- Generated by maintenance/makeStaticLoader.php -->
<!-- Standalone init -->
<script>
if (
document.createElementNS &&
document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect
) {
document.write(
'<link rel="stylesheet" ' +
'href="../../ve/ui/styles/ve.ui.Icons-vector.css">'
);
} else {
document.write(
'<link rel="stylesheet" ' +
'href="../../ve/ui/styles/ve.ui.Icons-raster.css">'
);
}
</script>
<!-- No need for VisualEditor styles here -->
</head>
<body>
<!-- Generated by maintenance/makeStaticLoader.php -->
<!-- jquery -->
<script src="../../jquery/jquery.js"></script>
<script src="../../../modules/jquery/jquery.js"></script>
<!-- oojs -->
<script src="../../oojs/oojs.js"></script>
<script src="../../../modules/oojs/oojs.js"></script>
<!-- oojs-ui -->
<script src="../../oojs-ui/oojs-ui.js"></script>
<!-- unicodejs.wordbreak -->
<script src="../../unicodejs/unicodejs.js"></script>
<script src="../../unicodejs/unicodejs.textstring.js"></script>
<script src="../../unicodejs/unicodejs.graphemebreakproperties.js"></script>
<script src="../../unicodejs/unicodejs.graphemebreak.js"></script>
<script src="../../unicodejs/unicodejs.wordbreakproperties.js"></script>
<script src="../../unicodejs/unicodejs.wordbreak.js"></script>
<!-- ext.visualEditor.base -->
<script src="../../ve/ve.js"></script>
<script src="../../ve/ve.track.js"></script>
<script src="../../ve/init/ve.init.js"></script>
<script src="../../ve/init/ve.init.Platform.js"></script>
<script src="../../ve/init/ve.init.Target.js"></script>
<script src="../../ve/ve.debug.js"></script>
<!-- jquery.i18n -->
<script src="../../jquery.i18n/src/jquery.i18n.js"></script>
<script src="../../jquery.i18n/src/jquery.i18n.messagestore.js"></script>
<script src="../../jquery.i18n/src/jquery.i18n.parser.js"></script>
<script src="../../jquery.i18n/src/jquery.i18n.emitter.js"></script>
<script src="../../jquery.i18n/src/jquery.i18n.language.js"></script>
<script src="../../jquery.i18n/src/jquery.i18n.fallbacks.js"></script>
<script src="../../jquery.i18n/src/languages/bs.js"></script>
<script src="../../jquery.i18n/src/languages/dsb.js"></script>
<script src="../../jquery.i18n/src/languages/fi.js"></script>
<script src="../../jquery.i18n/src/languages/ga.js"></script>
<script src="../../jquery.i18n/src/languages/he.js"></script>
<script src="../../jquery.i18n/src/languages/hsb.js"></script>
<script src="../../jquery.i18n/src/languages/hu.js"></script>
<script src="../../jquery.i18n/src/languages/hy.js"></script>
<script src="../../jquery.i18n/src/languages/la.js"></script>
<script src="../../jquery.i18n/src/languages/ml.js"></script>
<script src="../../jquery.i18n/src/languages/os.js"></script>
<script src="../../jquery.i18n/src/languages/ru.js"></script>
<script src="../../jquery.i18n/src/languages/sl.js"></script>
<script src="../../jquery.i18n/src/languages/uk.js"></script>
<!-- ext.visualEditor.standalone -->
<script src="../../ve/init/sa/ve.init.sa.js"></script>
<script src="../../ve/init/sa/ve.init.sa.Platform.js"></script>
<script src="../../ve/init/sa/ve.init.sa.Target.js"></script>
<!-- Standalone init -->
<script>
ve.init.platform.setModulesUrl( '../..' );
</script>
<script src="../../../modules/oojs-ui/oojs-ui.js"></script>
<!-- rangy -->
<script src="../../rangy/rangy-core-1.3.js"></script>
<script src="../../rangy/rangy-position-1.3.js"></script>
<script src="../../rangy/rangy-export.js"></script>
<!-- ext.visualEditor.core -->
<script src="../../ve/ve.Range.js"></script>
<script src="../../ve/ve.Node.js"></script>
<script src="../../ve/ve.BranchNode.js"></script>
<script src="../../ve/ve.LeafNode.js"></script>
<script src="../../ve/ve.Document.js"></script>
<script src="../../ve/ve.EventSequencer.js"></script>
<script src="../../ve/dm/ve.dm.js"></script>
<script src="../../ve/dm/ve.dm.Model.js"></script>
<script src="../../ve/dm/ve.dm.ModelRegistry.js"></script>
<script src="../../ve/dm/ve.dm.NodeFactory.js"></script>
<script src="../../ve/dm/ve.dm.AnnotationFactory.js"></script>
<script src="../../ve/dm/ve.dm.AnnotationSet.js"></script>
<script src="../../ve/dm/ve.dm.MetaItemFactory.js"></script>
<script src="../../ve/dm/ve.dm.Node.js"></script>
<script src="../../ve/dm/ve.dm.BranchNode.js"></script>
<script src="../../ve/dm/ve.dm.LeafNode.js"></script>
<script src="../../ve/dm/ve.dm.Annotation.js"></script>
<script src="../../ve/dm/ve.dm.InternalList.js"></script>
<script src="../../ve/dm/ve.dm.MetaItem.js"></script>
<script src="../../ve/dm/ve.dm.MetaList.js"></script>
<script src="../../ve/dm/ve.dm.TransactionProcessor.js"></script>
<script src="../../ve/dm/ve.dm.Transaction.js"></script>
<script src="../../ve/dm/ve.dm.Surface.js"></script>
<script src="../../ve/dm/ve.dm.SurfaceFragment.js"></script>
<script src="../../ve/dm/ve.dm.DataString.js"></script>
<script src="../../ve/dm/ve.dm.Document.js"></script>
<script src="../../ve/dm/ve.dm.DocumentSlice.js"></script>
<script src="../../ve/dm/ve.dm.LinearData.js"></script>
<script src="../../ve/dm/ve.dm.DocumentSynchronizer.js"></script>
<script src="../../ve/dm/ve.dm.IndexValueStore.js"></script>
<script src="../../ve/dm/ve.dm.Converter.js"></script>
<script src="../../ve/dm/lineardata/ve.dm.FlatLinearData.js"></script>
<script src="../../ve/dm/lineardata/ve.dm.ElementLinearData.js"></script>
<script src="../../ve/dm/lineardata/ve.dm.MetaLinearData.js"></script>
<script src="../../ve/dm/nodes/ve.dm.GeneratedContentNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.AlienNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.BreakNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.CenterNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.DefinitionListItemNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.DefinitionListNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.DivNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.DocumentNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.HeadingNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.ImageNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.InternalItemNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.InternalListNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.ListItemNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.ListNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.ParagraphNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.PreformattedNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TableCaptionNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TableCellNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TableNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TableRowNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TableSectionNode.js"></script>
<script src="../../ve/dm/nodes/ve.dm.TextNode.js"></script>
<script src="../../ve/dm/annotations/ve.dm.LinkAnnotation.js"></script>
<script src="../../ve/dm/annotations/ve.dm.TextStyleAnnotation.js"></script>
<script src="../../ve/dm/metaitems/ve.dm.AlienMetaItem.js"></script>
<script src="../../ve/ce/ve.ce.js"></script>
<script src="../../ve/ce/ve.ce.DomRange.js"></script>
<script src="../../ve/ce/ve.ce.AnnotationFactory.js"></script>
<script src="../../ve/ce/ve.ce.NodeFactory.js"></script>
<script src="../../ve/ce/ve.ce.Document.js"></script>
<script src="../../ve/ce/ve.ce.View.js"></script>
<script src="../../ve/ce/ve.ce.Annotation.js"></script>
<script src="../../ve/ce/ve.ce.Node.js"></script>
<script src="../../ve/ce/ve.ce.BranchNode.js"></script>
<script src="../../ve/ce/ve.ce.ContentBranchNode.js"></script>
<script src="../../ve/ce/ve.ce.LeafNode.js"></script>
<script src="../../ve/ce/ve.ce.ProtectedNode.js"></script>
<script src="../../ve/ce/ve.ce.FocusableNode.js"></script>
<script src="../../ve/ce/ve.ce.RelocatableNode.js"></script>
<script src="../../ve/ce/ve.ce.ResizableNode.js"></script>
<script src="../../ve/ce/ve.ce.Surface.js"></script>
<script src="../../ve/ce/ve.ce.SurfaceObserver.js"></script>
<script src="../../ve/ce/nodes/ve.ce.GeneratedContentNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.AlienNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.BreakNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.CenterNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.DefinitionListItemNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.DefinitionListNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.DivNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.DocumentNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.HeadingNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ImageNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.InternalItemNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.InternalListNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ListItemNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ListNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ParagraphNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.PreformattedNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TableCaptionNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TableCellNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TableNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TableRowNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TableSectionNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.TextNode.js"></script>
<script src="../../ve/ce/annotations/ve.ce.LinkAnnotation.js"></script>
<script src="../../ve/ce/annotations/ve.ce.TextStyleAnnotation.js"></script>
<script src="../../ve/ui/ve.ui.js"></script>
<script src="../../ve/ui/ve.ui.Surface.js"></script>
<script src="../../ve/ui/ve.ui.Context.js"></script>
<script src="../../ve/ui/ve.ui.Dialog.js"></script>
<script src="../../ve/ui/ve.ui.Inspector.js"></script>
<script src="../../ve/ui/ve.ui.WindowSet.js"></script>
<script src="../../ve/ui/ve.ui.Toolbar.js"></script>
<script src="../../ve/ui/ve.ui.TargetToolbar.js"></script>
<script src="../../ve/ui/ve.ui.ToolFactory.js"></script>
<script src="../../ve/ui/ve.ui.Command.js"></script>
<script src="../../ve/ui/ve.ui.CommandRegistry.js"></script>
<script src="../../ve/ui/ve.ui.Trigger.js"></script>
<script src="../../ve/ui/ve.ui.TriggerRegistry.js"></script>
<script src="../../ve/ui/ve.ui.Action.js"></script>
<script src="../../ve/ui/ve.ui.ActionFactory.js"></script>
<script src="../../ve/ui/actions/ve.ui.AnnotationAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.ContentAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.DialogAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.FormatAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.HistoryAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.IndentationAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.InspectorAction.js"></script>
<script src="../../ve/ui/actions/ve.ui.ListAction.js"></script>
<script src="../../ve/ui/widgets/ve.ui.SurfaceWidget.js"></script>
<script src="../../ve/ui/widgets/ve.ui.LinkTargetInputWidget.js"></script>
<script src="../../ve/ui/tools/ve.ui.AnnotationTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.ClearAnnotationTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.DialogTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.FormatTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.HistoryTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.IndentationTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.InspectorTool.js"></script>
<script src="../../ve/ui/tools/ve.ui.ListTool.js"></script>
<script src="../../ve/ui/inspectors/ve.ui.AnnotationInspector.js"></script>
<script src="../../ve/ui/inspectors/ve.ui.LinkInspector.js"></script>
<script src="../../ve/ui/widgets/ve.ui.GroupButtonWidget.js"></script>
<script src="../../ve/ui/inspectors/ve.ui.SpecialCharacterInspector.js"></script>
<script src="../../../modules/rangy/rangy-core-1.3.js"></script>
<script src="../../../modules/rangy/rangy-position-1.3.js"></script>
<script src="../../../modules/rangy/rangy-export.js"></script>
<!-- unicodejs -->
<script src="../../../modules/unicodejs/unicodejs.js"></script>
<script src="../../../modules/unicodejs/unicodejs.textstring.js"></script>
<script src="../../../modules/unicodejs/unicodejs.graphemebreakproperties.js"></script>
<script src="../../../modules/unicodejs/unicodejs.graphemebreak.js"></script>
<script src="../../../modules/unicodejs/unicodejs.wordbreakproperties.js"></script>
<script src="../../../modules/unicodejs/unicodejs.wordbreak.js"></script>
<!-- jquery.uls.data -->
<script src="../../jquery.uls/src/jquery.uls.data.js"></script>
<script src="../../jquery.uls/src/jquery.uls.data.utils.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.data.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.data.utils.js"></script>
<!-- jquery.uls -->
<script src="../../jquery.uls/src/jquery.uls.core.js"></script>
<script src="../../jquery.uls/src/jquery.uls.lcd.js"></script>
<script src="../../jquery.uls/src/jquery.uls.languagefilter.js"></script>
<script src="../../jquery.uls/src/jquery.uls.regionfilter.js"></script>
<!-- ext.visualEditor.language -->
<script src="../../ve/dm/annotations/ve.dm.LanguageAnnotation.js"></script>
<script src="../../ve/ce/annotations/ve.ce.LanguageAnnotation.js"></script>
<script src="../../ve/ui/inspectors/ve.ui.LanguageInspector.js"></script>
<script src="../../ve/ui/tools/ve.ui.LanguageInspectorTool.js"></script>
<script src="../../ve/ui/widgets/ve.ui.LanguageInputWidget.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.core.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.lcd.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.languagefilter.js"></script>
<script src="../../../modules/jquery.uls/src/jquery.uls.regionfilter.js"></script>
<!-- jquery.i18n -->
<script src="../../../modules/jquery.i18n/src/jquery.i18n.js"></script>
<script src="../../../modules/jquery.i18n/src/jquery.i18n.messagestore.js"></script>
<script src="../../../modules/jquery.i18n/src/jquery.i18n.parser.js"></script>
<script src="../../../modules/jquery.i18n/src/jquery.i18n.emitter.js"></script>
<script src="../../../modules/jquery.i18n/src/jquery.i18n.language.js"></script>
<script src="../../../modules/jquery.i18n/src/jquery.i18n.fallbacks.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/bs.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/dsb.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/fi.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/ga.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/he.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/hsb.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/hu.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/hy.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/la.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/ml.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/os.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/ru.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/sl.js"></script>
<script src="../../../modules/jquery.i18n/src/languages/uk.js"></script>
<!-- visualEditor.base -->
<script src="../../../modules/ve/ve.js"></script>
<script src="../../../modules/ve/ve.track.js"></script>
<script src="../../../modules/ve/init/ve.init.js"></script>
<script src="../../../modules/ve/init/ve.init.Platform.js"></script>
<script src="../../../modules/ve/init/ve.init.Target.js"></script>
<!-- visualEditor.standalone -->
<script src="../../../modules/ve/init/sa/ve.init.sa.js"></script>
<script src="../../../modules/ve/init/sa/ve.init.sa.Platform.js"></script>
<script src="../../../modules/ve/init/sa/ve.init.sa.Target.js"></script>
<!-- visualEditor.core -->
<script src="../../../modules/ve/ve.Range.js"></script>
<script src="../../../modules/ve/ve.Node.js"></script>
<script src="../../../modules/ve/ve.BranchNode.js"></script>
<script src="../../../modules/ve/ve.LeafNode.js"></script>
<script src="../../../modules/ve/ve.Document.js"></script>
<script src="../../../modules/ve/ve.EventSequencer.js"></script>
<script src="../../../modules/ve/dm/ve.dm.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Model.js"></script>
<script src="../../../modules/ve/dm/ve.dm.ModelRegistry.js"></script>
<script src="../../../modules/ve/dm/ve.dm.NodeFactory.js"></script>
<script src="../../../modules/ve/dm/ve.dm.AnnotationFactory.js"></script>
<script src="../../../modules/ve/dm/ve.dm.AnnotationSet.js"></script>
<script src="../../../modules/ve/dm/ve.dm.MetaItemFactory.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Node.js"></script>
<script src="../../../modules/ve/dm/ve.dm.BranchNode.js"></script>
<script src="../../../modules/ve/dm/ve.dm.LeafNode.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Annotation.js"></script>
<script src="../../../modules/ve/dm/ve.dm.InternalList.js"></script>
<script src="../../../modules/ve/dm/ve.dm.MetaItem.js"></script>
<script src="../../../modules/ve/dm/ve.dm.MetaList.js"></script>
<script src="../../../modules/ve/dm/ve.dm.TransactionProcessor.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Transaction.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Surface.js"></script>
<script src="../../../modules/ve/dm/ve.dm.SurfaceFragment.js"></script>
<script src="../../../modules/ve/dm/ve.dm.DataString.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Document.js"></script>
<script src="../../../modules/ve/dm/ve.dm.DocumentSlice.js"></script>
<script src="../../../modules/ve/dm/ve.dm.LinearData.js"></script>
<script src="../../../modules/ve/dm/ve.dm.DocumentSynchronizer.js"></script>
<script src="../../../modules/ve/dm/ve.dm.IndexValueStore.js"></script>
<script src="../../../modules/ve/dm/ve.dm.Converter.js"></script>
<script src="../../../modules/ve/dm/lineardata/ve.dm.FlatLinearData.js"></script>
<script src="../../../modules/ve/dm/lineardata/ve.dm.ElementLinearData.js"></script>
<script src="../../../modules/ve/dm/lineardata/ve.dm.MetaLinearData.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.GeneratedContentNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.AlienNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.BreakNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.CenterNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.DefinitionListItemNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.DefinitionListNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.DivNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.DocumentNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.HeadingNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.ImageNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.InternalItemNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.InternalListNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.ListItemNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.ListNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.ParagraphNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.PreformattedNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TableCaptionNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TableCellNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TableNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TableRowNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TableSectionNode.js"></script>
<script src="../../../modules/ve/dm/nodes/ve.dm.TextNode.js"></script>
<script src="../../../modules/ve/dm/annotations/ve.dm.LanguageAnnotation.js"></script>
<script src="../../../modules/ve/dm/annotations/ve.dm.LinkAnnotation.js"></script>
<script src="../../../modules/ve/dm/annotations/ve.dm.TextStyleAnnotation.js"></script>
<script src="../../../modules/ve/dm/metaitems/ve.dm.AlienMetaItem.js"></script>
<script src="../../../modules/ve/ce/ve.ce.js"></script>
<script src="../../../modules/ve/ce/ve.ce.DomRange.js"></script>
<script src="../../../modules/ve/ce/ve.ce.AnnotationFactory.js"></script>
<script src="../../../modules/ve/ce/ve.ce.NodeFactory.js"></script>
<script src="../../../modules/ve/ce/ve.ce.Document.js"></script>
<script src="../../../modules/ve/ce/ve.ce.View.js"></script>
<script src="../../../modules/ve/ce/ve.ce.Annotation.js"></script>
<script src="../../../modules/ve/ce/ve.ce.Node.js"></script>
<script src="../../../modules/ve/ce/ve.ce.BranchNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.ContentBranchNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.LeafNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.ProtectedNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.FocusableNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.RelocatableNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.ResizableNode.js"></script>
<script src="../../../modules/ve/ce/ve.ce.Surface.js"></script>
<script src="../../../modules/ve/ce/ve.ce.SurfaceObserver.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.AlienNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.BreakNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.CenterNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.DefinitionListItemNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.DefinitionListNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.DivNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.DocumentNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.HeadingNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.ImageNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.InternalItemNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.InternalListNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.ListItemNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.ListNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.ParagraphNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.PreformattedNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TableCaptionNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TableCellNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TableNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TableRowNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TableSectionNode.js"></script>
<script src="../../../modules/ve/ce/nodes/ve.ce.TextNode.js"></script>
<script src="../../../modules/ve/ce/annotations/ve.ce.LanguageAnnotation.js"></script>
<script src="../../../modules/ve/ce/annotations/ve.ce.LinkAnnotation.js"></script>
<script src="../../../modules/ve/ce/annotations/ve.ce.TextStyleAnnotation.js"></script>
<script src="../../../modules/ve/ui/ve.ui.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Surface.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Context.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Dialog.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Inspector.js"></script>
<script src="../../../modules/ve/ui/ve.ui.WindowSet.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Toolbar.js"></script>
<script src="../../../modules/ve/ui/ve.ui.TargetToolbar.js"></script>
<script src="../../../modules/ve/ui/ve.ui.ToolFactory.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Command.js"></script>
<script src="../../../modules/ve/ui/ve.ui.CommandRegistry.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Trigger.js"></script>
<script src="../../../modules/ve/ui/ve.ui.TriggerRegistry.js"></script>
<script src="../../../modules/ve/ui/ve.ui.Action.js"></script>
<script src="../../../modules/ve/ui/ve.ui.ActionFactory.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.AnnotationAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.ContentAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.DialogAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.FormatAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.HistoryAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.IndentationAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.InspectorAction.js"></script>
<script src="../../../modules/ve/ui/actions/ve.ui.ListAction.js"></script>
<script src="../../../modules/ve/ui/widgets/ve.ui.SurfaceWidget.js"></script>
<script src="../../../modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.AnnotationTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.DialogTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.FormatTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.HistoryTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.IndentationTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.InspectorTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.LanguageInspectorTool.js"></script>
<script src="../../../modules/ve/ui/tools/ve.ui.ListTool.js"></script>
<script src="../../../modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js"></script>
<script src="../../../modules/ve/ui/inspectors/ve.ui.LinkInspector.js"></script>
<script src="../../../modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js"></script>
<script src="../../../modules/ve/ui/inspectors/ve.ui.LanguageInspector.js"></script>
<script src="../../../modules/ve/ui/widgets/ve.ui.GroupButtonWidget.js"></script>
<script src="../../../modules/ve/ui/inspectors/ve.ui.SpecialCharacterInspector.js"></script>
<script>ve.init.platform.setModulesUrl( '../../../modules' );</script>
<!-- Load plugins for test framework -->
<script src="ve.qunit.js"></script>
@ -288,7 +275,7 @@
<script src="ui/actions/ve.ui.IndentationAction.test.js"></script>
<script src="ui/actions/ve.ui.ListAction.test.js"></script>
<!-- IME tests -->
<!-- IME tests -->
<script src="ce/ve.ce.TestRunner.js"></script>
<script src="ce/ve.ce.imetests.test.js"></script>
<script src="ce/imetests/backspace-chromium-ubuntu-none.js"></script>

View file

@ -0,0 +1,99 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>VisualEditor Tests</title>
<!-- Load test framework -->
<link rel="stylesheet" href="../../jsdifflib/diffview.css">
<script src="../../jsdifflib/diffview.js"></script>
<script src="../../jsdifflib/difflib.js"></script>
<link rel="stylesheet" href="../../qunit/qunit.css">
<script src="../../qunit/qunit.js"></script>
<!-- No need for VisualEditor styles here -->
</head>
<body>
<!-- SCRIPTS -->
<!-- Load plugins for test framework -->
<script src="ve.qunit.js"></script>
<!-- Load test suites -->
<script src="ve.test.utils.js"></script>
<script src="ve.test.js"></script>
<script src="ve.Range.test.js"></script>
<script src="ve.Document.test.js"></script>
<script src="ve.Node.test.js"></script>
<script src="ve.BranchNode.test.js"></script>
<script src="ve.LeafNode.test.js"></script>
<script src="dm/ve.dm.example.js"></script>
<script src="dm/ve.dm.AnnotationSet.test.js"></script>
<script src="dm/ve.dm.NodeFactory.test.js"></script>
<script src="dm/ve.dm.Node.test.js"></script>
<script src="dm/ve.dm.Converter.test.js"></script>
<script src="dm/ve.dm.BranchNode.test.js"></script>
<script src="dm/ve.dm.LeafNode.test.js"></script>
<script src="dm/nodes/ve.dm.TextNode.test.js"></script>
<script src="dm/ve.dm.Document.test.js"></script>
<script src="dm/ve.dm.DocumentSynchronizer.test.js"></script>
<script src="dm/ve.dm.IndexValueStore.test.js"></script>
<script src="dm/ve.dm.InternalList.test.js"></script>
<script src="dm/ve.dm.LinearData.test.js"></script>
<script src="dm/ve.dm.Transaction.test.js"></script>
<script src="dm/ve.dm.TransactionProcessor.test.js"></script>
<script src="dm/ve.dm.Surface.test.js"></script>
<script src="dm/ve.dm.SurfaceFragment.test.js"></script>
<script src="dm/ve.dm.ModelRegistry.test.js"></script>
<script src="dm/ve.dm.MetaList.test.js"></script>
<script src="dm/ve.dm.Model.test.js"></script>
<script src="dm/lineardata/ve.dm.FlatLinearData.test.js"></script>
<script src="dm/lineardata/ve.dm.ElementLinearData.test.js"></script>
<script src="dm/lineardata/ve.dm.MetaLinearData.test.js"></script>
<script src="ce/ve.ce.test.js"></script>
<script src="ce/ve.ce.Document.test.js"></script>
<script src="ce/ve.ce.Surface.test.js"></script>
<script src="ce/ve.ce.NodeFactory.test.js"></script>
<script src="ce/ve.ce.Node.test.js"></script>
<script src="ce/ve.ce.BranchNode.test.js"></script>
<script src="ce/ve.ce.ContentBranchNode.test.js"></script>
<script src="ce/ve.ce.LeafNode.test.js"></script>
<script src="ce/nodes/ve.ce.TextNode.test.js"></script>
<script src="init/ve.init.Platform.test.js"></script>
<script src="ui/ve.ui.Trigger.test.js"></script>
<script src="ui/actions/ve.ui.FormatAction.test.js"></script>
<script src="ui/actions/ve.ui.IndentationAction.test.js"></script>
<script src="ui/actions/ve.ui.ListAction.test.js"></script>
<!-- IME tests -->
<script src="ce/ve.ce.TestRunner.js"></script>
<script src="ce/ve.ce.imetests.test.js"></script>
<script src="ce/imetests/backspace-chromium-ubuntu-none.js"></script>
<script src="ce/imetests/backspace-firefox-ubuntu-none.js"></script>
<script src="ce/imetests/backspace-ie-win-none.js"></script>
<script src="ce/imetests/input-chrome-win-chinese-traditional-handwriting.js"></script>
<script src="ce/imetests/input-chrome-win-greek.js"></script>
<script src="ce/imetests/input-chrome-win-welsh.js"></script>
<script src="ce/imetests/input-chromium-ubuntu-ibus-chinese-cantonese.js"></script>
<script src="ce/imetests/input-chromium-ubuntu-ibus-japanese-anthy--hiraganaonly.js"></script>
<script src="ce/imetests/input-chromium-ubuntu-ibus-korean-korean.js"></script>
<script src="ce/imetests/input-chromium-ubuntu-ibus-malayalam-swanalekha.js"></script>
<script src="ce/imetests/input-firefox-ubuntu-ibus-chinese-cantonese.js"></script>
<script src="ce/imetests/input-firefox-ubuntu-ibus-japanese-anthy--hiraganaonly.js"></script>
<script src="ce/imetests/input-firefox-ubuntu-ibus-korean-korean.js"></script>
<script src="ce/imetests/input-firefox-ubuntu-ibus-malayalam.swanalekha.js"></script>
<script src="ce/imetests/input-firefox-win-chinese-traditional-handwriting.js"></script>
<script src="ce/imetests/input-firefox-win-greek.js"></script>
<script src="ce/imetests/input-firefox-win-welsh.js"></script>
<script src="ce/imetests/input-ie-win-chinese-traditional-handwriting.js"></script>
<script src="ce/imetests/input-ie-win-greek.js"></script>
<script src="ce/imetests/input-ie-win-korean.js"></script>
<script src="ce/imetests/input-ie-win-welsh.js"></script>
<script src="ce/imetests/leftarrow-chromium-ubuntu-none.js"></script>
<script src="ce/imetests/leftarrow-firefox-ubuntu-none.js"></script>
<script src="ce/imetests/leftarrow-ie-win-none.js"></script>
<div id="qunit"></div>
<div id="qunit-fixture">test markup</div>
</body>
</html>