| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * Licensed to the Apache Software Foundation (ASF) under one | 2 * Licensed to the Apache Software Foundation (ASF) under one |
| 3 * or more contributor license agreements. See the NOTICE file | 3 * or more contributor license agreements. See the NOTICE file |
| 4 * distributed with this work for additional information | 4 * distributed with this work for additional information |
| 5 * regarding copyright ownership. The ASF licenses this file | 5 * regarding copyright ownership. The ASF licenses this file |
| 6 * to you under the Apache License, Version 2.0 (the | 6 * to you under the Apache License, Version 2.0 (the |
| 7 * "License"); you may not use this file except in compliance | 7 * "License"); you may not use this file except in compliance |
| 8 * with the License. You may obtain a copy of the License at | 8 * with the License. You may obtain a copy of the License at |
| 9 * | 9 * |
| 10 * http://www.apache.org/licenses/LICENSE-2.0 | 10 * http://www.apache.org/licenses/LICENSE-2.0 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 /** | 199 /** |
| 200 * @return {JsEvalContext} the default rendering context to use - this will | 200 * @return {JsEvalContext} the default rendering context to use - this will |
| 201 * contain all available data. | 201 * contain all available data. |
| 202 */ | 202 */ |
| 203 os.Container.getDefaultContext = function() { | 203 os.Container.getDefaultContext = function() { |
| 204 if ((window['gadgets'] && gadgets.util.hasFeature('opensocial-data')) || | 204 if ((window['gadgets'] && gadgets.util.hasFeature('opensocial-data')) || |
| 205 (opensocial.data.getDataContext)) { | 205 (opensocial.data && opensocial.data.getDataContext)) { |
| 206 return os.createContext(opensocial.data.getDataContext().getData()); | 206 return os.createContext(opensocial.data.getDataContext().getData()); |
| 207 } | 207 } |
| 208 return os.createContext({}); | 208 return os.createContext({}); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 /** | 211 /** |
| 212 * Renders any registered inline templates. | 212 * Renders any registered inline templates. |
| 213 * @param {Object} opt_doc Optional document to use instead of window.document. | 213 * @param {Object} opt_doc Optional document to use instead of window.document. |
| 214 */ | 214 */ |
| 215 os.Container.renderInlineTemplates = function(opt_doc) { | 215 os.Container.renderInlineTemplates = function(opt_doc) { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 if (tagParts.length == 2) { | 501 if (tagParts.length == 2) { |
| 502 var nsObj = os.getNamespace(tagParts[0]); | 502 var nsObj = os.getNamespace(tagParts[0]); |
| 503 if (!nsObj) { | 503 if (!nsObj) { |
| 504 // Auto Create a namespace for lazy registration. | 504 // Auto Create a namespace for lazy registration. |
| 505 nsObj = os.createNamespace(tagParts[0], null); | 505 nsObj = os.createNamespace(tagParts[0], null); |
| 506 } | 506 } |
| 507 nsObj[tagParts[1]] = os.createTemplateCustomTag(template); | 507 nsObj[tagParts[1]] = os.createTemplateCustomTag(template); |
| 508 } | 508 } |
| 509 } | 509 } |
| 510 }; | 510 }; |
| LEFT | RIGHT |