Author: ygrego Date: 2015-04-15 12:44:12 +0000 (Wed, 15 Apr 2015) New Revision: 1193 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1193 Log: Addition of property "_inverse" and method "not". Modified: oipf/js/impl/model/Query.js Modified: oipf/js/impl/model/Query.js =================================================================== --- oipf/js/impl/model/Query.js 2015-04-15 12:21:45 UTC (rev 1192) +++ oipf/js/impl/model/Query.js 2015-04-15 12:44:12 UTC (rev 1193) @@ -7,6 +7,16 @@ */ var Query = Class.extend({ + _inverse: { + 0: 1, + 1: 0, + 2: 4, + 3: 5, + 4: 2, + 5: 3, + 6: 1 + }, + _type: null, _field: null, @@ -57,6 +67,12 @@ return newQuery; + }, + + not: function() { + var queryClone = this._cloneKeys(this); + queryClone._comparison = this._inverse[queryClone._comparison]; } + }); \ No newline at end of file
participants (1)
-
ygregoï¼ users.nuiton.org