From: Thierry Parmentelat Date: Sun, 17 Mar 2013 17:19:20 +0000 (+0100) Subject: rename js Query into ManifoldQuery X-Git-Tag: myslice-django-0.1-2~79 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=299e9c56ae549e87c974a0361d93cc1156c824ac rename js Query into ManifoldQuery --- diff --git a/engine/js/query.js b/engine/js/manifold-query.js similarity index 94% rename from engine/js/query.js rename to engine/js/manifold-query.js index 183e55d1..710f5d94 100644 --- a/engine/js/query.js +++ b/engine/js/manifold-query.js @@ -1,4 +1,4 @@ -function Query(action, method, timestamp, filters, params, fields, unique, uuid, aq, sq) +function ManifoldQuery(action, method, timestamp, filters, params, fields, unique, uuid, aq, sq) { // get, update, delete, create var action; @@ -40,7 +40,7 @@ INSERT INTO method VALUES(field=value) -------------------------------------------------------------*/ this.clone = function() { - q = new Query(); + q = new ManifoldQuery(); return jQuery.extend(true, q, this); } this.add_filter = function(key, op, value) { @@ -101,7 +101,7 @@ INSERT INTO method VALUES(field=value) } this.analyze_subqueries = function() { /* adapted from the PHP function in com_tophat/includes/query.php */ - var q = new Query(); + var q = new ManifoldQuery(); q.uuid = this.uuid; q.action = this.action; q.method = this.method; @@ -117,7 +117,7 @@ INSERT INTO method VALUES(field=value) var method = k.substr(0, pos); var field = k.substr(pos+1); if (jQuery.inArray(this.method, q.subqueries) == -1) { - q.subqueries[this.method] = new Query(); + q.subqueries[this.method] = new ManifoldQuery(); q.subqueries[this.method].action = this.action; q.subqueries[this.method].method = this.method; q.subqueries[this.method].timestamp = this.timestamp; @@ -135,7 +135,7 @@ INSERT INTO method VALUES(field=value) var method = param.substr(0, pos); var field = param.substr(pos+1); if (jQuery.inArray(this.method, q.subqueries) == -1) { - q.subqueries[this.method] = new Query(); + q.subqueries[this.method] = new ManifoldQuery(); q.subqueries[this.method].action = this.action; q.subqueries[this.method].method = this.method; q.subqueries[this.method].timestamp = this.timestamp; @@ -153,7 +153,7 @@ INSERT INTO method VALUES(field=value) var method = v.substr(0, pos); var field = v.substr(pos+1); if (jQuery.inArray(this.method, q.subqueries) == -1) { - q.subqueries[this.method] = new Query(); + q.subqueries[this.method] = new ManifoldQuery(); q.subqueries[this.method].action = this.action; q.subqueries[this.method].method = this.method; q.subqueries[this.method].timestamp = this.timestamp; diff --git a/engine/manifoldquery.py b/engine/manifoldquery.py index ab09bfe7..4ee9c01e 100644 --- a/engine/manifoldquery.py +++ b/engine/manifoldquery.py @@ -45,7 +45,7 @@ class ManifoldQuery: for (method, subquery) in self.subqueries.iteritems()]) sq="{%s}"%sq - return """ new Query('%(a)s', '%(m)s', '%(t)s', %(f)s, %(p)s, %(c)s, %(unique)s, '%(uuid)s', %(aq)s, %(sq)s)"""%locals() + return """ new ManifoldQuery('%(a)s', '%(m)s', '%(t)s', %(f)s, %(p)s, %(c)s, %(unique)s, '%(uuid)s', %(aq)s, %(sq)s)"""%locals() # this builds a ManifoldQuery object from a dict as received from javascript through its ajax request # e.g. here's what I captured from the server's output diff --git a/plugins/lists/simplelist.py b/plugins/lists/simplelist.py index 405b2e78..663dd05e 100644 --- a/plugins/lists/simplelist.py +++ b/plugins/lists/simplelist.py @@ -20,7 +20,7 @@ class SimpleList (Plugin) : return env def requirements (self): - reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/query.js", "js/onavail.js", + reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/manifold-query.js", "js/onavail.js", "js/manifold-pubsub.js", "js/manifold-async.js", "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", "js/myslice.js", diff --git a/plugins/querycode/querycode.py b/plugins/querycode/querycode.py index 4b84548a..6766444f 100644 --- a/plugins/querycode/querycode.py +++ b/plugins/querycode/querycode.py @@ -13,7 +13,7 @@ class QueryCode (Plugin): def requirements (self): return { - 'js_files' : [ "js/querycode.js", "js/plugin.js", "js/query.js", "js/onavail.js", + 'js_files' : [ "js/querycode.js", "js/plugin.js", "js/manifold-query.js", "js/onavail.js", "js/manifold-pubsub.js", "js/manifold-async.js", "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",