|
From: <tre...@us...> - 2007-09-03 16:58:16
|
Revision: 345
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=345&view=rev
Author: trevorolio
Date: 2007-09-03 09:58:15 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Tweak for new script lifecycle functions.
Added google map to globe template.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js
maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js 2007-09-03 03:26:23 UTC (rev 344)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js 2007-09-03 16:58:15 UTC (rev 345)
@@ -9,15 +9,32 @@
}
function onClick(username, shapeName){
- toggleSpinning();
}
+function onContextClick(username, shapeName){
+ return new Array(new ContextMenuItemInfo("Google Map", true, "gmap"));
+}
+
+function onContextMenuItemChosen(username, nonce){
+ if(nonce == "gmap"){
+ space.showInfoPanel(thingID, username, nonce);
+ }
+}
+
+var htmlPrefix = '<html><body>';
+var htmlSuffix = '</body></html>';
+var googleMapHTML = '<iframe width="250" height="250" frameborder="no" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=400+pennsylvania+ave,+washington+dc&sll=47.5669,-122.368681&sspn=0.009483,0.016458&ie=UTF8&om=1&s=AARTsJqSBDjaBccWHYlD36UE4aHiKV35QA&ll=38.900051,-77.013302&spn=0.016699,0.021458&z=14&output=embed"></iframe><br/><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=400+pennsylvania+ave,+washington+dc&sll=47.5669,-122.368681&sspn=0.009483,0.016458&ie=UTF8&om=1&ll=38.900051,-77.013302&spn=0.016699,0.021458&z=14&source=embed" style="color:#0000FF;text-align:left;font-size:small">View Larger Map</a>';
+
+function onService(method, parameterNames, parameterValues){
+ return new HTTPResponse(200, htmlPrefix + googleMapHTML + htmlSuffix, "text/html");
+}
+
function toggleSpinning(){
if(spinning){
space.stopShapeMotion(thingID, "Globe", new Point(0, 0, 0), new Quaternion(1, 0, 0, 0));
spinning = false;
} else {
- var path = new SplinePath(25000, true, false);
+ var path = new SplinePath(240000, true, false);
path.addKeyFrame(new SplineKeyFrame(0, 0, 0, 0, 0));
path.addKeyFrame(new SplineKeyFrame(0, 0, 0, 2 * math.PI, 1));
space.startShapeMotion(thingID, "Globe", path);
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-03 03:26:23 UTC (rev 344)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-03 16:58:15 UTC (rev 345)
@@ -13,6 +13,10 @@
pageID = space.createTextPage(thingID, 4, 2, htmlPrefix + formatBoardText(getTextSetting()) + htmlSuffix, 0, 2, 0.1, 0, math.PI, 0);
}
+function cleanup(){
+ space.removeSetting(textSettingKey);
+}
+
function formatBoardText(text){
var result = '';
for(var i=0; i < text.length; i++){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|