Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
burhandodhy committed Feb 28, 2024
1 parent c803f10 commit f35d5d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions assets/js/src/views/video-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ var VideoEditView = BrightcoveView.extend({
this.model.set('captions', captions);

// Labels
const labels = this.$el.find('.brightcove-labels-value').val()?.split(',') || [];
const labels = this.$el.find('.bc-labels-value').val()?.split(',') || [];
this.model.set('labels', labels);

// Custom fields
Expand Down Expand Up @@ -497,7 +497,7 @@ var VideoEditView = BrightcoveView.extend({
event.preventDefault();

const elem = this.el.querySelector('.brightcove-labels');
const labelsValElem = this.el.querySelector('.brightcove-labels-value');
const labelsValElem = this.el.querySelector('.bc-labels-value');
const value = elem.value;

elem.querySelector('option[value="' + value + '"]').setAttribute('disabled', true);
Expand All @@ -521,7 +521,7 @@ var VideoEditView = BrightcoveView.extend({
event.preventDefault();

const label = event.currentTarget.dataset.label;
const labelsValElem = this.el.querySelector('.brightcove-labels-value');
const labelsValElem = this.el.querySelector('.bc-labels-value');
const labelElem = this.el.querySelector('.brightcove-labels');
const selectedLabels = labelsValElem.value.split(',');

Expand Down
4 changes: 2 additions & 2 deletions includes/admin/class-bc-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class="brightcove-datetime brightcove-end-date"
<span class="name"><?php esc_html_e( 'Labels', 'brightcove' ); ?></span>
<div class="setting-content">
<div class="bc-labels-container">
<input type="hidden" class="brightcove-labels-value" value="{{data.labels}}">
<input type="hidden" class="bc-labels-value" value="{{data.labels}}">
<ul class="bc-labels-list">
<# _.each( data.labels, function( label ) { #>
<li>
Expand All @@ -266,7 +266,7 @@ class="brightcove-datetime brightcove-end-date"
</option>
<# }); #>
</select>
<button class="button-secondary add-bc-label">
<button class="button-secondary bc-add-label">
<?php esc_html_e( 'Add Label', 'brightcove' ); ?>
</button>
</div>
Expand Down

0 comments on commit f35d5d3

Please sign in to comment.