Review Board 1.7.22


Add lang and country substitution for ifr in client side

Review Request #4906 - Created April 27, 2012 and submitted

qiaoyun sun
SHINDIG-1763
Reviewers
shindig
ddumont, rbaxter, ssievers
shindig
If we don't set this property in shindig.properties: shindig.urlgen.use-templates-default=false, the lang and country info will not pass to the ifr url, so the lang and country are ignored.
For example: the ifr is like :
http://localhost:8080/shindig/gadgets/ifr?url=http%3A%2F%2Flocalhost%3A8080%2Fshindig%2Fsamplecontainer%2Fexamples%2FSocialHelloWorld.xml&container=default&view=default&lang=%25lang%25&country=%25country%25&debug=1&nocache=1&sanitize=%25sanitize%25&v=0a811629d8d99f87d3544b65058211fe&st=john.doe%3Ajohn.doe%3Ahttp%253A%252F%252Flocalhost%253A8080%252Fshindig%252Fsamplecontainer%252Fexamples%252FSocialHelloWorld.xml%3Acont%3Ahttp%253A%252F%252Flocalhost%253A8080%252Fshindig%252Fsamplecontainer%252Fexamples%252FSocialHelloWorld.xml%3A0%3Adefault%3A1335423393&testmode=0&parent=http%3A%2F%2Flocalhost%3A8080&mid=0

They should be substituted by the browser's setting in client side. 

 
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js
Revision 1331177 New Change
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
11
 *
11
 *
12
 * Unless required by applicable law or agreed to in writing,
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied. See the License for the
15
 * KIND, either express or implied. See the License for the
16
 * specific language governing permissions and limitations under the License.
16
 * specific language governing permissions and limitations under the License.
17
 */
17
 */
18

    
   
18

   
19

    
   
19

   
20
/**
20
/**
21
 * @fileoverview This represents an HTML element and the associated gadget.
21
 * @fileoverview This represents an HTML element and the associated gadget.
22
 */
22
 */
23

    
   
23

   
24

    
   
24

   
25
/**
25
/**
26
 * @param {osapi.container.GadgetSite} site The site containing this holder.
26
 * @param {osapi.container.GadgetSite} site The site containing this holder.
27
 * @param {Element} el The element to render gadgets in.
27
 * @param {Element} el The element to render gadgets in.
28
 * @param {string} onLoad The name of an onLoad function to call in window scope
28
 * @param {string} onLoad The name of an onLoad function to call in window scope
29
 *          to assign as the onload handler of this holder's iframe.
29
 *          to assign as the onload handler of this holder's iframe.
30
 * @constructor
30
 * @constructor
31
 * @extends {osapi.container.SiteHolder}
31
 * @extends {osapi.container.SiteHolder}
32
 */
32
 */
33
osapi.container.GadgetHolder = function(site, el, onLoad) {
33
osapi.container.GadgetHolder = function(site, el, onLoad) {
34
  osapi.container.SiteHolder.call(this, site, el, onLoad); // call super
34
  osapi.container.SiteHolder.call(this, site, el, onLoad); // call super
35
  var undef;
35
  var undef;
36

    
   
36

   
37
  /**
37
  /**
38
   * JSON metadata for gadget
38
   * JSON metadata for gadget
39
   * @type {Object}
39
   * @type {Object}
40
   * @private
40
   * @private
41
   */
41
   */
42
  this.gadgetInfo_ = undef;
42
  this.gadgetInfo_ = undef;
43

    
   
43

   
44
  /**
44
  /**
45
   * View parameters to pass to gadget.
45
   * View parameters to pass to gadget.
46
   * @type {Object}
46
   * @type {Object}
47
   * @private
47
   * @private
48
   */
48
   */
49
  this.viewParams_ = undef;
49
  this.viewParams_ = undef;
50

    
   
50

   
51
  /**
51
  /**
52
   * A dynamically set social/security token.
52
   * A dynamically set social/security token.
53
   * Social tokens are sent with original view URLs but may need
53
   * Social tokens are sent with original view URLs but may need
54
   * to be refreshed for long lived gadgets.
54
   * to be refreshed for long lived gadgets.
55
   * @type {string}
55
   * @type {string}
56
   * @private
56
   * @private
57
   */
57
   */
58
  this.securityToken_ = undef;
58
  this.securityToken_ = undef;
59

    
   
59

   
60
  this.onConstructed();
60
  this.onConstructed();
61
};
61
};
62
osapi.container.GadgetHolder.prototype = new osapi.container.SiteHolder;
62
osapi.container.GadgetHolder.prototype = new osapi.container.SiteHolder;
63

    
   
63

   
64
/**
64
/**
65
 * Url points to the rpc_relay.html which allows cross-domain communication between
65
 * Url points to the rpc_relay.html which allows cross-domain communication between
66
 *     a gadget and container
66
 *     a gadget and container
67
 * @type {string}
67
 * @type {string}
68
 * @private
68
 * @private
69
 */
69
 */
70
osapi.container.GadgetHolder.prototype.relayPath_ = null;
70
osapi.container.GadgetHolder.prototype.relayPath_ = null;
71

    
   
71

   
72
/**
72
/**
73
 * @return {Object} The metadata of gadget.
73
 * @return {Object} The metadata of gadget.
74
 */
74
 */
75
osapi.container.GadgetHolder.prototype.getGadgetInfo = function() {
75
osapi.container.GadgetHolder.prototype.getGadgetInfo = function() {
76
  return this.gadgetInfo_;
76
  return this.gadgetInfo_;
77
};
77
};
78

    
   
78

   
79

    
   
79

   
80
/**
80
/**
81
 * @inheritDoc
81
 * @inheritDoc
82
 */
82
 */
83
osapi.container.GadgetHolder.prototype.dispose = function() {
83
osapi.container.GadgetHolder.prototype.dispose = function() {
84
  osapi.container.SiteHolder.prototype.dispose.call(this); // super.dispose();
84
  osapi.container.SiteHolder.prototype.dispose.call(this); // super.dispose();
85
  this.gadgetInfo_ = null;
85
  this.gadgetInfo_ = null;
86
};
86
};
87

    
   
87

   
88

    
   
88

   
89
/**
89
/**
90
 * @inheritDoc
90
 * @inheritDoc
91
 */
91
 */
92
osapi.container.GadgetHolder.prototype.getUrl = function() {
92
osapi.container.GadgetHolder.prototype.getUrl = function() {
93
  return this.gadgetInfo_ && this.gadgetInfo_['url'];
93
  return this.gadgetInfo_ && this.gadgetInfo_['url'];
94
};
94
};
95

    
   
95

   
96
/**
96
/**
97
 * @return {string} The view of current gadget. This is the view that was actually rendered once
97
 * @return {string} The view of current gadget. This is the view that was actually rendered once
98
 *         view aliases were applied.
98
 *         view aliases were applied.
99
 * @see osapi.container.GadgetSite.prototype.render
99
 * @see osapi.container.GadgetSite.prototype.render
100
 */
100
 */
101
osapi.container.GadgetHolder.prototype.getView = function() {
101
osapi.container.GadgetHolder.prototype.getView = function() {
102
  return this.renderParams_[osapi.container.RenderParam.VIEW];
102
  return this.renderParams_[osapi.container.RenderParam.VIEW];
103
};
103
};
104

    
   
104

   
105

    
   
105

   
106
/**
106
/**
107
 * @inheritDoc
107
 * @inheritDoc
108
 * @see osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ and org.openajax.hub-2.0.5/iframe.js:createIframe()
108
 * @see osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ and org.openajax.hub-2.0.5/iframe.js:createIframe()
109
 */
109
 */
110
osapi.container.GadgetHolder.prototype.getIframeElement = function() {
110
osapi.container.GadgetHolder.prototype.getIframeElement = function() {
111
  return this.el_.getElementsByTagName('iframe')[0];
111
  return this.el_.getElementsByTagName('iframe')[0];
112
};
112
};
113

    
   
113

   
114

    
   
114

   
115
/**
115
/**
116
 * @param {string} value The value to set this social/security token to.
116
 * @param {string} value The value to set this social/security token to.
117
 * @return {osapi.container.GadgetHolder} the current GadgetHolder.
117
 * @return {osapi.container.GadgetHolder} the current GadgetHolder.
118
 */
118
 */
119
osapi.container.GadgetHolder.prototype.setSecurityToken = function(value) {
119
osapi.container.GadgetHolder.prototype.setSecurityToken = function(value) {
120
  this.securityToken_ = value;
120
  this.securityToken_ = value;
121
  return this;
121
  return this;
122
};
122
};
123

    
   
123

   
124

    
   
124

   
125
/**
125
/**
126
 * Render a gadget into the element.
126
 * Render a gadget into the element.
127
 *
127
 *
128
 * @override
128
 * @override
129
 * @param {Object} gadgetInfo the JSON gadget description.
129
 * @param {Object} gadgetInfo the JSON gadget description.
130
 * @param {Object} viewParams Look at osapi.container.ViewParam.
130
 * @param {Object} viewParams Look at osapi.container.ViewParam.
131
 * @param {Object} renderParams Look at osapi.container.RenderParam.
131
 * @param {Object} renderParams Look at osapi.container.RenderParam.
132
 */
132
 */
133
osapi.container.GadgetHolder.prototype.render = function(gadgetInfo, viewParams, renderParams) {
133
osapi.container.GadgetHolder.prototype.render = function(gadgetInfo, viewParams, renderParams) {
134
  this.iframeId_ = osapi.container.GadgetHolder.IFRAME_ID_PREFIX_ +
134
  this.iframeId_ = osapi.container.GadgetHolder.IFRAME_ID_PREFIX_ +
135
      this.site_.getId();
135
      this.site_.getId();
136
  this.gadgetInfo_ = gadgetInfo;
136
  this.gadgetInfo_ = gadgetInfo;
137
  this.viewParams_ = viewParams;
137
  this.viewParams_ = viewParams;
138
  this.renderParams_ = renderParams;
138
  this.renderParams_ = renderParams;
139

    
   
139

   
140
  if (this.hasFeature_(gadgetInfo, 'pubsub-2')) {
140
  if (this.hasFeature_(gadgetInfo, 'pubsub-2')) {
141
    this.doOaaIframeHtml_();
141
    this.doOaaIframeHtml_();
142
  } else {
142
  } else {
143
    this.doNormalIframeHtml_();
143
    this.doNormalIframeHtml_();
144
  }
144
  }
145
};
145
};
146

    
   
146

   
147

    
   
147

   
148
// -----------------------------------------------------------------------------
148
// -----------------------------------------------------------------------------
149
// Private variables and methods.
149
// Private variables and methods.
150
// -----------------------------------------------------------------------------
150
// -----------------------------------------------------------------------------
151

    
   
151

   
152

    
   
152

   
153
/**
153
/**
154
 * Prefix for gadget HTML IDs/names.
154
 * Prefix for gadget HTML IDs/names.
155
 * @type {string}
155
 * @type {string}
156
 * @private
156
 * @private
157
 */
157
 */
158
osapi.container.GadgetHolder.IFRAME_ID_PREFIX_ = '__gadget_';
158
osapi.container.GadgetHolder.IFRAME_ID_PREFIX_ = '__gadget_';
159

    
   
159

   
160
/**
160
/**
161
 * @private
161
 * @private
162
 */
162
 */
163
osapi.container.GadgetHolder.prototype.doNormalIframeHtml_ = function() {
163
osapi.container.GadgetHolder.prototype.doNormalIframeHtml_ = function() {
164
  var uri = this.getIframeUrl_();
164
  var uri = this.getIframeUrl_();
165
  this.el_.innerHTML = this.createIframeHtml(uri);
165
  this.el_.innerHTML = this.createIframeHtml(uri);
166

    
   
166

   
167
  // Set up RPC channel.
167
  // Set up RPC channel.
168
  var iframeUri = shindig.uri(uri);
168
  var iframeUri = shindig.uri(uri);
169
  var relayUri = shindig.uri()
169
  var relayUri = shindig.uri()
170
      .setSchema(iframeUri.getSchema())
170
      .setSchema(iframeUri.getSchema())
171
      .setAuthority(iframeUri.getAuthority())
171
      .setAuthority(iframeUri.getAuthority())
172
      .setPath(this.relayPath_);
172
      .setPath(this.relayPath_);
173
  gadgets.rpc.setupReceiver(this.iframeId_, relayUri.toString(),
173
  gadgets.rpc.setupReceiver(this.iframeId_, relayUri.toString(),
174
      iframeUri.getFP('rpctoken'));
174
      iframeUri.getFP('rpctoken'));
175
};
175
};
176

    
   
176

   
177

    
   
177

   
178
/**
178
/**
179
 * @private
179
 * @private
180
 */
180
 */
181
osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ = function() {
181
osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ = function() {
182
  new OpenAjax.hub.IframeContainer(
182
  new OpenAjax.hub.IframeContainer(
183
      gadgets.pubsub2router.hub,
183
      gadgets.pubsub2router.hub,
184
      this.iframeId_,
184
      this.iframeId_,
185
      {
185
      {
186
        Container: {
186
        Container: {
187
          onSecurityAlert: function(source, alertType) {
187
          onSecurityAlert: function(source, alertType) {
188
            gadgets.error(['Security error for container ',
188
            gadgets.error(['Security error for container ',
189
                source.getClientID(), ' : ', alertType].join(''));
189
                source.getClientID(), ' : ', alertType].join(''));
190
            source.getIframe().src = 'about:blank';
190
            source.getIframe().src = 'about:blank';
191
          },
191
          },
192
          onConnect: function(container) {
192
          onConnect: function(container) {
193
            gadgets.log(['connected: ', container.getClientID()].join(''));
193
            gadgets.log(['connected: ', container.getClientID()].join(''));
194
          }
194
          }
195
        },
195
        },
196
        IframeContainer: {
196
        IframeContainer: {
197
          parent: this.el_,
197
          parent: this.el_,
198
          uri: this.getIframeUrl_(),
198
          uri: this.getIframeUrl_(),
199
          //tunnelURI: shindig.uri('/test1/gadgets/' + '../container/rpc_relay.html')
199
          //tunnelURI: shindig.uri('/test1/gadgets/' + '../container/rpc_relay.html')
200
          //   .resolve(shindig.uri(window.location.href)),
200
          //   .resolve(shindig.uri(window.location.href)),
201
          tunnelURI: shindig.uri(this.relayPath_).resolve(shindig.uri(window.location.href)),
201
          tunnelURI: shindig.uri(this.relayPath_).resolve(shindig.uri(window.location.href)),
202
          iframeAttrs: this.createIframeAttributeMap(this.getIframeUrl_()),
202
          iframeAttrs: this.createIframeAttributeMap(this.getIframeUrl_()),
203
          onGadgetLoad: this.onLoad_
203
          onGadgetLoad: this.onLoad_
204
        }
204
        }
205
      }
205
      }
206
  );
206
  );
207
};
207
};
208

    
   
208

   
209

    
   
209

   
210
/**
210
/**
211
 * @param {Object} gadgetInfo the JSON gadget description.
211
 * @param {Object} gadgetInfo the JSON gadget description.
212
 * @param {string} feature the feature to look for.
212
 * @param {string} feature the feature to look for.
213
 * @private
213
 * @private
214
 * @return {boolean} true if feature is set.
214
 * @return {boolean} true if feature is set.
215
 */
215
 */
216
osapi.container.GadgetHolder.prototype.hasFeature_ = function(gadgetInfo, feature) {
216
osapi.container.GadgetHolder.prototype.hasFeature_ = function(gadgetInfo, feature) {
217
  var modulePrefs = gadgetInfo[osapi.container.MetadataResponse.MODULE_PREFS];
217
  var modulePrefs = gadgetInfo[osapi.container.MetadataResponse.MODULE_PREFS];
218
  if (modulePrefs) {
218
  if (modulePrefs) {
219
    var features = modulePrefs[osapi.container.MetadataResponse.FEATURES];
219
    var features = modulePrefs[osapi.container.MetadataResponse.FEATURES];
220
    if (features && features[feature]) {
220
    if (features && features[feature]) {
221
      return true;
221
      return true;
222
    }
222
    }
223
  }
223
  }
224
  return false;
224
  return false;
225
};
225
};
226

    
   
226

   
227
/**
227
/**
228
 * Get the rendering iframe URL.
228
 * Get the rendering iframe URL.
229
 * @private
229
 * @private
230
 * @return {string} the rendering iframe URL.
230
 * @return {string} the rendering iframe URL.
231
 */
231
 */
232
osapi.container.GadgetHolder.prototype.getIframeUrl_ = function() {
232
osapi.container.GadgetHolder.prototype.getIframeUrl_ = function() {
233
  var uri = shindig.uri(this.gadgetInfo_[osapi.container.MetadataResponse.IFRAME_URLS][this.getView()]);
233
  var uri = shindig.uri(this.gadgetInfo_[osapi.container.MetadataResponse.IFRAME_URLS][this.getView()]);
234
  uri.setQP('debug', this.renderParams_[osapi.container.RenderParam.DEBUG] ? '1' : '0');
234
  uri.setQP('debug', this.renderParams_[osapi.container.RenderParam.DEBUG] ? '1' : '0');
235
  uri.setQP('nocache', this.renderParams_[osapi.container.RenderParam.NO_CACHE] ? '1' : '0');
235
  uri.setQP('nocache', this.renderParams_[osapi.container.RenderParam.NO_CACHE] ? '1' : '0');
236
  uri.setQP('testmode', this.renderParams_[osapi.container.RenderParam.TEST_MODE] ? '1' : '0');
236
  uri.setQP('testmode', this.renderParams_[osapi.container.RenderParam.TEST_MODE] ? '1' : '0');
237
  uri.setQP('view', this.getView());
237
  uri.setQP('view', this.getView());
238
  if (this.renderParams_[osapi.container.RenderParam.CAJOLE]) {
238
  if (this.renderParams_[osapi.container.RenderParam.CAJOLE]) {
239
    var libs = uri.getQP('libs');
239
    var libs = uri.getQP('libs');
240
    if (libs == null || libs == '') uri.setQP('libs', 'caja');
240
    if (libs == null || libs == '') uri.setQP('libs', 'caja');
241
    else uri.setQP('libs', [libs, ':caja'].join(''));
241
    else uri.setQP('libs', [libs, ':caja'].join(''));
242
    uri.setQP('caja', '1');
242
    uri.setQP('caja', '1');
243
  }
243
  }
244
  this.updateUserPrefParams_(uri);
244
  this.updateUserPrefParams_(uri);
245

    
   
245

   
246
  // TODO: Share this base container logic
246
  // TODO: Share this base container logic
247
  // TODO: Two SD base URIs - one for container, one for gadgets
247
  // TODO: Two SD base URIs - one for container, one for gadgets
248
  // Need to add parent at end of query due to gadgets parsing bug
248
  // Need to add parent at end of query due to gadgets parsing bug
249
  uri.setQP('parent', window.__CONTAINER_URI.getOrigin());
249
  uri.setQP('parent', window.__CONTAINER_URI.getOrigin());
250

    
   
250

   
251
  // Remove existing social token if we have a new one
251
  // Remove existing social token if we have a new one
252
  if (this.securityToken_) {
252
  if (this.securityToken_) {
253
    uri.setExistingP('st', this.securityToken_);
253
    uri.setExistingP('st', this.securityToken_);
254
  }
254
  }
255

    
   
255

   
256
  // Uniquely identify possibly-same gadgets on a page.
256
  // Uniquely identify possibly-same gadgets on a page.
257
  uri.setQP('mid', String(this.site_.getModuleId()));
257
  uri.setQP('mid', String(this.site_.getModuleId()));
258

    
   
258

   
259
  if (!osapi.container.util.isEmptyJson(this.viewParams_)) {
259
  if (!osapi.container.util.isEmptyJson(this.viewParams_)) {
260
    var gadgetParamText = gadgets.json.stringify(this.viewParams_);
260
    var gadgetParamText = gadgets.json.stringify(this.viewParams_);
261
    uri.setFP('view-params', gadgetParamText);
261
    uri.setFP('view-params', gadgetParamText);
262
  }
262
  }
263

    
   
263

   
264
  // add rpctoken fragment to support flash transport if not in the uri
264
  // add rpctoken fragment to support flash transport if not in the uri
265
  if(typeof(uri.getFP('rpctoken')) === 'undefined' ) {
265
  if(typeof(uri.getFP('rpctoken')) === 'undefined' ) {
266
    var rpcToken = (0x7FFFFFFF * Math.random()) | 0;
266
    var rpcToken = (0x7FFFFFFF * Math.random()) | 0;
267
    uri.setFP('rpctoken', rpcToken);
267
    uri.setFP('rpctoken', rpcToken);
268
  }
268
  }
269

    
   
269
  var lang = this.site_.service_.getLanguage();

    
   
270
  var country = this.site_.service_.getCountry();

    
   
271
  var templateLang = uri.getQP('lang'), templateCountry = uri.getQP('country');

    
   
272
  if(templateLang.indexOf('%') != -1){

    
   
273
    uri.setQP('lang', lang);

    
   
274
  }

    
   
275
  if(templateCountry.indexOf('%') != -1){

    
   
276
    uri.setQP('country', country);

    
   
277
  }
270
  return uri.toString();
278
  return uri.toString();
271
};
279
};
272

    
   
280

   
273

    
   
281

   
274
/**
282
/**
275
 * Replace user prefs specified in url with only those specified. This will
283
 * Replace user prefs specified in url with only those specified. This will
276
 * maintain each user prefs existence (or lack of), order (from left to right)
284
 * maintain each user prefs existence (or lack of), order (from left to right)
277
 * and its appearance (in query params or fragment).
285
 * and its appearance (in query params or fragment).
278
 * @param {shindig.uri} uri The URL possibly containing user preferences
286
 * @param {shindig.uri} uri The URL possibly containing user preferences
279
 *     parameters prefixed by up_.
287
 *     parameters prefixed by up_.
280
 * @private
288
 * @private
281
 */
289
 */
282
osapi.container.GadgetHolder.prototype.updateUserPrefParams_ = function(uri) {
290
osapi.container.GadgetHolder.prototype.updateUserPrefParams_ = function(uri) {
283
  var userPrefs = this.renderParams_[osapi.container.RenderParam.USER_PREFS];
291
  var userPrefs = this.renderParams_[osapi.container.RenderParam.USER_PREFS];
284
  if (userPrefs) {
292
  if (userPrefs) {
285
    for (var up in userPrefs) {
293
    for (var up in userPrefs) {
286
      var upKey = 'up_' + up;
294
      var upKey = 'up_' + up;
287
      var upValue = userPrefs[up];
295
      var upValue = userPrefs[up];
288
      if (upValue instanceof Array) {
296
      if (upValue instanceof Array) {
289
        upValue = upValue.join('|');
297
        upValue = upValue.join('|');
290
      }
298
      }
291
      uri.setExistingP(upKey, upValue);
299
      uri.setExistingP(upKey, upValue);
292
    }
300
    }
293
  }
301
  }
294
};
302
};
295

    
   
303

   
296
function init(config) {
304
function init(config) {
297
  if (config['container']) {
305
  if (config['container']) {
298
    var rpath = config['container']['relayPath'];
306
    var rpath = config['container']['relayPath'];
299
    osapi.container.GadgetHolder.prototype.relayPath_ = rpath;
307
    osapi.container.GadgetHolder.prototype.relayPath_ = rpath;
300
  }
308
  }
301
}
309
}
302

    
   
310

   
303
// We do run this in the container mode in the new common container
311
// We do run this in the container mode in the new common container
304
if (gadgets.config) {
312
if (gadgets.config) {
305
  gadgets.config.register('container', null, init);
313
  gadgets.config.register('container', null, init);
306
}
314
}
http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/container/gadget_holder_test.js
Revision 1331168 New Change
 
  1. http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js: Loading...
  2. http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/container/gadget_holder_test.js: Loading...