summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authorMatthias Bartelmeß <mba@fourplusone.de>2012-03-13 22:44:33 +0100
committerMatthias Bartelmeß <mba@fourplusone.de>2012-03-14 01:28:08 +0100
commitf34f0585bb61b49b773e433771505b9ab1798f5f (patch)
tree35ff7bf41b1b5045cb0a2f1f29620b7ff37c61a1 /src/static
parentb28bfe8e31cf4a95b1242bc35b47201f7560a0a3 (diff)
downloadetherpad-lite-f34f0585bb61b49b773e433771505b9ab1798f5f.zip
smashing errors caused by .forEach
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/ace2_inner.js4
-rw-r--r--src/static/js/broadcast_slider.js6
-rw-r--r--src/static/js/chat.js9
-rw-r--r--src/static/js/linestylefilter.js3
4 files changed, 11 insertions, 11 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 8ecb44ae..64fdaea2 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -1642,7 +1642,7 @@ function Ace2Inner(){
// update the representation
p.mark("splice");
- forEach(splicesToDo, function(splice)
+ splicesToDo.forEach(function(splice)
{
doIncorpLineSplice(splice[0], splice[1], splice[2], splice[3], splice[4]);
});
@@ -2142,7 +2142,7 @@ function Ace2Inner(){
return entry.domInfo;
}), isTimeUp);
- infoStructs.forEach(function(k)
+ keysToDelete.forEach(function(k)
{
var n = doc.getElementById(k);
n.parentNode.removeChild(n);
diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js
index 2b67ac73..c40e6c63 100644
--- a/src/static/js/broadcast_slider.js
+++ b/src/static/js/broadcast_slider.js
@@ -22,7 +22,7 @@
// These parameters were global, now they are injected. A reference to the
// Timeslider controller would probably be more appropriate.
-var forEach = require('./ace2_common').forEach;
+require('./ace2_common');
function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
{
@@ -175,7 +175,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
$("#authorstable").empty();
var numAnonymous = 0;
var numNamed = 0;
- forEach(authors, function(author)
+ authors.forEach(function(author)
{
if (author.name)
{
@@ -469,7 +469,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
$("#timeslider").show();
setSliderLength(clientVars.totalRevs);
setSliderPosition(clientVars.revNum);
- forEach(clientVars.savedRevisions, function(revision)
+ clientVars.savedRevisions.forEach(function(revision)
{
addSavedRevision(revision.revNum, revision);
})
diff --git a/src/static/js/chat.js b/src/static/js/chat.js
index b8f22e9e..23b47667 100644
--- a/src/static/js/chat.js
+++ b/src/static/js/chat.js
@@ -147,10 +147,11 @@ var chat = (function()
}
});
- for(var i in clientVars.chatHistory)
- {
- this.addMessage(clientVars.chatHistory[i], false);
- }
+ var that = this;
+ $.each(clientVars.chatHistory, function(i, o){
+ that.addMessage(o, false);
+ })
+
$("#chatcounter").text(clientVars.chatHistory.length);
}
}
diff --git a/src/static/js/linestylefilter.js b/src/static/js/linestylefilter.js
index 04b8fb72..f1116ecc 100644
--- a/src/static/js/linestylefilter.js
+++ b/src/static/js/linestylefilter.js
@@ -30,7 +30,6 @@
var Changeset = require('./Changeset');
var hooks = require('./pluginfw/hooks');
-var map = require('./ace2_common').map;
var linestylefilter = {};
@@ -302,7 +301,7 @@ linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser)
linestylefilter: linestylefilter,
browser: browser
});
- map(hookFilters, function(hookFilter)
+ hookFilters.map(function(hookFilter)
{
func = hookFilter(lineText, func);
});