Skip to content

Commit 31ed8f5

Browse files
zubeydecivelekzzacharo
authored andcommitted
fix: transcriptions search
1 parent 64395cf commit 31ed8f5

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

cds/modules/records/static/templates/cds_records/video/detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h3 class="bt bw-1 pt-10 mb-0">
5151
<input type="text"
5252
class="form-control"
5353
placeholder="Search transcript..."
54-
ng-model="transcriptSearch"
54+
ng-model="search.transcriptSearch"
5555
ng-change="filterTranscript()">
5656
</div>
5757
<div ng-show="filteredTranscript.length > 0" class="content-container">

cds/modules/theme/assets/bootstrap3/js/cds_records/cdsRecord.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function cdsRecordController($scope, $sce, $http, $timeout, $filter) {
5858
$scope.transcript = [];
5959
$scope.filteredTranscript = [];
6060
$scope.selectedTranscriptLanguage = null;
61-
$scope.transcriptSearch = "";
61+
$scope.search = { transcriptSearch: "" };
6262
$scope.chapters = [];
6363
$scope.activeTab = "chapters"; // Default to chapters tab
6464
$scope.shortDescription = "";
@@ -173,7 +173,7 @@ function cdsRecordController($scope, $sce, $http, $timeout, $filter) {
173173
};
174174

175175
$scope.filterTranscript = function () {
176-
var searchTerm = this.transcriptSearch.toLowerCase();
176+
var searchTerm = $scope.search.transcriptSearch.toLowerCase();
177177
$scope.filteredTranscript = Object.values($scope.transcript).filter(
178178
function (line) {
179179
return (
@@ -428,7 +428,6 @@ function cdsRecordController($scope, $sce, $http, $timeout, $filter) {
428428
matches[chapter.seconds] = frame;
429429
}
430430
});
431-
console.log("Exact matches found:", matches);
432431
// Collect chapters still missing
433432
let missing = $scope.chapters.filter(
434433
(c) => !matches.hasOwnProperty(c.seconds)

0 commit comments

Comments
 (0)