AdminConnect.js (682B)
1 PNotify.prototype.options.styling = "bootstrap3"; 2 $("#menu-toggle").click(function(e) { 3 e.preventDefault(); 4 $("#wrapper").toggleClass("toggled"); 5 }); 6 var ws = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); 7 var socket = io(ws); 8 $(document).off('click', '#script_download').on('click', '#script_download', function (e) { 9 console.log('script_download'); 10 11 socket.emit('command', {command: 'script_download'}); 12 e.preventDefault(); 13 }); 14 socket.on('status_alert', function (message) { 15 console.warn(message) 16 }); 17 18 socket.on('ScriptDownloaded', function (message) { 19 console.log(message.response); 20 $("#first").hide() 21 $("#second").show() 22 });