oxspeed/js/ui/openSRTDialog.js

28 lines
772 B
JavaScript
Raw Normal View History

2013-03-05 11:50:51 +00:00
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;
};