Remove the math inspector code

Moved to the Math extension in I8e582ee6deadc2750

Change-Id: Iab0c56246626de1e0f6ab770e777c0a28756fa75
This commit is contained in:
James D. Forrester 2014-02-07 09:28:54 -08:00 committed by Roan Kattouw
parent ec40953722
commit aea64bf2df
12 changed files with 1 additions and 726 deletions

View file

@ -293,21 +293,6 @@ class VisualEditorHooks {
);
*/
$preferences['visualeditor-enable-mwmath'] = array(
'version' => '1.0',
'label-message' => 'visualeditor-preference-mwmath-label',
'desc-message' => 'visualeditor-preference-mwmath-description',
'screenshot' => $wgExtensionAssetsPath .
"/VisualEditor/betafeatures-icon-VisualEditor-formulae-$dir.svg",
'info-message' => 'visualeditor-preference-mwmath-info-link',
'discussion-message' => 'visualeditor-preference-mwmath-discussion-link',
'requirements' => array(
'betafeatures' => array(
'visualeditor-enable',
),
),
);
/* Disabling Beta Features option for hieroglyphics for now
$preferences['visualeditor-enable-mwhiero'] = array(
'version' => '1.0',

View file

@ -72,7 +72,6 @@ $wgExtensionFunctions[] = 'VisualEditorHooks::onSetup';
// Set default values for new preferences
$wgDefaultUserOptions['visualeditor-enable'] = 0;
$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0;
$wgDefaultUserOptions['visualeditor-enable-mwmath'] = 0;
$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0;
// Register resource modules
@ -1042,25 +1041,6 @@ $wgResourceModules += array(
'targets' => array( 'desktop', 'mobile' ),
),
'ext.visualEditor.mwmath' => $wgVisualEditorResourceTemplate + array(
'scripts' => array(
'modules/ve-mw/dm/nodes/ve.dm.MWMathNode.js',
'modules/ve-mw/ce/nodes/ve.ce.MWMathNode.js',
'modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js',
'modules/ve-mw/ui/tools/ve.ui.MWMathInspectorTool.js',
),
'styles' => array(
'modules/ve-mw/ce/styles/ve.ce.MWMathNode.css',
),
'dependencies' => array(
'ext.visualEditor.mwcore',
),
'messages' => array(
'visualeditor-mwmathinspector-title',
),
'targets' => array( 'desktop', 'mobile' ),
),
'ext.visualEditor.mwgallery' => $wgVisualEditorResourceTemplate + array(
'scripts' => array(
'modules/ve-mw/dm/nodes/ve.dm.MWGalleryNode.js',
@ -1099,7 +1079,6 @@ $wgResourceModules += array(
'ext.visualEditor.experimental' => array(
'dependencies' => array(
'ext.visualEditor.mwmath',
'ext.visualEditor.mwhiero',
'ext.visualEditor.language',
'ext.visualEditor.mwlanguage',
@ -1137,7 +1116,6 @@ $wgVisualEditorPreferenceModules = array(
'visualeditor-enable-experimental' => 'ext.visualEditor.experimental',
//'visualeditor-enable-language' => 'ext.visualEditor.language',
//'visualeditor-enable-mwalienextension' => 'ext.visualEditor.mwalienextension',
'visualeditor-enable-mwmath' => 'ext.visualEditor.mwmath',
//'visualeditor-enable-mwhiero' => 'ext.visualEditor.mwhiero'
);

View file

@ -1,184 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="264"
height="162"
viewBox="0 0 264 162"
id="Layer_1"
xml:space="preserve"><metadata
id="metadata3213"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3211" /><g
id="g3120-2"><polygon
points="0.5,151.749 0.5,0.5 263.5,0.5 263.5,152.249 254.5,158.954 254.5,42.5 215.5,42.5 215.5,155.1 211.107,151.369 203.5,156.699 203.5,42.5 48.5,42.5 48.5,153.35 38.749,161.38 24.833,151.361 13.366,161.357 "
id="polygon3122-9"
style="fill:#ffffff" /><g
id="g3124-5"><path
d="m 263,1 v 150.998 l -8,5.96 V 43 42 h -1 -38 -1 v 1 111.02 l -3.274,-2.781 -0.589,-0.498 -0.633,0.441 -6.504,4.556 V 43 42 H 203 49 48 v 1 110.1 l -9.257,7.66 -13.295,-9.57 -0.645,-0.463 -0.598,0.521 -10.864,9.47 L 1,151.499 V 1 h 262 m 1,-1 H 0 V 152 L 13.391,162 24.865,152 38.756,162 49,153.6 V 43 H 203 V 157.66 L 211.078,152 216,156.18 V 43 h 38 v 116.95 l 10,-7.45 V 0 l 0,0 z"
id="path3126-5"
style="fill:#e5e5e5" /></g></g><path
d="M 203,157.66 V 43 H 49 v 110.6 l 2.145,-1.6 12.555,10 13.809,-10 14.229,10 12.972,-10 12.973,10 13.811,-10 12.136,10 13.391,-10 14.229,10 12.972,-10 12.974,10 5.804,-4.34 z"
id="path3128-1"
style="fill:#e5e5e5" /><path
d="m 11,36 c 0,-7.732 6.268,-14 14,-14 7.732,0 14,6.268 14,14 0,7.732 -6.268,14 -14,14 -7.732,0 -14,-6.268 -14,-14 z"
id="Ellipse-2"
style="fill:#e5e5e5" /><path
d="M 254,159.95 V 43 h -38 v 113.18 l 7.551,5.82 13.811,-10 13.891,10 2.747,-2.05 z"
id="path3131-8"
style="fill:#e5e5e5" /><path
d="M 38,107 V 72 H 13 v 35 h 25 z"
id="path3133-5"
style="fill:#e5e5e5" /><path
d="m 232.51,5 h 26 v 6 h -26 V 5 z"
id="path3135-8"
style="fill:#e5e5e5" /><rect
width="22"
height="6"
x="208.51001"
y="5"
id="rect3137-5"
style="fill:#e5e5e5" /><path
d="m 142,6 v 4 H 50 V 6 h 92 m 1,-1 H 49 v 6 h 94 V 5 l 0,0 z"
id="path3139-9"
style="fill:#e5e5e5" /><rect
width="22"
height="6"
x="184.51001"
y="5"
id="rect3141-9"
style="fill:#e5e5e5" /><rect
width="13"
height="6"
x="161.51001"
y="5"
id="rect3143-3"
style="fill:#e5e5e5" /><rect
width="6"
height="6"
x="176.51001"
y="5"
id="rect3145-7"
style="fill:#e5e5e5" /><rect
width="6"
height="6"
x="153.51001"
y="5"
id="rect3147-6"
style="fill:#e5e5e5" /><rect
width="32"
height="6"
x="9"
y="5"
id="rect3149-5"
style="fill:#e5e5e5" /><path
d="M 2,14.5 H 262"
id="path3151-9"
style="fill:#e5e5e5;stroke:#e5e5e5" /><rect
width="2"
height="2"
x="52"
y="7"
id="rect3153-5"
style="fill:#e5e5e5" /><path
d="M 38,59 V 54 H 13 v 5 h 25 z"
id="path3155-4"
style="fill:#e5e5e5" /><g
id="g3157-6"><path
d="M 202.957,157.619 V 42.958 h -154 v 110.601 l 2.145,-1.6 12.556,10 13.809,-10 14.229,10 12.972,-10 12.973,10 13.811,-10 12.136,10 13.391,-10 14.229,10 12.973,-10 12.973,10 5.803,-4.34 z"
id="path3159-6"
style="fill:#e4e4e4" /></g><g
id="g3161-2"
style="opacity:0.2"><rect
width="156.08501"
height="21.667"
x="48.040001"
y="42.041"
id="rect3163-6"
style="fill:#4f89c8" /></g><g
id="g3165-8"
style="opacity:0.8"><rect
width="54"
height="5.9990001"
x="58.957001"
y="72.292"
id="rect3167-5"
style="fill:#cccbcb" /></g><g
id="g3169-6"
style="opacity:0.3"><path
d="m 189.957,84.293 h -39 v 30 h 39 v -30 z m -26.348,13.043 h 1.402 l 8.701,8.604 4.725,-2.834 7.117,5.943 v 0.025 h -31.148 l 9.203,-11.738 z"
id="path3171-4"
style="fill:#9b9b9b" /></g><g
id="g3173-1"
style="opacity:0.8"><rect
width="131"
height="3"
x="58.957001"
y="123.293"
id="rect3175-5"
style="fill:#cccbcb" /></g><g
id="g3177-3"
style="opacity:0.8"><rect
width="104"
height="3"
x="58.957001"
y="133.293"
id="rect3179-0"
style="fill:#cccbcb" /></g><g
id="g3181-8"
style="opacity:0.8"><rect
width="84"
height="3"
x="58.957001"
y="89.292999"
id="rect3183-5"
style="fill:#cccbcb" /></g><g
id="g3185-7"
style="opacity:0.8"><rect
width="84"
height="3"
x="58.957001"
y="99.292999"
id="rect3187-5"
style="fill:#cccbcb" /></g><g
id="g3189-6"
style="opacity:0.8"><rect
width="39"
height="3"
x="58.957001"
y="109.293"
id="rect3191-0"
style="fill:#cccbcb" /></g><g
id="g3193-4"
style="opacity:0.4"><g
id="g3195-4"><path
d="m 58.957,48.291 h 25 v 10 h -25 v -10 z"
id="path3197-0"
style="fill:#9b9b9b" /></g><g
id="g3199-1"><rect
width="10"
height="10"
x="92.457001"
y="48.291"
id="rect3201-3"
style="fill:#9b9b9b" /></g><g
id="g3203-9"><rect
width="10"
height="10"
x="109.457"
y="48.291"
id="rect3205-6"
style="fill:#9b9b9b" /></g></g><g
transform="translate(129.3,41.6)"
id="math-2"
style="opacity:0.75;fill:#222222;fill-opacity:1"><path
d="M 13.609,11.391 10.004,16.004 16,16 l 0,-1 1,0 0,3 -10,0 5,-6 -5,-6 10,0 0,3 -1,0 0,-2 -6,0 3.609,4.391"
id="sigma-7"
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" /></g></svg>

Before

Width:  |  Height:  |  Size: 6 KiB

View file

@ -1,238 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="264"
height="162"
viewBox="0 0 264 162"
id="Layer_1"
xml:space="preserve"
inkscape:version="0.48.4 r9939"
sodipodi:docname="betafeatures-icon-VisualEditor-formulae-ltr.svg"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview51"
showgrid="false"
inkscape:zoom="1.1022727"
inkscape:cx="132"
inkscape:cy="81"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><metadata
id="metadata3213"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3211" /><g
id="g3120-2"
transform="matrix(-1,0,0,1,264,0)"><polygon
points="0.5,0.5 263.5,0.5 263.5,152.249 254.5,158.954 254.5,42.5 215.5,42.5 215.5,155.1 211.107,151.369 203.5,156.699 203.5,42.5 48.5,42.5 48.5,153.35 38.749,161.38 24.833,151.361 13.366,161.357 0.5,151.749 "
id="polygon3122-9"
style="fill:#ffffff" /><g
id="g3124-5"><path
d="m 263,1 v 150.998 l -8,5.96 V 43 42 h -1 -38 -1 v 1 111.02 l -3.274,-2.781 -0.589,-0.498 -0.633,0.441 -6.504,4.556 V 43 42 H 203 49 48 v 1 110.1 l -9.257,7.66 -13.295,-9.57 -0.645,-0.463 -0.598,0.521 -10.864,9.47 L 1,151.499 V 1 h 262 m 1,-1 H 0 V 152 L 13.391,162 24.865,152 38.756,162 49,153.6 V 43 H 203 V 157.66 L 211.078,152 216,156.18 V 43 h 38 v 116.95 l 10,-7.45 V 0 l 0,0 z"
id="path3126-5"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /></g></g><path
d="M 61,157.66 V 43 H 215 V 153.6 L 212.855,152 200.3,162 186.491,152 172.262,162 159.29,152 146.317,162 132.506,152 120.37,162 106.979,152 92.75,162 79.778,152 66.804,162 61,157.66 z"
id="path3128-1"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><path
d="m 253,36 c 0,-7.732 -6.268,-14 -14,-14 -7.732,0 -14,6.268 -14,14 0,7.732 6.268,14 14,14 7.732,0 14,-6.268 14,-14 z"
id="Ellipse-2"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><path
d="M 10,159.95 V 43 H 48 V 156.18 L 40.449,162 26.638,152 12.747,162 10,159.95 z"
id="path3131-8"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><path
d="M 226,107 V 72 h 25 v 35 h -25 z"
id="path3133-5"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><path
d="m 31.49,5 h -26 v 6 h 26 V 5 z"
id="path3135-8"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><rect
width="22"
height="6"
x="-55.48999"
y="5"
id="rect3137-5"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><path
d="m 122,6 v 4 h 92 V 6 h -92 m -1,-1 h 94 v 6 H 121 V 5 l 0,0 z"
id="path3139-9"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><rect
width="22"
height="6"
x="-79.48999"
y="5"
id="rect3141-9"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><rect
width="13"
height="6"
x="-102.48999"
y="5"
id="rect3143-3"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><rect
width="6"
height="6"
x="-87.48999"
y="5"
id="rect3145-7"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><rect
width="6"
height="6"
x="-110.48999"
y="5"
id="rect3147-6"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><rect
width="32"
height="6"
x="-255"
y="5"
id="rect3149-5"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><path
d="M 262,14.5 H 2"
id="path3151-9"
style="fill:#e5e5e5;stroke:#e5e5e5"
inkscape:connector-curvature="0" /><rect
width="2"
height="2"
x="-212"
y="7"
id="rect3153-5"
style="fill:#e5e5e5"
transform="scale(-1,1)" /><path
d="m 226,59 v -5 h 25 v 5 h -25 z"
id="path3155-4"
style="fill:#e5e5e5"
inkscape:connector-curvature="0" /><g
id="g3157-6"
transform="matrix(-1,0,0,1,264,0)"><path
d="M 202.957,157.619 V 42.958 h -154 v 110.601 l 2.145,-1.6 12.556,10 13.809,-10 14.229,10 12.972,-10 12.973,10 13.811,-10 12.136,10 13.391,-10 14.229,10 12.973,-10 12.973,10 5.803,-4.34 z"
id="path3159-6"
style="fill:#e4e4e4"
inkscape:connector-curvature="0" /></g><g
id="g3161-2"
style="opacity:0.2"
transform="matrix(-1,0,0,1,264,0)"><rect
width="156.08501"
height="21.667"
x="48.040001"
y="42.041"
id="rect3163-6"
style="fill:#4f89c8" /></g><g
id="g3165-8"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="54"
height="5.9990001"
x="58.957001"
y="72.292"
id="rect3167-5"
style="fill:#cccbcb" /></g><g
id="g3169-6"
style="opacity:0.3"
transform="matrix(-1,0,0,1,264,0)"><path
d="m 189.957,84.293 h -39 v 30 h 39 v -30 z m -26.348,13.043 h 1.402 l 8.701,8.604 4.725,-2.834 7.117,5.943 v 0.025 h -31.148 l 9.203,-11.738 z"
id="path3171-4"
style="fill:#9b9b9b"
inkscape:connector-curvature="0" /></g><g
id="g3173-1"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="131"
height="3"
x="58.957001"
y="123.293"
id="rect3175-5"
style="fill:#cccbcb" /></g><g
id="g3177-3"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="104"
height="3"
x="58.957001"
y="133.293"
id="rect3179-0"
style="fill:#cccbcb" /></g><g
id="g3181-8"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="84"
height="3"
x="58.957001"
y="89.292999"
id="rect3183-5"
style="fill:#cccbcb" /></g><g
id="g3185-7"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="84"
height="3"
x="58.957001"
y="99.292999"
id="rect3187-5"
style="fill:#cccbcb" /></g><g
id="g3189-6"
style="opacity:0.8"
transform="matrix(-1,0,0,1,264,0)"><rect
width="39"
height="3"
x="58.957001"
y="109.293"
id="rect3191-0"
style="fill:#cccbcb" /></g><g
id="g3193-4"
style="opacity:0.4"
transform="matrix(-1,0,0,1,264,0)"><g
id="g3195-4"><path
d="m 58.957,48.291 h 25 v 10 h -25 v -10 z"
id="path3197-0"
style="fill:#9b9b9b"
inkscape:connector-curvature="0" /></g><g
id="g3199-1"><rect
width="10"
height="10"
x="92.457001"
y="48.291"
id="rect3201-3"
style="fill:#9b9b9b" /></g><g
id="g3203-9"><rect
width="10"
height="10"
x="109.457"
y="48.291"
id="rect3205-6"
style="fill:#9b9b9b" /></g></g><g
transform="translate(110.7,41.6)"
id="math-2"
style="opacity:0.75;fill:#222222;fill-opacity:1"><path
d="M 13.609,11.391 10.004,16.004 16,16 l 0,-1 1,0 0,3 -10,0 5,-6 -5,-6 10,0 0,3 -1,0 0,-2 -6,0 3.609,4.391"
id="sigma-7"
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" /></g></svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

View file

@ -1,67 +0,0 @@
/*!
* VisualEditor ContentEditable MWMathNode class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/*global MathJax */
/**
* ContentEditable MediaWiki math node.
*
* @class
* @extends ve.ce.MWExtensionNode
*
* @constructor
* @param {ve.dm.MWMathNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve.ce.MWMathNode = function VeCeMWMathNode( model, config ) {
// Parent constructor
ve.ce.MWExtensionNode.call( this, model, config );
// DOM changes
this.$element.addClass( 've-ce-mwMathNode' );
};
/* Inheritance */
OO.inheritClass( ve.ce.MWMathNode, ve.ce.MWExtensionNode );
/* Static Properties */
ve.ce.MWMathNode.static.name = 'mwMath';
ve.ce.MWMathNode.static.primaryCommandName = 'math';
/* Methods */
/** */
ve.ce.MWMathNode.prototype.onParseSuccess = function ( deferred, response ) {
var data = response.visualeditor, contentNodes = this.$( data.content ).get();
if ( contentNodes[0] && contentNodes[0].childNodes ) {
contentNodes = Array.prototype.slice.apply( contentNodes[0].childNodes );
}
deferred.resolve( contentNodes );
};
/** */
ve.ce.MWExtensionNode.prototype.afterRender = function ( domElements ) {
if ( this.$( domElements ).is( 'span.tex' ) ) {
// MathJax
MathJax.Hub.Queue(
[ 'Typeset', MathJax.Hub, this.$element[0] ],
[ this, this.emit, 'rerender' ]
);
} else {
// Rerender after image load
this.$element.find( 'img.tex' ).on( 'load', ve.bind( function () {
this.emit( 'rerender' );
}, this ) );
}
};
/* Registration */
ve.ce.nodeFactory.register( ve.ce.MWMathNode );

View file

@ -1,10 +0,0 @@
/*!
* VisualEditor ContentEditable MediaWiki MWMathNode styles.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ce-mwMathNode {
display: inline-block;
}

View file

@ -6,7 +6,7 @@
*/
/**
* DataModel MediaWiki math node.
* DataModel MediaWiki alien extension node.
*
* @class
* @extends ve.dm.MWExtensionNode

View file

@ -1,37 +0,0 @@
/*!
* VisualEditor DataModel MWMathNode class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* DataModel MediaWiki math node.
*
* @class
* @extends ve.dm.MWExtensionNode
*
* @constructor
* @param {number} [length] Length of content data (ignored, forced to 0)
* @param {Object} [element] Reference to element in linear model
*/
ve.dm.MWMathNode = function VeDmMWMathNode( length, element ) {
// Parent constructor
ve.dm.MWExtensionNode.call( this, 0, element );
};
/* Inheritance */
OO.inheritClass( ve.dm.MWMathNode, ve.dm.MWExtensionNode );
/* Static members */
ve.dm.MWMathNode.static.name = 'mwMath';
ve.dm.MWMathNode.static.tagName = 'img';
ve.dm.MWMathNode.static.extensionName = 'math';
/* Registration */
ve.dm.modelRegistry.register( ve.dm.MWMathNode );

View file

@ -168,7 +168,6 @@
"visualeditor-mwgalleryinspector-placeholder": "Example.jpg|Caption for image",
"visualeditor-mwgalleryinspector-title": "Gallery",
"visualeditor-mwhieroinspector-title": "Hieroglyphics",
"visualeditor-mwmathinspector-title": "Formula",
"visualeditor-notification-created": "\"$1\" has been created.",
"visualeditor-notification-restored": "\"$1\" has been restored.",
"visualeditor-notification-saved": "Your changes to \"$1\" have been saved.",
@ -195,10 +194,6 @@
"visualeditor-preference-mwhiero-discussion-link": "\/\/mediawiki.org\/wiki\/Special:MyLanguage\/Talk:VisualEditor\/Beta_Features\/Hieroglyphics",
"visualeditor-preference-mwhiero-info-link": "\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/Hieroglyphics",
"visualeditor-preference-mwhiero-label": "VisualEditor hieroglyphics editing",
"visualeditor-preference-mwmath-description": "Add experimental support to VisualEditor for creating and editing of mathematical formulae for testing, ahead of general release. Please remember to always review your changes before saving when using experimental features.",
"visualeditor-preference-mwmath-discussion-link": "\/\/mediawiki.org\/wiki\/Special:MyLanguage\/Talk:VisualEditor\/Beta_Features\/Formulae",
"visualeditor-preference-mwmath-info-link": "\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/Formulae",
"visualeditor-preference-mwmath-label": "VisualEditor formulae editing",
"visualeditor-reference-input-placeholder": "What do you want to reference?",
"visualeditor-referencelist-isempty": "There are no references with the group \"$1\" on this page to include in this list.",
"visualeditor-referencelist-isempty-default": "There are no references on this page to include in this list.",

View file

@ -1,116 +0,0 @@
/*!
* VisualEditor UserInterface MWMathInspector class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* MediaWiki math inspector.
*
* @class
* @extends ve.ui.MWExtensionInspector
*
* @constructor
* @param {ve.ui.Surface} surface Surface inspector is for
* @param {Object} [config] Configuration options
*/
ve.ui.MWMathInspector = function VeUiMWMathInspector( surface, config ) {
// Parent constructor
ve.ui.MWExtensionInspector.call( this, surface, config );
this.onChangeHandler = ve.debounce( ve.bind( this.updatePreview, this ), 250 );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWMathInspector, ve.ui.MWExtensionInspector );
/* Static properties */
ve.ui.MWMathInspector.static.name = 'math';
ve.ui.MWMathInspector.static.icon = 'math';
ve.ui.MWMathInspector.static.title =
OO.ui.deferMsg( 'visualeditor-mwmathinspector-title' );
ve.ui.MWMathInspector.static.nodeView = ve.ce.MWMathNode;
ve.ui.MWMathInspector.static.nodeModel = ve.dm.MWMathNode;
/* Methods */
/**
* Update the math node rendering to reflect the content entered into the inspector.
*/
ve.ui.MWMathInspector.prototype.updatePreview = function () {
var newsrc = this.input.getValue();
if ( this.visible ) {
this.node.update( { 'extsrc': newsrc } );
}
};
/**
* @inheritdoc
*/
ve.ui.MWMathInspector.prototype.setup = function ( data ) {
// Parent method
ve.ui.MWExtensionInspector.prototype.setup.call( this, data );
var mw, surfaceModel = this.surface.getModel();
this.node = this.surface.getView().getFocusedNode();
if ( !this.node ) {
// Create a dummy node, needed for live preview
mw = {
'name': 'math',
'attrs': {},
'body': {
'extsrc': ''
}
};
surfaceModel.getFragment().collapseRangeToEnd().insertContent( [
{
'type': 'mwMath',
'attributes': {
'mw': mw
}
},
{ 'type': '/mwMath' }
] );
this.node = this.surface.getView().getFocusedNode();
}
this.input.on( 'change', this.onChangeHandler );
// Override directionality settings, inspector's input
// should always be LTR:
this.input.setRTL( false );
};
/**
* @inheritdoc
*/
ve.ui.MWMathInspector.prototype.teardown = function ( data ) {
var newsrc = this.input.getValue(),
surfaceModel = this.surface.getModel();
this.input.off( 'change', this.onChangeHandler );
if ( newsrc !== '' ) {
// Parent method
ve.ui.MWExtensionInspector.prototype.teardown.call( this, data );
} else {
// The user tried to empty the node, remove it
surfaceModel.change( ve.dm.Transaction.newFromRemoval(
surfaceModel.getDocument(), this.node.getOuterRange()
) );
// Grandparent method; we're overriding the parent behavior in this case
ve.ui.Inspector.prototype.teardown.call( this, data );
}
};
/* Registration */
ve.ui.inspectorFactory.register( ve.ui.MWMathInspector );

View file

@ -1,28 +0,0 @@
/*!
* VisualEditor MediaWiki UserInterface math tool class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* MediaWiki UserInterface math tool.
*
* @class
* @extends ve.ui.InspectorTool
* @constructor
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
ve.ui.MWMathInspectorTool = function VeUiMWMathInspectorTool( toolGroup, config ) {
ve.ui.InspectorTool.call( this, toolGroup, config );
};
OO.inheritClass( ve.ui.MWMathInspectorTool, ve.ui.InspectorTool );
ve.ui.MWMathInspectorTool.static.name = 'math';
ve.ui.MWMathInspectorTool.static.group = 'object';
ve.ui.MWMathInspectorTool.static.icon = 'math';
ve.ui.MWMathInspectorTool.static.title =
OO.ui.deferMsg( 'visualeditor-mwmathinspector-title' );
ve.ui.MWMathInspectorTool.static.inspector = 'math';
ve.ui.MWMathInspectorTool.static.modelClasses = [ ve.dm.MWMathNode ];
ve.ui.toolFactory.register( ve.ui.MWMathInspectorTool );

View file

@ -10,9 +10,6 @@
ve.ui.commandRegistry.register(
new ve.ui.Command( 'gallery', 'inspector', 'open', 'gallery' )
);
ve.ui.commandRegistry.register(
new ve.ui.Command( 'math', 'inspector', 'open', 'math' )
);
ve.ui.commandRegistry.register(
new ve.ui.Command( 'mediaEdit', 'dialog', 'open', 'mediaEdit' )
);