From 67fd88950a66f326a1f11d76348890eb39f3840e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 27 Mar 2019 00:20:49 +0100 Subject: [PATCH] Fixed modal madness in Snapcast frontend --- .../backend/http/static/js/music.snapcast.js | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/platypush/backend/http/static/js/music.snapcast.js b/platypush/backend/http/static/js/music.snapcast.js index cd5ff3027..3cac9e259 100644 --- a/platypush/backend/http/static/js/music.snapcast.js +++ b/platypush/backend/http/static/js/music.snapcast.js @@ -102,17 +102,13 @@ $(document).ready(function() { var $hostTitle = $('

') .addClass('snapcast-host-settings') - .addClass('snapcast-settings-btn'); - - var $hostSettings = $('') - .attr('data-modal', '#snapcast-host-modal') - .addClass('fa fa-ellipsis-v'); + .addClass('snapcast-settings-btn') + .attr('data-modal', '#snapcast-host-modal'); var $hostName = $('') .attr('data-modal', '#snapcast-host-modal') - .html('  ' + name); + .text(name); - $hostSettings.appendTo($hostTitle); $hostName.appendTo($hostTitle); $hostTitle.appendTo($hostHeader); $hostHeader.appendTo($host); @@ -132,15 +128,9 @@ $(document).ready(function() { var $groupTitle = $('

') .addClass('snapcast-group-settings') .addClass('snapcast-settings-btn') - .addClass('eleven columns'); - - var $groupSettings = $('') .attr('data-modal', '#snapcast-group-modal') - .addClass('fa fa-ellipsis-v'); - - var $groupName = $('') - .attr('data-modal', '#snapcast-group-modal') - .html('  ' + groupName); + .addClass('eleven columns') + .text(groupName); var $groupMuteToggle = createPowerToggleElement({ id: group.id, @@ -149,8 +139,6 @@ $(document).ready(function() { .addClass('snapcast-mute-toggle') .addClass('snapcast-group-mute-toggle'); - $groupSettings.appendTo($groupTitle); - $groupName.appendTo($groupTitle); $groupTitle.appendTo($groupHeader); $groupMuteToggle.appendTo($groupHeader); $groupHeader.appendTo($group); @@ -178,15 +166,9 @@ $(document).ready(function() { var $clientTitle = $('

') .addClass('snapcast-settings-btn') .addClass('snapcast-client-settings') - .addClass('two columns'); - - var $clientSettings = $('') .attr('data-modal', '#snapcast-client-modal') - .addClass('fa fa-ellipsis-v'); - - var $clientName = $('') - .attr('data-modal', '#snapcast-client-modal') - .html('  ' + clientName); + .addClass('two columns') + .text(clientName); var $volumeSlider = $('') .addClass('slider snapcast-volume-slider') @@ -204,8 +186,6 @@ $(document).ready(function() { .addClass('snapcast-mute-toggle') .addClass('snapcast-client-mute-toggle'); - $clientSettings.appendTo($clientTitle); - $clientName.appendTo($clientTitle); $clientTitle.appendTo($clientRow); $volumeSlider.appendTo($clientRow); $clientMuteToggle.appendTo($clientRow);