Update VE core submodule to master (5f10e73)

New changes:
a53f101 Update OOjs UI to v0.1.0
1fa518b Update OOjs UI to v0.1.0-pre (15f4156bac)
257af53 Use ContextWidget instead of toolbar inside context menu
5f10e73 Follow-up Ia2076a42: Mark getDescription() as @inheritable for Annotation, Node

Local changes to adjust for the ContextWidget changes.

Change-Id: I47f68f5cf1b9583dab9bd0109fa6504481bdfc67
This commit is contained in:
James D. Forrester 2014-06-09 18:18:23 -07:00
parent cc90e3c832
commit 4be0218bbb
9 changed files with 72 additions and 2 deletions

View file

@ -31,6 +31,7 @@
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/ve.ui.Inspector.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/widgets/ve.ui.LanguageInputWidget.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/widgets/ve.ui.LanguageSearchWidget.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/widgets/ve.ui.ContextItemWidget.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/widgets/ve.ui.DimensionsWidget.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/widgets/ve.ui.MediaSizeWidget.css">
<link rel=stylesheet href="lib/ve/modules/ve/ui/styles/inspectors/ve.ui.SpecialCharacterInspector.css">
@ -254,6 +255,8 @@
<script src="lib/ve/modules/ve/ui/dialogs/ve.ui.LanguageSearchDialog.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.ContextWidget.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.ContextItemWidget.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.DimensionsWidget.js"></script>
<script src="lib/ve/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js"></script>
<script src="lib/ve/modules/ve/ui/tools/ve.ui.AnnotationTool.js"></script>

View file

@ -438,6 +438,8 @@ $wgResourceModules += array(
'lib/ve/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js',
'lib/ve/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js',
'lib/ve/modules/ve/ui/widgets/ve.ui.ContextWidget.js',
'lib/ve/modules/ve/ui/widgets/ve.ui.ContextItemWidget.js',
'lib/ve/modules/ve/ui/widgets/ve.ui.DimensionsWidget.js',
'lib/ve/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js',
@ -477,6 +479,7 @@ $wgResourceModules += array(
'lib/ve/modules/ve/ui/styles/dialogs/ve.ui.CommandHelpDialog.css',
'lib/ve/modules/ve/ui/styles/tools/ve.ui.FormatTool.css',
'lib/ve/modules/ve/ui/styles/ve.ui.Inspector.css',
'lib/ve/modules/ve/ui/styles/widgets/ve.ui.ContextItemWidget.css',
'lib/ve/modules/ve/ui/styles/widgets/ve.ui.DimensionsWidget.css',
'lib/ve/modules/ve/ui/styles/widgets/ve.ui.MediaSizeWidget.css',
'lib/ve/modules/ve/ui/styles/inspectors/ve.ui.SpecialCharacterInspector.css',
@ -1128,6 +1131,8 @@ $wgResourceModules += array(
'visualeditor-annotationbutton-language-tooltip',
'visualeditor-dialog-language-auto-direction',
'visualeditor-dialog-language-search-title',
"visualeditor-languageannotation-description",
"visualeditor-languageannotation-description-with-dir",
'visualeditor-languageinspector-title',
'visualeditor-languageinspector-block-tooltip',
'visualeditor-languageinspector-block-tooltip-rtldirection',

2
lib/ve

@ -1 +1 @@
Subproject commit 3a80662ef957f042832a09615ed85e0d39216f1d
Subproject commit 5f10e7333426f3fd5f73f6d0df727d3e8bcac28c

View file

@ -56,6 +56,15 @@ OO.inheritClass( ve.ce.MWInternalLinkAnnotation, ve.ce.LinkAnnotation );
ve.ce.MWInternalLinkAnnotation.static.name = 'link/mwInternal';
/* Static Methods */
/**
* @inheritdoc
*/
ve.ce.MWInternalLinkAnnotation.static.getDescription = function ( model ) {
return model.getAttribute( 'title' );
};
/* Registration */
ve.ce.annotationFactory.register( ve.ce.MWInternalLinkAnnotation );

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/*global mw */
/**
* ContentEditable MediaWiki image node.
*
@ -65,6 +67,16 @@ OO.mixinClass( ve.ce.MWImageNode, ve.ce.ClickableNode );
ve.ce.MWImageNode.static.primaryCommandName = 'mediaEdit';
/* Static Methods */
/**
* @inheritdoc ve.ce.Node
*/
ve.ce.MWImageNode.static.getDescription = function ( model ) {
var title = new mw.Title( model.getFilename() );
return title.getMain();
};
/* Methods */
/**

View file

@ -59,6 +59,15 @@ ve.ce.MWNumberedExternalLinkNode.static.tagName = 'span';
ve.ce.MWNumberedExternalLinkNode.static.primaryCommandName = 'linkNode';
/* Static Methods */
/**
* @inheritdoc
*/
ve.ce.MWNumberedExternalLinkNode.static.getDescription = function ( model ) {
return model.getAttribute( 'href' );
};
/* Methods */
/**

View file

@ -60,6 +60,15 @@ ve.ce.MWReferenceListNode.static.tagName = 'div';
ve.ce.MWReferenceListNode.static.primaryCommandName = 'referenceList';
/* Static Methods */
/**
* @inheritdoc
*/
ve.ce.MWReferenceListNode.static.getDescription = function ( model ) {
return model.getAttribute( 'refGroup' );
};
/* Methods */
/**

View file

@ -55,6 +55,26 @@ ve.ce.MWTransclusionNode.static.renderHtmlAttributes = false;
ve.ce.MWTransclusionNode.static.primaryCommandName = 'transclusion';
/* Static Methods */
/**
* @inheritdoc
*/
ve.ce.MWTransclusionNode.static.getDescription = function ( model ) {
var i, len, part,
parts = model.getPartsList(),
words = [];
for ( i = 0, len = parts.length; i < len; i++ ) {
part = parts[i];
if ( part.template ) {
words.push( part.template );
}
}
return words.join( ', ' );
};
/* Methods */
/** */

View file

@ -251,7 +251,10 @@ ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( templates ) {
templates = [ templates ];
}
for ( i = 0, len = templates.length; i < len; i++ ) {
if ( normalizeTitle( partsList[0].template ) === normalizeTitle( templates[i] ) ) {
if (
partsList[0].template &&
normalizeTitle( partsList[0].template ) === normalizeTitle( templates[i] )
) {
return true;
}
}