changed git call from https to git readonly
[atutor.git] / mods / social / lib / js / myContainer.js
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements.  See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership.  The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License.  You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied.  See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19
20 // Default container configuration. To change the configuration, you have two options:
21 //
22 // A. If you run the Java server: Create your own "myContainer.js" file and
23 // modify the value in web.xml. 
24 //
25 //  B. If you run the PHP server: Create a myContainer.js, copy the contents of container.js to it,
26 //  change 
27 //              {"gadgets.container" : ["default"],
28 //  to
29 //              {"gadgets.container" : ["myContainer"],
30 // And make your changes that you need to myContainer.js.
31 // Just make sure on the iframe URL you specify &container=myContainer 
32 // for it to use that config. 
33 //
34 // All configurations will automatically inherit values from this
35 // config, so you only need to provide configuration for items
36 // that you require explicit special casing for.
37 //
38 // Please namespace your attributes using the same conventions
39 // as you would for javascript objects, e.g. gadgets.features
40 // rather than "features".
41
42 // NOTE: Please _don't_ leave trailing commas because the php json parser
43 // errors out on this.
44
45 // Container must be an array; this allows multiple containers
46 // to share configuration.
47 {"gadgets.container" : ["myContainer"],
48
49 // Set of regular expressions to validate the parent parameter. This is
50 // necessary to support situations where you want a single container to support
51 // multiple possible host names (such as for localized domains, such as
52 // <language>.example.org. If left as null, the parent parameter will be
53 // ignored; otherwise, any requests that do not include a parent
54 // value matching this set will return a 404 error.
55 "gadgets.parent" : null,
56
57 // Should all gadgets be forced on to a locked domain?
58 "gadgets.lockedDomainRequired" : false,
59
60 // DNS domain on which gadgets should render.
61 "gadgets.lockedDomainSuffix" : "-a.example.com:8080",
62
63 // Various urls generated throughout the code base.
64 // iframeBaseUri will automatically have the host inserted
65 // if locked domain is enabled and the implementation supports it.
66 // query parameters will be added.
67 "gadgets.iframeBaseUri" : "/shindig/php/gadgets/ifr",
68
69 // jsUriTemplate will have %host% and %js% substituted.
70 // No locked domain special cases, but jsUriTemplate must
71 // never conflict with a lockedDomainSuffix.
72 "gadgets.jsUriTemplate" : "http://%host%/shindig/php/gadgets/js/%js%",
73
74 // Use an insecure security token by default
75 "gadgets.securityTokenType" : "insecure",
76
77 // Config param to load Opensocial data for social
78 // preloads in data pipelining.  %host% will be
79 // substituted with the current host.
80 "gadgets.osDataUri" : "http://%host%/shindig/php/social/rpc",
81
82 // Uncomment these to switch to a secure version
83 // 
84 //"gadgets.securityTokenType" : "secure",
85 //"gadgets.securityTokenKeyFile" : "/path/to/key/file.txt",
86
87 // This config data will be passed down to javascript. Please
88 // configure your object using the feature name rather than
89 // the javascript name.
90
91 // Only configuration for required features will be used.
92 // See individual feature.xml files for configuration details.
93 "gadgets.features" : {
94   "core.io" : {
95     // Note: /proxy is an open proxy. Be careful how you expose this!
96     "proxyUrl" : "http://%host%/shindig/php/gadgets/proxy?refresh=%refresh%&url=%url%",
97     "jsonProxyUrl" : "http://%host%/shindig/php/gadgets/makeRequest"
98   },
99   "views" : {
100     "profile" : {
101       "isOnlyVisible" : false,
102       "urlTemplate" : "http://localhost/shindig/php/gadgets/profile?{var}",
103       "aliases": ["DASHBOARD", "default"]
104     },
105     "canvas" : {
106       "isOnlyVisible" : true,
107       "urlTemplate" : "http://localhost/shindig/php/gadgets/canvas?{var}",
108       "aliases" : ["FULL_PAGE"]
109     }
110   },
111   "rpc" : {
112     // Path to the relay file. Automatically appended to the parent
113     /// parameter if it passes input validation and is not null.
114     // This should never be on the same host in a production environment!
115     // Only use this for TESTING!
116     "parentRelayUrl" : "/shindig/php/gadgets/files/container/rpc_relay.html",
117
118     // If true, this will use the legacy ifpc wire format when making rpc
119     // requests.
120     "useLegacyProtocol" : false
121   },
122   // Skin defaults
123   "skins" : {
124     "properties" : {
125       "BG_COLOR": "",
126       "BG_IMAGE": "",
127       "BG_POSITION": "",
128       "BG_REPEAT": "",
129       "FONT_COLOR": "",
130       "ANCHOR_COLOR": ""
131     }
132   },
133   "opensocial-0.8" : {
134     // Path to fetch opensocial data from
135     // Must be on the same domain as the gadget rendering server
136     "impl" : "rpc",  //Use "rpc" to enable JSON-RPC, "rest' for REST
137     "path" : "http://%host%/shindig/php/social",
138     "domain" : "shindig",
139     "enableCaja" : false,
140     "supportedFields" : {
141        "person" : ["id", {"name" : ["familyName", "givenName", "unstructured"]}, "thumbnailUrl", "profileUrl"],
142        "activity" : ["id", "title"]
143     }
144   }
145
146 }}