Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add patch for Extension:EmbedVideo #293

Open
wants to merge 1 commit into
base: REL1_39
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/includes/EmbedVideo.php b/includes/EmbedVideo.php
index bf41d2b..abd8ff8 100644
--- a/includes/EmbedVideo.php
+++ b/includes/EmbedVideo.php
@@ -427,6 +427,7 @@ class EmbedVideo {
'dimensions' => $dimensions,
'alignment' => $alignment,
'description' => $description,
+ 'container' => $container,
'urlArgs' => $urlArgs,
'width' => $width,
'height' => $height,
@@ -472,8 +473,8 @@ class EmbedVideo {
$this->setDescriptionNoParse( $description );
}

- if ( !$this->setContainer( $this->container ) ) {
- throw new InvalidArgumentException( $this->error( 'container', $this->container )[0] );
+ if ( !$this->setContainer( $container ) ) {
+ throw new InvalidArgumentException( $this->error( 'container', $container )[0] );
}

if ( !$this->setAlignment( $alignment ) ) {
@@ -591,6 +592,10 @@ class EmbedVideo {
$serviceString = $embedService::getServiceName();
$styleString = '';

+ if ( $this->container === 'frame' ) {
+ $classString .= ' frame';
+ }
+
if ( $this->alignment !== false ) {
$classString .= sprintf( ' mw-halign-%s', $this->alignment );
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/resources/ext.embedVideo.styles.less b/resources/ext.embedVideo.styles.less
index 7cf9f20..e2940c5 100644
--- a/resources/ext.embedVideo.styles.less
+++ b/resources/ext.embedVideo.styles.less
@@ -45,6 +45,11 @@
}
}

+ &.frame {
+ border: 1px solid #c8ccd1;
+ padding: 3px;
+ }
+
// From core
// We can safely remove this when Parsoid becomes default
&.mw-halign-right {