2011-11-28 20:28:28 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* VisualEditor extension
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2011-11-28 20:28:28 +00:00
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2013-02-19 23:37:34 +00:00
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
2012-07-19 00:11:26 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
2011-11-28 20:28:28 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Setup */
|
|
|
|
|
|
|
|
$wgExtensionCredits['other'][] = array(
|
|
|
|
'path' => __FILE__,
|
|
|
|
'name' => 'VisualEditor',
|
|
|
|
'author' => array(
|
|
|
|
'Trevor Parscal',
|
|
|
|
'Inez Korczyński',
|
|
|
|
'Roan Kattouw',
|
|
|
|
'Neil Kandalgaonkar',
|
|
|
|
'Gabriel Wicke',
|
|
|
|
'Brion Vibber',
|
2012-06-25 23:26:48 +00:00
|
|
|
'Christian Williams',
|
|
|
|
'Rob Moen',
|
|
|
|
'Subramanya Sastry',
|
2012-07-27 23:43:27 +00:00
|
|
|
'Timo Tijhof',
|
2013-03-15 12:22:33 +00:00
|
|
|
'Ed Sanders',
|
2013-08-29 18:11:10 +00:00
|
|
|
'David Chan',
|
2013-10-23 18:24:03 +00:00
|
|
|
'Moriel Schottlender',
|
2011-11-28 20:28:28 +00:00
|
|
|
),
|
|
|
|
'version' => '0.1.0',
|
2011-12-13 23:49:33 +00:00
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:VisualEditor',
|
2011-11-28 20:28:28 +00:00
|
|
|
'descriptionmsg' => 'visualeditor-desc',
|
|
|
|
);
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-11-20 09:33:52 +00:00
|
|
|
$dir = __DIR__ . '/';
|
2013-07-26 20:08:32 +00:00
|
|
|
|
|
|
|
// Register files
|
|
|
|
$wgAutoloadClasses['ApiVisualEditor'] = $dir . 'ApiVisualEditor.php';
|
|
|
|
$wgAutoloadClasses['ApiVisualEditorEdit'] = $dir . 'ApiVisualEditorEdit.php';
|
|
|
|
$wgAutoloadClasses['VisualEditorHooks'] = $dir . 'VisualEditor.hooks.php';
|
2013-08-30 00:55:31 +00:00
|
|
|
$wgAutoloadClasses['VisualEditorDataModule'] = $dir . 'VisualEditorDataModule.php';
|
2011-11-28 20:28:28 +00:00
|
|
|
$wgExtensionMessagesFiles['VisualEditor'] = $dir . 'VisualEditor.i18n.php';
|
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Register API modules
|
|
|
|
$wgAPIModules['visualeditor'] = 'ApiVisualEditor';
|
|
|
|
$wgAPIModules['visualeditoredit'] = 'ApiVisualEditorEdit';
|
|
|
|
|
|
|
|
// Register Hooks
|
|
|
|
$wgHooks['BeforePageDisplay'][] = 'VisualEditorHooks::onBeforePageDisplay';
|
2013-08-01 19:14:41 +00:00
|
|
|
$wgHooks['DoEditSectionLink'][] = 'VisualEditorHooks::onDoEditSectionLink';
|
2013-08-12 05:50:04 +00:00
|
|
|
if ( array_key_exists( 'GetBetaFeaturePreferences', $wgHooks ) ) {
|
|
|
|
$wgHooks['GetBetaFeaturePreferences'][] = 'VisualEditorHooks::onGetBetaPreferences';
|
|
|
|
}
|
2013-07-26 20:08:32 +00:00
|
|
|
$wgHooks['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences';
|
|
|
|
$wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags';
|
|
|
|
$wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript';
|
|
|
|
$wgHooks['ResourceLoaderGetConfigVars'][] = 'VisualEditorHooks::onResourceLoaderGetConfigVars';
|
|
|
|
$wgHooks['ResourceLoaderTestModules'][] = 'VisualEditorHooks::onResourceLoaderTestModules';
|
2013-08-01 19:14:41 +00:00
|
|
|
$wgHooks['SkinTemplateNavigation'][] = 'VisualEditorHooks::onSkinTemplateNavigation';
|
2013-09-16 21:12:50 +00:00
|
|
|
$wgHooks['ParserTestGlobals'][] = 'VisualEditorHooks::onParserTestGlobals';
|
2013-07-26 20:08:32 +00:00
|
|
|
$wgExtensionFunctions[] = 'VisualEditorHooks::onSetup';
|
|
|
|
|
2013-07-26 20:12:48 +00:00
|
|
|
// Set default values for new preferences
|
2013-07-29 16:13:22 +00:00
|
|
|
$wgDefaultUserOptions['visualeditor-enable'] = 0;
|
2013-08-12 05:50:04 +00:00
|
|
|
$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0;
|
2013-10-30 22:07:09 +00:00
|
|
|
$wgDefaultUserOptions['visualeditor-enable-mwmath'] = 0;
|
2013-07-26 20:12:48 +00:00
|
|
|
$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0;
|
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Register resource modules
|
|
|
|
|
2011-11-28 20:28:28 +00:00
|
|
|
$wgVisualEditorResourceTemplate = array(
|
2013-11-20 09:33:52 +00:00
|
|
|
'localBasePath' => __DIR__ . '/modules',
|
2011-11-28 20:28:28 +00:00
|
|
|
'remoteExtPath' => 'VisualEditor/modules',
|
|
|
|
);
|
|
|
|
|
|
|
|
$wgResourceModules += array(
|
2012-03-29 21:05:25 +00:00
|
|
|
'rangy' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
2013-05-13 21:44:16 +00:00
|
|
|
'rangy/rangy-core-1.3.js',
|
|
|
|
'rangy/rangy-position-1.3.js',
|
2013-04-15 17:25:52 +00:00
|
|
|
'rangy/rangy-export.js',
|
2012-03-29 21:05:25 +00:00
|
|
|
),
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2012-12-13 00:22:10 +00:00
|
|
|
'jquery.visibleText' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
2013-03-18 11:31:14 +00:00
|
|
|
'jquery/jquery.visibleText.js',
|
|
|
|
),
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-06-06 01:52:04 +00:00
|
|
|
'oojs' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
2013-10-15 23:16:06 +00:00
|
|
|
'oojs/oojs.js',
|
2013-06-06 01:52:04 +00:00
|
|
|
),
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-10-09 20:09:59 +00:00
|
|
|
'oojs-ui' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
2013-11-13 22:53:18 +00:00
|
|
|
'oojs-ui/oojs-ui.js',
|
2013-10-09 20:09:59 +00:00
|
|
|
),
|
|
|
|
'styles' => array(
|
2013-11-13 22:53:18 +00:00
|
|
|
'oojs-ui/oojs-ui.svg.css',
|
2013-10-09 20:09:59 +00:00
|
|
|
),
|
|
|
|
'messages' => array(
|
|
|
|
'ooui-dialog-action-close',
|
2013-11-18 09:42:04 +00:00
|
|
|
'ooui-inspector-close-tooltip',
|
|
|
|
'ooui-inspector-remove-tooltip',
|
2013-10-09 20:09:59 +00:00
|
|
|
'ooui-outline-control-move-down',
|
|
|
|
'ooui-outline-control-move-up',
|
2013-11-12 19:52:12 +00:00
|
|
|
'ooui-toggle-on',
|
|
|
|
'ooui-toggle-off',
|
2013-10-09 20:09:59 +00:00
|
|
|
'ooui-toolbar-more',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'oojs'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2013-03-18 11:31:14 +00:00
|
|
|
'unicodejs.wordbreak' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
'unicodejs/unicodejs.js',
|
|
|
|
'unicodejs/unicodejs.textstring.js',
|
2013-06-15 12:52:08 +00:00
|
|
|
'unicodejs/unicodejs.graphemebreakproperties.js',
|
|
|
|
'unicodejs/unicodejs.graphemebreak.js',
|
2013-06-07 01:30:44 +00:00
|
|
|
'unicodejs/unicodejs.wordbreakproperties.js',
|
2013-03-18 11:31:14 +00:00
|
|
|
'unicodejs/unicodejs.wordbreak.js',
|
2012-12-13 00:22:10 +00:00
|
|
|
),
|
|
|
|
),
|
2013-06-17 21:12:21 +00:00
|
|
|
|
2012-06-28 09:52:03 +00:00
|
|
|
// Alias for backwards compat, safe to remove after
|
|
|
|
'ext.visualEditor.editPageInit' => $wgVisualEditorResourceTemplate + array(
|
2011-11-28 20:28:28 +00:00
|
|
|
'dependencies' => array(
|
2012-06-28 09:52:03 +00:00
|
|
|
'ext.visualEditor.viewPageTarget',
|
|
|
|
)
|
2011-11-28 20:28:28 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2012-08-30 20:04:22 +00:00
|
|
|
'ext.visualEditor.viewPageTarget.icons-raster' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'styles' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget.Icons-raster.css',
|
2012-08-30 20:04:22 +00:00
|
|
|
),
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2012-08-30 20:04:22 +00:00
|
|
|
'ext.visualEditor.viewPageTarget.icons-vector' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'styles' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget.Icons-vector.css',
|
2012-08-30 20:04:22 +00:00
|
|
|
),
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-07-03 22:14:52 +00:00
|
|
|
'ext.visualEditor.viewPageTarget.init' => $wgVisualEditorResourceTemplate + array(
|
2013-07-05 06:01:31 +00:00
|
|
|
'scripts' => 've-mw/init/targets/ve.init.mw.ViewPageTarget.init.js',
|
|
|
|
'styles' => 've-mw/init/styles/ve.init.mw.ViewPageTarget.init.css',
|
2013-07-03 22:14:52 +00:00
|
|
|
'dependencies' => array(
|
|
|
|
'jquery.client',
|
2013-07-19 02:44:22 +00:00
|
|
|
'mediawiki.Title',
|
2013-07-03 22:14:52 +00:00
|
|
|
'mediawiki.Uri',
|
|
|
|
'mediawiki.util',
|
2013-07-26 13:54:29 +00:00
|
|
|
'user.options',
|
2013-07-03 22:14:52 +00:00
|
|
|
),
|
|
|
|
'messages' => array(
|
2013-07-05 05:51:31 +00:00
|
|
|
'accesskey-ca-editsource',
|
2013-07-05 06:01:31 +00:00
|
|
|
'accesskey-ca-ve-edit',
|
|
|
|
'pipe-separator',
|
2013-07-03 22:14:52 +00:00
|
|
|
'tooltip-ca-createsource',
|
|
|
|
'tooltip-ca-editsource',
|
|
|
|
'tooltip-ca-ve-edit',
|
2013-07-05 06:01:31 +00:00
|
|
|
'visualeditor-ca-editsource-section',
|
2013-07-03 22:14:52 +00:00
|
|
|
),
|
|
|
|
'position' => 'top',
|
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-08-01 19:14:41 +00:00
|
|
|
'ext.visualEditor.viewPageTarget.noscript' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'styles' => 've-mw/init/styles/ve.init.mw.ViewPageTarget.noscript.css',
|
|
|
|
),
|
|
|
|
|
2012-06-28 09:52:03 +00:00
|
|
|
'ext.visualEditor.viewPageTarget' => $wgVisualEditorResourceTemplate + array(
|
2012-05-25 19:50:48 +00:00
|
|
|
'scripts' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/targets/ve.init.mw.ViewPageTarget.js',
|
2012-06-11 06:54:41 +00:00
|
|
|
),
|
|
|
|
'styles' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget.css',
|
2012-08-17 20:16:25 +00:00
|
|
|
),
|
|
|
|
'skinStyles' => array(
|
|
|
|
'vector' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css',
|
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget-vector-hd.css' => array(
|
2012-08-17 20:16:25 +00:00
|
|
|
'media' => 'screen and (min-width: 982px)'
|
|
|
|
),
|
2012-06-14 01:26:21 +00:00
|
|
|
),
|
2012-08-17 20:16:25 +00:00
|
|
|
'apex' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget-apex.css',
|
2012-08-23 18:01:20 +00:00
|
|
|
),
|
|
|
|
'monobook' => array(
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/styles/ve.init.mw.ViewPageTarget-monobook.css',
|
2012-08-17 20:16:25 +00:00
|
|
|
)
|
2012-06-11 06:54:41 +00:00
|
|
|
),
|
|
|
|
'dependencies' => array(
|
2012-07-20 23:59:59 +00:00
|
|
|
'ext.visualEditor.base',
|
2013-05-14 23:45:42 +00:00
|
|
|
'ext.visualEditor.mediawiki',
|
2012-11-14 18:33:57 +00:00
|
|
|
'jquery.byteLength',
|
2012-12-02 03:44:07 +00:00
|
|
|
'jquery.byteLimit',
|
|
|
|
'jquery.client',
|
|
|
|
'jquery.placeholder',
|
2012-12-13 00:22:10 +00:00
|
|
|
'jquery.visibleText',
|
mw.ViewPageTarget: Refetch token if session expired
* Rephrased visualeditor-savedialog-error-badtoken to emphasise
that it is the old session that become invalid, not the one
the user started browsing with since in a different window.
* If the session changed, the user will be asked whether they
agree to save with this new session instead.
* We explictly update mw.config so that future save attempts
in the same window compare against the correct environment.
Without this there are two problems when saving and then
making a second edit in the same window and saving that:
- It will bring up the same question again (user A -> user B),
which is annoying.
- If the user logged back in again (new session, but for
user A again) it would silently try with that new token
without asking, thus saving as user A when the user still
thinks it switched to user B. It switching back automatically
is not obvious since we asked them from A->B, so we should
also ask the other way around.
This can be reproduced by opending ve-edit logged-in, then
logging out in a new window, save, confirm anon, save,
open edit again, log back in in a new window, save open edit
in the old window, confirm new logged-in, save.
Bug: 50424
Change-Id: Id055eca1886f85aeaf615f645de29898afc0373c
2013-07-12 18:27:35 +00:00
|
|
|
'mediawiki.api',
|
2013-07-03 22:14:52 +00:00
|
|
|
'mediawiki.feedback',
|
2012-12-05 22:45:20 +00:00
|
|
|
'mediawiki.jqueryMsg',
|
2013-07-03 22:14:52 +00:00
|
|
|
'mediawiki.notify',
|
2012-12-02 03:44:07 +00:00
|
|
|
'mediawiki.Title',
|
|
|
|
'mediawiki.Uri',
|
|
|
|
'mediawiki.user',
|
|
|
|
'user.options',
|
|
|
|
'user.tokens',
|
2012-05-25 19:50:48 +00:00
|
|
|
),
|
|
|
|
'messages' => array(
|
2013-06-12 19:10:22 +00:00
|
|
|
// MW core messages
|
2013-05-17 16:09:20 +00:00
|
|
|
'creating',
|
|
|
|
'editing',
|
2013-07-16 14:07:20 +00:00
|
|
|
'spamprotectionmatch',
|
|
|
|
'spamprotectiontext',
|
2013-06-12 19:10:22 +00:00
|
|
|
|
|
|
|
// Messages needed by VE in init phase only (rest go below)
|
2012-06-21 19:15:31 +00:00
|
|
|
'visualeditor-loadwarning',
|
2013-05-18 01:19:20 +00:00
|
|
|
'visualeditor-loadwarning-token',
|
2013-06-18 19:18:36 +00:00
|
|
|
'visualeditor-notification-created',
|
|
|
|
'visualeditor-notification-restored',
|
|
|
|
'visualeditor-notification-saved',
|
mw.ViewPageTarget: Refetch token if session expired
* Rephrased visualeditor-savedialog-error-badtoken to emphasise
that it is the old session that become invalid, not the one
the user started browsing with since in a different window.
* If the session changed, the user will be asked whether they
agree to save with this new session instead.
* We explictly update mw.config so that future save attempts
in the same window compare against the correct environment.
Without this there are two problems when saving and then
making a second edit in the same window and saving that:
- It will bring up the same question again (user A -> user B),
which is annoying.
- If the user logged back in again (new session, but for
user A again) it would silently try with that new token
without asking, thus saving as user A when the user still
thinks it switched to user B. It switching back automatically
is not obvious since we asked them from A->B, so we should
also ask the other way around.
This can be reproduced by opending ve-edit logged-in, then
logging out in a new window, save, confirm anon, save,
open edit again, log back in in a new window, save open edit
in the old window, confirm new logged-in, save.
Bug: 50424
Change-Id: Id055eca1886f85aeaf615f645de29898afc0373c
2013-07-12 18:27:35 +00:00
|
|
|
'visualeditor-savedialog-identify-anon',
|
|
|
|
'visualeditor-savedialog-identify-user',
|
2012-05-25 19:50:48 +00:00
|
|
|
),
|
2012-06-11 06:54:41 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2012-06-11 06:54:41 +00:00
|
|
|
'ext.visualEditor.base' => $wgVisualEditorResourceTemplate + array(
|
2011-11-28 20:28:28 +00:00
|
|
|
'scripts' => array(
|
2012-05-24 22:15:11 +00:00
|
|
|
// ve
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ve.js',
|
2013-07-30 22:52:19 +00:00
|
|
|
've/ve.track.js',
|
2013-04-03 03:47:40 +00:00
|
|
|
|
|
|
|
// init
|
2012-07-27 23:08:45 +00:00
|
|
|
've/init/ve.init.js',
|
|
|
|
've/init/ve.init.Platform.js',
|
2013-02-20 19:44:44 +00:00
|
|
|
've/init/ve.init.Target.js',
|
2013-05-14 23:45:42 +00:00
|
|
|
),
|
|
|
|
'debugScripts' => array(
|
|
|
|
've/ve.debug.js',
|
|
|
|
),
|
2013-05-30 15:39:22 +00:00
|
|
|
'dependencies' => array(
|
2013-06-06 01:52:04 +00:00
|
|
|
'oojs',
|
2013-10-09 20:09:59 +00:00
|
|
|
'oojs-ui',
|
2013-05-30 15:39:22 +00:00
|
|
|
'unicodejs.wordbreak',
|
2013-06-06 23:14:11 +00:00
|
|
|
'mediawiki.util',
|
2013-05-30 15:39:22 +00:00
|
|
|
),
|
2013-05-14 23:45:42 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
'ext.visualEditor.mediawiki' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
// init
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/init/ve.init.mw.js',
|
|
|
|
've-mw/init/ve.init.mw.Platform.js',
|
|
|
|
've-mw/init/ve.init.mw.Target.js',
|
2013-04-29 21:48:27 +00:00
|
|
|
),
|
|
|
|
'dependencies' => array(
|
2013-10-06 06:12:51 +00:00
|
|
|
'jquery.byteLength',
|
2013-04-29 21:48:27 +00:00
|
|
|
'jquery.client',
|
2013-06-19 01:02:23 +00:00
|
|
|
'mediawiki.Uri',
|
2013-05-14 23:45:42 +00:00
|
|
|
'ext.visualEditor.base',
|
2012-06-18 20:30:14 +00:00
|
|
|
),
|
2013-05-14 23:45:42 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
'ext.visualEditor.standalone' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
// init
|
|
|
|
've/init/sa/ve.init.sa.js',
|
|
|
|
've/init/sa/ve.init.sa.Platform.js',
|
|
|
|
've/init/sa/ve.init.sa.Target.js',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.base',
|
2012-06-18 20:30:14 +00:00
|
|
|
),
|
2012-06-11 06:54:41 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-08-30 00:55:31 +00:00
|
|
|
'ext.visualEditor.data' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'class' => 'VisualEditorDataModule'
|
2012-06-21 20:39:27 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2012-06-11 06:54:41 +00:00
|
|
|
'ext.visualEditor.core' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
// ve
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ve.Range.js',
|
|
|
|
've/ve.Node.js',
|
|
|
|
've/ve.BranchNode.js',
|
|
|
|
've/ve.LeafNode.js',
|
|
|
|
've/ve.Document.js',
|
2013-08-30 16:12:49 +00:00
|
|
|
've/ve.EventSequencer.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2012-02-06 23:50:56 +00:00
|
|
|
// dm
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.js',
|
2013-04-02 18:28:42 +00:00
|
|
|
've/dm/ve.dm.Model.js',
|
2013-01-18 05:29:01 +00:00
|
|
|
've/dm/ve.dm.ModelRegistry.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.NodeFactory.js',
|
|
|
|
've/dm/ve.dm.AnnotationFactory.js',
|
2013-03-20 22:35:05 +00:00
|
|
|
've/dm/ve.dm.AnnotationSet.js',
|
2013-02-21 23:01:04 +00:00
|
|
|
've/dm/ve.dm.MetaItemFactory.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.Node.js',
|
|
|
|
've/dm/ve.dm.BranchNode.js',
|
|
|
|
've/dm/ve.dm.LeafNode.js',
|
|
|
|
've/dm/ve.dm.Annotation.js',
|
2013-04-17 17:53:26 +00:00
|
|
|
've/dm/ve.dm.InternalList.js',
|
2013-02-21 23:01:04 +00:00
|
|
|
've/dm/ve.dm.MetaItem.js',
|
2013-03-15 04:07:23 +00:00
|
|
|
've/dm/ve.dm.MetaList.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.TransactionProcessor.js',
|
|
|
|
've/dm/ve.dm.Transaction.js',
|
|
|
|
've/dm/ve.dm.Surface.js',
|
2012-08-24 22:25:37 +00:00
|
|
|
've/dm/ve.dm.SurfaceFragment.js',
|
2013-03-18 11:31:14 +00:00
|
|
|
've/dm/ve.dm.DataString.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.Document.js',
|
2013-09-30 13:26:33 +00:00
|
|
|
've/dm/ve.dm.DocumentSlice.js',
|
2013-03-20 22:35:05 +00:00
|
|
|
've/dm/ve.dm.LinearData.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.DocumentSynchronizer.js',
|
2013-03-20 22:35:05 +00:00
|
|
|
've/dm/ve.dm.IndexValueStore.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/ve.dm.Converter.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2013-10-04 11:57:03 +00:00
|
|
|
've/dm/lineardata/ve.dm.FlatLinearData.js',
|
2013-03-20 22:35:05 +00:00
|
|
|
've/dm/lineardata/ve.dm.ElementLinearData.js',
|
|
|
|
've/dm/lineardata/ve.dm.MetaLinearData.js',
|
|
|
|
|
2013-04-03 18:21:10 +00:00
|
|
|
've/dm/nodes/ve.dm.GeneratedContentNode.js',
|
2013-01-25 04:09:53 +00:00
|
|
|
've/dm/nodes/ve.dm.AlienNode.js',
|
2012-08-08 23:06:20 +00:00
|
|
|
've/dm/nodes/ve.dm.BreakNode.js',
|
2012-10-16 14:03:26 +00:00
|
|
|
've/dm/nodes/ve.dm.CenterNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/nodes/ve.dm.DefinitionListItemNode.js',
|
|
|
|
've/dm/nodes/ve.dm.DefinitionListNode.js',
|
2013-05-01 01:32:06 +00:00
|
|
|
've/dm/nodes/ve.dm.DivNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/nodes/ve.dm.DocumentNode.js',
|
|
|
|
've/dm/nodes/ve.dm.HeadingNode.js',
|
|
|
|
've/dm/nodes/ve.dm.ImageNode.js',
|
2013-04-17 17:53:26 +00:00
|
|
|
've/dm/nodes/ve.dm.InternalItemNode.js',
|
|
|
|
've/dm/nodes/ve.dm.InternalListNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/nodes/ve.dm.ListItemNode.js',
|
|
|
|
've/dm/nodes/ve.dm.ListNode.js',
|
|
|
|
've/dm/nodes/ve.dm.ParagraphNode.js',
|
|
|
|
've/dm/nodes/ve.dm.PreformattedNode.js',
|
2013-04-25 22:24:37 +00:00
|
|
|
've/dm/nodes/ve.dm.TableCaptionNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/nodes/ve.dm.TableCellNode.js',
|
|
|
|
've/dm/nodes/ve.dm.TableNode.js',
|
|
|
|
've/dm/nodes/ve.dm.TableRowNode.js',
|
|
|
|
've/dm/nodes/ve.dm.TableSectionNode.js',
|
|
|
|
've/dm/nodes/ve.dm.TextNode.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWEntityNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWHeadingNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWPreformattedNode.js',
|
2013-10-15 12:18:11 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWImageNode.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWInlineImageNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWBlockImageNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWImageCaptionNode.js',
|
2013-10-17 20:15:36 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWNumberedExternalLinkNode.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWTransclusionNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWReferenceListNode.js',
|
|
|
|
've-mw/dm/nodes/ve.dm.MWReferenceNode.js',
|
2013-10-21 22:30:49 +00:00
|
|
|
've-mw/dm/nodes/ve.dm.MWExtensionNode.js',
|
2013-03-01 01:17:02 +00:00
|
|
|
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/annotations/ve.dm.LinkAnnotation.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js',
|
|
|
|
've-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/dm/annotations/ve.dm.TextStyleAnnotation.js',
|
2013-07-27 00:12:27 +00:00
|
|
|
've-mw/dm/annotations/ve.dm.MWNowikiAnnotation.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2013-02-21 23:01:04 +00:00
|
|
|
've/dm/metaitems/ve.dm.AlienMetaItem.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/dm/metaitems/ve.dm.MWAlienMetaItem.js',
|
|
|
|
've-mw/dm/metaitems/ve.dm.MWCategoryMetaItem.js',
|
|
|
|
've-mw/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js',
|
|
|
|
've-mw/dm/metaitems/ve.dm.MWLanguageMetaItem.js',
|
2013-07-23 13:35:26 +00:00
|
|
|
've-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
|
|
|
|
've-mw/dm/models/ve.dm.MWTransclusionModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTransclusionPartModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTransclusionContentModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTemplateSpecModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTemplateModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTemplatePlaceholderModel.js',
|
|
|
|
've-mw/dm/models/ve.dm.MWTemplateParameterModel.js',
|
2013-06-18 21:55:06 +00:00
|
|
|
|
2012-03-29 21:05:25 +00:00
|
|
|
// ce
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/ve.ce.js',
|
2013-03-05 20:18:59 +00:00
|
|
|
've/ce/ve.ce.DomRange.js',
|
Great Annotation Refactor of 2013
This changes the annotation API to be the same as the node API, sans
a few boolean flags that don't apply. The APIs were different, but
there was really no good reason why, so this makes things simpler for
API users. It also means we'll be able to factor a bunch of things out
because they're now duplicated between nodes, meta items and annotations.
Linear model annotations are now objects with 'type' and 'attributes'
properties (rather than 'name' and 'data'), for consistency with elements.
They now also contain html/0/* attributes for HTML attribute preservation,
which obsoletes the htmlTagName and htmlAttributes properties.
dm.Annotation subclasses take a reference to such an object and implement
conversion using .static.toDataElement and .static.toDomElements just
like nodes do. The custom .getHash() functions are no longer necessary
because of the way HTML attribute preservation was reimplemented.
CE rendering has been moved out of dm.Annotation (it never made sense to
have CE rendering functions in DM classes, this was bothering me) and into
separate ce.Annotation subclasses. These are very similar to CE nodes in
that they have a this.$ generated based on something in the DM; the main
difference is that nodes listen to events and update themselves, whereas
annotations are static and are simply destroyed and rebuilt when they
change. This change also adds whitelisted HTML attribute rendering for
annotations, as well as class="ve-ce-FooAnnotation" attributes.
Now that annotation classes produce real DOM nodes rather than weird
objects describing HTML tags, we can't generate HTML as a string in
ce.ContentBranchNode anymore. getRenderedContents() has been rewritten
to be much more similar to the way the converter renders annotations;
in fact, significant parts of it were copied from the converter, so that
should be factored out in the future. This change actually fixes an
annotation rendering discrepancy between ce.ContentBranchNode and
dm.Converter; see the diff of ve.ce.ContentBranchNode.test.js.
ve.ce.MWEntityNode.js:
* Remove stray property
ve.dm.MWExternalLinkAnnotation.js:
* Store 'rel' attribute
ve.dm.TextStyleAnnotation.js:
* Put all the conversion logic in the abstract base class
ve.dm.Converter.js:
* Also feed annotations through getDomElementsFromDataElement() and
createDataElement()
ve.dm.Node.js:
* Fix undocumented property
ve.ce.ContentBranchNode.test.js:
* Add descriptive messages for each test case
* Compare DOM trees, not HTML strings
* Compare without all the class="ve-ce-WhateverAnnotation" clutter
ve.ui.LinkInspector.js:
* Replace direct .getHash() calls (evil!) with ve.getHash()
Bug: 46464
Bug: 44808
Change-Id: I31991488579b8cce6d98ed8b29b486ba5ec38cdc
2013-04-02 17:23:33 +00:00
|
|
|
've/ce/ve.ce.AnnotationFactory.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/ve.ce.NodeFactory.js',
|
|
|
|
've/ce/ve.ce.Document.js',
|
2013-04-02 19:33:22 +00:00
|
|
|
've/ce/ve.ce.View.js',
|
Great Annotation Refactor of 2013
This changes the annotation API to be the same as the node API, sans
a few boolean flags that don't apply. The APIs were different, but
there was really no good reason why, so this makes things simpler for
API users. It also means we'll be able to factor a bunch of things out
because they're now duplicated between nodes, meta items and annotations.
Linear model annotations are now objects with 'type' and 'attributes'
properties (rather than 'name' and 'data'), for consistency with elements.
They now also contain html/0/* attributes for HTML attribute preservation,
which obsoletes the htmlTagName and htmlAttributes properties.
dm.Annotation subclasses take a reference to such an object and implement
conversion using .static.toDataElement and .static.toDomElements just
like nodes do. The custom .getHash() functions are no longer necessary
because of the way HTML attribute preservation was reimplemented.
CE rendering has been moved out of dm.Annotation (it never made sense to
have CE rendering functions in DM classes, this was bothering me) and into
separate ce.Annotation subclasses. These are very similar to CE nodes in
that they have a this.$ generated based on something in the DM; the main
difference is that nodes listen to events and update themselves, whereas
annotations are static and are simply destroyed and rebuilt when they
change. This change also adds whitelisted HTML attribute rendering for
annotations, as well as class="ve-ce-FooAnnotation" attributes.
Now that annotation classes produce real DOM nodes rather than weird
objects describing HTML tags, we can't generate HTML as a string in
ce.ContentBranchNode anymore. getRenderedContents() has been rewritten
to be much more similar to the way the converter renders annotations;
in fact, significant parts of it were copied from the converter, so that
should be factored out in the future. This change actually fixes an
annotation rendering discrepancy between ce.ContentBranchNode and
dm.Converter; see the diff of ve.ce.ContentBranchNode.test.js.
ve.ce.MWEntityNode.js:
* Remove stray property
ve.dm.MWExternalLinkAnnotation.js:
* Store 'rel' attribute
ve.dm.TextStyleAnnotation.js:
* Put all the conversion logic in the abstract base class
ve.dm.Converter.js:
* Also feed annotations through getDomElementsFromDataElement() and
createDataElement()
ve.dm.Node.js:
* Fix undocumented property
ve.ce.ContentBranchNode.test.js:
* Add descriptive messages for each test case
* Compare DOM trees, not HTML strings
* Compare without all the class="ve-ce-WhateverAnnotation" clutter
ve.ui.LinkInspector.js:
* Replace direct .getHash() calls (evil!) with ve.getHash()
Bug: 46464
Bug: 44808
Change-Id: I31991488579b8cce6d98ed8b29b486ba5ec38cdc
2013-04-02 17:23:33 +00:00
|
|
|
've/ce/ve.ce.Annotation.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/ve.ce.Node.js',
|
|
|
|
've/ce/ve.ce.BranchNode.js',
|
2012-11-27 00:35:12 +00:00
|
|
|
've/ce/ve.ce.ContentBranchNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/ve.ce.LeafNode.js',
|
ve.ce.ProtectedNode
Objective:
Generalize the shield and phantom magic, so we can use it for pretty much
any node we like. Usually this will be used with generated content nodes,
but also with aliens (of course) and possible other stuff in the future.
Bonus:
Also fixes a bug in DM that would crash VE when you selected to the end
and hit backspace.
Changes:
*.php
* Added links to files
aliens.html
* Added attributes to aliens to make them aliens again
ve.ce.AlienNode.js
* Moved shield and phantom functionality to ve.ce.ProtectedNode
ve.ce.AlienNode.js, ve.ce.MWReferenceListNode.js,
ve.ce.MWReferenceNode.js, ve.ce.MWTemplateNode.js
* Mixed in ve.ce.ProtectedNode
ve.ce.Node.css
* Reorganized styles and updated class names
* Added simple light blue hover with outline (using inset box shadow) for
protected nodes, same style as before for aliens
ve.ce.Surface.css
* Moved phantom styles to ve.ce.Node.css
ve.ce.BranchNode.js
* Moved call to setLive(false) to happen before detach() so that the
surface object is still available and events can be disconnected
ve.ce.BranchNode.js, ve.ce.Document.js, ve.ce.js, ve.ce.Surface.js, ve.ce.SurfaceObserver.js
* Adjusted CSS class names
ve.ce.Node.js
* Moved shield template to ve.ce.ProtectedNode
ve.ce.ProtectedNode.js
* New class, mix into another class to protect it from editing
ve.ce.RelocatableNode.js
* Renamed temporary surface property to relocatingSurface to avoid
confusion when debugging
ve.ce.Surface.js
* Moved phantom template to ve.ce.ProtectedNode
ve.dm.Transaction.js
* Fixed bug where most of the internal list was being deleted when the
end of the document was selected and the user pressed backspace
Change-Id: I2468b16e1ba6785ad298e38190e33493135719c3
2013-05-07 00:07:01 +00:00
|
|
|
've/ce/ve.ce.ProtectedNode.js',
|
2013-04-18 20:54:37 +00:00
|
|
|
've/ce/ve.ce.FocusableNode.js',
|
2013-04-15 17:54:49 +00:00
|
|
|
've/ce/ve.ce.RelocatableNode.js',
|
2013-04-18 01:07:59 +00:00
|
|
|
've/ce/ve.ce.ResizableNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/ve.ce.Surface.js',
|
2012-10-11 19:45:21 +00:00
|
|
|
've/ce/ve.ce.SurfaceObserver.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2013-04-03 18:21:10 +00:00
|
|
|
've/ce/nodes/ve.ce.GeneratedContentNode.js',
|
2012-11-15 23:33:09 +00:00
|
|
|
've/ce/nodes/ve.ce.AlienNode.js',
|
2012-08-08 23:06:20 +00:00
|
|
|
've/ce/nodes/ve.ce.BreakNode.js',
|
2012-10-17 20:12:37 +00:00
|
|
|
've/ce/nodes/ve.ce.CenterNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/nodes/ve.ce.DefinitionListItemNode.js',
|
|
|
|
've/ce/nodes/ve.ce.DefinitionListNode.js',
|
2013-05-01 01:32:06 +00:00
|
|
|
've/ce/nodes/ve.ce.DivNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/nodes/ve.ce.DocumentNode.js',
|
|
|
|
've/ce/nodes/ve.ce.HeadingNode.js',
|
|
|
|
've/ce/nodes/ve.ce.ImageNode.js',
|
2013-04-17 17:53:26 +00:00
|
|
|
've/ce/nodes/ve.ce.InternalItemNode.js',
|
|
|
|
've/ce/nodes/ve.ce.InternalListNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/nodes/ve.ce.ListItemNode.js',
|
|
|
|
've/ce/nodes/ve.ce.ListNode.js',
|
|
|
|
've/ce/nodes/ve.ce.ParagraphNode.js',
|
|
|
|
've/ce/nodes/ve.ce.PreformattedNode.js',
|
2013-04-25 22:24:37 +00:00
|
|
|
've/ce/nodes/ve.ce.TableCaptionNode.js',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/nodes/ve.ce.TableCellNode.js',
|
|
|
|
've/ce/nodes/ve.ce.TableNode.js',
|
|
|
|
've/ce/nodes/ve.ce.TableRowNode.js',
|
|
|
|
've/ce/nodes/ve.ce.TableSectionNode.js',
|
|
|
|
've/ce/nodes/ve.ce.TextNode.js',
|
2013-04-03 18:21:10 +00:00
|
|
|
|
2013-07-16 14:06:47 +00:00
|
|
|
've-mw/ce/ve.ce.MWResizableNode.js',
|
|
|
|
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWEntityNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWHeadingNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWPreformattedNode.js',
|
2013-10-15 12:18:11 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWImageNode.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWInlineImageNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWBlockImageNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWImageCaptionNode.js',
|
2013-10-17 20:15:36 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWTransclusionNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWReferenceListNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWReferenceNode.js',
|
2013-10-21 22:30:49 +00:00
|
|
|
've-mw/ce/nodes/ve.ce.MWExtensionNode.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
Great Annotation Refactor of 2013
This changes the annotation API to be the same as the node API, sans
a few boolean flags that don't apply. The APIs were different, but
there was really no good reason why, so this makes things simpler for
API users. It also means we'll be able to factor a bunch of things out
because they're now duplicated between nodes, meta items and annotations.
Linear model annotations are now objects with 'type' and 'attributes'
properties (rather than 'name' and 'data'), for consistency with elements.
They now also contain html/0/* attributes for HTML attribute preservation,
which obsoletes the htmlTagName and htmlAttributes properties.
dm.Annotation subclasses take a reference to such an object and implement
conversion using .static.toDataElement and .static.toDomElements just
like nodes do. The custom .getHash() functions are no longer necessary
because of the way HTML attribute preservation was reimplemented.
CE rendering has been moved out of dm.Annotation (it never made sense to
have CE rendering functions in DM classes, this was bothering me) and into
separate ce.Annotation subclasses. These are very similar to CE nodes in
that they have a this.$ generated based on something in the DM; the main
difference is that nodes listen to events and update themselves, whereas
annotations are static and are simply destroyed and rebuilt when they
change. This change also adds whitelisted HTML attribute rendering for
annotations, as well as class="ve-ce-FooAnnotation" attributes.
Now that annotation classes produce real DOM nodes rather than weird
objects describing HTML tags, we can't generate HTML as a string in
ce.ContentBranchNode anymore. getRenderedContents() has been rewritten
to be much more similar to the way the converter renders annotations;
in fact, significant parts of it were copied from the converter, so that
should be factored out in the future. This change actually fixes an
annotation rendering discrepancy between ce.ContentBranchNode and
dm.Converter; see the diff of ve.ce.ContentBranchNode.test.js.
ve.ce.MWEntityNode.js:
* Remove stray property
ve.dm.MWExternalLinkAnnotation.js:
* Store 'rel' attribute
ve.dm.TextStyleAnnotation.js:
* Put all the conversion logic in the abstract base class
ve.dm.Converter.js:
* Also feed annotations through getDomElementsFromDataElement() and
createDataElement()
ve.dm.Node.js:
* Fix undocumented property
ve.ce.ContentBranchNode.test.js:
* Add descriptive messages for each test case
* Compare DOM trees, not HTML strings
* Compare without all the class="ve-ce-WhateverAnnotation" clutter
ve.ui.LinkInspector.js:
* Replace direct .getHash() calls (evil!) with ve.getHash()
Bug: 46464
Bug: 44808
Change-Id: I31991488579b8cce6d98ed8b29b486ba5ec38cdc
2013-04-02 17:23:33 +00:00
|
|
|
've/ce/annotations/ve.ce.LinkAnnotation.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ce/annotations/ve.ce.MWExternalLinkAnnotation.js',
|
|
|
|
've-mw/ce/annotations/ve.ce.MWInternalLinkAnnotation.js',
|
Great Annotation Refactor of 2013
This changes the annotation API to be the same as the node API, sans
a few boolean flags that don't apply. The APIs were different, but
there was really no good reason why, so this makes things simpler for
API users. It also means we'll be able to factor a bunch of things out
because they're now duplicated between nodes, meta items and annotations.
Linear model annotations are now objects with 'type' and 'attributes'
properties (rather than 'name' and 'data'), for consistency with elements.
They now also contain html/0/* attributes for HTML attribute preservation,
which obsoletes the htmlTagName and htmlAttributes properties.
dm.Annotation subclasses take a reference to such an object and implement
conversion using .static.toDataElement and .static.toDomElements just
like nodes do. The custom .getHash() functions are no longer necessary
because of the way HTML attribute preservation was reimplemented.
CE rendering has been moved out of dm.Annotation (it never made sense to
have CE rendering functions in DM classes, this was bothering me) and into
separate ce.Annotation subclasses. These are very similar to CE nodes in
that they have a this.$ generated based on something in the DM; the main
difference is that nodes listen to events and update themselves, whereas
annotations are static and are simply destroyed and rebuilt when they
change. This change also adds whitelisted HTML attribute rendering for
annotations, as well as class="ve-ce-FooAnnotation" attributes.
Now that annotation classes produce real DOM nodes rather than weird
objects describing HTML tags, we can't generate HTML as a string in
ce.ContentBranchNode anymore. getRenderedContents() has been rewritten
to be much more similar to the way the converter renders annotations;
in fact, significant parts of it were copied from the converter, so that
should be factored out in the future. This change actually fixes an
annotation rendering discrepancy between ce.ContentBranchNode and
dm.Converter; see the diff of ve.ce.ContentBranchNode.test.js.
ve.ce.MWEntityNode.js:
* Remove stray property
ve.dm.MWExternalLinkAnnotation.js:
* Store 'rel' attribute
ve.dm.TextStyleAnnotation.js:
* Put all the conversion logic in the abstract base class
ve.dm.Converter.js:
* Also feed annotations through getDomElementsFromDataElement() and
createDataElement()
ve.dm.Node.js:
* Fix undocumented property
ve.ce.ContentBranchNode.test.js:
* Add descriptive messages for each test case
* Compare DOM trees, not HTML strings
* Compare without all the class="ve-ce-WhateverAnnotation" clutter
ve.ui.LinkInspector.js:
* Replace direct .getHash() calls (evil!) with ve.getHash()
Bug: 46464
Bug: 44808
Change-Id: I31991488579b8cce6d98ed8b29b486ba5ec38cdc
2013-04-02 17:23:33 +00:00
|
|
|
've/ce/annotations/ve.ce.TextStyleAnnotation.js',
|
2013-07-27 00:12:27 +00:00
|
|
|
've-mw/ce/annotations/ve.ce.MWNowikiAnnotation.js',
|
Great Annotation Refactor of 2013
This changes the annotation API to be the same as the node API, sans
a few boolean flags that don't apply. The APIs were different, but
there was really no good reason why, so this makes things simpler for
API users. It also means we'll be able to factor a bunch of things out
because they're now duplicated between nodes, meta items and annotations.
Linear model annotations are now objects with 'type' and 'attributes'
properties (rather than 'name' and 'data'), for consistency with elements.
They now also contain html/0/* attributes for HTML attribute preservation,
which obsoletes the htmlTagName and htmlAttributes properties.
dm.Annotation subclasses take a reference to such an object and implement
conversion using .static.toDataElement and .static.toDomElements just
like nodes do. The custom .getHash() functions are no longer necessary
because of the way HTML attribute preservation was reimplemented.
CE rendering has been moved out of dm.Annotation (it never made sense to
have CE rendering functions in DM classes, this was bothering me) and into
separate ce.Annotation subclasses. These are very similar to CE nodes in
that they have a this.$ generated based on something in the DM; the main
difference is that nodes listen to events and update themselves, whereas
annotations are static and are simply destroyed and rebuilt when they
change. This change also adds whitelisted HTML attribute rendering for
annotations, as well as class="ve-ce-FooAnnotation" attributes.
Now that annotation classes produce real DOM nodes rather than weird
objects describing HTML tags, we can't generate HTML as a string in
ce.ContentBranchNode anymore. getRenderedContents() has been rewritten
to be much more similar to the way the converter renders annotations;
in fact, significant parts of it were copied from the converter, so that
should be factored out in the future. This change actually fixes an
annotation rendering discrepancy between ce.ContentBranchNode and
dm.Converter; see the diff of ve.ce.ContentBranchNode.test.js.
ve.ce.MWEntityNode.js:
* Remove stray property
ve.dm.MWExternalLinkAnnotation.js:
* Store 'rel' attribute
ve.dm.TextStyleAnnotation.js:
* Put all the conversion logic in the abstract base class
ve.dm.Converter.js:
* Also feed annotations through getDomElementsFromDataElement() and
createDataElement()
ve.dm.Node.js:
* Fix undocumented property
ve.ce.ContentBranchNode.test.js:
* Add descriptive messages for each test case
* Compare DOM trees, not HTML strings
* Compare without all the class="ve-ce-WhateverAnnotation" clutter
ve.ui.LinkInspector.js:
* Replace direct .getHash() calls (evil!) with ve.getHash()
Bug: 46464
Bug: 44808
Change-Id: I31991488579b8cce6d98ed8b29b486ba5ec38cdc
2013-04-02 17:23:33 +00:00
|
|
|
|
2012-02-06 23:50:56 +00:00
|
|
|
// ui
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ui/ve.ui.js',
|
2013-08-05 23:36:10 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
've/ui/ve.ui.Surface.js',
|
2012-10-24 22:20:41 +00:00
|
|
|
've/ui/ve.ui.Context.js',
|
2013-11-05 00:29:50 +00:00
|
|
|
've/ui/ve.ui.Dialog.js',
|
|
|
|
've/ui/ve.ui.Inspector.js',
|
|
|
|
've/ui/ve.ui.WindowSet.js',
|
|
|
|
've/ui/ve.ui.Toolbar.js',
|
2013-09-06 00:10:06 +00:00
|
|
|
've/ui/ve.ui.TargetToolbar.js',
|
2013-10-09 20:09:59 +00:00
|
|
|
've/ui/ve.ui.ToolFactory.js',
|
2013-10-23 23:27:12 +00:00
|
|
|
've/ui/ve.ui.Command.js',
|
2013-05-14 23:45:42 +00:00
|
|
|
've/ui/ve.ui.CommandRegistry.js',
|
|
|
|
've/ui/ve.ui.Trigger.js',
|
|
|
|
've/ui/ve.ui.TriggerRegistry.js',
|
|
|
|
've/ui/ve.ui.Action.js',
|
|
|
|
've/ui/ve.ui.ActionFactory.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ui/ve.ui.MWDialog.js',
|
2013-05-14 23:45:42 +00:00
|
|
|
|
|
|
|
've/ui/actions/ve.ui.AnnotationAction.js',
|
|
|
|
've/ui/actions/ve.ui.ContentAction.js',
|
2013-10-17 22:09:48 +00:00
|
|
|
've/ui/actions/ve.ui.DialogAction.js',
|
2013-05-14 23:45:42 +00:00
|
|
|
've/ui/actions/ve.ui.FormatAction.js',
|
|
|
|
've/ui/actions/ve.ui.HistoryAction.js',
|
|
|
|
've/ui/actions/ve.ui.IndentationAction.js',
|
|
|
|
've/ui/actions/ve.ui.InspectorAction.js',
|
|
|
|
've/ui/actions/ve.ui.ListAction.js',
|
2012-05-21 19:37:30 +00:00
|
|
|
|
2013-07-17 19:09:30 +00:00
|
|
|
've/ui/widgets/ve.ui.SurfaceWidget.js',
|
Major UI refactoring and improvements
Objective:
Refactor UI widgets, improve usability and accessibility of menus, general cleanup and style improvements.
Extras:
Fixed documentation in a few other files to make descriptions of jQuery event arguments more consistent, classes inherit correctly, and made use of the @cfg functionality in jsduck.
Changes:
.docs/config.json
* Added window, HTMLDocument, HTMLElement, DocumentFragment and XMLHttpRequest to externals, so jsduck doesn't throw warnings when they are used
demos/ve/index.php, modules/ve/test/index.php, VisualEditor.php
* Moved widgets above tools (since tools use widgets)
demos/ve/index.php
* Refactored widget initialization to use options
* Renamed variables to match widget names
ve.init.mw.ViewPageTarget.css
* Adjusted text sizes to make widgets work normally
* Added margins for buttons in toolbar (since button widgets
don't have any)
* Removed styles for init buttons (button widgets now)
ve.init.mw.ViewPageTarget.js
* Switched to using button widgets (involved moving things around
a bit)
ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js
* Renamed static property "inputWidget" to
"linkTargetInputWidget" to better reflect the required base class
for the properties value
icons.ai, check.png, check.svg
* Added "check" icon, used in menu right now to show which item
is selected
ve.ui.Icons-raster.css, ve.ui.Icons-vector.css
* Added check icon
* Removed :before pseudo selectors from most of the icon classes (not need by button tool anymore, makes them more reusable now)
ve.ui.Tool.css
* Adjusted drop down tool styles so menu appears below, instead
of on top, of the label
* Adjusted paragraph font size to better match actual content
* Updated class names to still work with menu widget changes
(items are their own widgets now)
* Updated selectors as per changes in the structure of button tools
ve.ui.Widget.css
* Added styles for buttons and menu items
* Adjusted menu styles
ve.ui.*ButtonTool.js
* Added config options argument passthrough
ve.ui.ButtonTool.js
* Moved var statement to the top inside constructor
* Switched to using "a" tag to get cross-browser :active support
* Added icon to inside of button to make icon styles more reusable
* Removed disabled support (now provided by widget parent class)
ve.ui.FormatDropDownTool.js
* Updated options initialization to construct menu item objects
* Modified handling of items to account for changes in menu and
item classes
* Optimized onUpdateState method a bit, adding early exit to
inner loop
ve.ui.ButtonTool.js, ve.ui.DropdownTool.js, ve.ui.Context.js,
ve.ui.Frame, ve.ui.Tool.js, ve.ui.Widget.js
* Added chain ability to non-getter methods
ve.ui.DropdownTool.js
* Removed items argument to constructor
* Updated code as per changes in menu class
* Fixed inconsistent naming of event handler methods
* Removed item event handling (now handled by items directly)
* Made use of this.$$ to ensure tool works in other frames
ve.ui.Tool.js
* Made tools inherit from widget
* Moved trigger registry event handler to a method
ve.ui.Context.js
* Switched from using menu to contain toolbar to a simple wrapper
ve.ui.js
* Added get$$ method, a convenience function for binding jQuery
to a specific document context
ve.ui.*Widget.js
* Switched to using a config options object instead of individual arguments
* Added options
* Factored out flags and labels into their own classes
* Refactored value setting methods for inputs
ve.ui.MenuWidget.js, ve.ui.MenuItemWidget.js
* Broke items out into their own classes
* Redesigned API
* Updated code that uses these classes
* Added support for keyboard interaction
* Made items flash when selected (delaying the hiding of the menu for 200ms)
ve.ui.LinkTargetInputWidget.js, ve.ui.MWLinkTargetInputWidget
* Refactored annotation setting methods
Change-Id: I7769bd5a5b79f1ab36f258ef9f2be583ca503ce6
2013-02-20 23:25:12 +00:00
|
|
|
've/ui/widgets/ve.ui.LinkTargetInputWidget.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWCategoryWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWMediaResultWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWParameterResultWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWReferenceResultWidget.js',
|
|
|
|
've-mw/ui/widgets/ve.ui.MWTitleInputWidget.js',
|
Major UI refactoring and improvements
Objective:
Refactor UI widgets, improve usability and accessibility of menus, general cleanup and style improvements.
Extras:
Fixed documentation in a few other files to make descriptions of jQuery event arguments more consistent, classes inherit correctly, and made use of the @cfg functionality in jsduck.
Changes:
.docs/config.json
* Added window, HTMLDocument, HTMLElement, DocumentFragment and XMLHttpRequest to externals, so jsduck doesn't throw warnings when they are used
demos/ve/index.php, modules/ve/test/index.php, VisualEditor.php
* Moved widgets above tools (since tools use widgets)
demos/ve/index.php
* Refactored widget initialization to use options
* Renamed variables to match widget names
ve.init.mw.ViewPageTarget.css
* Adjusted text sizes to make widgets work normally
* Added margins for buttons in toolbar (since button widgets
don't have any)
* Removed styles for init buttons (button widgets now)
ve.init.mw.ViewPageTarget.js
* Switched to using button widgets (involved moving things around
a bit)
ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js
* Renamed static property "inputWidget" to
"linkTargetInputWidget" to better reflect the required base class
for the properties value
icons.ai, check.png, check.svg
* Added "check" icon, used in menu right now to show which item
is selected
ve.ui.Icons-raster.css, ve.ui.Icons-vector.css
* Added check icon
* Removed :before pseudo selectors from most of the icon classes (not need by button tool anymore, makes them more reusable now)
ve.ui.Tool.css
* Adjusted drop down tool styles so menu appears below, instead
of on top, of the label
* Adjusted paragraph font size to better match actual content
* Updated class names to still work with menu widget changes
(items are their own widgets now)
* Updated selectors as per changes in the structure of button tools
ve.ui.Widget.css
* Added styles for buttons and menu items
* Adjusted menu styles
ve.ui.*ButtonTool.js
* Added config options argument passthrough
ve.ui.ButtonTool.js
* Moved var statement to the top inside constructor
* Switched to using "a" tag to get cross-browser :active support
* Added icon to inside of button to make icon styles more reusable
* Removed disabled support (now provided by widget parent class)
ve.ui.FormatDropDownTool.js
* Updated options initialization to construct menu item objects
* Modified handling of items to account for changes in menu and
item classes
* Optimized onUpdateState method a bit, adding early exit to
inner loop
ve.ui.ButtonTool.js, ve.ui.DropdownTool.js, ve.ui.Context.js,
ve.ui.Frame, ve.ui.Tool.js, ve.ui.Widget.js
* Added chain ability to non-getter methods
ve.ui.DropdownTool.js
* Removed items argument to constructor
* Updated code as per changes in menu class
* Fixed inconsistent naming of event handler methods
* Removed item event handling (now handled by items directly)
* Made use of this.$$ to ensure tool works in other frames
ve.ui.Tool.js
* Made tools inherit from widget
* Moved trigger registry event handler to a method
ve.ui.Context.js
* Switched from using menu to contain toolbar to a simple wrapper
ve.ui.js
* Added get$$ method, a convenience function for binding jQuery
to a specific document context
ve.ui.*Widget.js
* Switched to using a config options object instead of individual arguments
* Added options
* Factored out flags and labels into their own classes
* Refactored value setting methods for inputs
ve.ui.MenuWidget.js, ve.ui.MenuItemWidget.js
* Broke items out into their own classes
* Redesigned API
* Updated code that uses these classes
* Added support for keyboard interaction
* Made items flash when selected (delaying the hiding of the menu for 200ms)
ve.ui.LinkTargetInputWidget.js, ve.ui.MWLinkTargetInputWidget
* Refactored annotation setting methods
Change-Id: I7769bd5a5b79f1ab36f258ef9f2be583ca503ce6
2013-02-20 23:25:12 +00:00
|
|
|
|
2013-10-07 10:01:43 +00:00
|
|
|
've-mw/ui/dialogs/ve.ui.MWSaveDialog.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ui/dialogs/ve.ui.MWMetaDialog.js',
|
2013-08-01 20:18:33 +00:00
|
|
|
've-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js',
|
|
|
|
've-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js',
|
|
|
|
've-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js',
|
|
|
|
've-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js',
|
2013-07-17 19:09:30 +00:00
|
|
|
've-mw/ui/dialogs/ve.ui.MWReferenceDialog.js',
|
2013-02-20 19:44:44 +00:00
|
|
|
|
2013-08-27 23:28:29 +00:00
|
|
|
've/ui/tools/ve.ui.AnnotationTool.js',
|
|
|
|
've/ui/tools/ve.ui.ClearAnnotationTool.js',
|
|
|
|
've/ui/tools/ve.ui.DialogTool.js',
|
|
|
|
've/ui/tools/ve.ui.FormatTool.js',
|
|
|
|
've/ui/tools/ve.ui.HistoryTool.js',
|
|
|
|
've/ui/tools/ve.ui.IndentationTool.js',
|
|
|
|
've/ui/tools/ve.ui.InspectorTool.js',
|
|
|
|
've/ui/tools/ve.ui.ListTool.js',
|
|
|
|
|
2013-09-06 00:10:06 +00:00
|
|
|
've-mw/ui/tools/ve.ui.MWEditModeTool.js',
|
2013-08-27 23:28:29 +00:00
|
|
|
've-mw/ui/tools/ve.ui.MWFormatTool.js',
|
|
|
|
've-mw/ui/tools/ve.ui.MWDialogTool.js',
|
2013-10-17 17:35:16 +00:00
|
|
|
've-mw/ui/tools/ve.ui.MWPopupTool.js',
|
(bug 43841) Major ve.ui rewrite, especially ve.ui.LinkInspector
Objectives:
* Make the link inspector easier to use
* Try to resolve a few bugs (bug 43841, bug 43063, bug 42986)
* Stop using jquery.multiSuggest (which didn't really understand annotations)
* Better divide MediaWiki specifics from generic implementations
Changes:
VisualEditor.php, modules/ve/test/index.php, demos/ve/index.php
* Updated links to files
ve.Registry
* Fixed mistake where registry was initialized as an array - this didn't cause any errors because you can add arbitrary properties to an array and use it like any other object
ve.Factory
* Removed duplicate initialization of registry property
* Added entries property, which is an array that's appended to for tracking the order of registrations
ve.CommandRegistry
* Added mwLink command which opens the mwLink inspector
ve.ui.TextInputWidget
* Added basic widget class for text inputs
ve.ui.TextInputMenuWidget
* Added widget that provides a menu of options for a text input widget
ve.ui.MWLinkTargetInputWidget
* Added MediaWiki specific link target widget
ve.ui.MenuWidget
* Converted ve.ui.Menu into a widget
* Moved the body of onSelect to onMouseUp
ve.ui.LinkTargetInputWidget
* Added link target widget which adds link annotation functionality to a normal text input
ve.ui.InputWidget
* Added generic input widget which emits reliable and instant change events and synchronizes a value property with the DOM value
ve.ui.Widget
* Added base widget class
* Widgets can be used in any frame
ve.ui.Tool
* Fixed line length issues
ve.ui.InspectorFactory
* Made use of new entries property for factories to select the most recently added inspector if more than one match a given annotation
ve.ui.Inspector
* Added auto-focus on the first visible input element on open
* Moved afterClose event to after re-focus on document on close
* Added documentation
ve.ui.Frame
* Adjusted documentation
* Added binding of $$ to the frame context so it can be passed around
* Added documentation
ve.ui.Context
* Added ve.ui.Widget.css to iframes
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
* Removed unused positionBelowOverlay method
* Added CSS settings to set overlay left and width properties according to context size
* Added documentation
ve.ui.DropdownTool
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.FormatDropdownTool
* Added documentation
ve.ui.MWLinkButtonTool
* Added MediaWiki specific version of ve.ui.LinkButtonTool, which opens the mwLink inspector
ve.ui.Widget.css
* Added styles for all widgets
ve.ui.Tool.css, ve.init.sa.css, ve.init.mw.ViewPageTarget.css, ve.init.mw.ViewPageTarget-apex.css
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.Menu.css
* Deleted (merged into ve.ui.Widget.css)
ve.ui.Menu.css
* Deleted suggest styles (no longer used)
pending.gif, pending.psd
* Added diagonal stripe animation to indicate a pending request to the API
ve.ui.MWLinkInspector
* Added MediaWiki specific inspector which uses MediaWiki specific annotations and widgets
ve.ui.LinkInspector
* Removed mw global hint (not needed anymore)
* Switched from comparing targets to annotations (since the target text is ambiguous in some situations)
* Switched to using input widget, which is configured using a static property
* Removed use of jquery.multiSuggest
* Moved MediaWiki specifics to their own class (ve.ui.MWLinkInspector)
ve.init.mw.ViewPageTarget
* Added MediaWiki specific toolbar and command options
Change-Id: I859b5871a9d2f17d970c002067c8ff24f3513e9f
2013-01-09 21:34:23 +00:00
|
|
|
|
2013-07-03 20:25:06 +00:00
|
|
|
've/ui/inspectors/ve.ui.AnnotationInspector.js',
|
(bug 43841) Major ve.ui rewrite, especially ve.ui.LinkInspector
Objectives:
* Make the link inspector easier to use
* Try to resolve a few bugs (bug 43841, bug 43063, bug 42986)
* Stop using jquery.multiSuggest (which didn't really understand annotations)
* Better divide MediaWiki specifics from generic implementations
Changes:
VisualEditor.php, modules/ve/test/index.php, demos/ve/index.php
* Updated links to files
ve.Registry
* Fixed mistake where registry was initialized as an array - this didn't cause any errors because you can add arbitrary properties to an array and use it like any other object
ve.Factory
* Removed duplicate initialization of registry property
* Added entries property, which is an array that's appended to for tracking the order of registrations
ve.CommandRegistry
* Added mwLink command which opens the mwLink inspector
ve.ui.TextInputWidget
* Added basic widget class for text inputs
ve.ui.TextInputMenuWidget
* Added widget that provides a menu of options for a text input widget
ve.ui.MWLinkTargetInputWidget
* Added MediaWiki specific link target widget
ve.ui.MenuWidget
* Converted ve.ui.Menu into a widget
* Moved the body of onSelect to onMouseUp
ve.ui.LinkTargetInputWidget
* Added link target widget which adds link annotation functionality to a normal text input
ve.ui.InputWidget
* Added generic input widget which emits reliable and instant change events and synchronizes a value property with the DOM value
ve.ui.Widget
* Added base widget class
* Widgets can be used in any frame
ve.ui.Tool
* Fixed line length issues
ve.ui.InspectorFactory
* Made use of new entries property for factories to select the most recently added inspector if more than one match a given annotation
ve.ui.Inspector
* Added auto-focus on the first visible input element on open
* Moved afterClose event to after re-focus on document on close
* Added documentation
ve.ui.Frame
* Adjusted documentation
* Added binding of $$ to the frame context so it can be passed around
* Added documentation
ve.ui.Context
* Added ve.ui.Widget.css to iframes
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
* Removed unused positionBelowOverlay method
* Added CSS settings to set overlay left and width properties according to context size
* Added documentation
ve.ui.DropdownTool
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.FormatDropdownTool
* Added documentation
ve.ui.MWLinkButtonTool
* Added MediaWiki specific version of ve.ui.LinkButtonTool, which opens the mwLink inspector
ve.ui.Widget.css
* Added styles for all widgets
ve.ui.Tool.css, ve.init.sa.css, ve.init.mw.ViewPageTarget.css, ve.init.mw.ViewPageTarget-apex.css
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.Menu.css
* Deleted (merged into ve.ui.Widget.css)
ve.ui.Menu.css
* Deleted suggest styles (no longer used)
pending.gif, pending.psd
* Added diagonal stripe animation to indicate a pending request to the API
ve.ui.MWLinkInspector
* Added MediaWiki specific inspector which uses MediaWiki specific annotations and widgets
ve.ui.LinkInspector
* Removed mw global hint (not needed anymore)
* Switched from comparing targets to annotations (since the target text is ambiguous in some situations)
* Switched to using input widget, which is configured using a static property
* Removed use of jquery.multiSuggest
* Moved MediaWiki specifics to their own class (ve.ui.MWLinkInspector)
ve.init.mw.ViewPageTarget
* Added MediaWiki specific toolbar and command options
Change-Id: I859b5871a9d2f17d970c002067c8ff24f3513e9f
2013-01-09 21:34:23 +00:00
|
|
|
've/ui/inspectors/ve.ui.LinkInspector.js',
|
2013-07-03 01:30:10 +00:00
|
|
|
've-mw/ui/inspectors/ve.ui.MWLinkInspector.js',
|
2013-10-21 22:30:49 +00:00
|
|
|
've-mw/ui/inspectors/ve.ui.MWExtensionInspector.js',
|
2011-11-28 20:28:28 +00:00
|
|
|
),
|
2011-11-30 20:45:24 +00:00
|
|
|
'styles' => array(
|
2012-05-24 22:15:11 +00:00
|
|
|
// ce
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/styles/ve.ce.Node.css',
|
2013-07-04 02:02:35 +00:00
|
|
|
've-mw/ce/styles/ve.ce.Node.css',
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ce/styles/ve.ce.Surface.css',
|
2012-02-06 23:50:56 +00:00
|
|
|
// ui
|
2012-06-20 17:57:23 +00:00
|
|
|
've/ui/styles/ve.ui.Context.css',
|
2013-11-05 00:29:50 +00:00
|
|
|
've/ui/styles/ve.ui.Inspector.css',
|
2013-10-09 20:09:59 +00:00
|
|
|
've/ui/styles/ve.ui.Surface.css',
|
2012-10-24 21:49:08 +00:00
|
|
|
've/ui/styles/ve.ui.Tool.css',
|
2013-11-05 00:29:50 +00:00
|
|
|
've/ui/styles/ve.ui.Toolbar.css',
|
(bug 43841) Major ve.ui rewrite, especially ve.ui.LinkInspector
Objectives:
* Make the link inspector easier to use
* Try to resolve a few bugs (bug 43841, bug 43063, bug 42986)
* Stop using jquery.multiSuggest (which didn't really understand annotations)
* Better divide MediaWiki specifics from generic implementations
Changes:
VisualEditor.php, modules/ve/test/index.php, demos/ve/index.php
* Updated links to files
ve.Registry
* Fixed mistake where registry was initialized as an array - this didn't cause any errors because you can add arbitrary properties to an array and use it like any other object
ve.Factory
* Removed duplicate initialization of registry property
* Added entries property, which is an array that's appended to for tracking the order of registrations
ve.CommandRegistry
* Added mwLink command which opens the mwLink inspector
ve.ui.TextInputWidget
* Added basic widget class for text inputs
ve.ui.TextInputMenuWidget
* Added widget that provides a menu of options for a text input widget
ve.ui.MWLinkTargetInputWidget
* Added MediaWiki specific link target widget
ve.ui.MenuWidget
* Converted ve.ui.Menu into a widget
* Moved the body of onSelect to onMouseUp
ve.ui.LinkTargetInputWidget
* Added link target widget which adds link annotation functionality to a normal text input
ve.ui.InputWidget
* Added generic input widget which emits reliable and instant change events and synchronizes a value property with the DOM value
ve.ui.Widget
* Added base widget class
* Widgets can be used in any frame
ve.ui.Tool
* Fixed line length issues
ve.ui.InspectorFactory
* Made use of new entries property for factories to select the most recently added inspector if more than one match a given annotation
ve.ui.Inspector
* Added auto-focus on the first visible input element on open
* Moved afterClose event to after re-focus on document on close
* Added documentation
ve.ui.Frame
* Adjusted documentation
* Added binding of $$ to the frame context so it can be passed around
* Added documentation
ve.ui.Context
* Added ve.ui.Widget.css to iframes
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
* Removed unused positionBelowOverlay method
* Added CSS settings to set overlay left and width properties according to context size
* Added documentation
ve.ui.DropdownTool
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.FormatDropdownTool
* Added documentation
ve.ui.MWLinkButtonTool
* Added MediaWiki specific version of ve.ui.LinkButtonTool, which opens the mwLink inspector
ve.ui.Widget.css
* Added styles for all widgets
ve.ui.Tool.css, ve.init.sa.css, ve.init.mw.ViewPageTarget.css, ve.init.mw.ViewPageTarget-apex.css
* Updated code as per moving of ve.ui.Menu to ve.ui.MenuWidget
ve.ui.Menu.css
* Deleted (merged into ve.ui.Widget.css)
ve.ui.Menu.css
* Deleted suggest styles (no longer used)
pending.gif, pending.psd
* Added diagonal stripe animation to indicate a pending request to the API
ve.ui.MWLinkInspector
* Added MediaWiki specific inspector which uses MediaWiki specific annotations and widgets
ve.ui.LinkInspector
* Removed mw global hint (not needed anymore)
* Switched from comparing targets to annotations (since the target text is ambiguous in some situations)
* Switched to using input widget, which is configured using a static property
* Removed use of jquery.multiSuggest
* Moved MediaWiki specifics to their own class (ve.ui.MWLinkInspector)
ve.init.mw.ViewPageTarget
* Added MediaWiki specific toolbar and command options
Change-Id: I859b5871a9d2f17d970c002067c8ff24f3513e9f
2013-01-09 21:34:23 +00:00
|
|
|
've/ui/styles/ve.ui.Widget.css',
|
2013-10-02 00:00:57 +00:00
|
|
|
've-mw/ui/styles/ve.ui.MWWidget.css',
|
2013-07-19 22:30:29 +00:00
|
|
|
've-mw/ui/styles/ve.ui.MWInspector.css',
|
Transplant CSS from the main document to each iframe
We previously manually loaded CSS into these frames, which is flawed
because it completely bypasses ResourceLoader (so CSSJanus didn't flip
them, necessitating a bunch of hacks for RTL), and doesn't pull in
MediaWiki styles (so templates inside references don't render correctly).
Instead, this commit copies all styles from the main document into each
frame's document, inlining what it can.
Loading all styles in dialogs and inspectors caused some problems,
initially. We didn't namespace our styles for dialogs vs. inspectors
at all; the only reason inspector styles weren't being applied to dialogs
and vice versa was because we controlled which files were being loaded
in which context. This commit namespaces the inspector and dialog styles
where needed so they don't conflict and try to override each other.
Tested in Vector and Monobook, but not in Apex and not in RTL.
ve.init.mw.ViewPageTarget*.css:
* Namespace styles that are only intended for the main document
* Undo Monobook's font-size: x-small; in frames
*Dialog.js:
* Remove addLocalStylesheet() calls, we don't need those any more
** ve.ui.MWDialog seems to be unneeded now, we may want to remove it
*.css:
* Remove @noflip-ped RTL rules where they were just flipped versions of
their LTR counterparts
ve.ui.Dialog.css, ve.ui.Inspector.css:
* Namespace styles with .ve-ui-dialog-content / .ve-ui-inspector-content
ve.ui.Frame.css:
* Move the margin:0 and padding:0 here (were in the frame <body>'s style
attribute) and add background:none to prevent frames from getting
the skin's background (grey in Vector, a book in Monobook)
ve.ui.Dialog.js, ve.ui.Inspector.js:
* Add ve-ui-dialog-content / ve-ui-inspector-content class to the
frame's content <div> so we can restrict styles to only apply in
dialogs / inspectors
ve.ui.Frame.js:
* Replace infrastructure for @import-ing stylesheets with transplantation
* Remove code polling to see when the stylesheets were loaded
** We can't do this in the new approach AFAIK, since all styles in the
frame are either inlined or inaccessible due to the same-origin policy
** We also shouldn't need it because the browser should have cached the
styles when it loaded the main document
* Apply ve-ui-frame-body class to the frame's <body> so we can style it
** Move inline padding:0;margin:0; into ve.ui.Frame.css
** Move the ve-ltr/ve-rtl class up to the <body>
ve.ui.Window.js:
* Remove infrastructure registering stylesheet URLs to load
Change-Id: I4a37115301811ad860f4578344a04873ea8c2b69
2013-07-03 21:47:52 +00:00
|
|
|
've-mw/ui/styles/ve.ui.MWDialog.css',
|
2011-11-30 20:45:24 +00:00
|
|
|
),
|
2011-11-28 20:28:28 +00:00
|
|
|
'dependencies' => array(
|
|
|
|
'jquery',
|
2012-03-29 21:05:25 +00:00
|
|
|
'rangy',
|
2013-03-18 11:31:14 +00:00
|
|
|
'unicodejs.wordbreak',
|
2012-06-25 23:25:09 +00:00
|
|
|
'ext.visualEditor.base',
|
|
|
|
'mediawiki.Title',
|
2013-10-07 10:01:43 +00:00
|
|
|
'mediawiki.action.history.diff',
|
2013-11-20 07:10:27 +00:00
|
|
|
'mediawiki.user',
|
2012-11-06 18:56:03 +00:00
|
|
|
'jquery.autoEllipsis',
|
2011-11-28 20:28:28 +00:00
|
|
|
),
|
2012-02-07 16:37:08 +00:00
|
|
|
'messages' => array(
|
2013-06-12 19:10:22 +00:00
|
|
|
// VE messages for the editor (NOT experimental mode messages)
|
2012-02-07 16:37:08 +00:00
|
|
|
'visualeditor',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-aliennode-tooltip',
|
2012-06-19 08:30:30 +00:00
|
|
|
'visualeditor-annotationbutton-bold-tooltip',
|
2013-07-26 11:03:13 +00:00
|
|
|
'visualeditor-annotationbutton-code-tooltip',
|
2012-06-19 08:30:30 +00:00
|
|
|
'visualeditor-annotationbutton-italic-tooltip',
|
|
|
|
'visualeditor-annotationbutton-link-tooltip',
|
2013-09-12 02:41:14 +00:00
|
|
|
'visualeditor-annotationbutton-strikethrough-tooltip',
|
|
|
|
'visualeditor-annotationbutton-subscript-tooltip',
|
|
|
|
'visualeditor-annotationbutton-superscript-tooltip',
|
|
|
|
'visualeditor-annotationbutton-underline-tooltip',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-beta-label',
|
|
|
|
'visualeditor-beta-warning',
|
|
|
|
'visualeditor-browserwarning',
|
2013-10-17 22:09:48 +00:00
|
|
|
'visualeditor-categories-tool',
|
2012-06-19 08:30:30 +00:00
|
|
|
'visualeditor-clearbutton-tooltip',
|
Context, frame, window, dialog and inspector refactor
This is a major refactor of user interface context, frame, dialog
and inspector classes, including adding several new classes which
generalize managing inspectors/dialogs (which are now subclasses
of window).
New classes:
* ve.ui.Window.js - base class for inspector and dialog classes
* ve.ui.WindowSet.js - manages mutually exclusive windows, used
by surface and context for dialogs and inspectors respectively
* ve.ui.DialogFactory - generates dialogs
* ve.ui.IconButtonWidget - used in inspector for buttons in the head
Refactored classes:
* ve.ui.Context - moved inspector management to window set
* ve.ui.Frame - made iframes initialize asynchronously
* ve.ui.Dialog and ve.ui.Inspector - moved initialization to async
initialize method
Other interesting bits:
ve.ui.*Icons*.css, *.svg, *.png, *.ai
* Merged icon stylesheets so all icons are available inside windows
* Renamed inspector icon to window
ve.ui.*.css
* Reorganized styles so that different windows can include only
what they need
* Moved things to where they belonged (some things were in strange places)
ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js
* Removed dialog management - dialogs are managed by the surface now
ve.ui.*Dialog.js
* Renamed title message static property
* Added registration
ve.ui.*Inspector.js
* Switch to accept surface object rather than context, which conforms
to the more general window class without losing any functionality
(in fact, most of the time the surface was what we actually wanted)
ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js
* Using surface overly rather than passing an overlay around
through constructors
Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
|
|
|
'visualeditor-dialog-action-apply',
|
|
|
|
'visualeditor-dialog-action-cancel',
|
2013-07-17 19:09:30 +00:00
|
|
|
'visualeditor-dialog-action-goback',
|
2013-09-05 22:33:17 +00:00
|
|
|
'visualeditor-dialog-beta-welcome-action-continue',
|
|
|
|
'visualeditor-dialog-beta-welcome-content',
|
|
|
|
'visualeditor-dialog-beta-welcome-title',
|
2013-06-19 15:56:00 +00:00
|
|
|
'visualeditor-dialog-media-content-section',
|
2013-06-12 19:39:35 +00:00
|
|
|
'visualeditor-dialog-media-insert-button',
|
|
|
|
'visualeditor-dialog-media-insert-title',
|
|
|
|
'visualeditor-dialog-media-title',
|
2013-06-12 23:43:23 +00:00
|
|
|
'visualeditor-dialog-meta-categories-category',
|
2013-06-18 21:55:06 +00:00
|
|
|
'visualeditor-dialog-meta-categories-data-label',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-dialog-meta-categories-defaultsort-label',
|
2013-05-25 10:01:32 +00:00
|
|
|
'visualeditor-dialog-meta-categories-input-matchingcategorieslabel',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-dialog-meta-categories-input-movecategorylabel',
|
|
|
|
'visualeditor-dialog-meta-categories-input-newcategorylabel',
|
|
|
|
'visualeditor-dialog-meta-categories-input-placeholder',
|
|
|
|
'visualeditor-dialog-meta-categories-options',
|
|
|
|
'visualeditor-dialog-meta-categories-section',
|
2013-05-25 10:01:32 +00:00
|
|
|
'visualeditor-dialog-meta-categories-sortkey-label',
|
2013-05-25 12:08:43 +00:00
|
|
|
'visualeditor-dialog-meta-languages-code-label',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-dialog-meta-languages-label',
|
2013-05-25 12:08:43 +00:00
|
|
|
'visualeditor-dialog-meta-languages-link-label',
|
|
|
|
'visualeditor-dialog-meta-languages-readonlynote',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-dialog-meta-languages-section',
|
|
|
|
'visualeditor-dialog-meta-title',
|
2013-06-27 23:17:59 +00:00
|
|
|
'visualeditor-dialog-reference-insert-button',
|
|
|
|
'visualeditor-dialog-reference-insert-title',
|
2013-06-23 03:29:55 +00:00
|
|
|
'visualeditor-dialog-reference-options-group-label',
|
|
|
|
'visualeditor-dialog-reference-options-name-label',
|
|
|
|
'visualeditor-dialog-reference-options-section',
|
|
|
|
'visualeditor-dialog-reference-title',
|
2013-07-17 19:09:30 +00:00
|
|
|
'visualeditor-dialog-reference-useexisting-label',
|
2013-06-23 03:29:55 +00:00
|
|
|
'visualeditor-dialog-referencelist-title',
|
2013-06-18 21:55:06 +00:00
|
|
|
'visualeditor-dialog-transclusion-add-content',
|
|
|
|
'visualeditor-dialog-transclusion-add-param',
|
|
|
|
'visualeditor-dialog-transclusion-add-template',
|
|
|
|
'visualeditor-dialog-transclusion-content',
|
|
|
|
'visualeditor-dialog-transclusion-options',
|
|
|
|
'visualeditor-dialog-transclusion-placeholder',
|
|
|
|
'visualeditor-dialog-transclusion-remove-content',
|
|
|
|
'visualeditor-dialog-transclusion-remove-param',
|
|
|
|
'visualeditor-dialog-transclusion-remove-template',
|
|
|
|
'visualeditor-dialog-transclusion-title',
|
|
|
|
'visualeditor-dialog-transclusion-wikitext-label',
|
2013-06-12 19:39:35 +00:00
|
|
|
'visualeditor-dialogbutton-media-tooltip',
|
2013-06-06 23:20:58 +00:00
|
|
|
'visualeditor-dialogbutton-meta-tooltip',
|
2013-06-23 03:29:55 +00:00
|
|
|
'visualeditor-dialogbutton-reference-tooltip',
|
|
|
|
'visualeditor-dialogbutton-referencelist-tooltip',
|
2013-06-18 21:55:06 +00:00
|
|
|
'visualeditor-dialogbutton-transclusion-tooltip',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-diff-nochanges',
|
|
|
|
'visualeditor-differror',
|
|
|
|
'visualeditor-editconflict',
|
|
|
|
'visualeditor-editnotices-tool',
|
|
|
|
'visualeditor-editsummary',
|
|
|
|
'visualeditor-feedback-tool',
|
2013-06-20 21:56:54 +00:00
|
|
|
'visualeditor-formatdropdown-format-mw-heading1',
|
|
|
|
'visualeditor-formatdropdown-format-mw-heading2',
|
|
|
|
'visualeditor-formatdropdown-format-mw-heading3',
|
|
|
|
'visualeditor-formatdropdown-format-mw-heading4',
|
|
|
|
'visualeditor-formatdropdown-format-mw-heading5',
|
|
|
|
'visualeditor-formatdropdown-format-mw-heading6',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-formatdropdown-format-paragraph',
|
|
|
|
'visualeditor-formatdropdown-format-preformatted',
|
|
|
|
'visualeditor-formatdropdown-title',
|
2013-07-01 17:28:40 +00:00
|
|
|
'visualeditor-help-label',
|
2013-09-05 22:33:17 +00:00
|
|
|
'visualeditor-help-link',
|
2013-07-01 17:28:40 +00:00
|
|
|
'visualeditor-help-title',
|
2013-10-02 00:00:57 +00:00
|
|
|
'visualeditor-help-tool',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-historybutton-redo-tooltip',
|
|
|
|
'visualeditor-historybutton-undo-tooltip',
|
|
|
|
'visualeditor-indentationbutton-indent-tooltip',
|
|
|
|
'visualeditor-indentationbutton-outdent-tooltip',
|
2013-11-05 00:29:50 +00:00
|
|
|
'visualeditor-inspector-close-tooltip',
|
|
|
|
'visualeditor-inspector-remove-tooltip',
|
2013-10-17 22:09:48 +00:00
|
|
|
'visualeditor-languages-tool',
|
2013-08-01 11:53:11 +00:00
|
|
|
'visualeditor-linkinspector-illegal-title',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-linkinspector-suggest-external-link',
|
|
|
|
'visualeditor-linkinspector-suggest-matching-page',
|
|
|
|
'visualeditor-linkinspector-suggest-new-page',
|
|
|
|
'visualeditor-linkinspector-title',
|
|
|
|
'visualeditor-listbutton-bullet-tooltip',
|
|
|
|
'visualeditor-listbutton-number-tooltip',
|
2013-06-12 19:39:35 +00:00
|
|
|
'visualeditor-media-input-placeholder',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-meta-tool',
|
2013-09-06 00:10:06 +00:00
|
|
|
'visualeditor-mweditmodesource-title',
|
|
|
|
'visualeditor-mweditmodesource-warning',
|
2013-07-02 20:40:54 +00:00
|
|
|
'visualeditor-parameter-input-placeholder',
|
|
|
|
'visualeditor-parameter-search-no-unused',
|
|
|
|
'visualeditor-parameter-search-unknown',
|
2013-06-27 23:17:59 +00:00
|
|
|
'visualeditor-reference-input-placeholder',
|
2013-06-30 18:40:57 +00:00
|
|
|
'visualeditor-referencelist-isempty',
|
2013-09-30 12:09:20 +00:00
|
|
|
'visualeditor-referencelist-isempty-default',
|
2013-06-30 18:40:57 +00:00
|
|
|
'visualeditor-referencelist-missingref',
|
2013-07-11 18:10:59 +00:00
|
|
|
'visualeditor-savedialog-error-badtoken',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-savedialog-label-create',
|
2013-06-30 18:40:57 +00:00
|
|
|
'visualeditor-savedialog-label-error',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-savedialog-label-report',
|
|
|
|
'visualeditor-savedialog-label-resolve-conflict',
|
|
|
|
'visualeditor-savedialog-label-restore',
|
|
|
|
'visualeditor-savedialog-label-review',
|
|
|
|
'visualeditor-savedialog-label-review-good',
|
|
|
|
'visualeditor-savedialog-label-save',
|
2013-06-30 18:40:57 +00:00
|
|
|
'visualeditor-savedialog-label-warning',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-savedialog-title-conflict',
|
|
|
|
'visualeditor-savedialog-title-nochanges',
|
|
|
|
'visualeditor-savedialog-title-review',
|
|
|
|
'visualeditor-savedialog-title-save',
|
2013-06-30 18:40:57 +00:00
|
|
|
'visualeditor-savedialog-warning-dirty',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-saveerror',
|
|
|
|
'visualeditor-serializeerror',
|
|
|
|
'visualeditor-toolbar-cancel',
|
|
|
|
'visualeditor-toolbar-savedialog',
|
2013-08-29 22:53:33 +00:00
|
|
|
'visualeditor-version-label',
|
2013-09-05 22:33:17 +00:00
|
|
|
'visualeditor-viewpage-savewarning',
|
2013-07-13 11:44:25 +00:00
|
|
|
'visualeditor-wikitext-warning-title',
|
2013-06-12 19:10:22 +00:00
|
|
|
'visualeditor-window-title',
|
2013-06-29 01:52:29 +00:00
|
|
|
|
|
|
|
// Only used if FancyCaptcha is installed and triggered on save
|
|
|
|
'captcha-label',
|
|
|
|
'fancycaptcha-edit',
|
|
|
|
'colon-separator',
|
2012-02-07 16:37:08 +00:00
|
|
|
),
|
2012-08-30 20:04:22 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-10-21 22:30:49 +00:00
|
|
|
'ext.visualEditor.language' => $wgVisualEditorResourceTemplate + array(
|
2013-04-16 17:31:17 +00:00
|
|
|
'scripts' => array(
|
2013-07-10 14:49:46 +00:00
|
|
|
've/dm/annotations/ve.dm.LanguageAnnotation.js',
|
|
|
|
've/ce/annotations/ve.ce.LanguageAnnotation.js',
|
2013-07-08 21:20:31 +00:00
|
|
|
've/ui/inspectors/ve.ui.LanguageInspector.js',
|
2013-10-21 22:30:49 +00:00
|
|
|
've/ui/tools/ve.ui.LanguageInspectorTool.js',
|
2013-07-08 21:20:31 +00:00
|
|
|
've/ui/widgets/ve.ui.LanguageInputWidget.js',
|
2013-04-16 17:31:17 +00:00
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.core',
|
2013-07-08 21:20:31 +00:00
|
|
|
'jquery.uls',
|
2013-05-07 23:00:23 +00:00
|
|
|
),
|
|
|
|
'messages' => array(
|
2013-08-29 00:25:52 +00:00
|
|
|
'visualeditor-languageinspector-title',
|
|
|
|
'visualeditor-languageinspector-block-tooltip',
|
|
|
|
'visualeditor-languageinspector-block-tooltip-rtldirection',
|
|
|
|
'visualeditor-languageinspector-widget-changelang',
|
|
|
|
'visualeditor-languageinspector-widget-label-language',
|
|
|
|
'visualeditor-languageinspector-widget-label-langcode',
|
|
|
|
'visualeditor-languageinspector-widget-label-direction',
|
|
|
|
'visualeditor-languageinspector-block-tooltip',
|
|
|
|
'visualeditor-languageinspector-block-tooltip-rtldirection',
|
2013-07-08 21:20:31 +00:00
|
|
|
'visualeditor-annotationbutton-language-tooltip',
|
2013-10-21 22:30:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
'ext.visualEditor.mwalienextension' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
've-mw/dm/nodes/ve.dm.MWAlienExtensionNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWAlienExtensionNode.js',
|
|
|
|
've-mw/ui/inspectors/ve.ui.MWAlienExtensionInspector.js',
|
|
|
|
've-mw/ui/tools/ve.ui.MWAlienExtensionInspectorTool.js',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.core',
|
|
|
|
),
|
|
|
|
'messages' => array(
|
2013-08-29 00:25:52 +00:00
|
|
|
'visualeditor-mwalienextensioninspector-title',
|
2013-05-07 23:00:23 +00:00
|
|
|
),
|
2013-04-16 17:31:17 +00:00
|
|
|
),
|
2013-07-26 20:08:32 +00:00
|
|
|
|
2013-10-21 22:30:49 +00:00
|
|
|
'ext.visualEditor.mwmath' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
've-mw/dm/nodes/ve.dm.MWMathNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWMathNode.js',
|
|
|
|
've-mw/ui/inspectors/ve.ui.MWMathInspector.js',
|
|
|
|
've-mw/ui/tools/ve.ui.MWMathInspectorTool.js',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.core',
|
|
|
|
),
|
|
|
|
'messages' => array(
|
|
|
|
'visualeditor-mwmathinspector-title',
|
2012-08-30 20:04:22 +00:00
|
|
|
),
|
|
|
|
),
|
2013-10-21 22:30:49 +00:00
|
|
|
|
|
|
|
'ext.visualEditor.mwhiero' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'scripts' => array(
|
|
|
|
've-mw/dm/nodes/ve.dm.MWHieroNode.js',
|
|
|
|
've-mw/ce/nodes/ve.ce.MWHieroNode.js',
|
|
|
|
've-mw/ui/inspectors/ve.ui.MWHieroInspector.js',
|
|
|
|
've-mw/ui/tools/ve.ui.MWHieroInspectorTool.js',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.core',
|
|
|
|
),
|
|
|
|
'messages' => array(
|
|
|
|
'visualeditor-mwhieroinspector-title',
|
2012-08-30 20:04:22 +00:00
|
|
|
),
|
|
|
|
),
|
2013-10-21 22:30:49 +00:00
|
|
|
|
|
|
|
'ext.visualEditor.mwsyntaxHighlight' => $wgVisualEditorResourceTemplate + array(
|
2013-07-03 21:56:29 +00:00
|
|
|
'scripts' => array(
|
|
|
|
'syntaxhighlight/ve.dm.MWSyntaxHighlightNode.js',
|
|
|
|
'syntaxhighlight/ve.ce.MWSyntaxHighlightNode.js',
|
|
|
|
'syntaxhighlight/ve.ui.MWSyntaxHighlightTool.js',
|
|
|
|
'syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.js',
|
|
|
|
'syntaxhighlight/ve.ui.MWSyntaxHighlightSimpleSurface.js',
|
|
|
|
'syntaxhighlight/helpers/ve.ce.MWSyntaxHighlightHighlighter.js',
|
|
|
|
'syntaxhighlight/helpers/ve.dm.MWSyntaxHighlightTokenizer.js',
|
|
|
|
'syntaxhighlight/helpers/ve.ce.MWSyntaxHighlightValidator.js',
|
|
|
|
),
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.core',
|
|
|
|
),
|
|
|
|
'messages' => array(
|
|
|
|
'visualeditor-dialog-syntaxhighlight-title',
|
|
|
|
'visualeditor-dialogbutton-syntaxhighlight-tooltip',
|
|
|
|
),
|
|
|
|
'styles' => array(
|
|
|
|
'syntaxhighlight/styles/ve.ui.MWSyntaxHighlight.css',
|
|
|
|
),
|
|
|
|
),
|
2013-10-21 22:30:49 +00:00
|
|
|
|
|
|
|
'ext.visualEditor.experimental' => array(
|
|
|
|
'dependencies' => array(
|
|
|
|
'ext.visualEditor.mwmath',
|
|
|
|
'ext.visualEditor.mwhiero',
|
|
|
|
'ext.visualEditor.language',
|
|
|
|
'ext.visualEditor.mwalienextension',
|
|
|
|
//'ext.visualEditor.mwsyntaxHighlight',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
'ext.visualEditor.icons-raster' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'styles' => array(
|
|
|
|
've/ui/styles/ve.ui.Icons-raster.css',
|
|
|
|
've-mw/ui/styles/ve.ui.Icons-raster.css',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'ext.visualEditor.icons-vector' => $wgVisualEditorResourceTemplate + array(
|
|
|
|
'styles' => array(
|
|
|
|
've/ui/styles/ve.ui.Icons-vector.css',
|
|
|
|
've-mw/ui/styles/ve.ui.Icons-vector.css',
|
|
|
|
),
|
|
|
|
),
|
2011-11-28 20:28:28 +00:00
|
|
|
);
|
2012-05-25 19:50:48 +00:00
|
|
|
|
2013-06-15 02:07:34 +00:00
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
/* Configuration */
|
2013-06-15 02:07:34 +00:00
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Array of ResourceLoader module names (strings) that should be loaded when VisualEditor is
|
|
|
|
// loaded. Other extensions that extend VisualEditor should add to this array.
|
|
|
|
$wgVisualEditorPluginModules = array();
|
2012-06-21 20:39:27 +00:00
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// URL to the Parsoid instance
|
|
|
|
// MUST NOT end in a slash due to Parsoid bug
|
|
|
|
$wgVisualEditorParsoidURL = 'http://localhost:8000';
|
|
|
|
|
|
|
|
// Interwiki prefix to pass to the Parsoid instance
|
|
|
|
// Parsoid will be called as $url/$prefix/$pagename
|
|
|
|
$wgVisualEditorParsoidPrefix = 'localhost';
|
|
|
|
|
2013-10-22 00:24:27 +00:00
|
|
|
// Forward users' Cookie: headers to Parsoid. Required for private wikis (login required to read).
|
|
|
|
// If the wiki is not private (i.e. $wgGroupPermissions['*']['read'] is true) this configuration
|
|
|
|
// variable will be ignored.
|
|
|
|
//
|
|
|
|
// This feature requires a non-locking session store. The default session store will not work and
|
|
|
|
// will cause deadlocks when trying to use this feature. If you experience deadlock issues, enable
|
|
|
|
// $wgSessionsInObjectCache.
|
|
|
|
//
|
|
|
|
// WARNING: ONLY enable this on private wikis and ONLY IF you understand the SECURITY IMPLICATIONS
|
|
|
|
// of sending Cookie headers to Parsoid over HTTP. For security reasons, it is strongly recommended
|
|
|
|
// that $wgVisualEditorParsoidURL be pointed to localhost if this setting is enabled.
|
|
|
|
$wgVisualEditorParsoidForwardCookies = false;
|
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Timeout for HTTP requests to Parsoid in seconds
|
|
|
|
$wgVisualEditorParsoidTimeout = 100;
|
|
|
|
|
2013-11-01 21:30:22 +00:00
|
|
|
// Serialization cache timeout, in seconds
|
|
|
|
$wgVisualEditorSerializationCacheTimeout = 3600;
|
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Namespaces to enable VisualEditor in
|
|
|
|
$wgVisualEditorNamespaces = $wgContentNamespaces;
|
|
|
|
|
2013-10-07 22:55:22 +00:00
|
|
|
// List of skins VisualEditor integration supports
|
|
|
|
$wgVisualEditorSupportedSkins = array( 'vector', 'apex', 'monobook' );
|
|
|
|
|
2013-10-10 12:33:49 +00:00
|
|
|
// List of browsers VisualEditor is incompatibe with
|
|
|
|
// See jQuery.client for specification
|
|
|
|
$wgVisualEditorBrowserBlacklist = array(
|
|
|
|
// IE <= 8 has various incompatibilities in layout and feature support
|
|
|
|
// IE9 and IE10 generally work but fail in ajax handling when making POST
|
|
|
|
// requests to the VisualEditor/Parsoid API which is causing silent failures
|
|
|
|
// when trying to save a page (bug 49187)
|
|
|
|
'msie' => array( array( '<=', 10 ) ),
|
|
|
|
// Android 2.x and below "support" CE but don't trigger keyboard input
|
|
|
|
'android' => array( array( '<', 3 ) ),
|
|
|
|
// Firefox issues in versions 12 and below (bug 50780)
|
|
|
|
// Wikilink [[./]] bug in Firefox 14 and below (bug 50720)
|
|
|
|
'firefox' => array( array( '<=', 14 ) ),
|
|
|
|
// Opera < 12 was not tested and it's userbase is almost nonexistent anyway
|
|
|
|
'opera' => array( array( '<', 12 ) ),
|
|
|
|
// Blacklist all versions:
|
|
|
|
'blackberry' => null,
|
|
|
|
);
|
|
|
|
|
2013-07-26 20:08:32 +00:00
|
|
|
// Whether to use change tagging for VisualEditor edits
|
|
|
|
$wgVisualEditorUseChangeTagging = true;
|
|
|
|
|
|
|
|
// Whether to disable for logged-in users
|
|
|
|
// This allows you to enable the 'visualeditor-enable' preference by default
|
|
|
|
// but still disable VE for logged-out users (by setting this to false).
|
|
|
|
$wgVisualEditorDisableForAnons = false;
|
|
|
|
|
2013-08-01 20:18:33 +00:00
|
|
|
// Whether to show the "welcome to the beta" dialog the first time a user uses VisualEditor
|
|
|
|
$wgVisualEditorShowBetaWelcome = false;
|
|
|
|
|
2013-08-01 19:14:41 +00:00
|
|
|
// Where to put the VisualEditor edit tab
|
|
|
|
// 'before': put it right before the old edit tab
|
|
|
|
// 'after': put it right after the old edit tab
|
|
|
|
$wgVisualEditorTabPosition = 'before';
|
|
|
|
|
|
|
|
$wgVisualEditorTabMessages = array(
|
|
|
|
// i18n message key to use for the VisualEditor edit tab
|
|
|
|
// If null, the default edit tab caption will be used
|
|
|
|
// The 'visualeditor-ca-ve-edit' message is available for this
|
|
|
|
'edit' => null,
|
|
|
|
// i18n message key to use for the old edit tab
|
|
|
|
// If null, the tab's caption will not be changed
|
|
|
|
'editsource' => 'visualeditor-ca-editsource',
|
|
|
|
// i18n message key to use for the VisualEditor create tab
|
|
|
|
// If null, the default create tab caption will be used
|
|
|
|
// The 'visualeditor-ca-ve-create' message is available for this
|
|
|
|
'create' => null,
|
|
|
|
// i18n message key to use for the old create tab
|
|
|
|
// If null, the tab's caption will not be changed
|
|
|
|
'createsource' => 'visualeditor-ca-createsource',
|
|
|
|
// i18n message key to use for the VisualEditor section edit link
|
|
|
|
// If null, the default edit section link caption will be used
|
|
|
|
'editsection' => null,
|
|
|
|
// i18n message key to use for the source section edit link
|
|
|
|
// If null, the link's caption will not be changed
|
|
|
|
'editsectionsource' => 'visualeditor-ca-editsource-section',
|
|
|
|
|
|
|
|
// i18n message key for an optional appendix to add to each of these from JS
|
|
|
|
// Use this if you have HTML messages to add
|
|
|
|
// The 'visualeditor-beta-appendix' message is available for this purpose
|
|
|
|
'editappendix' => null,
|
|
|
|
'editsourceappendix' => null,
|
|
|
|
'createappendix' => null,
|
|
|
|
'createsourceappendix' => null,
|
|
|
|
'editsectionappendix' => null,
|
|
|
|
'editsectionsourceappendix' => null,
|
|
|
|
);
|