r86703 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86702‎ | r86703 | r86704 >
Date:12:10, 22 April 2011
Author:janpaul123
Status:ok
Tags:
Comment:
Fixes bug 28149 (but with default to true)
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/WikiEditor/WikiEditor.i18n.php (modified) (history)
  • /trunk/extensions/WikiEditor/WikiEditor.php (modified) (history)
  • /trunk/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.config.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.php
@@ -23,6 +23,8 @@
2424 'toolbar' => array( 'global' => false, 'user' => true ),
2525 // Provides interactive tools
2626 'dialogs' => array( 'global' => false, 'user' => true ),
 27+ // Hide signature button from main namespace
 28+ 'hidesig' => array( 'global' => false, 'user' => false ),
2729
2830 /* Textarea / i-frame compatible, but still experimental and unstable (do not deploy!) */
2931
@@ -496,5 +498,11 @@
497499 'jquery.wikiEditor.toolbar.config',
498500 )
499501 ),
500 -
 502+ 'ext.wikiEditor.toolbar.hideSig' => $wikiEditorTpl + array(
 503+ 'scripts' => 'ext.wikiEditor.toolbar.hideSig.js',
 504+ 'dependencies' => array(
 505+ 'ext.wikiEditor',
 506+ 'ext.wikiEditor.toolbar',
 507+ )
 508+ ),
501509 );
Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php
@@ -47,6 +47,22 @@
4848 'ext.wikiEditor.dialogs',
4949 ),
5050 ),
 51+ 'hidesig' => array(
 52+ 'preferences' => array(
 53+ 'wikieditor-toolbar-hidesig' => array(
 54+ 'type' => 'toggle',
 55+ 'label-message' => 'wikieditor-toolbar-hidesig',
 56+ 'section' => 'editing/beta',
 57+ ),
 58+ ),
 59+ 'requirements' => array(
 60+ 'wikieditor-toolbar-hidesig' => true,
 61+ 'usebetatoolbar' => true,
 62+ ),
 63+ 'modules' => array(
 64+ 'ext.wikiEditor.toolbar.hideSig',
 65+ ),
 66+ ),
5167
5268 /* Labs Features */
5369
Index: trunk/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js
@@ -0,0 +1,11 @@
 2+/*
 3+ * Remove the signature button if the main namespace is edited.
 4+ */
 5+$( document ).ready( function() {
 6+ if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
 7+ return;
 8+ }
 9+ if ( $( 'body' ).hasClass( 'ns-0' ) ) {
 10+ $( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', { 'section': 'main', 'group': 'insert', 'tool': 'signature' } );
 11+ }
 12+});
Property changes on: trunk/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js
___________________________________________________________________
Added: svn:eol-style
113 + native
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.config.js
@@ -170,7 +170,6 @@
171171 },
172172 'signature': {
173173 'labelMsg': 'wikieditor-toolbar-tool-signature',
174 - 'filters': [ 'body:not(.ns-0)' ],
175174 'type': 'button',
176175 'offset': [2, -1872],
177176 'icon': 'insert-signature.png',
Index: trunk/extensions/WikiEditor/WikiEditor.i18n.php
@@ -55,6 +55,7 @@
5656 'wikieditor-toolbar-desc' => 'Edit page toolbar with enhanced usability',
5757 'wikieditor-toolbar-preference' => 'Enable enhanced editing toolbar',
5858 'wikieditor-toolbar-dialogs-preference' => 'Enable dialogs for inserting links, tables and more',
 59+ 'wikieditor-toolbar-hidesig' => 'Hide the signature button from pages in the main namespace',
5960 'wikieditor-toolbar-loading' => 'Loading...',
6061 /* Toolbar - Main Section */
6162 'wikieditor-toolbar-tool-bold' => 'Bold',

Follow-up revisions

RevisionCommit summaryAuthorDate
r86704The hiding of signature button in the WikiEditor for the main namespace is no...janpaul12312:24, 22 April 2011

Status & tagging log