Skip to content

Commit

Permalink
Merge pull request #95 from ts-tech-repo/open-release/srtAutoSuggestion
Browse files Browse the repository at this point in the history
same key word search auto suggestion fixed and video
  • Loading branch information
Chandana3008 authored Oct 25, 2024
2 parents 19ffb46 + ad3729e commit f6f6971
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,31 @@ define(["jquery", "backbone", "underscore"], function($, Backbone) {
minLength: 2,
scroll: true,
autoFocus: true,
delay: 0,
select: function(event, ui) {
if(ui.item.domain == "cdn.exec.talentsprint.com" || ui.item.domain == "cdn.chn.talentsprint.com" || ui.item.domain == "cdn-intl.talentsprint.com") {
ui.item.value = "https://" + ui.item.domain + "/content/" + ui.item.value;
}else {
ui.item.value = "https://" + ui.item.domain + "/content/" + Crypto.MD5(ui.item.value + "dingdong") + "/" + ui.item.value;
}
$(this).val(ui.item.value);
$(this).trigger("input");
$(this).val(ui.item.value).trigger('change');
return false;
},
focus: function(event, ui) {
event.preventDefault();
}
});
$('.list-input.settings-list li:nth-child(4) .wrapper-comp-setting input')
.on('input', function() {
$(this).data('manuallyEdited', true);
})
.on('keyup', function() {
$(this).autocomplete("search");
});
};

return {
cdn_srt: cdnLinks_autoComplete_srt
};
}());
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,26 @@ define(["jquery", "backbone", "underscore"], function($, Backbone) {
minLength: 2,
scroll: true,
autoFocus: true,
delay: 0,
open: function() {
$(this).data('uiAutocomplete').menu.element.addClass('video-url-autocomplete');
},
select: function(event, ui) {
ui.item.value = "https://" + ui.item.domain + "/e_content/" + ui.item.value;
if(ui.item.domain == "cdn.exec.talentsprint.com" || ui.item.domain == "cdn.chn.talentsprint.com" || ui.item.domain == "cdn-intl.talentsprint.com") {
ui.item.value = "https://" + ui.item.domain + "/e_content/" + ui.item.value;
}else {
ui.item.value = "https://" + ui.item.domain + "/e_content/" + Crypto.MD5(ui.item.value + "dingdong") + "/" + ui.item.value;
}

$(this).val(ui.item.value);
$(this).trigger("input");
event.preventDefault();
}
}).on('input', function() {
var self = this;
setTimeout(function() {
$(self).autocomplete("search");
}, 0);
});
};

Expand Down

0 comments on commit f6f6971

Please sign in to comment.