Commit 107ff64a authored by David Loiret's avatar David Loiret

remote playback: add l10n

parent 7102d401
......@@ -9,6 +9,7 @@
<script type="text/javascript" src="jquery.ui.widget.js"></script>
<script type="text/javascript" src="jquery.iframe-transport.js"></script>
<script type="text/javascript" src="jquery.fileupload.js"></script>
<script type="text/javascript" src="/web_resources.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="playerControl.js"></script>
</head>
......
......@@ -630,12 +630,13 @@ $(function() {
$('form.open-url').on('submit', function(e) {
e.preventDefault();
var url = $(this).find('input').val();
var localesURL = LOCALES ? (LOCALES.PLAYER_CONTROL ? LOCALES.PLAYER_CONTROL.URL : {}) : {};
if (!url) {
return displayMessage('URL cannot be empty.');
return displayMessage(localesURL.EMPTY);
} else if (!isURL(url)) {
return displayMessage('Not a valid URL.');
return displayMessage(localesURL.NOT_VALID);
}
displayMessage('URL sent successfully.');
displayMessage(localesURL.SENT_SUCCESSFULLY);
playerControl.openURL({
url: url
});
......@@ -657,6 +658,9 @@ $(function() {
var TIMEOUT = null;
var DELAY = 5000;
function displayMessage(message) {
if (!message) {
return;
}
$('.display-message').addClass('show');
$('.display-message').text(message);
if (TIMEOUT) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment