|
From: <tre...@us...> - 2007-11-17 16:36:27
|
Revision: 587
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=587&view=rev
Author: trevorolio
Date: 2007-11-17 08:36:31 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
Tweaked the Java3D setup to fall back to aliased, single buffered if the graphics board doesn't support it, which makes us run on lesser machines and also on the Parallels emulator on OS X Intel machines, making life much easier for Macish developers who want to maintain support WinIE.
Used this fact to fix IE+Java quirks (e.g. no String[] passing over liveconnect) so that the majority of browser installations can once again use Ogoglio.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.js
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.js 2007-11-17 16:36:17 UTC (rev 586)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.js 2007-11-17 16:36:31 UTC (rev 587)
@@ -64,43 +64,42 @@
}
bodyDataListXML = xml;
- setTimeout("awaitInitialLoad();", 1000);
+ awaitInitialLoad();
}
function awaitInitialLoad(){
var editor = document.getElementById("viewer");
- if(editor != null && editor.completedInitialLoad()){
+ if(typeof editor != "undefined" && editor != null && typeof editor.completedInitialLoad != "undefined" && editor.completedInitialLoad()){
initControls();
return;
}
- setTimeout("awaitInitialLoad();", 500);
+ window.setTimeout("awaitInitialLoad()", 1000);
}
function initControls(){
var editor = document.getElementById("viewer");
- var morphNames = editor.getMorphNames();
- var textureNames = editor.getBaseTextureNames();
var baseTextureName = bodyXML.getAttribute("basetexturename");
var defaultBodyID = +bodyXML.getAttribute("bodyconfigurationid");
var ownerUsername = bodyXML.getAttribute("ownerusername");
var morphHTML = "";
- for(var i = morphNames.length - 1; i >= 0; i--){
- var settingValue = editor.getMorphSetting(morphNames[i]);
- morphHTML += "<h4>" + morphNames[i] + ":</h4>";
- morphHTML += "<form onsubmit='changeMorph(\"" + morphNames[i] + "\", 0.1);return false;'><input type='submit' value='+' name='" + morphNames[i] + "'></form>";
- morphHTML += " <span id='" + morphNames[i] + " setting'>" + formatSettingValue(settingValue) + "</span> ";
- morphHTML += "<form onsubmit='changeMorph(\"" + morphNames[i] + "\", -0.1);return false;'><input type='submit' value='-' name='" + morphNames[i] + "'></form>";
+ for(var i = editor.getMorphCount() - 1; i >= 0; i--){
+ var morphName = editor.getMorphName(i);
+ var settingValue = editor.getMorphSetting(morphName);
+ morphHTML += "<h4>" + morphName + ":</h4>";
+ morphHTML += "<form onsubmit='changeMorph(\"" + morphName + "\", 0.1);return false;'><input type='submit' value='+' name='" + morphName + "'></form>";
+ morphHTML += " <span id='" + morphName + " setting'>" + formatSettingValue(settingValue) + "</span> ";
+ morphHTML += "<form onsubmit='changeMorph(\"" + morphName + "\", -0.1);return false;'><input type='submit' value='-' name='" + morphName + "'></form>";
}
morphControls.innerHTML = morphHTML;
- var animationNames = editor.getAnimationNames();
var animationHTML = "";
- for(var i = 0; i < animationNames.length; i++){
- if(animationNames[i] == "default"){
+ for(var i = 0; i < editor.getAnimationCount(); i++){
+ var name = editor.getAnimationName(i);
+ if(name == "default"){
continue;
}
- animationHTML += "<form onsubmit='playAnimation(\"" + animationNames[i] + "\"); return false;'><input type='submit' value='" + animationNames[i] + "'/></form>";
+ animationHTML += "<form onsubmit='playAnimation(\"" + name + "\"); return false;'><input type='submit' value='" + name + "'/></form>";
}
animationControls.innerHTML = animationHTML;
@@ -111,9 +110,10 @@
} else {
textureHTML += "<option value='Default'>Default</option>";
}
- for(var i=0; i < textureNames.length; i++){
- var selectedText = textureNames[i] == baseTextureName ? "selected='selected'" : "";
- textureHTML += "<option " + selectedText + " value='" + textureNames[i] + "'>" + textureNames[i] + "</option>";
+ for(var i=0; i < editor.getBaseTextureCount(); i++){
+ var name = editor.getBaseTextureName(i);
+ var selectedText = name == baseTextureName ? "selected='selected'" : "";
+ textureHTML += "<option " + selectedText + " value='" + name + "'>" + name + "</option>";
}
textureHTML += "</select></form>";
textureSelectionDiv.innerHTML = textureHTML;
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-11-17 16:36:17 UTC (rev 586)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-11-17 16:36:31 UTC (rev 587)
@@ -172,19 +172,25 @@
return text.substring(0, maxLength - eLength) + (elipseText == null ? "" : elipseText);
}
-function popUp(URL, decorated, width, height) {
- var id = "page-" + new Date().getTime();
+function popUp(url, decorated, width, height) {
+ var id = "page" + new Date().getTime();
var params = "";
if(typeof width != "undefined"){
- params += ",width=" + width;
+ params += "width=" + width;
}
if(typeof height != undefined){
- params += ",height=" + height;
+ if(params.length > 0){
+ params += ",";
+ }
+ params += "height=" + height;
}
- if(decorated == null || decorated == true){
- params += ',toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1';
+ if(typeof decorated == "undefined" || decorated == null || decorated == true){
+ if(params.length > 0){
+ params += ",";
+ }
+ params += 'toolbar=yes,scrollbars=yes,location=yes,statusbar=yes,menubar=yes,resizable';
}
- return window.open(URL, id, params);
+ return window.open(url, id, params);
}
function getLoginCookie(){
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-11-17 16:36:17 UTC (rev 586)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-11-17 16:36:31 UTC (rev 587)
@@ -119,7 +119,7 @@
displayName = displayName + "";
link = link + "";
- displayChatMessage("Link: <a onclick='popUp(this.href, true); return false;' href='" + link + "'>" + escapeHTML(displayName) + "</a>");
+ displayChatMessage("Link: <a onclick='popUp(\"" + link + "\", true); return false;' href='javascript:void(0);'>" + escapeHTML(displayName) + "</a>");
}
//called by the viewer applet
@@ -240,10 +240,11 @@
infoActionDiv.style.width = "100%";
infoActionDiv.style.textAlign = "right";
var closeActionAnchor = document.createElement("a");
- closeActionAnchor.setAttribute("href", "error.html");
- closeActionAnchor.setAttribute("onclick", "removeInfoPanel(" + id + "); return false;");
+ closeActionAnchor.setAttribute("href", "javascript:void(0);");
+ closeActionAnchor.setAttribute("onclick", "removeInfoPanel('" + id + "'); return false;");
closeActionAnchor.appendChild(document.createTextNode("close"));
infoActionDiv.appendChild(closeActionAnchor);
+ closeActionAnchor.parentNode.innerHTML = closeActionAnchor.parentNode.innerHTML; //THIS LOOKS POINTLESS, but it fixes IE's broken DOM for anchor onclick
infoPanelElement.appendChild(infoActionDiv);
var panelHTMLWrapper = document.createElement("iframe");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|