28 lines
772 B
JavaScript
28 lines
772 B
JavaScript
|
pandora.ui.openSRTDialog = function() {
|
||
|
var $textInput = Ox.Input({
|
||
|
'type': 'textarea',
|
||
|
'label': 'Paste SRT',
|
||
|
'id': 'srtText',
|
||
|
'labelWidth': 150,
|
||
|
'width': 500,
|
||
|
'height': 400
|
||
|
});
|
||
|
var $content = Ox.Element().append($textInput);
|
||
|
var that = Ox.Dialog({
|
||
|
'content': $content,
|
||
|
'closeButton': true,
|
||
|
'buttons': [
|
||
|
Ox.Button({
|
||
|
'group': true,
|
||
|
'id': 'loadSRTButton',
|
||
|
'title': 'Load SRT'
|
||
|
}).bindEvent("click", function() {
|
||
|
var txt = $textInput.value();
|
||
|
pandora.$ui.textArea.speedtrans.fromSrt(txt);
|
||
|
that.close();
|
||
|
})
|
||
|
]
|
||
|
});
|
||
|
return that;
|
||
|
};
|