mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Plug new vector icons / styles into inspector iframe.
Change-Id: Ibd5227de6b74c51f31093e64a4404d5830e84a4e
This commit is contained in:
parent
1df15237fb
commit
3331b16b3f
19
modules/ve/ui/styles/ve.ui.inspector.Icons-raster.css
Normal file
19
modules/ve/ui/styles/ve.ui.inspector.Icons-raster.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
.ve-ui-inspector-clearButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/clear.png);
|
||||
}
|
||||
|
||||
.ve-ui-linkInspector-location {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/down.png);
|
||||
}
|
||||
|
||||
.ve-ui-inspector-closeButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/close.png);
|
||||
}
|
||||
|
||||
.ve-ui-inspector-acceptButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/accept.png);
|
||||
}
|
19
modules/ve/ui/styles/ve.ui.inspector.Icons-vector.css
Normal file
19
modules/ve/ui/styles/ve.ui.inspector.Icons-vector.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
.ve-ui-inspector-clearButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/clear.svg);
|
||||
}
|
||||
|
||||
.ve-ui-linkInspector-location {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/down.svg);
|
||||
}
|
||||
|
||||
.ve-ui-inspector-closeButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/close.svg);
|
||||
}
|
||||
|
||||
.ve-ui-inspector-acceptButton {
|
||||
/* @embed */
|
||||
background-image: url(images/icons/accept.svg);
|
||||
}
|
|
@ -54,7 +54,8 @@ ve.ui.Context = function ( surfaceView, $overlay ) {
|
|||
/* Methods */
|
||||
|
||||
ve.ui.Context.prototype.setupInspectorSpace = function () {
|
||||
var $styleLink;
|
||||
var $styleLink,
|
||||
$iconLink;
|
||||
|
||||
// Inspector container
|
||||
this.$inspectors = $( '<div class="ve-ui-context-inspectors"></div>' );
|
||||
|
@ -87,9 +88,22 @@ ve.ui.Context.prototype.setupInspectorSpace = function () {
|
|||
'media': 'screen',
|
||||
'href': ve.init.platform.getModulesUrl() + '/ve/ui/styles/ve.ui.Inspector.css'
|
||||
} );
|
||||
// Create vector or raster icon style element.
|
||||
$iconLink =
|
||||
$( '<link>', this.inspectorDoc )
|
||||
.attr( {
|
||||
'rel': 'stylesheet',
|
||||
'type': 'text/css',
|
||||
'media': 'screen',
|
||||
'href': ve.init.platform.getModulesUrl() +
|
||||
( window.devicePixelRatio > 1 ? '/ve/ui/styles/ve.ui.Icons-vector.css' :
|
||||
'/ve/ui/styles/ve.ui.Icons-raster.css' )
|
||||
} );
|
||||
|
||||
// Append style element to head.
|
||||
$( this.inspectorDoc ).find( 'head' ).append( $styleLink );
|
||||
// Append style elements to head.
|
||||
$( this.inspectorDoc ).find( 'head' )
|
||||
.append( $styleLink )
|
||||
.append( $iconLink );
|
||||
|
||||
// Set iframe body styles.
|
||||
$( 'body', this.inspectorDoc ).css( {
|
||||
|
|
Loading…
Reference in a new issue