From ced68d930431246e2f22ee5e7b5ee58309f06a5b Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 25 Feb 2014 23:28:32 -0600 Subject: [PATCH] Fix layout issues --- www/js/callbacks.js | 11 ++++++----- www/js/util.js | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/www/js/callbacks.js b/www/js/callbacks.js index 5c8b609c..512fb2f8 100644 --- a/www/js/callbacks.js +++ b/www/js/callbacks.js @@ -1111,8 +1111,9 @@ setupCallbacks = function() { for(var key in Callbacks) { (function(key) { socket.on(key, function(data) { - if (SOCKET_DEBUG) + if (SOCKET_DEBUG) { console.log(key, data); + } Callbacks[key](data); }); })(key); @@ -1135,11 +1136,11 @@ try { io.transports.splice(i, 1); } } - var opts = {}; - if (location.protocol === "https:" || USEROPTS.secure_connection) { - opts.secure = true; + if (ALLOW_SSL && (location.protocol === "https:" || USEROPTS.secure_connection)) { + socket = io.connect(IO_URL, opts); + } else { + socket = io.connect(IO_URL); } - socket = io.connect(IO_URL, opts); setupCallbacks(); } catch (e) { if (e) { diff --git a/www/js/util.js b/www/js/util.js index 174c91e7..8fa416c8 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -888,6 +888,7 @@ function handlePermissionChange() { setVisible("#chatline", CLIENT.rank >= 0); setVisible("#queue", hasPermission("seeplaylist")); setVisible("#plmeta", hasPermission("seeplaylist")); + resizeStuff(); $("#getplaylist").attr("disabled", !hasPermission("seeplaylist")); setVisible("#showmediaurl", hasPermission("playlistadd"));