mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-22 21:07:18 +00:00
Merge pull request #82 from iwanders/improvement_stream_ui
Improve the add stream dialog user experience.
This commit is contained in:
commit
b211543890
@ -116,6 +116,13 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$('#addstream').on('shown.bs.modal', function () {
|
||||
$('#streamurl').focus();
|
||||
})
|
||||
$('#addstream form').on('submit', function (e) {
|
||||
addStream();
|
||||
});
|
||||
|
||||
if(!notificationsSupported())
|
||||
$('#btnnotify').addClass("disabled");
|
||||
else
|
||||
@ -583,6 +590,7 @@ function addStream() {
|
||||
if($('#streamurl').val().length > 0) {
|
||||
socket.send('MPD_API_ADD_TRACK,'+$('#streamurl').val());
|
||||
}
|
||||
$('#streamurl').val("");
|
||||
$('#addstream').modal('hide');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user