Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/213808
Change subject: Move oojs ui code to top of page
......................................................................
Move oojs ui code to top of page
Having it embedded in functions is not very visible and also interferes
with documentation generation.
Moving it to the top makes it much more visible and makes the code far
more readable.
Change-Id: Id56fa7f03d3f6e2e0bd0c20c9b88b1355d48774e
---
M resources/mobile.editor.common/EditorOverlayBase.js
1 file changed, 49 insertions(+), 49 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/08/213808/1
diff --git a/resources/mobile.editor.common/EditorOverlayBase.js
b/resources/mobile.editor.common/EditorOverlayBase.js
index b4a3099..ef10e12 100644
--- a/resources/mobile.editor.common/EditorOverlayBase.js
+++ b/resources/mobile.editor.common/EditorOverlayBase.js
@@ -10,6 +10,55 @@
EditorOverlayBase;
/**
+ * 'Edit' button
+ * @param {OO.ui.ToolGroup} toolGroup
+ * @param {Object} config
+ * @ignore
+ */
+ function EditVeTool( toolGroup, config ) {
+ config = config || {};
+ config.classes = [ 'visual-editor' ];
+ EditVeTool.super.call( this, toolGroup, config );
+ }
+ OO.inheritClass( EditVeTool, OO.ui.Tool );
+
+ EditVeTool.static.name = 'editVe';
+ EditVeTool.static.icon = 'edit-ve';
+ EditVeTool.static.group = 'editorSwitcher';
+ EditVeTool.static.title = mw.msg(
'mobile-frontend-editor-visual-editor' );
+ /**
+ * click handler
+ */
+ EditVeTool.prototype.onSelect = function () {
+ // will be overridden later
+ };
+
+ /**
+ * 'Edit source' button
+ * @param {OO.ui.ToolGroup} toolGroup
+ * @param {Object} config
+ * @ignore
+ */
+ function EditSourceTool( toolGroup, config ) {
+ config = config || {};
+ config.classes = [ 'source-editor' ];
+ EditSourceTool.super.call( this, toolGroup, config );
+ }
+
+ OO.inheritClass( EditSourceTool, OO.ui.Tool );
+
+ EditSourceTool.static.name = 'editSource';
+ EditSourceTool.static.icon = 'edit-source';
+ EditSourceTool.static.group = 'editorSwitcher';
+ EditSourceTool.static.title = mw.msg(
'mobile-frontend-editor-source-editor' );
+ /**
+ * click handler
+ */
+ EditSourceTool.prototype.onSelect = function () {
+ // will be overridden later
+ };
+
+ /**
* Base class for EditorOverlay
* @class EditorOverlayBase
* @extends Overlay
@@ -270,55 +319,6 @@
var toolFactory = new OO.ui.ToolFactory(),
toolGroupFactory = new OO.ui.ToolGroupFactory(),
toolbar;
-
- /**
- * 'Edit' button
- * @param {OO.ui.ToolGroup} toolGroup
- * @param {Object} config
- * @constructor
- */
- function EditVeTool( toolGroup, config ) {
- config = config || {};
- config.classes = [ 'visual-editor' ];
- EditVeTool.super.call( this, toolGroup, config
);
- }
- OO.inheritClass( EditVeTool, OO.ui.Tool );
-
- EditVeTool.static.name = 'editVe';
- EditVeTool.static.icon = 'edit-ve';
- EditVeTool.static.group = 'editorSwitcher';
- EditVeTool.static.title = mw.msg(
'mobile-frontend-editor-visual-editor' );
- /**
- * click handler
- */
- EditVeTool.prototype.onSelect = function () {
- // will be overridden later
- };
-
- /**
- * 'Edit source' button
- * @param {OO.ui.ToolGroup} toolGroup
- * @param {Object} config
- * @constructor
- */
- function EditSourceTool( toolGroup, config ) {
- config = config || {};
- config.classes = [ 'source-editor' ];
- EditSourceTool.super.call( this, toolGroup,
config );
- }
-
- OO.inheritClass( EditSourceTool, OO.ui.Tool );
-
- EditSourceTool.static.name = 'editSource';
- EditSourceTool.static.icon = 'edit-source';
- EditSourceTool.static.group = 'editorSwitcher';
- EditSourceTool.static.title = mw.msg(
'mobile-frontend-editor-source-editor' );
- /**
- * click handler
- */
- EditSourceTool.prototype.onSelect = function () {
- // will be overridden later
- };
toolbar = new OO.ui.Toolbar( toolFactory,
toolGroupFactory, {
classes: [ 'editor-switcher' ]
--
To view, visit https://gerrit.wikimedia.org/r/213808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id56fa7f03d3f6e2e0bd0c20c9b88b1355d48774e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits