From 6e8dcee6501b6d05603979743c18b93a9782b6e2 Mon Sep 17 00:00:00 2001 From: mluto Date: Thu, 7 Feb 2013 11:15:16 +0100 Subject: [PATCH 1/2] Removed old chat-code --- src/static/js/pad.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 27dd3b73..43ad7aab 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -501,7 +501,6 @@ var pad = { padeditor.init(postAceInit, pad.padOptions.view || {}, this); paduserlist.init(pad.myUserInfo, this); - // padchat.init(clientVars.chatHistory, pad.myUserInfo); padconnectionstatus.init(); padmodals.init(this); @@ -540,7 +539,7 @@ var pad = { $('#options-stickychat').prop("checked", true); // set the checkbox to on } if(padcookie.getPref("showAuthorshipColors") == false){ - pad.changeViewOption('showAuthorColors', false); + pad.changeViewOption('showAuthorColors', false); } hooks.aCallAll("postAceInit", {ace: padeditor.ace}); } @@ -553,13 +552,11 @@ var pad = { { pad.myUserInfo.name = newName; pad.collabClient.updateUserInfo(pad.myUserInfo); - //padchat.handleUserJoinOrUpdate(pad.myUserInfo); }, notifyChangeColor: function(newColorId) { pad.myUserInfo.colorId = newColorId; pad.collabClient.updateUserInfo(pad.myUserInfo); - //padchat.handleUserJoinOrUpdate(pad.myUserInfo); }, notifyChangeTitle: function(newTitle) { @@ -643,17 +640,14 @@ var pad = { handleUserJoin: function(userInfo) { paduserlist.userJoinOrUpdate(userInfo); - //padchat.handleUserJoinOrUpdate(userInfo); }, handleUserUpdate: function(userInfo) { paduserlist.userJoinOrUpdate(userInfo); - //padchat.handleUserJoinOrUpdate(userInfo); }, handleUserLeave: function(userInfo) { paduserlist.userLeave(userInfo); - //padchat.handleUserLeave(userInfo); }, handleClientMessage: function(msg) { @@ -665,10 +659,6 @@ var pad = { paduserlist.setMyUserInfo(pad.myUserInfo); } } - else if (msg.type == 'chat') - { - //padchat.receiveChat(msg); - } else if (msg.type == 'padtitle') { paddocbar.changeTitle(msg.title); From fc60ab24fa8fa32283f5d99fd275b85cca68a4d2 Mon Sep 17 00:00:00 2001 From: mluto Date: Thu, 7 Feb 2013 15:34:10 +0100 Subject: [PATCH 2/2] Removed debug code, moved hash-setting after the param-checking --- src/static/js/broadcast_slider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index 5acaedaf..e1f7b6c0 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -107,16 +107,16 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) { newpos = Number(newpos); if (newpos < 0 || newpos > sliderLength) return; - window.location.hash = "#" + newpos; if(!newpos){ newpos = 0; // stops it from displaying NaN if newpos isn't set } + window.location.hash = "#" + newpos; $("#ui-slider-handle").css('left', newpos * ($("#ui-slider-bar").width() - 2) / (sliderLength * 1.0)); $("a.tlink").map(function() { $(this).attr('href', $(this).attr('thref').replace("%revision%", newpos)); }); - console.log(newpos); + $("#revision_label").html(html10n.get("timeslider.version", { "version": newpos})); if (newpos == 0)