mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
MobileArticleTarget: Add webkit touch scrolling to panels
Also use named classes for hiding toolbars, and move the MobileFrontend overlay z-index hack out to that repo. Depends on Ia46e6b4d7a in MobileFrontend. Change-Id: I0e1f527446fd10fde5dd3107e6467fd2c8f621b2
This commit is contained in:
parent
9daee8b995
commit
f9fbd52962
|
@ -5,9 +5,8 @@
|
||||||
* @license The MIT License (MIT); see LICENSE.txt
|
* @license The MIT License (MIT); see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.ve-ui-overlay {
|
.oo-ui-panelLayout-scrollable {
|
||||||
/* enough to cover .overlay-header-container with z-index: 5 */
|
-webkit-overflow-scrolling: touch;
|
||||||
z-index: 6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-target-surface .ve-ce-documentNode,
|
.ve-init-mw-target-surface .ve-ce-documentNode,
|
||||||
|
@ -40,7 +39,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-actions {
|
.ve-init-mw-mobileArticleTarget-actions {
|
||||||
float: none;
|
float: none;
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
@ -70,28 +69,33 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools {
|
.ve-init-mw-mobileArticleTarget-tools {
|
||||||
display: table;
|
display: table;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup {
|
.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup-empty {
|
.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup-empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup:last-child {
|
.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup:last-child {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup > .oo-ui-toolGroup-tools
|
.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup > .oo-ui-toolGroup-tools
|
||||||
> .oo-ui-tool {
|
> .oo-ui-tool {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ve-init-mw-mobileArticleTarget-tools-hidden,
|
||||||
|
.ve-init-mw-mobileArticleTarget-actions-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
.ve-init-mw-mobileArticleTarget-toolbar
|
.ve-init-mw-mobileArticleTarget-toolbar
|
||||||
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement.oo-ui-tool-with-label > .oo-ui-tool-link .oo-ui-tool-title {
|
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement.oo-ui-tool-with-label > .oo-ui-tool-link .oo-ui-tool-title {
|
||||||
|
|
|
@ -93,8 +93,8 @@ ve.init.mw.MobileArticleTarget.prototype.onSurfaceReady = function () {
|
||||||
*/
|
*/
|
||||||
ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () {
|
ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () {
|
||||||
var toolbar = this.getToolbar();
|
var toolbar = this.getToolbar();
|
||||||
toolbar.$group.addClass( 'oo-ui-element-hidden' );
|
toolbar.$group.addClass( 've-init-mw-mobileArticleTarget-tools-hidden' );
|
||||||
toolbar.$actions.removeClass( 'oo-ui-element-hidden' );
|
toolbar.$actions.removeClass( 've-init-mw-mobileArticleTarget-actions-hidden' );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,8 +102,8 @@ ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () {
|
||||||
*/
|
*/
|
||||||
ve.init.mw.MobileArticleTarget.prototype.onSurfaceFocus = function () {
|
ve.init.mw.MobileArticleTarget.prototype.onSurfaceFocus = function () {
|
||||||
var toolbar = this.getToolbar();
|
var toolbar = this.getToolbar();
|
||||||
toolbar.$group.removeClass( 'oo-ui-element-hidden' );
|
toolbar.$group.removeClass( 've-init-mw-mobileArticleTarget-tools-hidden' );
|
||||||
toolbar.$actions.addClass( 'oo-ui-element-hidden' );
|
toolbar.$actions.addClass( 've-init-mw-mobileArticleTarget-actions-hidden' );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,7 +132,7 @@ ve.init.mw.MobileArticleTarget.prototype.setupToolbar = function ( surface ) {
|
||||||
|
|
||||||
this.toolbar.$element.addClass( 've-init-mw-mobileArticleTarget-toolbar' );
|
this.toolbar.$element.addClass( 've-init-mw-mobileArticleTarget-toolbar' );
|
||||||
// Append the context to the toolbar
|
// Append the context to the toolbar
|
||||||
this.toolbar.$bar.append( surface.context.$element );
|
this.toolbar.$bar.append( surface.getContext().$element );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -160,15 +160,20 @@ ve.init.mw.MobileArticleTarget.prototype.attachToolbarSaveButton = function () {
|
||||||
|
|
||||||
this.actionsToolbar.emit( 'updateState' );
|
this.actionsToolbar.emit( 'updateState' );
|
||||||
|
|
||||||
this.toolbar.$actions.append(
|
this.toolbar.$group
|
||||||
this.actionsToolbar.$element,
|
.addClass( 've-init-mw-mobileArticleTarget-tools' );
|
||||||
$( '<div>' ).addClass( 've-init-mw-mobileArticleTarget-title-container' ).append(
|
|
||||||
$( '<div>' ).addClass( 've-init-mw-mobileArticleTarget-title' ).text(
|
this.toolbar.$actions
|
||||||
new mw.Title( ve.init.target.pageName ).getMainText()
|
.addClass( 've-init-mw-mobileArticleTarget-actions' )
|
||||||
)
|
.append(
|
||||||
),
|
this.actionsToolbar.$element,
|
||||||
this.toolbarSaveButton.$element
|
$( '<div>' ).addClass( 've-init-mw-mobileArticleTarget-title-container' ).append(
|
||||||
);
|
$( '<div>' ).addClass( 've-init-mw-mobileArticleTarget-title' ).text(
|
||||||
|
new mw.Title( ve.init.target.pageName ).getMainText()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
this.toolbarSaveButton.$element
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue