Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(152)

Delta Between Two Patch Sets: features/src/main/javascript/features/opensocial-templates/container.js

Issue 91041: Client support for multiple required libraries SVN Base: http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Left Patch Set: Created 5 months ago
Right Patch Set: Fixed an error when opensocial-data is not present Created 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497