From a7d72951164585a9baefc4a4e74000a677e7717f Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 2 Feb 2012 18:42:34 +0000 Subject: [PATCH 1/2] Remove jQuery UI --- node/utils/tar.json | 1 - static/js/chat.js | 17 ++++++----------- static/js/pad.js | 1 - 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/node/utils/tar.json b/node/utils/tar.json index e1e6fb2b1..8813b776b 100644 --- a/node/utils/tar.json +++ b/node/utils/tar.json @@ -18,7 +18,6 @@ , "pad_impexp.js" , "pad_savedrevs.js" , "pad_connectionstatus.js" - , "jquery-ui.js" , "chat.js" , "excanvas.js" , "farbtastic.js" diff --git a/static/js/chat.js b/static/js/chat.js index 9b28c3334..6806ab225 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -37,14 +37,10 @@ var chat = (function() var self = { show: function () { - $("#chaticon").hide("slide", { - direction: "down" - }, hDuration, function () + $("#chaticon").hide(function () { - $("#chatbox").show("slide", { - direction: "down" - }, sDuration, self.scrollDown); - $("#chatbox").resizable( + $("#chatbox").show(); +/* $("#chatbox").resizable( { handles: 'nw', minHeight: 40, @@ -66,6 +62,7 @@ var chat = (function() self.scrollDown(); } }); +*/ }); chatMentions = 0; document.title = title; @@ -90,10 +87,8 @@ var chat = (function() hide: function () { $("#chatcounter").text("0"); - $("#chatbox").hide("slide", { direction: "down" }, sDuration, function() - { - $("#chaticon").show("slide", { direction: "down" }, hDuration); - }); + $("#chatbox").hide(); + $("#chaticon").show(); }, scrollDown: function() { diff --git a/static/js/pad.js b/static/js/pad.js index 4fa46ac6b..47b1635b2 100644 --- a/static/js/pad.js +++ b/static/js/pad.js @@ -27,7 +27,6 @@ var socket; // These jQuery things should create local references, but for now `require()` // assigns to the global `$` and augments it with plugins. require('/jquery'); -require('/jquery-ui'); require('/farbtastic'); require('/excanvas'); JSON = require('/json2'); From c16d6eefdf2334e8bcb7621b5240635d8dc043a2 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 2 Feb 2012 18:44:43 +0000 Subject: [PATCH 2/2] remove callbacks to speed things up --- static/js/chat.js | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/static/js/chat.js b/static/js/chat.js index 6806ab225..2cf57d51e 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -37,33 +37,8 @@ var chat = (function() var self = { show: function () { - $("#chaticon").hide(function () - { - $("#chatbox").show(); -/* $("#chatbox").resizable( - { - handles: 'nw', - minHeight: 40, - minWidth: 80, - start: function (event, ui) - { - $("#focusprotector").show(); - }, - stop: function (event, ui) - { - $("#focusprotector").hide(); - - if(browser.mobile) { - $("#chatbox").css({right: "0px", bottom: "32px", left: "", top: ""}); - } else { - $("#chatbox").css({right: "20px", bottom: "0px", left: "", top: ""}); - } - - self.scrollDown(); - } - }); -*/ - }); + $("#chaticon").hide(); + $("#chatbox").show(); chatMentions = 0; document.title = title; },