fixed password remove
authorAndrew Karpow <andy@ndyk.de>
Sat, 8 Mar 2014 19:33:22 +0000 (20:33 +0100)
committerAndrew Karpow <andy@ndyk.de>
Sat, 8 Mar 2014 19:33:22 +0000 (20:33 +0100)
htdocs/index.html
htdocs/js/mpd.js

index 7a90c25..538c8fe 100644 (file)
                 data-trigger="manual" />
               </div>
               <div class="form-group col-md-12">
-                <div id="mpd_password_set" class="hide alert alert-info">MPD Password is set</div>
+                <div id="mpd_password_set" class="hide alert alert-info">
+                  <button type="button" class="close" aria-hidden="true">&times;</button>
+                  MPD Password is set
+                </div>
               </div>
 
             </div>
index 6344679..9e7d6c7 100644 (file)
@@ -569,6 +569,13 @@ function confirmSettings() {
     $('#settings').modal('hide');
 }
 
+$('#mpd_password_set > button').on('click', function (e) {
+    socket.send('MPD_API_SET_MPDPASS,');
+    $('#mpd_pw').val("");
+    $('#mpd_pw_con').val("");
+    $('#mpd_password_set').addClass('hide');
+})
+
 function notificationsSupported() {
     return "webkitNotifications" in window;
 }