mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Improve langlinks styling in meta dialog
Change-Id: I88d6d374d34dc08ecf46053cfc639c03ec23f8bf
This commit is contained in:
parent
2ce91bf4ca
commit
0c935f69af
|
@ -84,7 +84,7 @@ $messages['en'] = array(
|
||||||
'visualeditor-inspector-remove-tooltip' => 'Remove',
|
'visualeditor-inspector-remove-tooltip' => 'Remove',
|
||||||
'visualeditor-dialog-meta-categories-section' => 'Categories',
|
'visualeditor-dialog-meta-categories-section' => 'Categories',
|
||||||
'visualeditor-dialog-meta-categories-data-label' => 'Categories',
|
'visualeditor-dialog-meta-categories-data-label' => 'Categories',
|
||||||
'visualeditor-dialog-meta-categories-settings-label' => 'Category settings',
|
'visualeditor-dialog-meta-categories-options' => 'Options',
|
||||||
'visualeditor-dialog-meta-categories-input-placeholder' => 'Add a category',
|
'visualeditor-dialog-meta-categories-input-placeholder' => 'Add a category',
|
||||||
'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'New category',
|
'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'New category',
|
||||||
'visualeditor-dialog-meta-categories-input-movecategorylabel' => 'Move this category here',
|
'visualeditor-dialog-meta-categories-input-movecategorylabel' => 'Move this category here',
|
||||||
|
@ -238,7 +238,7 @@ See also:
|
||||||
{{Identical|Category}}',
|
{{Identical|Category}}',
|
||||||
'visualeditor-dialog-meta-categories-data-label' => 'Label for the categories sub-section.
|
'visualeditor-dialog-meta-categories-data-label' => 'Label for the categories sub-section.
|
||||||
{{Identical|Category}}',
|
{{Identical|Category}}',
|
||||||
'visualeditor-dialog-meta-categories-settings-label' => 'Label for the category settings sub-section',
|
'visualeditor-dialog-meta-categories-options' => 'Label for the category options sub-section',
|
||||||
'visualeditor-dialog-meta-categories-input-placeholder' => 'Placeholder text for category input
|
'visualeditor-dialog-meta-categories-input-placeholder' => 'Placeholder text for category input
|
||||||
{{Identical|Add category}}',
|
{{Identical|Add category}}',
|
||||||
'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'Label for suggested categories for an uncreated category',
|
'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'Label for suggested categories for an uncreated category',
|
||||||
|
|
|
@ -529,7 +529,7 @@ $wgResourceModules += array(
|
||||||
'visualeditor-dialog-meta-title',
|
'visualeditor-dialog-meta-title',
|
||||||
'visualeditor-dialog-meta-categories-section',
|
'visualeditor-dialog-meta-categories-section',
|
||||||
'visualeditor-dialog-meta-categories-data-label',
|
'visualeditor-dialog-meta-categories-data-label',
|
||||||
'visualeditor-dialog-meta-categories-settings-label',
|
'visualeditor-dialog-meta-categories-options',
|
||||||
'visualeditor-dialog-meta-categories-input-placeholder',
|
'visualeditor-dialog-meta-categories-input-placeholder',
|
||||||
'visualeditor-dialog-meta-categories-input-newcategorylabel',
|
'visualeditor-dialog-meta-categories-input-newcategorylabel',
|
||||||
'visualeditor-dialog-meta-categories-input-movecategorylabel',
|
'visualeditor-dialog-meta-categories-input-movecategorylabel',
|
||||||
|
|
|
@ -58,10 +58,14 @@ ve.ui.MWMetaDialog.prototype.initialize = function () {
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
this.categoriesFieldset = new ve.ui.FieldsetLayout( {
|
this.categoriesFieldset = new ve.ui.FieldsetLayout( {
|
||||||
'$$': this.frame.$$, 'label': ve.msg( 'visualeditor-dialog-meta-categories-data-label' ), 'icon': 'tag'
|
'$$': this.frame.$$,
|
||||||
|
'label': ve.msg( 'visualeditor-dialog-meta-categories-data-label' ),
|
||||||
|
'icon': 'tag'
|
||||||
} );
|
} );
|
||||||
this.categorySettingsFieldset = new ve.ui.FieldsetLayout( {
|
this.categoryOptionsFieldset = new ve.ui.FieldsetLayout( {
|
||||||
'$$': this.frame.$$, 'label': ve.msg( 'visualeditor-dialog-meta-categories-settings-label' ), 'icon': 'settings'
|
'$$': this.frame.$$,
|
||||||
|
'label': ve.msg( 'visualeditor-dialog-meta-categories-options' ),
|
||||||
|
'icon': 'settings'
|
||||||
} );
|
} );
|
||||||
this.categoryWidget = new ve.ui.MWCategoryWidget( {
|
this.categoryWidget = new ve.ui.MWCategoryWidget( {
|
||||||
'$$': this.frame.$$, '$overlay': this.$overlay
|
'$$': this.frame.$$, '$overlay': this.$overlay
|
||||||
|
@ -75,7 +79,9 @@ ve.ui.MWMetaDialog.prototype.initialize = function () {
|
||||||
'label': ve.msg( 'visualeditor-dialog-meta-categories-defaultsort-label' )
|
'label': ve.msg( 'visualeditor-dialog-meta-categories-defaultsort-label' )
|
||||||
} );
|
} );
|
||||||
this.languagesFieldset = new ve.ui.FieldsetLayout( {
|
this.languagesFieldset = new ve.ui.FieldsetLayout( {
|
||||||
'$$': this.frame.$$, 'label': ve.msg( 'visualeditor-dialog-meta-languages-label' ), 'icon': 'language'
|
'$$': this.frame.$$,
|
||||||
|
'label': ve.msg( 'visualeditor-dialog-meta-languages-label' ),
|
||||||
|
'icon': 'language'
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
|
@ -97,24 +103,32 @@ ve.ui.MWMetaDialog.prototype.initialize = function () {
|
||||||
'icon': 'language'
|
'icon': 'language'
|
||||||
} );
|
} );
|
||||||
|
|
||||||
this.pages.categories.$.append( this.categoriesFieldset.$, this.categorySettingsFieldset.$ );
|
this.pages.categories.$.append( this.categoriesFieldset.$, this.categoryOptionsFieldset.$ );
|
||||||
this.categoriesFieldset.$.append( this.categoryWidget.$ );
|
this.categoriesFieldset.$.append( this.categoryWidget.$ );
|
||||||
this.categorySettingsFieldset.$.append( this.defaultSortLabel.$, this.defaultSortInput.$ );
|
this.categoryOptionsFieldset.$.append( this.defaultSortLabel.$, this.defaultSortInput.$ );
|
||||||
|
|
||||||
this.pages.languages.$.append( this.languagesFieldset.$ );
|
this.pages.languages.$.append( this.languagesFieldset.$ );
|
||||||
|
|
||||||
this.languagesFieldset.$
|
this.languagesFieldset.$.append(
|
||||||
.append( this.frame.$$( '<span>' ).text( ve.msg( 'visualeditor-dialog-meta-languages-readonlynote' ) ) );
|
this.frame.$$( '<span>' )
|
||||||
|
.text( ve.msg( 'visualeditor-dialog-meta-languages-readonlynote' ) )
|
||||||
|
);
|
||||||
|
|
||||||
languagePromise = this.getAllLanguageItems();
|
languagePromise = this.getAllLanguageItems();
|
||||||
languagePromise.done( ve.bind( function ( languages ) {
|
languagePromise.done( ve.bind( function ( languages ) {
|
||||||
var i, $languagesTable = this.frame.$$( '<table>' ), languageslength = languages.length;
|
var i, $languagesTable = this.frame.$$( '<table>' ), languageslength = languages.length;
|
||||||
|
|
||||||
$languagesTable
|
$languagesTable
|
||||||
.addClass( 've-ui-dialog-meta-languages-table' )
|
.addClass( 've-ui-mwMetaDialog-languages-table' )
|
||||||
.append( this.frame.$$( '<tr>' )
|
.append( this.frame.$$( '<tr>' )
|
||||||
.append( this.frame.$$( '<th>' ).append( ve.msg( 'visualeditor-dialog-meta-languages-code-label' ) ) )
|
.append(
|
||||||
.append( this.frame.$$( '<th>' ).append( ve.msg( 'visualeditor-dialog-meta-languages-link-label' ) ) )
|
this.frame.$$( '<th>' )
|
||||||
|
.append( ve.msg( 'visualeditor-dialog-meta-languages-code-label' ) )
|
||||||
|
)
|
||||||
|
.append(
|
||||||
|
this.frame.$$( '<th>' )
|
||||||
|
.append( ve.msg( 'visualeditor-dialog-meta-languages-link-label' ) )
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
for ( i = 0; i < languageslength; i++ ) {
|
for ( i = 0; i < languageslength; i++ ) {
|
||||||
|
|
|
@ -165,25 +165,40 @@
|
||||||
height: 10em;
|
height: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-ui-dialog-meta-languages-table {
|
.ve-ui-mwTemplateDialog-addParameterFieldset .ve-ui-widget {
|
||||||
margin: 2em 0 0 3em;
|
display: inline-block;
|
||||||
border: 1px solid silver;
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ve.ui.MWMetaDialog */
|
||||||
|
|
||||||
|
.ve-ui-mwMetaDialog-languages-table {
|
||||||
|
margin: 2em 0 0 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-ui-dialog-meta-languages-table th {
|
.ve-ui-mwMetaDialog-languages-table th {
|
||||||
background: #E8E8E8;
|
border-bottom: solid 1px #ddd;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-ui-dialog-meta-languages-table th, td {
|
.ve-ui-mwMetaDialog-languages-table th, td {
|
||||||
padding: 0.5em 1em;
|
padding: 0.75em 1em;
|
||||||
|
border-bottom: solid 1px white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-ui-dialog-meta-languages-table tr:nth-child(odd) td {
|
.ve-ui-mwMetaDialog-languages-table tr td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ve-ui-mwMetaDialog-languages-table tr:nth-child(odd) td {
|
||||||
background: #F0F0F0;
|
background: #F0F0F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-ui-dialog-meta-languages-table tr:nth-child(even) td {
|
.ve-ui-mwMetaDialog-languages-table tr:nth-child(even) td {
|
||||||
background: #F8F8F8;
|
background: #F8F8F8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue