~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/dataschema/dataschema-json-debug.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-09 14:20:30 UTC
  • mfrom: (182.1.3 yui-3.2)
  • Revision ID: launchpad@pqm.canonical.com-20100909142030-13w6vo0ixfysxc15
[r=beuno] Update lazr-js to yui-3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.com/yui/license.html
5
 
version: 3.1.2
6
 
build: 56
 
5
version: 3.2.0
 
6
build: 2676
7
7
*/
8
8
YUI.add('dataschema-json', function(Y) {
9
9
 
121
121
            if(LANG.isObject(data_in) && schema) {
122
122
                // Parse results data
123
123
                if(!LANG.isUndefined(schema.resultListLocator)) {
124
 
                    data_out = SchemaJSON._parseResults(schema, data_in, data_out);
 
124
                    data_out = SchemaJSON._parseResults.call(this, schema, data_in, data_out);
125
125
                }
126
126
 
127
127
                // Parse meta data
167
167
                            // Sometimes you're getting an array of strings, or want the whole object,
168
168
                            // so resultFields don't make sense.
169
169
                            if (LANG.isArray(schema.resultFields)) {
170
 
                                data_out = SchemaJSON._getFieldValues(schema.resultFields, results, data_out);
 
170
                                data_out = SchemaJSON._getFieldValues.call(this, schema.resultFields, results, data_out);
171
171
                            }
172
172
                            else {
173
173
                                data_out.results = results;
245
245
                    // Cycle through simpleLocators
246
246
                    for (j=simplePaths.length-1; j>=0; --j) {
247
247
                        // Bug 1777850: The result might be an array instead of object
248
 
                        record[simplePaths[j].key] = Y.DataSchema.Base.parse(
 
248
                        record[simplePaths[j].key] = Y.DataSchema.Base.parse.call(this,
249
249
                                (LANG.isUndefined(result[simplePaths[j].path]) ?
250
250
                                result[j] : result[simplePaths[j].path]), simplePaths[j]);
251
251
                    }
252
252
 
253
253
                    // Cycle through complexLocators
254
254
                    for (j=complexPaths.length - 1; j>=0; --j) {
255
 
                        record[complexPaths[j].key] = Y.DataSchema.Base.parse(
 
255
                        record[complexPaths[j].key] = Y.DataSchema.Base.parse.call(this,
256
256
                            (SchemaJSON.getLocationValue(complexPaths[j].path, result)), complexPaths[j] );
257
257
                    }
258
258
 
259
259
                    // Cycle through fieldParsers
260
260
                    for (j=fieldParsers.length-1; j>=0; --j) {
261
261
                        key = fieldParsers[j].key;
262
 
                        record[key] = fieldParsers[j].parser(record[key]);
 
262
                        record[key] = fieldParsers[j].parser.call(this, record[key]);
263
263
                        // Safety net
264
264
                        if (LANG.isUndefined(record[key])) {
265
265
                            record[key] = null;
306
306
 
307
307
 
308
308
 
309
 
}, '3.1.2' ,{requires:['json', 'dataschema-base']});
 
309
}, '3.2.0' ,{requires:['json', 'dataschema-base']});