select subtitles layer by default if selecting an srt file
This commit is contained in:
parent
69083d1521
commit
dd7e1d0ba0
1 changed files with 8 additions and 1 deletions
|
@ -68,7 +68,14 @@ pandora.ui.importAnnotationsDialog = function(options) {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
$status.empty();
|
$status.empty();
|
||||||
data.value.length && $formatSelect.options({value: Ox.last(data.value[0].name.split('.'))});
|
if (data.value.length) {
|
||||||
|
var format = Ox.last(data.value[0].name.split('.'));
|
||||||
|
$formatSelect.options({value: format});
|
||||||
|
var subtitlesLayer = pandora.getSubtitlesLayer()
|
||||||
|
if (subtitlesLayer && format == 'srt' && Ox.getObjectById(layers, subtitlesLayer)) {
|
||||||
|
$layerSelect.options({value: subtitlesLayer})
|
||||||
|
}
|
||||||
|
}
|
||||||
that[
|
that[
|
||||||
data.value.length ? 'enableButton' : 'disableButton'
|
data.value.length ? 'enableButton' : 'disableButton'
|
||||||
]('import');
|
]('import');
|
||||||
|
|
Loading…
Reference in a new issue