';
html += '
';
- html += '';
- html += '';
+ html += '
';
+
+ html += '
';
+
+ html += '
';
html += '';
@@ -715,6 +725,25 @@
ApiClient.sendSystemCommand(id, 'GoToSettings');
});
+ $('.btnSendMessage', popup).on('click', function () {
+
+ var id = $('#selectSession', popup).val();
+
+ var messageText = $('#txtMessage', popup).val();
+
+ if (messageText) {
+ Dashboard.getCurrentUser().done(function(user) {
+
+ ApiClient.sendMessageCommand(id, {
+ Header: "Message from " + user.Name,
+ Text: messageText
+ });
+ });
+ } else {
+ $('#txtMessage', popup)[0].focus();
+ }
+ });
+
$('.btnVolumeDown', popup).on('click', function () {
var id = $('#selectSession', popup).val();
@@ -842,11 +871,13 @@
$('.nothingPlaying', popup).hide();
$('.nowPlaying', popup).hide();
$('.commandsCollapsible', popup).hide();
+ $('.sessionButtons', popup).hide();
}
else if (session.NowPlayingItem) {
$('.commandsCollapsible', popup).show();
+ $('.sessionButtons', popup).show();
$('.nothingPlaying', popup).hide();
var elem = $('.nowPlaying', popup).show();
@@ -855,6 +886,7 @@
} else {
+ $('.sessionButtons', popup).show();
$('.commandsCollapsible', popup).show();
$('.nothingPlaying', popup).show();
$('.nowPlaying', popup).hide();