mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-26 14:57:17 +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())
|
if(!notificationsSupported())
|
||||||
$('#btnnotify').addClass("disabled");
|
$('#btnnotify').addClass("disabled");
|
||||||
else
|
else
|
||||||
@ -583,6 +590,7 @@ function addStream() {
|
|||||||
if($('#streamurl').val().length > 0) {
|
if($('#streamurl').val().length > 0) {
|
||||||
socket.send('MPD_API_ADD_TRACK,'+$('#streamurl').val());
|
socket.send('MPD_API_ADD_TRACK,'+$('#streamurl').val());
|
||||||
}
|
}
|
||||||
|
$('#streamurl').val("");
|
||||||
$('#addstream').modal('hide');
|
$('#addstream').modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user