mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-12 09:27:36 +00:00
Merge "Use mw-mmv CSS prefix consistently for all things"
This commit is contained in:
commit
d72aa68694
|
@ -284,9 +284,9 @@
|
|||
*/
|
||||
MMVB.setupOverlay = function () {
|
||||
this.$overlay = $( '<div>' )
|
||||
.addClass( 'mlb-overlay' );
|
||||
.addClass( 'mw-mmv-overlay' );
|
||||
|
||||
$( document.body ).addClass( 'mw-mlb-lightbox-open' )
|
||||
$( document.body ).addClass( 'mw-mmv-lightbox-open' )
|
||||
.append( this.$overlay );
|
||||
};
|
||||
|
||||
|
@ -294,7 +294,7 @@
|
|||
* Cleans up the overlay
|
||||
*/
|
||||
MMVB.cleanupOverlay = function () {
|
||||
$( document.body ).removeClass( 'mw-mlb-lightbox-open' );
|
||||
$( document.body ).removeClass( 'mw-mmv-lightbox-open' );
|
||||
|
||||
if ( this.$overlay ) {
|
||||
this.$overlay.remove();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.mlb-overlay {
|
||||
.mw-mmv-overlay {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
|
@ -8,20 +8,20 @@
|
|||
background-color: rgb(0,0,0);
|
||||
}
|
||||
|
||||
body.mw-mlb-lightbox-open {
|
||||
body.mw-mmv-lightbox-open {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
body.mw-mlb-lightbox-open #mw-page-base,
|
||||
body.mw-mlb-lightbox-open #mw-head-base,
|
||||
body.mw-mlb-lightbox-open #mw-navigation,
|
||||
body.mw-mlb-lightbox-open #mw-footer,
|
||||
body.mw-mlb-lightbox-open #content {
|
||||
body.mw-mmv-lightbox-open #mw-page-base,
|
||||
body.mw-mmv-lightbox-open #mw-head-base,
|
||||
body.mw-mmv-lightbox-open #mw-navigation,
|
||||
body.mw-mmv-lightbox-open #mw-footer,
|
||||
body.mw-mmv-lightbox-open #content {
|
||||
/** Stop the article from scrolling in the background */
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.mw-mlb-lightbox-open > :not(.mlb-overlay, .mlb-wrapper) {
|
||||
body.mw-mmv-lightbox-open > :not(.mw-mmv-overlay, .mw-mmv-wrapper) {
|
||||
/** Stop the article from scrolling in the background */
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
/**
|
||||
* Override multilightbox styles that don't apply to us
|
||||
*/
|
||||
.mlb-wrapper {
|
||||
.mw-mmv-wrapper {
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
.mlb-main {
|
||||
.mw-mmv-main {
|
||||
height: auto;
|
||||
|
||||
.jq-fullscreened {
|
||||
|
@ -30,25 +30,25 @@
|
|||
@metadata-background: rgb(251, 251, 251);
|
||||
@progress-height: 3px;
|
||||
|
||||
.mlb-image-wrapper,
|
||||
.mw-mlb-controls {
|
||||
.mw-mmv-image-wrapper,
|
||||
.mw-mmv-controls {
|
||||
top: 0px;
|
||||
bottom: @bottom-height;
|
||||
}
|
||||
|
||||
.jq-fullscreened {
|
||||
.mlb-image-wrapper,
|
||||
.mlb-post-image,
|
||||
.mw-mlb-controls {
|
||||
.mw-mmv-image-wrapper,
|
||||
.mw-mmv-post-image,
|
||||
.mw-mmv-controls {
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.mw-mlb-drag-affordance {
|
||||
.mw-mmv-drag-affordance {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mlb-post-image,
|
||||
.mlb-controls {
|
||||
.mw-mmv-post-image,
|
||||
.mw-mmv-controls {
|
||||
@fullscreen-padding: 10px;
|
||||
padding: (@fullscreen-padding / 2) 0;
|
||||
height: (@title-height + @fullscreen-padding);
|
||||
|
@ -61,11 +61,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mlb-post-image {
|
||||
.mw-mmv-post-image {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.mlb-controls {
|
||||
.mw-mmv-controls {
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s;
|
||||
|
||||
|
@ -79,11 +79,11 @@
|
|||
cursor: none;
|
||||
}
|
||||
|
||||
.mlb-image-wrapper {
|
||||
.mw-mmv-image-wrapper {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.mlb-post-image {
|
||||
.mw-mmv-post-image {
|
||||
bottom: auto;
|
||||
height: auto;
|
||||
color: #333333;
|
||||
|
@ -93,15 +93,15 @@
|
|||
opacity: 0;
|
||||
|
||||
&.invite {
|
||||
.animation( invite-animation 0.5s ease 0s 1 normal forwards )
|
||||
.animation( mw-mmv-invite-animation 0.5s ease 0s 1 normal forwards )
|
||||
}
|
||||
}
|
||||
|
||||
.mlb-post-image.invited {
|
||||
.mw-mmv-post-image.invited {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.invite-animation {
|
||||
.mw-mmv-invite-animation() {
|
||||
0% {
|
||||
opacity: 0.6;
|
||||
margin-top: 5px;
|
||||
|
@ -116,118 +116,71 @@
|
|||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes invite-animation {
|
||||
.invite-animation;
|
||||
@-webkit-keyframes mw-mmv-invite-animation {
|
||||
.mw-mmv-invite-animation;
|
||||
}
|
||||
|
||||
@-moz-keyframes invite-animation {
|
||||
.invite-animation;
|
||||
@-moz-keyframes mw-mmv-invite-animation {
|
||||
.mw-mmv-invite-animation;
|
||||
}
|
||||
|
||||
@-o-keyframes invite-animation {
|
||||
.invite-animation;
|
||||
@-o-keyframes mw-mmv-invite-animation {
|
||||
.mw-mmv-invite-animation;
|
||||
}
|
||||
|
||||
@keyframes invite-animation {
|
||||
.invite-animation;
|
||||
@keyframes mw-mmv-invite-animation {
|
||||
.mw-mmv-invite-animation;
|
||||
}
|
||||
|
||||
.mlb-controls {
|
||||
.mw-mmv-controls {
|
||||
height: auto;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
.mw-mlb-controls {
|
||||
border: none;
|
||||
|
||||
div {
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
body.mobile .mw-mlb-controls,
|
||||
.mw-mlb-controls-position:hover .mw-mlb-controls {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mw-lightbox-title-div,
|
||||
.mw-lightbox-extra-info-div {
|
||||
text-align: left;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.mw-lightbox-title-div {
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.mw-lightbox-extra-info-div {
|
||||
bottom: -50px;
|
||||
}
|
||||
|
||||
.mw-lightbox-extra-info-div a,
|
||||
.mw-lightbox-extra-info-div a:hover,
|
||||
.mw-lightbox-extra-info-div a:visited,
|
||||
.mw-lightbox-extra-info-div a:active,
|
||||
.mw-lightbox-extra-info-div a:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mw-lightbox .lb-container {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.mw-mlb-title-contain {
|
||||
.mw-mmv-title-contain {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mw-mlb-license,
|
||||
.mw-mlb-title-contain {
|
||||
.mw-mmv-license,
|
||||
.mw-mmv-title-contain {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mw-mlb-title-para {
|
||||
.mw-mmv-title-para {
|
||||
margin-bottom: 1px;
|
||||
margin-top: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mw-mlb-title {
|
||||
.mw-mmv-title {
|
||||
font-size: 1.2em;
|
||||
max-width: 60%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mw-mlb-image-metadata {
|
||||
.mw-mmv-image-metadata {
|
||||
width: 100%;
|
||||
background-color: #fbfbfb;
|
||||
position: relative;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.jq-fullscreened .mw-mlb-image-metadata {
|
||||
.jq-fullscreened .mw-mmv-image-metadata {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mw-mlb-image-desc-div {
|
||||
.mw-mmv-image-desc-div {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mw-mlb-image-desc-div,
|
||||
.mw-mlb-image-links-div {
|
||||
.mw-mmv-image-desc-div,
|
||||
.mw-mmv-image-links-div {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.mw-mlb-image-desc-div {
|
||||
.mw-mmv-image-desc-div {
|
||||
max-height: 150px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
@ -235,13 +188,13 @@ body.mobile .mw-mlb-controls,
|
|||
@littlefont: 0.85em;
|
||||
@mediumfont: 1em;
|
||||
|
||||
.mw-mlb-caption,
|
||||
.mw-mlb-image-desc {
|
||||
.mw-mmv-caption,
|
||||
.mw-mmv-image-desc {
|
||||
font-size: @mediumfont;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.mw-mlb-image-links {
|
||||
.mw-mmv-image-links {
|
||||
margin-left: 20px;
|
||||
li {
|
||||
list-style: none;
|
||||
|
@ -264,22 +217,22 @@ body.mobile .mw-mlb-controls,
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
&.mw-mlb-repo-li:before {
|
||||
&.mw-mmv-repo-li:before {
|
||||
/* @embed */
|
||||
background-image: url(img/repo.svg);
|
||||
}
|
||||
|
||||
&.mw-mlb-datetime-li:before {
|
||||
&.mw-mmv-datetime-li:before {
|
||||
/* @embed */
|
||||
background-image: url(img/time.svg);
|
||||
}
|
||||
|
||||
&.mw-mlb-username-li:before {
|
||||
&.mw-mmv-username-li:before {
|
||||
/* @embed */
|
||||
background-image: url(img/user-ltr.svg);
|
||||
}
|
||||
|
||||
&.mw-mlb-location-li:before {
|
||||
&.mw-mmv-location-li:before {
|
||||
/* @embed */
|
||||
background-image: url(img/location.svg);
|
||||
}
|
||||
|
@ -290,17 +243,17 @@ body.mobile .mw-mlb-controls,
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-license,
|
||||
.mw-mlb-title-credit {
|
||||
.mw-mmv-license,
|
||||
.mw-mmv-title-credit {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mw-mlb-title-credit {
|
||||
.mw-mmv-title-credit {
|
||||
width: 100%;
|
||||
height: @title-height;
|
||||
}
|
||||
|
||||
.mw-mlb-license {
|
||||
.mw-mmv-license {
|
||||
color: #888888;
|
||||
font-size: 0.9em;
|
||||
padding-left: 10px;
|
||||
|
@ -323,40 +276,40 @@ body.mobile .mw-mlb-controls,
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-license-contain,
|
||||
.mw-mlb-license {
|
||||
.mw-mmv-license-contain,
|
||||
.mw-mmv-license {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mw-mlb-title-para,
|
||||
.mw-mlb-credit,
|
||||
.mw-mlb-image-desc,
|
||||
.mw-mlb-caption {
|
||||
.mw-mmv-title-para,
|
||||
.mw-mmv-credit,
|
||||
.mw-mmv-image-desc,
|
||||
.mw-mmv-caption {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.mw-mlb-image-desc-div.empty .mw-mlb-image-desc {
|
||||
.mw-mmv-image-desc-div.empty .mw-mmv-image-desc {
|
||||
color: rgb(136, 136, 136);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.mw-mlb-caption.empty {
|
||||
.mw-mmv-caption.empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mw-mlb-mmv-about-links {
|
||||
.mw-mmv-about-links {
|
||||
font-size: @littlefont;
|
||||
padding: 20px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.mw-mlb-drag-affordance {
|
||||
.mw-mmv-drag-affordance {
|
||||
width: 100%;
|
||||
height: @drag-height;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mw-mlb-drag-icon {
|
||||
.mw-mmv-drag-icon {
|
||||
width: 64px;
|
||||
height: @drag-height;
|
||||
/* @embed */
|
||||
|
@ -373,22 +326,22 @@ body.mobile .mw-mlb-controls,
|
|||
}
|
||||
}
|
||||
|
||||
.mlb-post-image:hover .mw-mlb-drag-icon {
|
||||
.mw-mmv-post-image:hover .mw-mmv-drag-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.mw-mlb-progress {
|
||||
.mw-mmv-progress {
|
||||
width: 100%;
|
||||
height: @progress-height;
|
||||
background-color: rgb( 204, 204, 204 );
|
||||
margin-top: -@progress-height;
|
||||
}
|
||||
|
||||
.mw-mlb-progress.empty {
|
||||
.mw-mmv-progress.empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mw-mlb-progress-percent {
|
||||
.mw-mmv-progress-percent {
|
||||
width: 0;
|
||||
height: @progress-height;
|
||||
background-color: rgb( 0, 113, 188 );
|
||||
|
|
|
@ -56,25 +56,25 @@
|
|||
this.$filter = $( '<svg><filter id="gaussian-blur"><fegaussianblur stdDeviation="3"></filter></svg>' );
|
||||
|
||||
this.$wrapper = $( '<div>' )
|
||||
.addClass( 'mlb-wrapper' );
|
||||
.addClass( 'mw-mmv-wrapper' );
|
||||
|
||||
this.$main = $( '<div>' )
|
||||
.addClass( 'mlb-main' );
|
||||
.addClass( 'mw-mmv-main' );
|
||||
|
||||
// I blame CSS for this
|
||||
this.$innerWrapper = $( '<div>' )
|
||||
.addClass( 'mlb-image-inner-wrapper' );
|
||||
.addClass( 'mw-mmv-image-inner-wrapper' );
|
||||
|
||||
this.$imageWrapper = $( '<div>' )
|
||||
.addClass( 'mlb-image-wrapper' )
|
||||
.addClass( 'mw-mmv-image-wrapper' )
|
||||
.append( this.$innerWrapper );
|
||||
|
||||
this.$preDiv = $( '<div>' )
|
||||
.addClass( 'mlb-pre-image' );
|
||||
.addClass( 'mw-mmv-pre-image' );
|
||||
this.setupPreDiv( addToPre );
|
||||
|
||||
this.$postDiv = $( '<div>' )
|
||||
.addClass( 'mlb-post-image' );
|
||||
.addClass( 'mw-mmv-post-image' );
|
||||
this.setupPostDiv( addToPost );
|
||||
|
||||
this.$main.append(
|
||||
|
@ -241,18 +241,18 @@
|
|||
var ui = this;
|
||||
|
||||
this.$controlBar = $( '<div>' )
|
||||
.addClass( 'mlb-controls' );
|
||||
.addClass( 'mw-mmv-controls' );
|
||||
|
||||
this.$closeButton = $( '<div>' )
|
||||
.text( ' ' )
|
||||
.addClass( 'mlb-close' )
|
||||
.addClass( 'mw-mmv-close' )
|
||||
.click( function () {
|
||||
ui.unattach();
|
||||
} );
|
||||
|
||||
this.$fullscreenButton = $( '<div>' )
|
||||
.text( ' ' )
|
||||
.addClass( 'mlb-fullscreen' )
|
||||
.addClass( 'mw-mmv-fullscreen' )
|
||||
.click( function () {
|
||||
if ( ui.isFullscreen ) {
|
||||
ui.exitFullscreen();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "ui/mmv.mixins";
|
||||
|
||||
.mlb-wrapper {
|
||||
.mw-mmv-wrapper {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
|
@ -9,13 +9,13 @@
|
|||
z-index: 1001;
|
||||
}
|
||||
|
||||
.mlb-main {
|
||||
.mw-mmv-main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mlb-image-wrapper {
|
||||
.mw-mmv-image-wrapper {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0px;
|
||||
|
@ -23,32 +23,32 @@
|
|||
bottom: 0px;
|
||||
}
|
||||
|
||||
.mlb-image-inner-wrapper {
|
||||
.mw-mmv-image-inner-wrapper {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mlb-pre-image {
|
||||
.mw-mmv-pre-image {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mlb-post-image {
|
||||
.mw-mmv-post-image {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mlb-controls {
|
||||
.mw-mmv-controls {
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #7d7c81;
|
||||
}
|
||||
|
||||
.mlb-main.jq-fullscreened {
|
||||
.mw-mmv-main.jq-fullscreened {
|
||||
background-color: black;
|
||||
}
|
|
@ -44,7 +44,7 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$imageDiv = $( '<div>' )
|
||||
.addClass( 'mlb-image' );
|
||||
.addClass( 'mw-mmv-image' );
|
||||
|
||||
this.$imageDiv.appendTo( this.$container );
|
||||
|
||||
|
@ -273,7 +273,7 @@
|
|||
this.$imageDiv.empty()
|
||||
.addClass( 'error' )
|
||||
.append(
|
||||
$( '<div>' ).addClass( 'mlb-error-text' ).text(
|
||||
$( '<div>' ).addClass( 'mw-mmv-error-text' ).text(
|
||||
mw.message( 'multimediaviewer-thumbnail-error', error ).text()
|
||||
)
|
||||
);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "mmv.mixins";
|
||||
|
||||
.mlb-image {
|
||||
.mw-mmv-image {
|
||||
display: table-cell;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -16,7 +16,7 @@
|
|||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
}
|
||||
.mlb-error-text {
|
||||
.mw-mmv-error-text {
|
||||
position: absolute;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
|
@ -31,17 +31,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mlb-image.empty img {
|
||||
.mw-mmv-image.empty img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mlb-image img.blurred {
|
||||
.mw-mmv-image img.blurred {
|
||||
filter: blur(3px);
|
||||
-webkit-filter: blur(3px);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.mlb-image img {
|
||||
.mw-mmv-image img {
|
||||
display: block;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
this.$fullscreen = $fullscreenButton;
|
||||
|
||||
this.$next = $( '<div>' )
|
||||
.addClass( 'mw-mlb-next-image disabled' )
|
||||
.addClass( 'mw-mmv-next-image disabled' )
|
||||
.html( ' ' );
|
||||
|
||||
this.$prev = $( '<div>' )
|
||||
.addClass( 'mw-mlb-prev-image disabled' )
|
||||
.addClass( 'mw-mmv-prev-image disabled' )
|
||||
.html( ' ' );
|
||||
|
||||
this.$nav = this.$next
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
@navbutton-width: 18px;
|
||||
@buttons-offset: 5px;
|
||||
|
||||
.mlb-close,
|
||||
.mlb-fullscreen,
|
||||
.mw-mlb-next-image,
|
||||
.mw-mlb-prev-image {
|
||||
.mw-mmv-close,
|
||||
.mw-mmv-fullscreen,
|
||||
.mw-mmv-next-image,
|
||||
.mw-mmv-prev-image {
|
||||
cursor: pointer;
|
||||
position: fixed;
|
||||
background-repeat: no-repeat;
|
||||
|
@ -21,21 +21,21 @@
|
|||
.unselectable;
|
||||
}
|
||||
|
||||
.mlb-close.hidden,
|
||||
.mlb-fullscreen.hidden,
|
||||
.mw-mlb-next-image.hidden,
|
||||
.mw-mlb-prev-image.hidden {
|
||||
.mw-mmv-close.hidden,
|
||||
.mw-mmv-fullscreen.hidden,
|
||||
.mw-mmv-next-image.hidden,
|
||||
.mw-mmv-prev-image.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cursor-hidden {
|
||||
.mlb-close, .mlb-fullscreen, .mw-mlb-next-image, .mw-mlb-prev-image {
|
||||
.mw-mmv-close, .mw-mmv-fullscreen, .mw-mmv-next-image, .mw-mmv-prev-image {
|
||||
cursor: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mlb-close,
|
||||
.mlb-fullscreen {
|
||||
.mw-mmv-close,
|
||||
.mw-mmv-fullscreen {
|
||||
right: @buttons-offset;
|
||||
left: auto;
|
||||
transition: opacity 0.25s;
|
||||
|
@ -44,8 +44,8 @@
|
|||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.mw-mlb-next-image,
|
||||
.mw-mlb-prev-image {
|
||||
.mw-mmv-next-image,
|
||||
.mw-mmv-prev-image {
|
||||
top: -999px;
|
||||
width: 80px;
|
||||
height: 120px;
|
||||
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mlb-close {
|
||||
.mw-mmv-close {
|
||||
top: @buttons-offset;
|
||||
/* @embed */
|
||||
background-image: url(img/mw-close.svg);
|
||||
|
@ -65,7 +65,7 @@
|
|||
width: 23px;
|
||||
}
|
||||
|
||||
.mlb-fullscreen {
|
||||
.mw-mmv-fullscreen {
|
||||
top: (@buttons-offset + 37px);
|
||||
/* @embed */
|
||||
background-image: url(img/mw-fullscreen-ltr.svg);
|
||||
|
@ -73,12 +73,12 @@
|
|||
height: 22px;
|
||||
}
|
||||
|
||||
.jq-fullscreened .mlb-fullscreen {
|
||||
.jq-fullscreened .mw-mmv-fullscreen {
|
||||
/* @embed */
|
||||
background-image: url(img/mw-defullscreen-ltr.svg);
|
||||
}
|
||||
|
||||
.mw-mlb-next-image {
|
||||
.mw-mmv-next-image {
|
||||
/* @embed */
|
||||
background-image: url(img/next-ltr.svg);
|
||||
background-position: right;
|
||||
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-prev-image {
|
||||
.mw-mmv-prev-image {
|
||||
/* @embed */
|
||||
background-image: url(img/prev-ltr.svg);
|
||||
background-position: left;
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
cat = categories[i];
|
||||
|
||||
if ( !this.$categories ) {
|
||||
this.$categories = $( '<li>' ).addClass( 'mw-mlb-image-category' )
|
||||
this.$categories = $( '<li>' ).addClass( 'mw-mmv-image-category' )
|
||||
.appendTo( this.$container );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.mw-mlb-image-links li.mw-mlb-image-category {
|
||||
.mw-mmv-image-links li.mw-mmv-image-category {
|
||||
&:before {
|
||||
/* @embed */
|
||||
background-image: url(img/tag.svg);
|
||||
|
|
|
@ -30,15 +30,15 @@
|
|||
this.htmlUtils = new mw.mmv.HtmlUtils();
|
||||
|
||||
this.$imageDescDiv = $( '<div>' )
|
||||
.addClass( 'mw-mlb-image-desc-div empty' )
|
||||
.addClass( 'mw-mmv-image-desc-div empty' )
|
||||
.appendTo( this.$container );
|
||||
|
||||
this.$imageCaption = $( '<p>' )
|
||||
.addClass( 'mw-mlb-caption empty' )
|
||||
.addClass( 'mw-mmv-caption empty' )
|
||||
.appendTo( this.$imageDescDiv );
|
||||
|
||||
this.$imageDesc = $( '<p>' )
|
||||
.addClass( 'mw-mlb-image-desc' )
|
||||
.addClass( 'mw-mmv-image-desc' )
|
||||
.appendTo( this.$imageDescDiv );
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
FileUsage.prototype.init = function() {
|
||||
this.$title = $( '<h3>' ).appendTo( this.$box );
|
||||
this.$usageList = $( '<ul>' ).appendTo( this.$box );
|
||||
this.$box.addClass( 'mw-mlb-fileusage-container' );
|
||||
this.$box.addClass( 'mw-mmv-fileusage-container' );
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@
|
|||
var $section;
|
||||
|
||||
if ( fileUsage.totalCount ) {
|
||||
$section = $( '<li>' ).addClass( 'mw-mlb-fileusage-' + sectionType + '-section' )
|
||||
$section = $( '<li>' ).addClass( 'mw-mmv-fileusage-' + sectionType + '-section' )
|
||||
.msg( 'multimediaviewer-fileusage-' + sectionType + '-section' );
|
||||
|
||||
this.$usageList.append( $section );
|
||||
|
@ -156,7 +156,7 @@
|
|||
*/
|
||||
FileUsage.prototype.addViewAllLink = function( $section, url ) {
|
||||
$section.append(
|
||||
$( '<span>' ).addClass( 'mw-mlb-fileusage-view-all' ).append(
|
||||
$( '<span>' ).addClass( 'mw-mmv-fileusage-view-all' ).append(
|
||||
$( '<a>' ).msg( 'multimediaviewer-fileusage-link' )
|
||||
.attr( 'href', url )
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "mmv.mixins";
|
||||
|
||||
.mw-mlb-fileusage-container {
|
||||
.mw-mmv-fileusage-container {
|
||||
@border-color: #DDDDDD;
|
||||
@info-color: #565656;
|
||||
@dark-text: #333333;
|
||||
|
@ -37,7 +37,7 @@
|
|||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.mw-mlb-fileusage-local-section, &.mw-mlb-fileusage-global-section, &.mw-mlb-fileusage-view-all {
|
||||
&.mw-mmv-fileusage-local-section, &.mw-mmv-fileusage-global-section, &.mw-mmv-fileusage-view-all {
|
||||
color: @dark-text;
|
||||
border-bottom: 1px solid @border-color;
|
||||
margin: 3px 0;
|
||||
|
@ -51,7 +51,7 @@
|
|||
font-size: 0.9em;
|
||||
color: @info-color;
|
||||
}
|
||||
.mw-mlb-fileusage-view-all {
|
||||
.mw-mmv-fileusage-view-all {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "mmv.mixins";
|
||||
|
||||
.mw-mlb-info-box {
|
||||
.mw-mmv-info-box {
|
||||
@box-color: #FFFFFF;
|
||||
@border-color: #DDDDDD;
|
||||
@border-shadow-color: #C9C9C9;
|
||||
|
|
|
@ -120,18 +120,18 @@
|
|||
this.initializeProgress();
|
||||
|
||||
this.$dragBar = $( '<div>' )
|
||||
.addClass( 'mw-mlb-drag-affordance' )
|
||||
.addClass( 'mw-mmv-drag-affordance' )
|
||||
.appendTo( this.$controlBar )
|
||||
.click( function () {
|
||||
panel.toggle();
|
||||
} );
|
||||
|
||||
this.$dragIcon = $( '<div>' )
|
||||
.addClass( 'mw-mlb-drag-icon' )
|
||||
.addClass( 'mw-mmv-drag-icon' )
|
||||
.appendTo( this.$dragBar );
|
||||
|
||||
this.$titleDiv = $( '<div>' )
|
||||
.addClass( 'mw-mlb-title-contain' )
|
||||
.addClass( 'mw-mmv-title-contain' )
|
||||
.appendTo( this.$controlBar );
|
||||
|
||||
this.$container.append( this.$controlBar );
|
||||
|
@ -145,7 +145,7 @@
|
|||
*/
|
||||
MPP.initializeTitleAndCredit = function () {
|
||||
this.$titleAndCredit = $( '<div>' )
|
||||
.addClass( 'mw-mlb-title-credit' )
|
||||
.addClass( 'mw-mmv-title-credit' )
|
||||
.appendTo( this.$titleDiv );
|
||||
|
||||
this.initializeTitle();
|
||||
|
@ -157,11 +157,11 @@
|
|||
*/
|
||||
MPP.initializeTitle = function () {
|
||||
this.$titlePara = $( '<p>' )
|
||||
.addClass( 'mw-mlb-title-para' )
|
||||
.addClass( 'mw-mmv-title-para' )
|
||||
.appendTo( this.$titleAndCredit );
|
||||
|
||||
this.$title = $( '<span>' )
|
||||
.addClass( 'mw-mlb-title' )
|
||||
.addClass( 'mw-mmv-title' )
|
||||
.appendTo( this.$titlePara );
|
||||
};
|
||||
|
||||
|
@ -170,13 +170,13 @@
|
|||
*/
|
||||
MPP.initializeCredit = function () {
|
||||
this.$source = $( '<span>' )
|
||||
.addClass( 'mw-mlb-source' );
|
||||
.addClass( 'mw-mmv-source' );
|
||||
|
||||
this.$author = $( '<span>' )
|
||||
.addClass( 'mw-mlb-author' );
|
||||
.addClass( 'mw-mmv-author' );
|
||||
|
||||
this.$credit = $( '<p>' )
|
||||
.addClass( 'mw-mlb-credit empty' )
|
||||
.addClass( 'mw-mmv-credit empty' )
|
||||
.html(
|
||||
mw.message(
|
||||
'multimediaviewer-credit',
|
||||
|
@ -194,12 +194,12 @@
|
|||
var panel = this;
|
||||
|
||||
this.$license = $( '<a>' )
|
||||
.addClass( 'mw-mlb-license empty' )
|
||||
.addClass( 'mw-mmv-license empty' )
|
||||
.prop( 'href', '#' )
|
||||
.appendTo( this.$titlePara );
|
||||
|
||||
this.$permissionLink = $( '<span>' )
|
||||
.addClass( 'mw-mlb-permission-link mw-mlb-label' )
|
||||
.addClass( 'mw-mmv-permission-link mw-mmv-label' )
|
||||
.text( mw.message( 'multimediaviewer-permission-link' ).text() )
|
||||
.appendTo( this.$titlePara )
|
||||
.hide()
|
||||
|
@ -214,15 +214,15 @@
|
|||
*/
|
||||
MPP.initializeImageMetadata = function () {
|
||||
this.$imageMetadata = $( '<div>' )
|
||||
.addClass( 'mw-mlb-image-metadata' )
|
||||
.addClass( 'mw-mmv-image-metadata' )
|
||||
.appendTo( this.$container );
|
||||
|
||||
this.$imageMetadataLeft = $( '<div>' )
|
||||
.addClass( 'mw-mlb-image-metadata-column mw-mlb-image-metadata-desc-column' )
|
||||
.addClass( 'mw-mmv-image-metadata-column mw-mmv-image-metadata-desc-column' )
|
||||
.appendTo( this.$imageMetadata );
|
||||
|
||||
this.$imageMetadataRight = $( '<div>' )
|
||||
.addClass( 'mw-mlb-image-metadata-column mw-mlb-image-metadata-links-column' )
|
||||
.addClass( 'mw-mmv-image-metadata-column mw-mmv-image-metadata-links-column' )
|
||||
.appendTo( this.$imageMetadata );
|
||||
|
||||
this.description = new mw.mmv.ui.Description( this.$imageMetadataLeft );
|
||||
|
@ -235,11 +235,11 @@
|
|||
*/
|
||||
MPP.initializeImageLinks = function () {
|
||||
this.$imageLinkDiv = $( '<div>' )
|
||||
.addClass( 'mw-mlb-image-links-div' )
|
||||
.addClass( 'mw-mmv-image-links-div' )
|
||||
.appendTo( this.$imageMetadataRight );
|
||||
|
||||
this.$imageLinks = $( '<ul>' )
|
||||
.addClass( 'mw-mlb-image-links' )
|
||||
.addClass( 'mw-mmv-image-links' )
|
||||
.appendTo( this.$imageLinkDiv );
|
||||
|
||||
this.initializeRepoLink();
|
||||
|
@ -261,11 +261,11 @@
|
|||
*/
|
||||
MPP.initializeRepoLink = function () {
|
||||
this.$repoLi = $( '<li>' )
|
||||
.addClass( 'mw-mlb-repo-li empty' )
|
||||
.addClass( 'mw-mmv-repo-li empty' )
|
||||
.appendTo( this.$imageLinks );
|
||||
|
||||
this.$repo = $( '<a>' )
|
||||
.addClass( 'mw-mlb-repo' )
|
||||
.addClass( 'mw-mmv-repo' )
|
||||
.prop( 'href', '#' )
|
||||
.click( function ( e ) {
|
||||
var $link = $( this ),
|
||||
|
@ -296,11 +296,11 @@
|
|||
*/
|
||||
MPP.initializeDatetime = function () {
|
||||
this.$datetimeLi = $( '<li>' )
|
||||
.addClass( 'mw-mlb-datetime-li empty' )
|
||||
.addClass( 'mw-mmv-datetime-li empty' )
|
||||
.appendTo( this.$imageLinks );
|
||||
|
||||
this.$datetime = $( '<span>' )
|
||||
.addClass( 'mw-mlb-datetime' )
|
||||
.addClass( 'mw-mmv-datetime' )
|
||||
.appendTo( this.$datetimeLi );
|
||||
};
|
||||
|
||||
|
@ -309,11 +309,11 @@
|
|||
*/
|
||||
MPP.initializeUploader = function () {
|
||||
this.$usernameLi = $( '<li>' )
|
||||
.addClass( 'mw-mlb-username-li empty' )
|
||||
.addClass( 'mw-mmv-username-li empty' )
|
||||
.appendTo( this.$imageLinks );
|
||||
|
||||
this.$username = $( '<a>' )
|
||||
.addClass( 'mw-mlb-username' )
|
||||
.addClass( 'mw-mmv-username' )
|
||||
.prop( 'href', '#' )
|
||||
.appendTo( this.$usernameLi );
|
||||
};
|
||||
|
@ -323,11 +323,11 @@
|
|||
*/
|
||||
MPP.initializeLocation = function () {
|
||||
this.$locationLi = $( '<li>' )
|
||||
.addClass( 'mw-mlb-location-li empty' )
|
||||
.addClass( 'mw-mmv-location-li empty' )
|
||||
.appendTo( this.$imageLinks );
|
||||
|
||||
this.$location = $( '<a>' )
|
||||
.addClass( 'mw-mlb-location' )
|
||||
.addClass( 'mw-mmv-location' )
|
||||
.appendTo( this.$locationLi );
|
||||
};
|
||||
|
||||
|
@ -340,20 +340,20 @@
|
|||
this.$mmvAboutLink = $( '<a>' )
|
||||
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).infoLink )
|
||||
.text( mw.message( 'multimediaviewer-about-mmv' ).text() )
|
||||
.addClass( 'mw-mlb-mmv-about-link' );
|
||||
.addClass( 'mw-mmv-about-link' );
|
||||
|
||||
this.$mmvDiscussLink = $( '<a>' )
|
||||
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).discussionLink )
|
||||
.text( mw.message( 'multimediaviewer-discuss-mmv' ).text() )
|
||||
.addClass( 'mw-mlb-mmv-discuss-link' );
|
||||
.addClass( 'mw-mmv-discuss-link' );
|
||||
|
||||
this.$mmvHelpLink = $( '<a>' )
|
||||
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).helpLink )
|
||||
.text( mw.message( 'multimediaviewer-help-mmv' ).text() )
|
||||
.addClass( 'mw-mlb-mmv-help-link' );
|
||||
.addClass( 'mw-mmv-help-link' );
|
||||
|
||||
this.$mmvAboutLinks = $( '<div>' )
|
||||
.addClass( 'mw-mlb-mmv-about-links' )
|
||||
.addClass( 'mw-mmv-about-links' )
|
||||
.append(
|
||||
this.$mmvAboutLink,
|
||||
separator,
|
||||
|
@ -369,11 +369,11 @@
|
|||
*/
|
||||
MPP.initializeProgress = function () {
|
||||
this.$progress = $( '<div>' )
|
||||
.addClass( 'mw-mlb-progress empty' )
|
||||
.addClass( 'mw-mmv-progress empty' )
|
||||
.appendTo( this.$controlBar );
|
||||
|
||||
this.$percent = $( '<div>' )
|
||||
.addClass( 'mw-mlb-progress-percent' )
|
||||
.addClass( 'mw-mmv-progress-percent' )
|
||||
.appendTo( this.$progress );
|
||||
};
|
||||
|
||||
|
@ -415,7 +415,7 @@
|
|||
this.$repoLiInlineStyle = $( '<style type="text/css" />' ).appendTo( 'head' );
|
||||
}
|
||||
|
||||
this.$repoLiInlineStyle.html( '.mw-mlb-image-links li.mw-mlb-repo-li:before '
|
||||
this.$repoLiInlineStyle.html( '.mw-mmv-image-links li.mw-mmv-repo-li:before '
|
||||
+ '{ background-image: url("'
|
||||
+ favIcon
|
||||
+ '"); }'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "mmv.mixins";
|
||||
|
||||
.mw-mlb-label {
|
||||
.mw-mmv-label {
|
||||
color: #333333;
|
||||
margin-left: 6px;
|
||||
.box-round(3px);
|
||||
|
@ -12,22 +12,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-image-metadata-column {
|
||||
.mw-mmv-image-metadata-column {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mw-mlb-image-metadata-desc-column {
|
||||
.mw-mmv-image-metadata-desc-column {
|
||||
width: 66.5%;
|
||||
}
|
||||
|
||||
.mw-mlb-image-metadata-links-column {
|
||||
.mw-mmv-image-metadata-links-column {
|
||||
width: 33.5%;
|
||||
}
|
||||
|
||||
.mw-mlb-permission-link {
|
||||
.mw-mmv-permission-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mw-mlb-mmv-about-links {
|
||||
.mw-mmv-about-links {
|
||||
clear: both;
|
||||
}
|
|
@ -41,7 +41,7 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$box = $( '<div>' )
|
||||
.addClass( 'mw-mlb-permission-box mw-mlb-info-box empty')
|
||||
.addClass( 'mw-mmv-permission-box mw-mmv-info-box empty')
|
||||
.appendTo( this.$container );
|
||||
|
||||
/**
|
||||
|
@ -59,9 +59,9 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$text = $( '<div>' )
|
||||
.addClass( 'mw-mlb-permission-text' )
|
||||
.addClass( 'mw-mmv-permission-text' )
|
||||
.appendTo( this.$box )
|
||||
.on( 'click', '.mw-mlb-permission-text-viewmore', function( e ) {
|
||||
.on( 'click', '.mw-mmv-permission-text-viewmore', function( e ) {
|
||||
e.preventDefault();
|
||||
permission.grow();
|
||||
} )
|
||||
|
@ -72,10 +72,10 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$fader = $( '<div>' )
|
||||
.addClass( 'mw-mlb-permission-text-fader' )
|
||||
.addClass( 'mw-mmv-permission-text-fader' )
|
||||
.append(
|
||||
$( '<a>' )
|
||||
.addClass( 'mw-mlb-permission-text-viewmore' )
|
||||
.addClass( 'mw-mmv-permission-text-viewmore' )
|
||||
.prop( 'href', '#' )
|
||||
.text( mw.message( 'multimediaviewer-permission-viewmore' ).text() )
|
||||
);
|
||||
|
@ -86,7 +86,7 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$html = $( '<div>' )
|
||||
.addClass( 'mw-mlb-permission-html' )
|
||||
.addClass( 'mw-mmv-permission-html' )
|
||||
.appendTo( this.$box );
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
this.$close = $( '<div>' )
|
||||
.addClass( 'mw-mlb-permission-close' )
|
||||
.addClass( 'mw-mmv-permission-close' )
|
||||
.on( 'click', function() {
|
||||
permission.shrink();
|
||||
} )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@import "mediawiki.mixins";
|
||||
@import "mmv.mixins";
|
||||
|
||||
.mw-mlb-permission-box {
|
||||
.mw-mmv-permission-box {
|
||||
position: relative;
|
||||
|
||||
width: 90%;
|
||||
|
@ -18,7 +18,7 @@
|
|||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
.mw-mlb-permission-close {
|
||||
.mw-mmv-permission-close {
|
||||
display: none;
|
||||
|
||||
position: absolute;
|
||||
|
@ -32,7 +32,7 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mw-mlb-permission-text {
|
||||
.mw-mmv-permission-text {
|
||||
@text-font-size: 0.9em;
|
||||
@text-line-height: 1.4;
|
||||
@lines-shown: 3;
|
||||
|
@ -46,7 +46,7 @@
|
|||
line-height: @text-line-height;
|
||||
color: #555555;
|
||||
|
||||
.mw-mlb-permission-text-fader {
|
||||
.mw-mmv-permission-text-fader {
|
||||
position: absolute;
|
||||
top: (@lines-shown - 1) * @text-line-height * @text-font-size;
|
||||
width: 100%;
|
||||
|
@ -64,7 +64,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-permission-html {
|
||||
.mw-mmv-permission-html {
|
||||
padding: 0 15px 15px;
|
||||
display: none;
|
||||
max-height: 400px;
|
||||
|
@ -72,15 +72,15 @@
|
|||
}
|
||||
|
||||
&.full-size {
|
||||
.mw-mlb-permission-close {
|
||||
.mw-mmv-permission-close {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mw-mlb-permission-text {
|
||||
.mw-mmv-permission-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mw-mlb-permission-html {
|
||||
.mw-mmv-permission-html {
|
||||
display: block;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
|
|
@ -30,23 +30,23 @@
|
|||
mw.mmv.ui.Element.call( this, $container );
|
||||
|
||||
this.$reuseLink = $( '<span>' )
|
||||
.addClass( 'mw-mlb-reuse-link empty' )
|
||||
.addClass( 'mw-mmv-reuse-link empty' )
|
||||
.text( mw.message( 'multimediaviewer-reuse-link' ).text() );
|
||||
|
||||
this.$reuseLink.appendTo( $linkContainer );
|
||||
|
||||
this.$reuseDialog = $( '<div>' )
|
||||
.addClass( 'mw-mlb-reuse-dialog' );
|
||||
.addClass( 'mw-mmv-reuse-dialog' );
|
||||
|
||||
this.reuseTabs = new oo.ui.MenuWidget( {
|
||||
classes: [ 'mw-mlb-reuse-tabs' ]
|
||||
classes: [ 'mw-mmv-reuse-tabs' ]
|
||||
} );
|
||||
// MenuWidget has a nasty tendency to hide itself, maybe we're not using it right?
|
||||
this.reuseTabs.hide = $.noop;
|
||||
this.reuseTabs.$element.show().appendTo( this.$reuseDialog );
|
||||
|
||||
this.$downArrow = $( '<div>' )
|
||||
.addClass( 'mw-mlb-reuse-down-arrow' )
|
||||
.addClass( 'mw-mmv-reuse-down-arrow' )
|
||||
.appendTo( this.$reuseDialog );
|
||||
|
||||
this.$reuseDialog.appendTo( this.$container );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import "mmv.mixins";
|
||||
|
||||
.mw-mlb-reuse-link {
|
||||
.mw-mmv-reuse-link {
|
||||
@reuse-link-color: rgb(136, 136, 136);
|
||||
|
||||
position: absolute;
|
||||
|
@ -41,11 +41,11 @@
|
|||
}
|
||||
|
||||
// not-so-great but quick way of ensuring the reuse link does not get overflowed with text
|
||||
.mw-mlb-title-contain {
|
||||
.mw-mmv-title-contain {
|
||||
padding-right: 175px;
|
||||
}
|
||||
|
||||
.mw-mlb-reuse-dialog {
|
||||
.mw-mmv-reuse-dialog {
|
||||
@background-color: rgb(255, 255, 255);
|
||||
@shadow-color: #aaaaaa;
|
||||
@border-radius: 3px;
|
||||
|
@ -63,7 +63,7 @@
|
|||
box-shadow: 0 2px 0 @shadow-color;
|
||||
.box-round(@border-radius);
|
||||
|
||||
.mw-mlb-reuse-tabs {
|
||||
.mw-mmv-reuse-tabs {
|
||||
@divider-color: rgb(204, 204, 204);
|
||||
|
||||
position: static;
|
||||
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-reuse-pane {
|
||||
.mw-mmv-reuse-pane {
|
||||
display: none;
|
||||
padding: 10px 20px;
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-reuse-down-arrow {
|
||||
.mw-mmv-reuse-down-arrow {
|
||||
@arrow-size: 20px;
|
||||
@arrow-border-color: #aaaaaa;
|
||||
@arrow-border-size: 2px;
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
*/
|
||||
this.formatter = new mw.mmv.EmbedFileFormatter();
|
||||
|
||||
this.$pane.addClass( 'mw-mlb-embed-pane' );
|
||||
this.$pane.addClass( 'mw-mmv-embed-pane' );
|
||||
|
||||
this.$pane.appendTo( this.$container );
|
||||
|
||||
this.createSnippetTextAreas( this.$pane );
|
||||
|
||||
this.$explanation = $( '<div>' )
|
||||
.addClass( 'mw-mlb-shareembed-explanation mw-mlb-embed-explanation' )
|
||||
.addClass( 'mw-mmv-shareembed-explanation mw-mmv-embed-explanation' )
|
||||
.text( mw.message( 'multimediaviewer-embed-explanation' ).text() )
|
||||
.appendTo( this.$pane );
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
*/
|
||||
EP.createSnippetTextAreas = function( $container ) {
|
||||
this.embedTextHtml = new oo.ui.TextInputWidget( {
|
||||
classes: [ 'mw-mlb-embed-text-html' ],
|
||||
classes: [ 'mw-mmv-embed-text-html' ],
|
||||
multiline: true,
|
||||
readOnly: true
|
||||
} );
|
||||
|
@ -89,7 +89,7 @@
|
|||
.prop( 'placeholder', mw.message( 'multimediaviewer-reuse-loading-placeholder' ).text() );
|
||||
|
||||
this.embedTextWikitext = new oo.ui.TextInputWidget( {
|
||||
classes: [ 'mw-mlb-embed-text-wikitext', 'active' ],
|
||||
classes: [ 'mw-mmv-embed-text-wikitext', 'active' ],
|
||||
multiline: true,
|
||||
readOnly: true
|
||||
} );
|
||||
|
@ -114,7 +114,7 @@
|
|||
var wikitextButtonOption,
|
||||
htmlButtonOption;
|
||||
this.embedSwitch = new oo.ui.ButtonSelectWidget( {
|
||||
classes: [ 'mw-mlb-embed-select' ]
|
||||
classes: [ 'mw-mmv-embed-select' ]
|
||||
} );
|
||||
|
||||
wikitextButtonOption = new oo.ui.ButtonOptionWidget( 'wikitext', {
|
||||
|
@ -144,12 +144,12 @@
|
|||
*/
|
||||
EP.createSizePulldownMenus = function( $container ) {
|
||||
var placeholderDimensions = $( '<span>' )
|
||||
.addClass( 'mw-mlb-embed-dimensions' )
|
||||
.addClass( 'mw-mmv-embed-dimensions' )
|
||||
.text( mw.message( 'multimediaviewer-embed-dimensions', 0, 0 ).text() ).get( 0 ).outerHTML;
|
||||
|
||||
// Wikitext sizes pulldown menu
|
||||
this.embedSizeSwitchWikitext = new oo.ui.InlineMenuWidget( {
|
||||
classes: [ 'mw-mlb-embed-size', 'active' ]
|
||||
classes: [ 'mw-mmv-embed-size', 'active' ]
|
||||
} );
|
||||
|
||||
this.embedSizeChoicesWikitext = {};
|
||||
|
@ -195,7 +195,7 @@
|
|||
|
||||
// Html sizes pulldown menu
|
||||
this.embedSizeSwitchHtml = new oo.ui.InlineMenuWidget( {
|
||||
classes: [ 'mw-mlb-embed-size' ]
|
||||
classes: [ 'mw-mmv-embed-size' ]
|
||||
} );
|
||||
|
||||
this.embedHtmlSizeChoices = {};
|
||||
|
@ -594,7 +594,7 @@
|
|||
data.height = sizes[data.name].height;
|
||||
|
||||
dimensions = $( '<span>' )
|
||||
.addClass( 'mw-mlb-embed-dimensions' )
|
||||
.addClass( 'mw-mmv-embed-dimensions' )
|
||||
.text( mw.message( 'multimediaviewer-embed-dimensions', data.width, data.height ).text() ).get( 0 ).outerHTML;
|
||||
|
||||
$label = $( '<span>' ).html(
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
@embed-dimensions-color: #aaaaaa;
|
||||
@textarea-text-color: #333333;
|
||||
|
||||
.mw-mlb-reuse-pane {
|
||||
.mw-mlb-embed-text-html,
|
||||
.mw-mlb-embed-text-wikitext {
|
||||
.mw-mmv-reuse-pane {
|
||||
.mw-mmv-embed-text-html,
|
||||
.mw-mmv-embed-text-wikitext {
|
||||
display: none;
|
||||
width: auto;
|
||||
|
||||
|
@ -20,16 +20,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-reuse-dialog .mw-mlb-embed-pane {
|
||||
.mw-mmv-reuse-dialog .mw-mmv-embed-pane {
|
||||
padding: 5px 27px;
|
||||
|
||||
.mw-mlb-embed-explanation {
|
||||
.mw-mmv-embed-explanation {
|
||||
padding-bottom: 10px;
|
||||
top: 0
|
||||
}
|
||||
}
|
||||
|
||||
.mw-mlb-embed-switch {
|
||||
.mw-mmv-embed-switch {
|
||||
div {
|
||||
padding: 1px 3px;
|
||||
background-color: @switch-color;
|
||||
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-embed-size {
|
||||
.mw-mmv-embed-size {
|
||||
display: none;
|
||||
|
||||
&.active {
|
||||
|
@ -52,6 +52,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-embed-dimensions {
|
||||
.mw-mmv-embed-dimensions {
|
||||
color: @embed-dimensions-color;
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
SP = Share.prototype;
|
||||
|
||||
SP.init = function () {
|
||||
this.$pane.addClass( 'mw-mlb-share-pane active' )
|
||||
this.$pane.addClass( 'mw-mmv-share-pane active' )
|
||||
.appendTo( this.$container );
|
||||
|
||||
this.pageInput = new oo.ui.TextInputWidget( {
|
||||
classes: [ 'mw-mlb-share-page' ],
|
||||
classes: [ 'mw-mmv-share-page' ],
|
||||
readOnly: true
|
||||
} );
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
.prop( 'placeholder', mw.message( 'multimediaviewer-reuse-loading-placeholder' ).text() );
|
||||
|
||||
this.$pageLink = $( '<a>' )
|
||||
.addClass( 'mw-mlb-share-page-link' )
|
||||
.addClass( 'mw-mmv-share-page-link' )
|
||||
.prop( 'alt', mw.message( 'multimediaviewer-link-to-page' ).text() )
|
||||
.prop( 'target', '_blank' )
|
||||
.html( ' ' )
|
||||
|
@ -55,7 +55,7 @@
|
|||
this.pageInput.$element.appendTo( this.$pane );
|
||||
|
||||
this.$explanation = $( '<div>' )
|
||||
.addClass( 'mw-mlb-shareembed-explanation' )
|
||||
.addClass( 'mw-mmv-shareembed-explanation' )
|
||||
.text( mw.message( 'multimediaviewer-share-explanation' ).text() )
|
||||
.appendTo( this.$pane );
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@input-text-color: #333333;
|
||||
|
||||
.mw-mlb-share-pane {
|
||||
.mw-mlb-share-page {
|
||||
.mw-mmv-share-pane {
|
||||
.mw-mmv-share-page {
|
||||
// override OOJS-UI fixed width
|
||||
width: auto;
|
||||
// make sure this is a new block formatting context so that the float shrinks it instead of
|
||||
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mlb-share-page-link {
|
||||
.mw-mmv-share-page-link {
|
||||
float: left;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@explanation-color: #aaaaaa;
|
||||
|
||||
.mw-mlb-shareembed-explanation {
|
||||
.mw-mmv-shareembed-explanation {
|
||||
color: @explanation-color;
|
||||
font-size: 0.9em;
|
||||
position: relative;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* Container for the tab.
|
||||
* @property {jQuery}
|
||||
*/
|
||||
this.$pane = $( '<div>' ).addClass( 'mw-mlb-reuse-pane' );
|
||||
this.$pane = $( '<div>' ).addClass( 'mw-mmv-reuse-pane' );
|
||||
|
||||
}
|
||||
oo.inheritClass( Tab, mw.mmv.ui.Element );
|
||||
|
|
|
@ -10,31 +10,31 @@ class LightboxDemoPage
|
|||
a(:image1_in_article, href: /Kerala\.jpg$/)
|
||||
|
||||
# Wrapper div for all mmv elements
|
||||
div(:mmv_wrapper, class: "mlb-wrapper")
|
||||
div(:mmv_wrapper, class: "mw-mmv-wrapper")
|
||||
|
||||
# Wrapper div for image
|
||||
div(:mmv_image_div, class: "mlb-image")
|
||||
div(:mmv_image_div, class: "mw-mmv-image")
|
||||
|
||||
# Metadata elements
|
||||
span(:mmv_metadata_title, class: "mw-mlb-title")
|
||||
a(:mmv_metadata_license, class: "mw-mlb-license cc-license")
|
||||
p(:mmv_metadata_credit, class: "mw-mlb-credit")
|
||||
span(:mmv_metadata_source, class: "mw-mlb-source")
|
||||
span(:mmv_metadata_title, class: "mw-mmv-title")
|
||||
a(:mmv_metadata_license, class: "mw-mmv-license cc-license")
|
||||
p(:mmv_metadata_credit, class: "mw-mmv-credit")
|
||||
span(:mmv_metadata_source, class: "mw-mmv-source")
|
||||
|
||||
div(:mmv_image_metadata_wrapper, class: "mw-mlb-image-metadata")
|
||||
p(:mmv_image_metadata_caption, class: "mw-mlb-caption")
|
||||
p(:mmv_image_metadata_desc, class: "mw-mlb-image-desc")
|
||||
div(:mmv_image_metadata_wrapper, class: "mw-mmv-image-metadata")
|
||||
p(:mmv_image_metadata_caption, class: "mw-mmv-caption")
|
||||
p(:mmv_image_metadata_desc, class: "mw-mmv-image-desc")
|
||||
|
||||
ul(:mmv_image_metadata_links_wrapper, class: "mw-mlb-image-links")
|
||||
a(:mmv_image_metadata_repo_link, class: "mw-mlb-repo")
|
||||
li(:mmv_image_metadata_category_links_wrapper, class: "mw-mlb-image-category")
|
||||
ul(:mmv_image_metadata_links_wrapper, class: "mw-mmv-image-links")
|
||||
a(:mmv_image_metadata_repo_link, class: "mw-mmv-repo")
|
||||
li(:mmv_image_metadata_category_links_wrapper, class: "mw-mmv-image-category")
|
||||
|
||||
# File usage
|
||||
div(:mmv_image_metadata_fileusage_wrapper, class: "mw-mlb-fileusage-container")
|
||||
li(:mmv_image_metadata_fileusage_local_section_title, class: "mw-mlb-fileusage-local-section")
|
||||
div(:mmv_image_metadata_fileusage_wrapper, class: "mw-mmv-fileusage-container")
|
||||
li(:mmv_image_metadata_fileusage_local_section_title, class: "mw-mmv-fileusage-local-section")
|
||||
|
||||
# Controls
|
||||
div(:mmv_next_button, class: "mw-mlb-next-image")
|
||||
div(:mmv_previous_button, class: "mw-mlb-prev-image")
|
||||
div(:mmv_close_button, class: "mlb-close")
|
||||
div(:mmv_next_button, class: "mw-mmv-next-image")
|
||||
div(:mmv_previous_button, class: "mw-mmv-prev-image")
|
||||
div(:mmv_close_button, class: "mw-mmv-close")
|
||||
end
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
QUnit.test( 'getByline():', 4, function ( assert ) {
|
||||
var formatter = new mw.mmv.EmbedFileFormatter(),
|
||||
author = '<span class="mw-mlb-author">Homer</span>',
|
||||
source = '<span class="mw-mlb-source">Iliad</span>',
|
||||
author = '<span class="mw-mmv-author">Homer</span>',
|
||||
source = '<span class="mw-mmv-source">Iliad</span>',
|
||||
byline;
|
||||
|
||||
// Works with no arguments
|
||||
|
@ -65,8 +65,8 @@
|
|||
licenseInternalName = '-',
|
||||
licenseLongName = 'Public Domain, copyrights have lapsed',
|
||||
licenseUrl = '//example.com/pd',
|
||||
author = '<span class="mw-mlb-author">Homer</span>',
|
||||
source = '<span class="mw-mlb-source">Iliad</span>',
|
||||
author = '<span class="mw-mmv-author">Homer</span>',
|
||||
source = '<span class="mw-mmv-source">Iliad</span>',
|
||||
thumbUrl = 'https://upload.wikimedia.org/wikipedia/thumb/Foobar.jpg',
|
||||
width = 700,
|
||||
height = 500,
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
function checkIfUIAreasAttachedToDocument( inDocument ) {
|
||||
var msg = inDocument === 1 ? ' ' : ' not ';
|
||||
assert.strictEqual( $( '.mlb-wrapper' ).length, inDocument, 'Wrapper area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mlb-main' ).length, inDocument, 'Main area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mlb-title' ).length, inDocument, 'Title area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mlb-author' ).length, inDocument, 'Author area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mlb-image-desc' ).length, inDocument, 'Description area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mlb-image-links' ).length, inDocument, 'Links area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-wrapper' ).length, inDocument, 'Wrapper area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-main' ).length, inDocument, 'Main area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-title' ).length, inDocument, 'Title area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-author' ).length, inDocument, 'Author area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-desc' ).length, inDocument, 'Description area' + msg + 'attached.' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-links' ).length, inDocument, 'Links area' + msg + 'attached.' );
|
||||
}
|
||||
|
||||
// UI areas not attached to the document yet.
|
||||
|
@ -37,8 +37,8 @@
|
|||
checkIfUIAreasAttachedToDocument(1);
|
||||
|
||||
// Check that the close button on the lightbox still follow the spec (being visible right away)
|
||||
assert.strictEqual( $( '#qunit-fixture .mlb-close' ).length, 1, 'There should be a close button' );
|
||||
assert.ok( $( '#qunit-fixture .mlb-close' ).is(':visible'), 'The close button should be visible' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-close' ).length, 1, 'There should be a close button' );
|
||||
assert.ok( $( '#qunit-fixture .mw-mmv-close' ).is(':visible'), 'The close button should be visible' );
|
||||
|
||||
// Unattach lightbox from document
|
||||
lightbox.unattach();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
categories.set( 'http://example.net/wiki/$1', categoryNames );
|
||||
|
||||
assert.strictEqual( $( '.mw-mlb-image-category > span' ).length, 4, 'Only valid categories have an element created for them' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-category > span' ).length, 4, 'Only valid categories have an element created for them' );
|
||||
|
||||
for ( i = 0; i < categoryNames.length; i ++ ) {
|
||||
categoryName = categoryNames[ i ];
|
||||
|
@ -26,18 +26,18 @@
|
|||
continue;
|
||||
}
|
||||
|
||||
assert.strictEqual( $( '.mw-mlb-image-category > span' ).eq( j ).find( '.comma-container' ).length, j > 0 ? 1 : 0, 'Comma is properly set inside of them' );
|
||||
assert.strictEqual( $( '.mw-mlb-image-category > span' ).eq( j ).find( 'a' ).text(), categoryName, 'Category elements have correct text inside of them' );
|
||||
assert.strictEqual( $( '.mw-mlb-image-category > span' ).eq( j ).find( 'a' ).prop( 'href' ), 'http://example.net/wiki/Category:' + categoryName, 'Category links are set to the right target' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-category > span' ).eq( j ).find( '.comma-container' ).length, j > 0 ? 1 : 0, 'Comma is properly set inside of them' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-category > span' ).eq( j ).find( 'a' ).text(), categoryName, 'Category elements have correct text inside of them' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-category > span' ).eq( j ).find( 'a' ).prop( 'href' ), 'http://example.net/wiki/Category:' + categoryName, 'Category links are set to the right target' );
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
for ( i = 0; i < 3; i ++ ) {
|
||||
assert.ok( !$( '.mw-mlb-image-category > span' ).eq( i ).hasClass( 'extra' ), 'Categories before the fourth are not marked as extra' );
|
||||
assert.ok( !$( '.mw-mmv-image-category > span' ).eq( i ).hasClass( 'extra' ), 'Categories before the fourth are not marked as extra' );
|
||||
}
|
||||
|
||||
assert.ok( $( '.mw-mlb-image-category > span' ).eq( 3 ).hasClass( 'extra' ), 'Categories after the third are marked as extra' );
|
||||
assert.ok( $( '.mw-mmv-image-category > span' ).eq( 3 ).hasClass( 'extra' ), 'Categories after the third are marked as extra' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'Emptying data works as expected', 4, function ( assert ) {
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
categories.set( 'http://example.net/wiki/$1', [ 'Foo', 'Bar', 'Baz', 'Quux' ] );
|
||||
categories.empty();
|
||||
assert.strictEqual( $( '.mw-mlb-image-category > span' ).length, 0, 'All elements are removed from the DOM' );
|
||||
assert.strictEqual( $( '.mw-mmv-image-category > span' ).length, 0, 'All elements are removed from the DOM' );
|
||||
assert.strictEqual( $list.text(), '', 'Text is emptied correctly' );
|
||||
assert.strictEqual( $list.find( 'li' ).length, 0, 'List elements are all removed' );
|
||||
assert.strictEqual( categories.$categories, undefined, 'Category UI element is removed from object' );
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
assert.strictEqual( $list.eq( 0 ).text(), 'Bar' );
|
||||
assert.strictEqual( $list.eq( 1 ).text(), 'Baz' );
|
||||
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section' ).length, 0, 'There is no global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section .mw-mlb-fileusage-view-all' ).length, 0, 'The local section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section .mw-mlb-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section' ).length, 0, 'There is no global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section .mw-mmv-fileusage-view-all' ).length, 0, 'The local section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section .mw-mmv-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'File usage panel with local usage and overflow', 6, function( assert ) {
|
||||
|
@ -58,10 +58,10 @@
|
|||
|
||||
$list = $( '#qunit-fixture li:not([class])' );
|
||||
assert.strictEqual( $list.length, fileUsage.MAX_LOCAL );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section' ).length, 0, 'There is no global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section .mw-mlb-fileusage-view-all' ).length, 1, 'The local section has its "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section .mw-mlb-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section' ).length, 0, 'There is no global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section .mw-mmv-fileusage-view-all' ).length, 1, 'The local section has its "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section .mw-mmv-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'File usage panel with global usage', 10, function( assert ) {
|
||||
|
@ -86,10 +86,10 @@
|
|||
assert.strictEqual( $list.eq( 0 ).find( 'aside' ).text(), 'x.com' );
|
||||
assert.strictEqual( $list.eq( 1 ).find( 'aside' ).text(), 'y.com' );
|
||||
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section' ).length, 0, 'There is no local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section' ).length, 1, 'There is a global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section .mw-mlb-fileusage-view-all' ).length, 0, 'The local section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section .mw-mlb-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section' ).length, 0, 'There is no local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section' ).length, 1, 'There is a global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section .mw-mmv-fileusage-view-all' ).length, 0, 'The local section has no "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section .mw-mmv-fileusage-view-all' ).length, 0, 'The global section has no "view all uses" link' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'File usage panel with lots of uses', 7, function( assert ) {
|
||||
|
@ -117,10 +117,10 @@
|
|||
|
||||
$list = $( '#qunit-fixture li:not([class])' );
|
||||
assert.strictEqual( $list.length, fileUsage.MAX_LOCAL + fileUsage.MAX_GLOBAL, 'Total amount of results is correctly capped' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section' ).length, 1, 'There is a global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-local-section .mw-mlb-fileusage-view-all' ).length, 1, 'The local section has its "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-global-section .mw-mlb-fileusage-view-all' ).length, 1, 'The global section has its "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section' ).length, 1, 'There is a local section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section' ).length, 1, 'There is a global section' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-local-section .mw-mmv-fileusage-view-all' ).length, 1, 'The local section has its "view all uses" link' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-global-section .mw-mmv-fileusage-view-all' ).length, 1, 'The global section has its "view all uses" link' );
|
||||
assert.ok( $( '#qunit-fixture h3' ).text().match( totalCount ), 'The "Used in" counter has the right total' );
|
||||
} );
|
||||
|
||||
|
@ -146,6 +146,6 @@
|
|||
$list = $( '#qunit-fixture li:not([class])' );
|
||||
assert.strictEqual( $list.length, 0, 'The list is empty' );
|
||||
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mlb-fileusage-container h3' ).text(), '', 'The "Used in" counter is empty' );
|
||||
assert.strictEqual( $( '#qunit-fixture .mw-mmv-fileusage-container h3' ).text(), '', 'The "Used in" counter is empty' );
|
||||
} );
|
||||
}( mediaWiki, jQuery ) );
|
||||
|
|
Loading…
Reference in a new issue