Skip to content

Commit e3ecb41

Browse files
authored
Merge pull request #211 from 10up/develop
Release 2.1.4
2 parents 2e06857 + f7580bc commit e3ecb41

15 files changed

+156
-68
lines changed

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7-
## [2.1.3] TBD
7+
## [2.1.4] - 2021-06-23
88
### Fixed
9-
- Fix: Playlist player is not available
9+
- Fix: Default Source field when is submitted unchecked.
10+
- Fix: Adjust the position of media details in the editing modal.
11+
- Fix: Clear filtered results when the input search is empty.
12+
- Fix: Add missing mute attribute in the block.
13+
14+
## [2.1.3] - 2021-06-03
15+
### Fixed
16+
- Fix: Playlist player is not available.
1017

1118
## [2.1.2] - 2021-02-17
1219
### Fixed
@@ -293,6 +300,12 @@ All notable changes to this project will be documented in this file, per [the Ke
293300
- First release
294301

295302
[Unreleased]: https://github.com/10up/brightcove-video-connect/compare/master...develop
303+
[2.1.4]: https://github.com/10up/brightcove-video-connect/compare/2.1.3...2.1.4
304+
[2.1.3]: https://github.com/10up/brightcove-video-connect/compare/2.1.2...2.1.3
305+
[2.1.2]: https://github.com/10up/brightcove-video-connect/compare/2.1.1...2.1.2
306+
[2.1.1]: https://github.com/10up/brightcove-video-connect/compare/2.1...2.1.1
307+
[2.1.0]: https://github.com/10up/brightcove-video-connect/compare/2.0...2.1
308+
[2.0.0]: https://github.com/10up/brightcove-video-connect/compare/1.9.2...2.0
296309
[1.9.2]: https://github.com/10up/brightcove-video-connect/compare/1.9.1...1.9.2
297310
[1.9.1]: https://github.com/10up/brightcove-video-connect/compare/1.9.0...1.9.1
298311
[1.9.0]: https://github.com/10up/brightcove-video-connect/compare/1.8.2...1.9.0

assets/js/brightcove-admin.js

Lines changed: 47 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/brightcove-admin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/brightcove-admin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/src/block.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
max_width: attrs.named.max_width,
7373
padding_top: '',
7474
autoplay: '',
75+
mute: '',
7576
playsinline: '',
7677
picture_in_picture: '',
7778
embed: attrs.named.embed
@@ -81,13 +82,15 @@
8182
setAttrs.player_id = attrs.named.player_id;
8283
setAttrs.video_id = sanitizeIds( attrs.named.video_id );
8384
setAttrs.autoplay = attrs.named.autoplay;
85+
setAttrs.mute = attrs.named.mute;
8486
setAttrs.playsinline = attrs.named.playsinline;
8587
setAttrs.picture_in_picture = attrs.named.picture_in_picture;
8688
setAttrs.padding_top = attrs.named.padding_top;
8789
} else if ( '[bc_playlist' === attrs.numeric[0] ) {
8890
setAttrs.player_id = attrs.named.player_id;
8991
setAttrs.playlist_id = sanitizeIds( attrs.named.playlist_id );
9092
setAttrs.autoplay = attrs.named.autoplay;
93+
setAttrs.mute = attrs.named.mute;
9194
setAttrs.playsinline = attrs.named.playsinline;
9295
setAttrs.padding_top = attrs.named.padding_top;
9396
} else if ( '[bc_experience' === attrs.numeric[0] ) {

assets/js/src/views/brightcove-media-manager.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,21 @@ var BrightcoveMediaManagerView = BrightcoveView.extend(
321321

322322
this.detailsView.render();
323323
this.detailsView.$el.toggle( true ); // Always show new view
324+
325+
const contentElement = $('.brightcove-modal .media-frame-content').first();
326+
327+
if (contentElement.length) {
328+
const maxTopValue = $('#brightcove-media-frame-content').outerHeight() - this.detailsView.$el.outerHeight();
329+
330+
let topValue = contentElement.scrollTop() - $('#brightcove-media-frame-router').outerHeight() + 25;
331+
332+
if (topValue > maxTopValue) {
333+
topValue = maxTopValue
334+
}
335+
336+
this.detailsView.$el.css('top', topValue > 0 ? topValue : 0 );
337+
}
338+
324339
this.model.get( 'media-collection-view' ).$el.addClass( 'menu-visible' );
325340
mediaView.$el.addClass( 'highlighted' );
326341
wpbc.broadcast.trigger( 'toggle:insertButton', 'enabled' );

assets/js/src/views/media-details.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ var MediaDetailsView = BrightcoveView.extend(
315315

316316
toggleShortcodeGeneration: function () {
317317
var method = $( '#generate-shortcode' ).val(),
318-
$fields = $( '#video-player, #autoplay, input[name="embed-style"], input[name="sizing"], #aspect-ratio, #width, #height, #units' );
318+
$fields = $( '#video-player, #autoplay, #mute, input[name="embed-style"], input[name="sizing"], #aspect-ratio, #width, #height, #units' );
319319

320320
if ( 'manual' === method ) {
321321
$( '#shortcode' ).removeAttr( 'readonly' );
@@ -363,4 +363,3 @@ var MediaDetailsView = BrightcoveView.extend(
363363
}
364364
}
365365
);
366-

assets/js/src/views/toolbar.js

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ var ToolbarView = BrightcoveView.extend(
99
template : wp.template( 'brightcove-media-toolbar' ),
1010

1111
events : {
12-
'click .view-list': 'toggleList',
13-
'click .view-grid': 'toggleGrid',
14-
'click .brightcove-toolbar': 'toggleToolbar',
15-
'change .brightcove-media-source': 'sourceChanged',
16-
'change .brightcove-media-dates': 'datesChanged',
17-
'change .brightcove-media-tags': 'tagsChanged',
18-
'change .brightcove-media-folders': 'foldersChanged',
19-
'change .brightcove-media-labels': 'labelsChanged',
20-
'change .brightcove-empty-playlists': 'emptyPlaylistsChanged',
21-
'change .brightcove-media-state-filters': 'stateChanged',
22-
'click #media-search': 'searchHandler',
23-
'keyup .search': 'enterHandler'
12+
'click .view-list': 'toggleList',
13+
'click .view-grid': 'toggleGrid',
14+
'click .brightcove-toolbar': 'toggleToolbar',
15+
'change .brightcove-media-source': 'sourceChanged',
16+
'change .brightcove-media-dates': 'datesChanged',
17+
'change .brightcove-media-tags': 'tagsChanged',
18+
'change .brightcove-media-folders': 'foldersChanged',
19+
'change .brightcove-media-labels': 'labelsChanged',
20+
'change .brightcove-empty-playlists': 'emptyPlaylistsChanged',
21+
'change .brightcove-media-state-filters': 'stateChanged',
22+
'click #media-search': 'searchHandler',
23+
'keyup .search': 'enterHandler',
24+
'input #media-search-input': 'handleEmptySearchInput'
2425
},
2526

2627
render : function () {
@@ -101,11 +102,11 @@ var ToolbarView = BrightcoveView.extend(
101102
wpbc.broadcast.trigger( 'change:tag', event.target.value );
102103
},
103104

104-
foldersChanged: function (event) {
105-
this.model.set('oldFolderId', this.model.get('folderId'));
106-
this.model.set('folderId', event.target.value);
107-
wpbc.broadcast.trigger('change:folder', event.target.value);
108-
},
105+
foldersChanged: function (event) {
106+
this.model.set('oldFolderId', this.model.get('folderId'));
107+
this.model.set('folderId', event.target.value);
108+
wpbc.broadcast.trigger('change:folder', event.target.value);
109+
},
109110

110111
labelsChanged: function ( event ) {
111112
this.model.set( 'oldLabelPath', this.model.get( 'labelPath' ) );
@@ -118,11 +119,18 @@ var ToolbarView = BrightcoveView.extend(
118119
wpbc.broadcast.trigger( 'change:emptyPlaylists', emptyPlaylists );
119120
},
120121

121-
enterHandler : function ( event ) {
122-
if ( event.keyCode === 13 ) {
123-
this.searchHandler( event );
124-
}
125-
},
122+
enterHandler : function ( event ) {
123+
if ( event.keyCode === 13 ) {
124+
this.searchHandler( event );
125+
}
126+
},
127+
128+
handleEmptySearchInput : function ( event ) {
129+
if (this.model.get( 'search' ) && !event.target.value) {
130+
this.model.set('search', '');
131+
wpbc.broadcast.trigger( 'change:searchTerm', '' );
132+
}
133+
},
126134

127135
stateChanged : function( event ) {
128136
this.model.set('oldState', 'oldstate');
@@ -137,7 +145,7 @@ var ToolbarView = BrightcoveView.extend(
137145
this.model.set( 'search', searchTerm );
138146
wpbc.broadcast.trigger( 'change:searchTerm', searchTerm );
139147
} else if (searchTerm.length === 0) {
140-
wpbc.broadcast.trigger( 'change:searchTerm', "" );
148+
wpbc.broadcast.trigger( 'change:searchTerm', "" );
141149
}
142150
}
143151
}

brightcove-video-connect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Brightcove Video Connect
44
* Plugin URI: https://wordpress.org/plugins/brightcove-video-connect/
55
* Description: A Brightcove™ Connector for WordPress that leverages enhanced APIs and Brightcove™ Capabilities
6-
* Version: 2.1.3
6+
* Version: 2.1.4
77
* Author: 10up
88
* Author URI: http://10up.com
99
* License: GPLv2+

includes/admin/class-bc-admin-sources.php

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ public function save_account() {
147147

148148
if ( isset( $_POST['source-default-account'] ) && 'on' === $_POST['source-default-account'] ) {
149149
update_option( '_brightcove_default_account', sanitize_text_field( $_POST['hash'] ) );
150+
} else {
151+
delete_option( '_brightcove_default_account' );
150152
}
151-
152153
}
153154

154155
// Deleting transient to allow syncing from the new account, otherwise we won't be able to sync it until this transient expires.
@@ -283,9 +284,16 @@ class="regular-text" required="required" value="<?php echo esc_attr( $client_sec
283284
<tr class="brightcove-account-row">
284285
<th scope="row"><?php esc_html_e( 'Default Source', 'brightcove' ) ?></th>
285286
<td>
286-
<input type="checkbox" <?php checked( 'on', $default_account ); ?>
287-
name="source-default-account" value="on">&nbsp;
288-
<?php esc_html_e( 'Make this the default source for new users', 'brightcove' ); ?>
287+
<label for="source-default-account">
288+
<input
289+
type="checkbox"
290+
id="source-default-account"
291+
name="source-default-account"
292+
value="on"
293+
<?php checked( 'on', $default_account ); ?>
294+
>&nbsp;
295+
<?php esc_html_e( 'Make this the default source for new users', 'brightcove' ); ?>
296+
</label>
289297
</td>
290298
</tr>
291299
</tbody>
@@ -339,9 +347,15 @@ public function render_edit_html( $account ) {
339347
<tr class="brightcove-account-row">
340348
<th scope="row"><?php esc_html_e( 'Default Source', 'brightcove' ) ?></th>
341349
<td>
342-
<input type="checkbox"
343-
name="source-default-account" <?php checked( get_option( '_brightcove_default_account' ), $account['hash'] ) ?> >&nbsp;
344-
<?php esc_html_e( 'Make this the default source for new users', 'brightcove' ); ?>
350+
<label for="source-default-account">
351+
<input
352+
type="checkbox"
353+
id="source-default-account"
354+
name="source-default-account"
355+
<?php checked( get_option( '_brightcove_default_account' ), $account['hash'] ); ?>
356+
>&nbsp;
357+
<?php esc_html_e( 'Make this the default source for new users', 'brightcove' ); ?>
358+
</label>
345359
</td>
346360
</tr>
347361
</table>

0 commit comments

Comments
 (0)