mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 09:26:37 +00:00
Merge "Make tools disable correctly"
This commit is contained in:
commit
f61227fc3c
|
@ -186,11 +186,14 @@ OO.ui.ToolGroup.prototype.onMouseOut = function ( e ) {
|
|||
* @returns {OO.ui.Tool|null} Tool, `null` if none was found
|
||||
*/
|
||||
OO.ui.ToolGroup.prototype.getTargetTool = function ( e ) {
|
||||
var $item = this.$( e.target ).closest( '.oo-ui-tool-link' );
|
||||
var tool,
|
||||
$item = this.$( e.target ).closest( '.oo-ui-tool-link' );
|
||||
|
||||
if ( $item.length ) {
|
||||
return $item.parent().data( 'oo-ui-tool' );
|
||||
tool = $item.parent().data( 'oo-ui-tool' );
|
||||
}
|
||||
return null;
|
||||
|
||||
return tool && !tool.isDisabled() ? tool : null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -236,10 +236,14 @@
|
|||
border-color: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled {
|
||||
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-labeledElement-label {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-iconedElement-icon {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue