diff --git a/_includes/recline-deps.html b/_includes/recline-deps.html
index 286eb7e9..2d0784c0 100644
--- a/_includes/recline-deps.html
+++ b/_includes/recline-deps.html
@@ -42,6 +42,7 @@
-->
+
diff --git a/demos/multiview/app.js b/demos/multiview/app.js
index 3bfc12a1..ada770f3 100755
--- a/demos/multiview/app.js
+++ b/demos/multiview/app.js
@@ -74,21 +74,21 @@ var createExplorer = function(dataset, state) {
label: 'Grid',
view: new recline.View.SlickGrid({
model: dataset
- }),
+ })
},
{
id: 'graph',
label: 'Graph',
view: new recline.View.Graph({
model: dataset
- }),
+ })
},
{
id: 'map',
label: 'Map',
view: new recline.View.Map({
model: dataset
- }),
+ })
},
{
id: 'transform',
diff --git a/dist/recline.dataset.js b/dist/recline.dataset.js
index 05ae6add..86359d90 100644
--- a/dist/recline.dataset.js
+++ b/dist/recline.dataset.js
@@ -608,7 +608,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
});
};
- this.delete = function(doc) {
+ this.remove = function(doc) {
var newdocs = _.reject(self.data, function(internalDoc) {
return (doc.id === internalDoc.id);
});
@@ -623,7 +623,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
self.update(record);
});
_.each(changes.deletes, function(record) {
- self.delete(record);
+ self.remove(record);
});
dfd.resolve();
return dfd.promise();
diff --git a/dist/recline.js b/dist/recline.js
index ed8a7054..a0bbbd77 100644
--- a/dist/recline.js
+++ b/dist/recline.js
@@ -529,7 +529,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
//
// @param {Object} id id of object to delete
// @return deferred supporting promise API
- this.delete = function(id) {
+ this.remove = function(id) {
url = this.endpoint;
url += '/' + id;
return makeRequest({
@@ -669,7 +669,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
else if (changes.updates.length >0) {
return es.upsert(changes.updates[0]);
} else if (changes.deletes.length > 0) {
- return es.delete(changes.deletes[0].id);
+ return es.remove(changes.deletes[0].id);
}
};
@@ -680,7 +680,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
var jqxhr = es.query(queryObj);
jqxhr.done(function(results) {
var out = {
- total: results.hits.total,
+ total: results.hits.total
};
out.hits = _.map(results.hits.hits, function(hit) {
if (!('id' in hit._source) && hit._id) {
@@ -930,7 +930,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
});
};
- this.delete = function(doc) {
+ this.remove = function(doc) {
var newdocs = _.reject(self.data, function(internalDoc) {
return (doc.id === internalDoc.id);
});
@@ -945,7 +945,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
self.update(record);
});
_.each(changes.deletes, function(record) {
- self.delete(record);
+ self.remove(record);
});
dfd.resolve();
return dfd.promise();
@@ -1180,7 +1180,73 @@ my.Transform.mapDocs = function(docs, editFunc) {
};
}(this.recline.Data))
-// # Recline Backbone Models
+// This file adds in full array method support in browsers that don't support it
+// see: http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-etc
+
+// Add ECMA262-5 Array methods if not supported natively
+if (!('indexOf' in Array.prototype)) {
+ Array.prototype.indexOf= function(find, i /*opt*/) {
+ if (i===undefined) i= 0;
+ if (i<0) i+= this.length;
+ if (i<0) i= 0;
+ for (var n= this.length; ithis.length-1) i= this.length-1;
+ for (i++; i-->0;) /* i++ because from-argument is sadly inclusive */
+ if (i in this && this[i]===find)
+ return i;
+ return -1;
+ };
+}
+if (!('forEach' in Array.prototype)) {
+ Array.prototype.forEach= function(action, that /*opt*/) {
+ for (var i= 0, n= this.length; i \
\
\
-