You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2011/10/24 10:45:56 UTC

svn commit: r1188045 [4/4] - in /tuscany/sca-cpp/trunk: ./ modules/edit/ modules/edit/htdocs/ modules/edit/htdocs/account/ modules/edit/htdocs/app/ modules/edit/htdocs/clone/ modules/edit/htdocs/create/ modules/edit/htdocs/data/ modules/edit/htdocs/gra...

Modified: tuscany/sca-cpp/trunk/modules/http/proxy-ssl-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/proxy-ssl-conf?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/proxy-ssl-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/proxy-ssl-conf Mon Oct 24 08:45:54 2011
@@ -24,17 +24,6 @@ root=`echo "import os; print os.path.rea
 
 cat >>$root/conf/vhost-ssl.conf <<EOF
 # Generated by: proxy-ssl-conf $*
-# Enable HTTPS reverse proxy
-ProxyRequests Off
-ProxyPreserveHost On
-ProxyStatus On
-SSLProxyEngine on
-SSLProxyCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
-
-# Verify server certificates
-SSLProxyVerify require
-SSLProxyVerifyDepth 1
-
 # Enable load balancing
 ProxyPass /balancer-manager !
 ProxyPass / balancer://sslcluster/
@@ -63,7 +52,6 @@ EOF
 
 cat >>$root/conf/dvhost-ssl.conf <<EOF
 # Generated by: proxy-ssl-conf $*
-
 # Declare proxy SSL client certificates
 SSLProxyCACertificateFile "$root/cert/ca.crt"
 SSLProxyMachineCertificateFile "$root/cert/proxy.pem"

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/all-min.js
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/all-min.js?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/all-min.js (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/all-min.js Mon Oct 24 08:45:54 2011
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
 function cons(car,cdr){var a=new Array();a.push(car);return a.concat(cdr);}
 function car(l){return l[0];}
 function first(l){return l[0];}
@@ -66,10 +84,6 @@ function properties(o){var a=new Array()
 a.push(p);return a;}
 function domainname(host){var h=reverse(host.split('.'));return reverse(mklist(car(h),cadr(h))).join('.');}
 function issubdomain(host){return host.split('.').length>2;}
-function hometitle(host){if(!isNil(config.hometitle))
-return config.hometitle;var h=reverse(host.split('.'));var d=isNil(cdr(h))?car(h):cadr(h);return d.substr(0,1).toUpperCase()+d.substr(1);}
-function windowtitle(host){if(!isNil(config.windowtitle))
-return config.windowtitle;var h=reverse(host.split('.'));var d=isNil(cdr(h))?car(h):cadr(h);return d.substr(0,1).toUpperCase()+d.substr(1);}
 function format(){var i=0;var s='';for(a in arguments){s=i==0?arguments[a]:s.replace('{'+a+'}',arguments[a]);i++;}
 return s;}
 function setcar(l,v){l[0]=v;return l;}
@@ -231,56 +245,34 @@ return t;return bindingsTarget(scdl.bind
 var turi=targetURI();if(isNil(turi))
 return turi;return car(tokens(turi));};scdl.properties=function(l){return namedElementChildren("'property",l);};scdl.propertyValue=function(l){if(!elementHasValue(l))
 return'';return elementValue(l);};scdl.nameToElementAssoc=function(l){if(isNil(l))
-return l;return cons(mklist(scdl.name(car(l)),car(l)),scdl.nameToElementAssoc(cdr(l)));};var ui={};ui.ahref=function(loc,target,html){if(target=='_blank')
-return'<a href="'+loc+'" target="_blank">'+html+'</a>';return'<a href="javascript:void(0)" onclick="ui.navigate(\''+loc+'\', \''+target+'\');">'+html+'</a>';};ui.menu=function(name,href,target){function Menu(n,h,t){this.name=n;this.href=h;this.target=isNil(t)?'_parent':t;this.content=function(){function complete(uri){var h=uri.indexOf('#');if(h!=-1)
-return complete(uri.substr(0,h));var q=uri.indexOf('?');if(q!=-1)
-return complete(uri.substr(0,q));if(uri.match('.*\.html$'))
-return uri;if(uri.match('.*/$'))
-return uri+'index.html';return uri+'/index.html';}
-if(complete(this.href)!=complete(window.top.location.pathname))
-return ui.ahref(this.href,this.target,'<span class="tbaramenu">'+this.name+'</span>');return ui.ahref(this.href,this.target,'<span class="tbarsmenu">'+this.name+'</span>');};}
-return new Menu(name,href,target);};ui.menubar=function(left,right){var bar='<table cellpadding="0" cellspacing="0" width="100%" class="tbar"><tr>'+'<td class="dtbar"><table border="0" cellspacing="0" cellpadding="0"><tr>';for(i in left)
-bar=bar+'<td class="ltbar">'+left[i].content()+'</td>'
-bar=bar+'</tr></table></td>'+'<td class="dtbar"><table border="0" cellpadding="0" cellspacing="0" align="right"><tr>';for(i in right)
-bar=bar+'<td class="'+(i==0?'dtbar':'rtbar')+'">'+right[i].content()+'</td>'
-bar=bar+'</tr></table></td></tr></table>';return bar;};ui.selectSuggestion=function(node,value){for(;;){node=node.parentNode;if(node.tagName.toLowerCase()=='div')
-break;}
-node.selectSuggestion(value);};ui.hilightSuggestion=function(node,over){if(over)
-node.className='suggestHilighted';node.className='suggestItem';};ui.suggest=function(input,suggestFunction){input.suggest=suggestFunction;input.selectSuggestion=function(value){this.hideSuggestDiv();this.value=value;}
-input.hideSuggestDiv=function(){if(this.suggestDiv!=null){this.suggestDiv.style.visibility='hidden';}}
-input.showSuggestDiv=function(){if(this.suggestDiv==null){this.suggestDiv=document.createElement('div');this.suggestDiv.input=this;this.suggestDiv.className='suggest';input.parentNode.insertBefore(this.suggestDiv,input);this.suggestDiv.style.visibility='hidden';this.suggestDiv.style.zIndex='99';this.suggestDiv.selectSuggestion=function(value){this.input.selectSuggestion(value);}}
-var values=this.suggest();var items='';for(var i=0;i<values.length;i++){if(values[i].indexOf(this.value)==-1)
-continue;if(items.length==0)
-items+='<table class="suggestTable">';items+='<tr><td class="suggestItem" '+'onmouseover="ui.hilightSuggestion(this, true)" onmouseout="ui.hilightSuggestion(this, false)" '+'onmousedown="ui.selectSuggestion(this, \''+values[i]+'\')">'+values[i]+'</td></tr>';}
-if(items.length!=0)
-items+='</table>';this.suggestDiv.innerHTML=items;if(items.length!=0){var node=input;var left=0;var top=0;for(;;){left+=node.offsetLeft;top+=node.offsetTop;node=node.offsetParent;if(node.tagName.toLowerCase()=='body')
-break;}
-this.suggestDiv.style.left=left;this.suggestDiv.style.top=top+input.offsetHeight;this.suggestDiv.style.visibility='visible';}else
-this.suggestDiv.style.visibility='hidden';}
-input.onkeydown=function(event){this.showSuggestDiv();};input.onkeyup=function(event){this.showSuggestDiv();};input.onmousedown=function(event){this.showSuggestDiv();};input.onblur=function(event){setTimeout(function(){input.hideSuggestDiv();},50);};};ui.elementByID=function(node,id){for(var i in node.childNodes){var child=node.childNodes[i];if(child.id==id)
+return l;return cons(mklist(scdl.name(car(l)),car(l)),scdl.nameToElementAssoc(cdr(l)));};var ui={};ui.elementByID=function(node,id){if(node.skipNode==true)
+return null;for(var i in node.childNodes){var child=node.childNodes[i];if(child.id==id)
 return child;var gchild=ui.elementByID(child,id);if(gchild!=null)
 return gchild;}
-return null;};function $(id){if(id==document){if(!isNil(document.widget))
-return document.widget;return document;}
-return ui.elementByID($(document),id);};ui.queryParams=function(){var qp=new Array();var qs=window.location.search.substring(1).split('&');for(var i=0;i<qs.length;i++){var e=qs[i].indexOf('=');if(e>0)
+return null;};function $(id){if(id==document)
+return document;return ui.elementByID($(document),id);};ui.query=function(url){var u=''+url;var q=u.indexOf('?');return q>=0?u.substring(q+1):'';};ui.fragment=function(url){var u=''+url;var h=u.indexOf('#');return h>=0?u.substring(h+1):'';};ui.pathandparams=function(url){var u=''+url;var ds=u.indexOf('//');var u2=ds>0?u.substring(ds+2):u;var s=u2.indexOf('/');return s>0?u2.substring(s):'';};ui.queryParams=function(url){var qp=new Array();var qs=ui.query(url).split('&');for(var i=0;i<qs.length;i++){var e=qs[i].indexOf('=');if(e>0)
 qp[qs[i].substring(0,e)]=unescape(qs[i].substring(e+1));}
-return qp;};ui.fragmentParams=function(){var qp=new Array();var qs=window.location.hash.substring(1).split('&');for(var i=0;i<qs.length;i++){var e=qs[i].indexOf('=');if(e>0)
+return qp;};ui.fragmentParams=function(url){var qp=new Array();var qs=ui.fragment(url).split('&');for(var i=0;i<qs.length;i++){var e=qs[i].indexOf('=');if(e>0)
 qp[qs[i].substring(0,e)]=unescape(qs[i].substring(e+1));}
-return qp;};ui.mobiledetected=false;ui.mobile=false;ui.isMobile=function(){if(ui.mobiledetected)
+return qp;};ui.b64img=function(b64){return'data:image/png;base64,'+b64;};ui.declareCSS=function(s){var e=document.createElement('style');e.type='text/css';e.textContent=s;return e;};ui.declareScript=function(s){var e=document.createElement('script');e.type='text/javascript';e.text=s;return e;};ui.innerScripts=function(e){return map(function(s){return s.text;},nodeList(e.getElementsByTagName('script')));};ui.evalScript=function(s){return eval('(function() {\n'+s+'\n})();');};ui.includeScript=function(s){log('include',s);return eval(s);};ui.mobiledetected=false;ui.mobile=false;ui.isMobile=function(){if(ui.mobiledetected)
 return ui.mobile;var ua=navigator.userAgent;if(ua.match(/iPhone/i)||ua.match(/iPad/i)||ua.match(/Android/i)||ua.match(/Blackberry/i)||ua.match(/WebOs/i))
-ui.mobile=true;ui.mobiledetected=true;return ui.mobile;};ui.pagetransitions=false;ui.initbody=function(){if(ui.isMobile()){if(ui.pagetransitions){var bdiv=$('bodydiv');if(!isNil(bdiv)){bdiv.className='bodydivloading';}}
-document.body.onorientationchange=ui.onorientationchange;}
-return true;}
-ui.onorientationchange=function(){window.open(window.location,'_self');return true;}
-ui.onload=function(){var path=document.location.pathname;if(path.indexOf('/login/')!=0&&path.indexOf('/logout/')!=0)
-localStorage.setItem('ui.lastvisited',''+document.location);document.body.style.visibility='visible';if(ui.pagetransitions&&ui.isMobile()){setTimeout(function(){var bdiv=$('bodydiv');if(!isNil(bdiv)){function transitionend(e){bdiv.removeEventListener('webkitTransitionEnd',transitionend,false);bdiv.removeEventListener('transitionend',transitionend,false);bdiv.className='bodydiv';};bdiv.addEventListener('webkitTransitionEnd',transitionend,false);bdiv.addEventListener('transitionend',transitionend,false);bdiv.className='bodydivloaded';}},0);}
-return true;};ui.navigate=function(url,win){function opendoc(url,win){if(win=='_reload'){window.location=url;return window.location.reload();}
-return window.open(url,win);}
-if(ui.pagetransitions&&ui.isMobile()&&win!='_blank'){var bdiv=$('bodydiv');if(!isNil(bdiv)){function transitionend(e){bdiv.removeEventListener('webkitTransitionEnd',transitionend,false);bdiv.removeEventListener('transitionend',transitionend,false);return opendoc(url,win);};bdiv.addEventListener('webkitTransitionEnd',transitionend,false);bdiv.addEventListener('transitionend',transitionend,false);bdiv.className='bodydivunloaded';return true;}}
-return opendoc(url,win);}
-ui.onbeforeunload=function(){if(ui.pagetransitions&&ui.isMobile()){var bdiv=$('bodydiv');if(!isNil(bdiv))
-bdiv.className='bodydivunloaded';}};ui.lastvisited=function(){return localStorage.getItem('ui.lastvisited');}
-ui.numpos=function(p){return p==''?0:Number(p.substr(0,p.length-2));};ui.pixpos=function(p){return p+'px';};ui.datatable=function(l){function indent(i){if(i==0)
+ui.mobile=true;ui.mobiledetected=true;return ui.mobile;};ui.hometitle=function(host){if(!isNil(window.top.config.hometitle))
+return window.top.config.hometitle;var h=reverse(host.split('.'));var d=isNil(cdr(h))?car(h):cadr(h);return d.substr(0,1).toUpperCase()+d.substr(1);};ui.windowtitle=function(host){if(!isNil(window.top.config.windowtitle))
+return window.top.config.windowtitle;var h=reverse(host.split('.'));var d=isNil(cdr(h))?car(h):cadr(h);return d.substr(0,1).toUpperCase()+d.substr(1);};ui.numpos=function(p){return p==''?0:Number(p.substr(0,p.length-2));};ui.pixpos=function(p){return p+'px';};ui.onorientationchange=function(){window.location.reload();return true;}
+ui.navigate=function(url,win){log('navigate',url,win);if(win=='_blank')
+return window.top.open(url,win);if(win=='_self')
+return window.top.open(url,win);if(win=='_reload'){window.top.location=url;return window.top.location.reload();}
+if(win=='_view'){if(!window.top.onnavigate)
+return window.top.open(url,'_self');return window.top.onnavigate(url);}
+return window.top.open(url,win);}
+ui.ahref=function(loc,target,html){if(target=='_blank')
+return'<a href="'+loc+'" target="_blank">'+html+'</a>';return'<a href="javascript:void(0)" onclick="ui.navigate(\''+loc+'\', \''+target+'\');">'+html+'</a>';};ui.menu=function(name,href,target,hilight){function Menu(){this.content=function(){if(hilight)
+return ui.ahref(href,target,'<span class="tbarsmenu">'+name+'</span>');return ui.ahref(href,target,'<span class="tbaramenu">'+name+'</span>');};}
+return new Menu();};ui.menubar=function(left,right){var bar='<table cellpadding="0" cellspacing="0" width="100%" class="tbar"><tr>'+'<td class="dtbar"><table border="0" cellspacing="0" cellpadding="0"><tr>';for(i in left)
+bar=bar+'<td class="ltbar">'+left[i].content()+'</td>'
+bar=bar+'</tr></table></td>'+'<td class="dtbar"><table border="0" cellpadding="0" cellspacing="0" align="right"><tr>';for(i in right)
+bar=bar+'<td class="'+(i==0?'dtbar':'rtbar')+'">'+right[i].content()+'</td>'
+bar=bar+'</tr></table></td></tr></table>';return bar;};ui.datatable=function(l){function indent(i){if(i==0)
 return'';return'&nbsp;&nbsp;'+indent(i-1);}
 function rows(l,i){if(isNil(l))
 return'';var e=car(l);if(!isList(e))
@@ -296,7 +288,21 @@ return rows(expandElementValues("'value"
 return rows(expandElementValues(elementName(e),v),i)+rows(cdr(l),i);}
 return rows(elementChildren(e),i+1)+rows(cdr(l),i);}
 return'<table class="datatable '+(window.name=='dataFrame'?' databg':'')+'" style="width: 100%;">'+rows(l,0)+'</table>';}
-var JSONClient={};JSONClient.escapeJSONChar=function(c){if(c=="\""||c=="\\")return"\\"+c;if(c=="\b")return"\\b";if(c=="\f")return"\\f";if(c=="\n")return"\\n";if(c=="\r")return"\\r";if(c=="\t")return"\\t";var hex=c.charCodeAt(0).toString(16);if(hex.length==1)return"\\u000"+hex;if(hex.length==2)return"\\u00"+hex;if(hex.length==3)return"\\u0"+hex;return"\\u"+hex;};JSONClient.escapeJSONString=function(s){var parts=s.split("");for(var i=0;i<parts.length;i++){var c=parts[i];if(c=='"'||c=='\\'||c.charCodeAt(0)<32||c.charCodeAt(0)>=128)
+ui.selectSuggestion=function(node,value){for(;;){node=node.parentNode;if(node.tagName.toLowerCase()=='div')
+break;}
+node.selectSuggestion(value);};ui.hilightSuggestion=function(node,over){if(over)
+node.className='suggestHilighted';node.className='suggestItem';};ui.suggest=function(input,suggestFunction){input.suggest=suggestFunction;input.selectSuggestion=function(value){this.hideSuggestDiv();this.value=value;}
+input.hideSuggestDiv=function(){if(this.suggestDiv!=null){this.suggestDiv.style.visibility='hidden';}}
+input.showSuggestDiv=function(){if(this.suggestDiv==null){this.suggestDiv=document.createElement('div');this.suggestDiv.input=this;this.suggestDiv.className='suggest';input.parentNode.insertBefore(this.suggestDiv,input);this.suggestDiv.style.visibility='hidden';this.suggestDiv.style.zIndex='99';this.suggestDiv.selectSuggestion=function(value){this.input.selectSuggestion(value);}}
+var values=this.suggest();var items='';for(var i=0;i<values.length;i++){if(values[i].indexOf(this.value)==-1)
+continue;if(items.length==0)
+items+='<table class="suggestTable">';items+='<tr><td class="suggestItem" '+'onmouseover="ui.hilightSuggestion(this, true)" onmouseout="ui.hilightSuggestion(this, false)" '+'onmousedown="ui.selectSuggestion(this, \''+values[i]+'\')">'+values[i]+'</td></tr>';}
+if(items.length!=0)
+items+='</table>';this.suggestDiv.innerHTML=items;if(items.length!=0){var node=input;var left=0;var top=0;for(;;){left+=node.offsetLeft;top+=node.offsetTop;node=node.offsetParent;if(node.tagName.toLowerCase()=='body')
+break;}
+this.suggestDiv.style.left=left;this.suggestDiv.style.top=top+input.offsetHeight;this.suggestDiv.style.visibility='visible';}else
+this.suggestDiv.style.visibility='hidden';}
+input.onkeydown=function(event){this.showSuggestDiv();};input.onkeyup=function(event){this.showSuggestDiv();};input.onmousedown=function(event){this.showSuggestDiv();};input.onblur=function(event){setTimeout(function(){input.hideSuggestDiv();},50);};};var JSONClient={};JSONClient.escapeJSONChar=function(c){if(c=="\""||c=="\\")return"\\"+c;if(c=="\b")return"\\b";if(c=="\f")return"\\f";if(c=="\n")return"\\n";if(c=="\r")return"\\r";if(c=="\t")return"\\t";var hex=c.charCodeAt(0).toString(16);if(hex.length==1)return"\\u000"+hex;if(hex.length==2)return"\\u00"+hex;if(hex.length==3)return"\\u0"+hex;return"\\u"+hex;};JSONClient.escapeJSONString=function(s){var parts=s.split("");for(var i=0;i<parts.length;i++){var c=parts[i];if(c=='"'||c=='\\'||c.charCodeAt(0)<32||c.charCodeAt(0)>=128)
 parts[i]=JSONClient.escapeJSONChar(parts[i]);}
 return"\""+parts.join("")+"\"";};JSONClient.toJSON=function(o){if(o==null)
 return"null";if(o.constructor==String)
@@ -308,7 +314,7 @@ v.push(JSONClient.toJSON(o[i]));return"[
 var v=[];for(attr in o){if(o[attr]==null)
 v.push("\""+attr+"\": null");else if(typeof o[attr]=="function");else
 v.push(JSONClient.escapeJSONString(attr)+": "+JSONClient.toJSON(o[attr]));}
-return"{"+v.join(", ")+"}";};function HTTPBindingClient(name,uri){this.name=name;this.uri=uri;this.apply=this.createApplyMethod();}
+return"{"+v.join(", ")+"}";};function HTTPBindingClient(name,uri,domain){this.name=name;this.domain=domain;this.uri=uri;this.apply=this.createApplyMethod();}
 HTTPBindingClient.jsonrpcID=1;HTTPBindingClient.prototype.createApplyMethod=function(){var fn=function(){var methodName=arguments[0];var args=[];for(var i=1;i<arguments.length;i++)
 args.push(arguments[i]);var cb=null;if(typeof args[args.length-1]=="function")
 cb=args.pop();var req=HTTPBindingClient.makeJSONRequest(methodName,args,cb);return fn.client.jsonApply(req);};fn.client=this;return fn;};HTTPBindingClient.makeJSONRequest=function(methodName,args,cb){var req={};req.id=HTTPBindingClient.jsonrpcID++;if(cb)
@@ -320,14 +326,14 @@ HTTPBindingClient.charset=httpCharset(ht
 throw new HTTPBindingClient.Exception(obj.error.code,obj.error.msg);var res=obj.result;return res;};HTTPBindingClient.prototype.jsonApply=function(req){var http=HTTPBindingClient.getHTTPRequest();var hascb=req.cb?true:false;http.open("POST",this.uri,hascb);http.setRequestHeader("Content-Type","application/json-rpc");if(hascb){http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){var res=null;try{res=HTTPBindingClient.jsonResult(http);try{req.cb(res);}catch(cbe){}}catch(e){try{req.cb(null,e);}catch(cbe){}}}else
 try{req.cb(null,HTTPBindingClient.Exception(http.status,http.statusText));}catch(cbe){}}};http.send(req.data);return req.id;}
 http.send(req.data);if(http.status==200)
-return HTTPBindingClient.jsonResult(http);throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.prototype.get=function(id,cb){var u=this.uri+'/'+id;var hascb=cb?true:false;var item=localStorage.getItem(u);if(item!=null&&item!=''){if(!hascb)
+return HTTPBindingClient.jsonResult(http);throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.prototype.get=function(id,cb){var u=id?(this.uri?this.uri+'/'+id:id):this.uri;var hascb=cb?true:false;var item=localStorage.getItem(u);if(item!=null&&item!=''){if(!hascb)
 return item;try{cb(item);}catch(cbe){}}
 var http=HTTPBindingClient.getHTTPRequest();http.open("GET",u,hascb);if(hascb){http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){if(http.getResponseHeader("X-Login")!=null){try{cb(null,new HTTPBindingClient.Exception(403,'X-Login'));}catch(cbe){}}else if(http.responseText==''||http.getResponseHeader("Content-Type")==null){try{cb(null,new HTTPBindingClient.Exception(403,'No-Content'));}catch(cbe){}}else{if(item==null||http.responseText!=item){if(http.responseText!=null){localStorage.setItem(u,http.responseText);}
 try{cb(http.responseText);}catch(cbe){}}}}
 else{if(item==null){try{cb(null,new HTTPBindingClient.Exception(http.status,http.statusText));}catch(cbe){}}}}};http.send(null);return true;}
 http.send(null);if(http.status==200){if(http.getResponseHeader("X-Login")!=null){throw new HTTPBindingClient.Exception(403,'X-Login');}else if(http.responseText==''||http.getResponseHeader("Content-Type")==null){throw new HTTPBindingClient.Exception(403,'No-Content');}
 return http.responseText;}
-throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.prototype.getnocache=function(id,cb){var u=this.uri+'/'+id;var hascb=cb?true:false;var http=HTTPBindingClient.getHTTPRequest();http.open("GET",u,hascb);if(hascb){http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){if(http.getResponseHeader("X-Login")!=null){try{return cb(null,new HTTPBindingClient.Exception(403,'X-Login'));}catch(cbe){}}else if(http.responseText==''||http.getResponseHeader("Content-Type")==null){try{return cb(null,new HTTPBindingClient.Exception(403,'No-Content'));}catch(cbe){}}else{try{cb(http.responseText);}catch(cbe){}}}else{try{cb(null,new HTTPBindingClient.Exception(http.status,http.statusText));}catch(cbe){}}}};http.send(null);return true;}
+throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.prototype.getnocache=function(id,cb){var u=id?(this.uri?this.uri+'/'+id:id):this.uri;var hascb=cb?true:false;var http=HTTPBindingClient.getHTTPRequest();http.open("GET",u,hascb);if(hascb){http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){if(http.getResponseHeader("X-Login")!=null){try{return cb(null,new HTTPBindingClient.Exception(403,'X-Login'));}catch(cbe){}}else if(http.responseText==''||http.getResponseHeader("Content-Type")==null){try{return cb(null,new HTTPBindingClient.Exception(403,'No-Content'));}catch(cbe){}}else{try{cb(http.responseText);}catch(cbe){}}}else{try{cb(null,new HTTPBindingClient.Exception(http.status,http.statusText));}catch(cbe){}}}};http.send(null);return true;}
 http.send(null);if(http.status==200){if(http.getResponseHeader("X-Login")!=null){throw new HTTPBindingClient.Exception(403,'X-Login');}else if(http.responseText==''||http.getResponseHeader("Content-Type")==null){throw new HTTPBindingClient.Exception(403,'No-Content');}
 return http.responseText;}
 throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.prototype.post=function(entry,cb){var http=HTTPBindingClient.getHTTPRequest();var hascb=cb?true:false;http.open("POST",this.uri,hascb);http.setRequestHeader("Content-Type","application/atom+xml");if(hascb){http.onreadystatechange=function(){if(http.readyState==4){if(http.status==201){try{cb(http.responseText);}catch(cbe){}}
@@ -341,7 +347,9 @@ http.send(null);if(http.status==200)
 return true;throw new HTTPBindingClient.Exception(http.status,http.statusText);};HTTPBindingClient.Exception=function(code,message){this.name="HTTPBindingClientException";this.code=code;this.message=message;};HTTPBindingClient.Exception.prototype=new Error();HTTPBindingClient.Exception.prototype.toString=function(){return this.name+": "+this.message;};HTTPBindingClient.msxmlNames=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];HTTPBindingClient.getHTTPRequest=function(){if(HTTPBindingClient.httpFactory)
 return HTTPBindingClient.httpFactory();try{HTTPBindingClient.httpFactory=function(){return new XMLHttpRequest();};return HTTPBindingClient.httpFactory();}catch(e){}
 for(var i=0;i<HTTPBindingClient.msxmlNames.length;i++){try{HTTPBindingClient.httpFactory=function(){return new ActiveXObject(HTTPBindingClient.msxmlNames[i]);};return HTTPBindingClient.httpFactory();}catch(e){}}
-HTTPBindingClient.httpFactory=null;throw new HTTPBindingClient.Exception(0,"Can't create XMLHttpRequest object");};var sca={};sca.httpclient=function(name,uri){return new HTTPBindingClient(name,uri);};sca.component=function(name){return new HTTPBindingClient(name,'/components/'+name);};sca.reference=function(comp,rname){return new HTTPBindingClient(comp.name+'/'+rname,"/references/"+comp.name+"/"+rname);};sca.defun=function(ref){function defapply(name){return function(){var args=new Array();args[0]=name;for(i=0,n=arguments.length;i<n;i++)
+HTTPBindingClient.httpFactory=null;throw new HTTPBindingClient.Exception(0,"Can't create XMLHttpRequest object");};var sca={};sca.httpclient=function(name,uri,domain){return new HTTPBindingClient(name,uri,domain);};sca.component=function(name,domain){if(!domain)
+return new HTTPBindingClient(name,'/c/'+name,domain);return new HTTPBindingClient(name,'/a/'+domain+'/c/'+name,domain);};sca.reference=function(comp,rname){if(!comp.domain)
+return new HTTPBindingClient(comp.name+'/'+rname,'/r/'+comp.name+'/'+rname,comp.domain);return new HTTPBindingClient(comp.name+'/'+rname,'/a/'+comp.domain+'/r/'+comp.name+'/'+rname,comp.domain);};sca.defun=function(ref){function defapply(name){return function(){var args=new Array();args[0]=name;for(i=0,n=arguments.length;i<n;i++)
 args[i+1]=arguments[i];return this.apply.apply(this,args);};}
 for(f=1;f<arguments.length;f++){var fn=arguments[f];ref[fn]=defapply(fn);}
-return ref;};
\ No newline at end of file
+return ref;};

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/component.js
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/component.js?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/component.js (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/component.js Mon Oct 24 08:45:54 2011
@@ -102,8 +102,9 @@ JSONClient.toJSON = function(o) {
 /**
  * Construct an HTTPBindingClient.
  */
-function HTTPBindingClient(name, uri) {
+function HTTPBindingClient(name, uri, domain) {
     this.name = name;
+    this.domain = domain;
     this.uri = uri;
     this.apply = this.createApplyMethod();
 }
@@ -230,10 +231,10 @@ HTTPBindingClient.prototype.jsonApply = 
 
 
 /**
- * REST ATOMPub GET method.
+ * REST GET method.
  */
 HTTPBindingClient.prototype.get = function(id, cb) {
-    var u = this.uri + '/' + id;
+    var u = id? (this.uri? this.uri + '/' + id : id) : this.uri;
     var hascb = cb? true : false;
 
     // Get from local storage first
@@ -321,10 +322,10 @@ HTTPBindingClient.prototype.get = functi
 };
 
 /**
- * REST ATOMPub GET method, does not use the local cache.
+ * REST GET method, does not use the local cache.
  */
 HTTPBindingClient.prototype.getnocache = function(id, cb) {
-    var u = this.uri + '/' + id;
+    var u = id? (this.uri? this.uri + '/' + id : id) : this.uri;
     var hascb = cb? true : false;
 
     // Connect to the service
@@ -386,7 +387,7 @@ HTTPBindingClient.prototype.getnocache =
 };
 
 /**
- * REST ATOMPub POST method.
+ * REST POST method.
  */
 HTTPBindingClient.prototype.post = function (entry, cb) {
 
@@ -426,7 +427,7 @@ HTTPBindingClient.prototype.post = funct
 };
 
 /**
- * REST ATOMPub PUT method.
+ * REST PUT method.
  */
 HTTPBindingClient.prototype.put = function (id, entry, cb) {
     var u = this.uri + '/' + id;
@@ -470,7 +471,7 @@ HTTPBindingClient.prototype.put = functi
 };
 
 /**
- * REST ATOMPub DELETE method.
+ * REST DELETE method.
  */
 HTTPBindingClient.prototype.del = function (id, cb) {       
     var u = this.uri + '/' + id;
@@ -569,22 +570,26 @@ var sca = {};
 /**
  * Return an HTTP client proxy.
  */
-sca.httpclient = function(name, uri) {
-    return new HTTPBindingClient(name, uri);
+sca.httpclient = function(name, uri, domain) {
+    return new HTTPBindingClient(name, uri, domain);
 };
 
 /**
  * Return a component proxy.
  */
-sca.component = function(name) {
-    return new HTTPBindingClient(name, '/components/' + name);
+sca.component = function(name, domain) {
+    if (!domain)
+        return new HTTPBindingClient(name, '/c/' + name, domain);
+    return new HTTPBindingClient(name, '/a/' + domain + '/c/' + name, domain);
 };
 
 /**
  * Return a reference proxy.
  */
 sca.reference = function(comp, rname) {
-    return new HTTPBindingClient(comp.name + '/' + rname, "/references/" + comp.name + "/" + rname);
+    if (!comp.domain)
+        return new HTTPBindingClient(comp.name + '/' + rname, '/r/' + comp.name + '/' + rname, comp.domain);
+    return new HTTPBindingClient(comp.name + '/' + rname, '/a/' + comp.domain + '/r/' + comp.name + '/' + rname, comp.domain);
 };
 
 /**

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/ui-min.css
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/ui-min.css?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/ui-min.css (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/ui-min.css Mon Oct 24 08:45:54 2011
@@ -1,10 +1,38 @@
-body{margin-top:0px;margin-bottom:2px;margin-left:2px;margin-right:2px;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-user-select:none;}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+body{margin-top:0px;margin-bottom:2px;margin-left:2px;margin-right:2px;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;}
 .delayed{visibility:hidden;}
 .devicewidth{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;}
+.mainbodydiv{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;}
 .bodydiv{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;}
-.bodydivloading{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;-webkit-transform:translate(100%, 0px);-webkit-backface-visibility:hidden;-moz-transform:translate(100%, 0px);-ms-transform:translate(100%, 0px);transform:translate(100%, 0px);}
-.bodydivloaded{-webkit-transition:-webkit-transform 0.4s linear;-moz-transition:-moz-transform 0.4s linear;-ms-transition:-ms-transform 0.4s linear;transition:transform 0.4s linear;position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;-webkit-transform:translate3d(0px, 0px, 0px);-webkit-backface-visibility:hidden;-moz-transform:translate(0px, 0px);-ms-transform:translate(0px, 0px);transform:translate(0px, 0px);}
-.bodydivunloaded{-webkit-transition:-webkit-transform 0.4s linear;-moz-transition:-moz-transform 0.4s linear;-ms-transition:-ms-transform 0.4s linear;transition:transform 0.4s linear;position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:hidden;-webkit-transform:translate3d(-100%, 0px, 0px);-webkit-backface-visibility:hidden;-moz-transform:translate(-100%, 0px);-ms-transform:translate(-100%, 0px);transform:translate(-100%, 0px);}
+.viewcontainer3dm{-webkit-perspective:1000;}
+.viewcontainer3d{}
+.leftviewloading3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transform:translate3d(100%, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(100%, 0px);-ms-transform:translate(100%, 0px);transform:translate(100%, 0px);}
+.rightviewloading3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transform:translate3d(-100%, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(-100%, 0px);-ms-transform:translate(-100%, 0px);transform:translate(-100%, 0px);}
+.flipviewloading3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transform:translate3d(0px, 0px, 0) rotateY(180deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(100%, 0px);-ms-transform:translate(100%, 0px);transform:translate(100%, 0px);}
+.viewloading3d{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;visibility:hidden;-webkit-transform:translate3d(100%, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(100%, 0px);-ms-transform:translate(100%, 0px);transform:translate(100%, 0px);}
+.viewloaded3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transition:-webkit-transform 0.5s ease-in-out;-moz-transition:-moz-transform 0.5s ease-in-out;-ms-transition:-ms-transform 0.5s ease-in-out;transition:transform 0.5s ease-in-out;-webkit-transform:translate3d(0px, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(0px, 0px);-ms-transform:translate(0px, 0px);transform:translate(0px, 0px);}
+.viewloaded3d{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transform:translate3d(0px, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(0px, 0px);-ms-transform:translate(0px, 0px);transform:translate(0px, 0px);}
+.viewunloading3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transform:translate3d(0px, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(0px, 0px);-ms-transform:translate(0px, 0px);transform:translate(0px, 0px);}
+.leftviewunloaded3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transition:-webkit-transform 0.5s ease-in-out;-moz-transition:-moz-transform 0.5s ease-in-out;-ms-transition:-ms-transform 0.5s ease-in-out;transition:transform 0.5s ease-in-out;-webkit-transform:translate3d(-100%, 0px, 0px) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(-100%, 0px);-ms-transform:translate(-100%, 0px);transform:translate(-100%, 0px);}
+.rightviewunloaded3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transition:-webkit-transform 0.5s ease-in-out;-moz-transition:-moz-transform 0.5s ease-in-out;-ms-transition:-ms-transform 0.5s ease-in-out;transition:transform 0.5s ease-in-out;-webkit-transform:translate3d(100%, 0px, 0) rotateY(0deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(100%, 0px);-ms-transform:translate(100%, 0px);transform:translate(100%, 0px);}
+.flipviewunloaded3dm{position:absolute;top:0px;left:0px;width:100%;height:5000px;overflow:visible;-webkit-transition:-webkit-transform 0.5s ease-in-out;-moz-transition:-moz-transform 0.5s ease-in-out;-ms-transition:-ms-transform 0.5s ease-in-out;transition:transform 0.5s ease-in-out;-webkit-transform:translate3d(0px, 0px, 0) rotateY(-180deg);-webkit-backface-visibility:hidden;background-color:#ffffff;-moz-transform:translate(0px, 0px);-ms-transform:translate(0px, 0px);transform:translate(0px, 0px);}
 table{border:0px;border-collapse:collapse;border-color:#a2bae7;border-style:solid;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;overflow:visible;}
 .trb{border-bottom:1px;border-bottom-style:solid;border-color:#dcdcdc;}
 th{font-weight:bold;background-color:#d4e6fc;color:#000000;height:18px;text-align:left;padding-left:2px;padding-right:8px;padding-top:0px;padding-bottom:0px;vertical-align:middle;white-space:nowrap;border-top:1px;border-bottom:1px;border-left:1px;border-right:1px;border-style:solid;border-top-color:#a2bae7;border-bottom-color:#d1d3d4;border-left-color:#a2bae7;border-right-color:#a2bae7;overflow:hidden;}
@@ -21,6 +49,7 @@ td{padding-left:2px;padding-top:2px;padd
 .tdw{padding-left:2px;padding-top:2px;padding-right:8px;white-space:normal;vertical-align:middle;}
 .datatd{border-top:1px;border-bottom:1px;border-style:solid;border-color:#dcdcdc;width:10px;vertical-align:middle;}
 .datatdl{border-right:1px;border-top:1px;border-bottom:1px;border-style:solid;border-color:#dcdcdc;width:10px;vertical-align:middle;}
+.datatdltop{border-right:1px;border-top:1px;border-bottom:1px;border-style:solid;border-color:#dcdcdc;width:10px;vertical-align:top;}
 .datatdr{border-left:1px;border-top:1px;border-bottom:1px;border-style:solid;border-color:#dcdcdc;vertical-align:middle;}
 .datatable{border-top:1px;border-bottom:1px;border-style:solid;border-color:#dcdcdc;overflow:visible;}
 .databg{opacity:.6;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);}
@@ -51,10 +80,10 @@ img{border:0px;}
 .ltbar{padding-left:2px;padding-right:6px;padding-top:3px;padding-bottom:4px;white-space:nowrap;vertical-align:middle;}
 .dtbar{padding-left:0px;padding-right:0px;padding-top:3px;padding-bottom:4px;white-space:nowrap;vertical-align:middle;text-align:right;}
 .rtbar{padding-left:6px;padding-right:2px;padding-top:3px;padding-bottom:4px;white-space:nowrap;vertical-align:middle;text-align:right;}
-.tbaramenu{color:#cccccc;text-decoration:none;white-space:nowrap;}
-.tbarsmenu{font-weight:bold;color:#ffffff;text-decoration:none;white-space:nowrap;}
+.tbaramenu{color:#cccccc;text-decoration:none;white-space:nowrap;vertical-align:middle;}
+.tbarsmenu{font-weight:bold;color:#ffffff;text-decoration:none;white-space:nowrap;vertical-align:middle;}
 .suggest{background-color:#d4e6fc;color:#598edd;border-top:1px;border-bottom:1px;border-left:1px;border-right:1px;border-style:solid;border-top-color:#a2bae7;border-bottom-color:#d1d3d4;border-left-color:#d1d3d4;border-right-color:#d1d3d4;position:absolute;overflow:auto;overflow-x:hidden;padding:0px;margin:0px;cursor:default;}
 .suggestTable{border:0px;border-collapse:separate;padding-left:5px;padding-right:5px;padding-top:2px;padding-bottom:2px;margin:0px;}
 .suggestItem{padding-left:2px;padding-top:0px;padding-bottom:0px;padding-right:2px;vertical-align:middle;background-color:#d4e6fc;color:#598edd;}
 .suggestHilighted{padding-left:2px;padding-top:0px;padding-bottom:0px;padding-right:2px;vertical-align:middle;background-color:#598edd;color:#d4e6fc;}
-.svgtitle{margin:0px;padding:0px;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:10px;cursor:default;}
\ No newline at end of file
+.svgtitle{margin:0px;padding:0px;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:10px;cursor:default;}

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css Mon Oct 24 08:45:54 2011
@@ -22,6 +22,7 @@ margin-top: 0px; margin-bottom: 2px; mar
 font-family: "Helvetica Neue", Helvetica; font-style: normal; font-variant: normal; font-size: 13px;
 -webkit-text-size-adjust: none;
 -webkit-touch-callout: none;
+-webkit-tap-highlight-color: rgba(0,0,0,0);
 -webkit-user-select: none;
 }
 
@@ -33,42 +34,128 @@ visibility: hidden;
 position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: hidden;
 }
 
-.bodydiv {
+.mainbodydiv {
 position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: hidden;
 }
 
-.bodydivloading {
+.bodydiv {
 position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: hidden;
--webkit-transform: translate(100%, 0px); -webkit-backface-visibility: hidden;
+}
+
+.viewcontainer3dm {
+-webkit-perspective: 1000;
+}
+
+.viewcontainer3d {
+}
+
+.leftviewloading3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transform: translate3d(100%, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
 -moz-transform: translate(100%, 0px);
 -ms-transform: translate(100%, 0px);
 transform: translate(100%, 0px);
 }
 
-.bodydivloaded {
--webkit-transition: -webkit-transform 0.4s linear;
--moz-transition: -moz-transform 0.4s linear;
--ms-transition: -ms-transform 0.4s linear;
-transition: transform 0.4s linear;
-position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: hidden;
--webkit-transform: translate3d(0px, 0px, 0px); -webkit-backface-visibility: hidden;
+.rightviewloading3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transform: translate3d(-100%, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(-100%, 0px);
+-ms-transform: translate(-100%, 0px);
+transform: translate(-100%, 0px);
+}
+
+.flipviewloading3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transform: translate3d(0px, 0px, 0) rotateY(180deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(100%, 0px);
+-ms-transform: translate(100%, 0px);
+transform: translate(100%, 0px);
+}
+
+.viewloading3d {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+visibility: hidden;
+-webkit-transform: translate3d(100%, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(100%, 0px);
+-ms-transform: translate(100%, 0px);
+transform: translate(100%, 0px);
+}
+
+.viewloaded3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transition: -webkit-transform 0.5s ease-in-out;
+-moz-transition: -moz-transform 0.5s ease-in-out;
+-ms-transition: -ms-transform 0.5s ease-in-out;
+transition: transform 0.5s ease-in-out;
+-webkit-transform: translate3d(0px, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
 -moz-transform: translate(0px, 0px);
 -ms-transform: translate(0px, 0px);
 transform: translate(0px, 0px);
 }
 
-.bodydivunloaded {
--webkit-transition: -webkit-transform 0.4s linear;
--moz-transition: -moz-transform 0.4s linear;
--ms-transition: -ms-transform 0.4s linear;
-transition: transform 0.4s linear;
-position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: hidden;
--webkit-transform: translate3d(-100%, 0px, 0px); -webkit-backface-visibility: hidden;
+.viewloaded3d {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transform: translate3d(0px, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(0px, 0px);
+-ms-transform: translate(0px, 0px);
+transform: translate(0px, 0px);
+}
+
+.viewunloading3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transform: translate3d(0px, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(0px, 0px);
+-ms-transform: translate(0px, 0px);
+transform: translate(0px, 0px);
+}
+
+.leftviewunloaded3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transition: -webkit-transform 0.5s ease-in-out;
+-moz-transition: -moz-transform 0.5s ease-in-out;
+-ms-transition: -ms-transform 0.5s ease-in-out;
+transition: transform 0.5s ease-in-out;
+-webkit-transform: translate3d(-100%, 0px, 0px) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
 -moz-transform: translate(-100%, 0px);
 -ms-transform: translate(-100%, 0px);
 transform: translate(-100%, 0px);
 }
 
+.rightviewunloaded3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transition: -webkit-transform 0.5s ease-in-out;
+-moz-transition: -moz-transform 0.5s ease-in-out;
+-ms-transition: -ms-transform 0.5s ease-in-out;
+transition: transform 0.5s ease-in-out;
+-webkit-transform: translate3d(100%, 0px, 0) rotateY(0deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(100%, 0px);
+-ms-transform: translate(100%, 0px);
+transform: translate(100%, 0px);
+}
+
+.flipviewunloaded3dm {
+position: absolute; top: 0px; left: 0px; width: 100%; height: 5000px; overflow: visible;
+-webkit-transition: -webkit-transform 0.5s ease-in-out;
+-moz-transition: -moz-transform 0.5s ease-in-out;
+-ms-transition: -ms-transform 0.5s ease-in-out;
+transition: transform 0.5s ease-in-out;
+-webkit-transform: translate3d(0px, 0px, 0) rotateY(-180deg);
+-webkit-backface-visibility: hidden; background-color: #ffffff;
+-moz-transform: translate(0px, 0px);
+-ms-transform: translate(0px, 0px);
+transform: translate(0px, 0px);
+}
+
 table {
 border: 0px; border-collapse: collapse; border-color: #a2bae7; border-style: solid;
 font-family: "Helvetica Neue", Helvetica; font-style: normal; font-variant: normal; font-size: 13px;
@@ -143,6 +230,10 @@ border-top: 1px; border-bottom: 1px; bor
 border-right: 1px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: middle;
 }
 
+.datatdltop {
+border-right: 1px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: top;
+}
+
 .datatdr {
 border-left: 1px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; vertical-align: middle;
 }
@@ -335,11 +426,11 @@ padding-left: 6px; padding-right: 2px; p
 }
 
 .tbaramenu {
-color: #cccccc; text-decoration: none; white-space: nowrap;
+color: #cccccc; text-decoration: none; white-space: nowrap; vertical-align: middle;
 }
 
 .tbarsmenu {
-font-weight: bold; color: #ffffff; text-decoration: none; white-space: nowrap;
+font-weight: bold; color: #ffffff; text-decoration: none; white-space: nowrap; vertical-align: middle;
 }
 
 .suggest {

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js Mon Oct 24 08:45:54 2011
@@ -24,167 +24,11 @@
 var ui = {};
 
 /**
- * Build a portable <a href> tag.
- */
-ui.ahref = function(loc, target, html) {
-    if (target == '_blank')
-        return '<a href="' + loc + '" target="_blank">' + html + '</a>';
-    return '<a href="javascript:void(0)" onclick="ui.navigate(\'' + loc + '\', \'' + target + '\');">' + html + '</a>';
-};
-
-/**
- * Build a menu bar.
- */ 
-ui.menu = function(name, href, target) {
-    function Menu(n, h, t) {
-        this.name = n;
-        this.href = h;
-        this.target = isNil(t)? '_parent' : t;
-
-        this.content = function() {
-            function complete(uri) {
-                var h = uri.indexOf('#');
-                if (h != -1)
-                    return complete(uri.substr(0, h));
-                var q = uri.indexOf('?');
-                if (q != -1)
-                    return complete(uri.substr(0, q));
-                if (uri.match('.*\.html$'))
-                    return uri;
-                if (uri.match('.*/$'))
-                    return uri + 'index.html';
-                return uri + '/index.html';
-            }
-
-            if (complete(this.href) != complete(window.top.location.pathname))
-                return ui.ahref(this.href, this.target, '<span class="tbaramenu">' + this.name + '</span>');
-            return ui.ahref(this.href, this.target, '<span class="tbarsmenu">' + this.name + '</span>');
-        };
-    }
-    return new Menu(name, href, target);
-};
-
-ui.menubar = function(left, right) {
-    var bar = '<table cellpadding="0" cellspacing="0" width="100%" class="tbar"><tr>' +
-    '<td class="dtbar"><table border="0" cellspacing="0" cellpadding="0"><tr>';
-    for (i in left)
-        bar = bar + '<td class="ltbar">' + left[i].content() + '</td>'
-
-    bar = bar + '</tr></table></td>' +
-    '<td class="dtbar"><table border="0" cellpadding="0" cellspacing="0" align="right"><tr>';
-    for (i in right)
-        bar = bar + '<td class="' + (i == 0? 'dtbar' : 'rtbar') + '">' + right[i].content() + '</td>'
-
-    bar = bar + '</tr></table></td></tr></table>';
-    return bar;
-};
- 
-/**
- * Autocomplete / suggest support for input fields
- * To use it declare a 'suggest' function as follows:
- * function suggestItems() {
- *       return new Array('abc', 'def', 'ghi');
- * }
- * then hook it to an input field as follows:
- * suggest(document.yourForm.yourInputField, suggestItems);
- */ 
-ui.selectSuggestion = function(node, value) {
-    for (;;) {
-        node = node.parentNode;
-        if (node.tagName.toLowerCase() == 'div')
-              break;
-    }
-    node.selectSuggestion(value);
-};
-
-ui.hilightSuggestion = function(node, over) {
-    if (over)
-        node.className = 'suggestHilighted';
-    node.className = 'suggestItem';
-};
-
-ui.suggest = function(input, suggestFunction) {
-    input.suggest = suggestFunction;
-      
-    input.selectSuggestion = function(value) {
-        this.hideSuggestDiv();
-        this.value = value;
-    }
-    
-    input.hideSuggestDiv = function() {
-        if (this.suggestDiv != null) {
-            this.suggestDiv.style.visibility = 'hidden';
-        }
-    }
-    
-    input.showSuggestDiv = function() {
-        if (this.suggestDiv == null) {
-            this.suggestDiv = document.createElement('div');
-            this.suggestDiv.input = this;
-            this.suggestDiv.className = 'suggest';
-            input.parentNode.insertBefore(this.suggestDiv, input);
-            this.suggestDiv.style.visibility = 'hidden';
-            this.suggestDiv.style.zIndex = '99';
-            
-            this.suggestDiv.selectSuggestion = function(value) {
-                this.input.selectSuggestion(value);
-            }
-        }
-        
-        var values = this.suggest();
-        var items = '';
-        for (var i = 0; i < values.length; i++) {
-            if (values[i].indexOf(this.value) == -1)
-                continue;
-            if (items.length == 0)
-                items += '<table class="suggestTable">';
-            items += '<tr><td class="suggestItem" ' +
-            'onmouseover="ui.hilightSuggestion(this, true)" onmouseout="ui.hilightSuggestion(this, false)" ' +
-            'onmousedown="ui.selectSuggestion(this, \'' + values[i] + '\')">' + values[i] + '</td></tr>';
-        }
-        if (items.length != 0)
-            items += '</table>';
-        this.suggestDiv.innerHTML = items;
-        
-        if (items.length != 0) {
-            var node = input;              
-            var left = 0;
-            var top = 0;
-            for (;;) {
-                left += node.offsetLeft;
-                top += node.offsetTop;
-                node = node.offsetParent;
-                if (node.tagName.toLowerCase() == 'body')
-                  break;
-            }
-            this.suggestDiv.style.left = left;
-            this.suggestDiv.style.top = top + input.offsetHeight;
-            this.suggestDiv.style.visibility = 'visible';
-        } else
-            this.suggestDiv.style.visibility = 'hidden';
-    }
-      
-    input.onkeydown = function(event) {
-        this.showSuggestDiv();
-    };
-
-    input.onkeyup = function(event) {
-        this.showSuggestDiv();
-    };
-
-    input.onmousedown = function(event) {
-        this.showSuggestDiv();
-    };
-
-    input.onblur = function(event) {
-        setTimeout(function() { input.hideSuggestDiv(); }, 50);
-    };
-};
-
-/**
  * Return a child element of a node with the given id.
  */
 ui.elementByID = function(node, id) {
+    if (node.skipNode == true)
+        return null;
     for (var i in node.childNodes) {
         var child = node.childNodes[i];
         if (child.id == id)
@@ -200,20 +44,46 @@ ui.elementByID = function(node, id) {
  * Return the current document, or a child element with the given id.
  */
 function $(id) {
-    if (id == document) {
-        if (!isNil(document.widget))
-            return document.widget;
+    if (id == document)
         return document;
-    }
     return ui.elementByID($(document), id);
 };
 
 /**
- * Return a dictionary of the query parameters.
+ * Return the query string of a URL.
+ */
+ui.query = function(url) {
+    var u = '' + url;
+    var q = u.indexOf('?');
+    return q >= 0? u.substring(q + 1) : '';
+};
+
+/**
+ * Return the fragment part of a URL.
+ */
+ui.fragment = function(url) {
+    var u = '' + url;
+    var h = u.indexOf('#');
+    return h >= 0? u.substring(h + 1) : '';
+};
+
+/**
+ * Return the path and parameters of a URL.
+ */
+ui.pathandparams = function(url) {
+    var u = '' + url;
+    var ds = u.indexOf('//');
+    var u2 = ds > 0? u.substring(ds + 2) : u;
+    var s = u2.indexOf('/');
+    return s > 0? u2.substring(s) : '';
+};
+
+/**
+ * Return a dictionary of query parameters in a URL.
  */
-ui.queryParams = function() {
+ui.queryParams = function(url) {
     var qp = new Array();
-    var qs = window.location.search.substring(1).split('&');
+    var qs = ui.query(url).split('&');
     for (var i = 0; i < qs.length; i++) {
         var e = qs[i].indexOf('=');
         if (e > 0)
@@ -223,11 +93,11 @@ ui.queryParams = function() {
 };
 
 /**
- * Return a dictionary of the fragment parameters.
+ * Return a dictionary of fragment parameters in a URL.
  */
-ui.fragmentParams = function() {
+ui.fragmentParams = function(url) {
     var qp = new Array();
-    var qs = window.location.hash.substring(1).split('&');
+    var qs = ui.fragment(url).split('&');
     for (var i = 0; i < qs.length; i++) {
         var e = qs[i].indexOf('=');
         if (e > 0)
@@ -237,6 +107,55 @@ ui.fragmentParams = function() {
 };
 
 /**
+ * Convert a base64-encoded image to a data URL.
+ */
+ui.b64img = function(b64) {
+    return 'data:image/png;base64,' + b64;
+};
+
+/**
+ * Declare a CSS stylesheet.
+ */
+ui.declareCSS = function(s) {
+    var e = document.createElement('style');
+    e.type = 'text/css';
+    e.textContent = s;
+    return e;
+};
+
+/**
+ * Declare a script.
+ */
+ui.declareScript = function(s) {
+    var e = document.createElement('script');
+    e.type = 'text/javascript';
+    e.text = s;
+    return e;
+};
+
+/**
+ * Return the scripts elements under a given element.
+ */
+ui.innerScripts = function(e) {
+    return map(function(s) { return s.text; },  nodeList(e.getElementsByTagName('script')));
+};
+
+/**
+ * Evaluate a script.
+ */
+ui.evalScript = function(s) {
+    return eval('(function() {\n' + s + '\n})();');
+};
+
+/**
+ * Include a script.
+ */
+ui.includeScript = function(s) {
+    log('include', s);
+    return eval(s);
+};
+
+/**
  * Return true if the client is a mobile device.
  */
 ui.mobiledetected = false;
@@ -252,145 +171,117 @@ ui.isMobile = function() {
 };
 
 /**
- * Initialize a document's body.
+ * Convert a host name to a home page title.
  */
-ui.pagetransitions = false;
-
-ui.initbody = function() {
-    if (ui.isMobile()) {
-        //log('init', window.location);
-
-        // Position the main body div off screen
-        if (ui.pagetransitions) {
-            var bdiv = $('bodydiv');
-            if (!isNil(bdiv)) {
-                bdiv.className = 'bodydivloading';
-            }
-        }
-
-        // Install orientation handler
-        document.body.onorientationchange = ui.onorientationchange;
-    }
-    return true;
-}
+ui.hometitle = function(host) {
+    if (!isNil(window.top.config.hometitle))
+        return window.top.config.hometitle;
+    var h = reverse(host.split('.'));
+    var d = isNil(cdr(h))? car(h) : cadr(h);
+    return d.substr(0, 1).toUpperCase() + d.substr(1);
+};
 
 /**
- * Reload the current document when orientation changes.
+ * Convert a host name to a window title.
  */
-ui.onorientationchange = function() {
-    window.open(window.location, '_self');
-    return true;
-}
+ui.windowtitle = function(host) {
+    if (!isNil(window.top.config.windowtitle))
+        return window.top.config.windowtitle;
+    var h = reverse(host.split('.'));
+    var d = isNil(cdr(h))? car(h) : cadr(h);
+    return d.substr(0, 1).toUpperCase() + d.substr(1);
+};
 
 /**
- * Post process a document after it's loaded.
+ * Convert a CSS position to a numeric position.
  */
-ui.onload = function() {
+ui.numpos = function(p) {
+    return p == ''? 0 : Number(p.substr(0, p.length - 2));
+};
 
-    // Save the current page location in local storage
-    // (except for login and logout pages)
-    var path = document.location.pathname;
-    if (path.indexOf('/login/') != 0 && path.indexOf('/logout/') != 0)
-        localStorage.setItem('ui.lastvisited', '' + document.location);
-
-    // Make the document body visible
-    //log('visible', $('bodydiv').className);
-    document.body.style.visibility = 'visible';
+/**
+ * Convert a numeric position to a CSS pixel position.
+ */
+ui.pixpos = function(p) {
+    return p + 'px';
+};
 
-    if (ui.pagetransitions && ui.isMobile()) {
-        //log('onload', window.location);
-        
-        // Slide the main body div in
-        setTimeout(function() {
-            var bdiv = $('bodydiv');
-            if (!isNil(bdiv)) { 
-                function transitionend(e) {
-                    bdiv.removeEventListener('webkitTransitionEnd', transitionend, false);
-                    bdiv.removeEventListener('transitionend', transitionend, false);
-                    bdiv.className = 'bodydiv';
-                    //log('loadtransitionend', window.location);
-                };
-                bdiv.addEventListener('webkitTransitionEnd', transitionend, false);
-                bdiv.addEventListener('transitionend', transitionend, false);
-                //log('loadtransitionstart', window.location);
-                bdiv.className = 'bodydivloaded';
-            }
-        }, 0);
-    }
+/**
+ * Reload the current document when orientation changes.
+ */
+ui.onorientationchange = function() {
+    window.location.reload();
     return true;
-};
+}
 
 /**
  * Navigate to a new document.
  */
 ui.navigate = function(url, win) {
+    log('navigate', url, win);
 
-    function opendoc(url, win) {
-        if (win == '_reload') {
-            window.location = url;
-            return window.location.reload();
-        }
-        return window.open(url, win);
-    }
+    // Open a new window
+    if (win == '_blank')
+        return window.top.open(url, win);
 
-    if (ui.pagetransitions && ui.isMobile() && win != '_blank') {
+    // Open a new document in the current window
+    if (win == '_self')
+        return window.top.open(url, win);
 
-        // Slide the main body div out, then open the new document
-        var bdiv = $('bodydiv');
-        if (!isNil(bdiv)) {
-            function transitionend(e) {
-                bdiv.removeEventListener('webkitTransitionEnd', transitionend, false);
-                bdiv.removeEventListener('transitionend', transitionend, false);
-                //log('navigatetransitionend', window.location);
-                return opendoc(url, win);
-            };
-            bdiv.addEventListener('webkitTransitionEnd', transitionend, false);
-            bdiv.addEventListener('transitionend', transitionend, false);
-            //log('navigatetransitionstart', window.location);
-            bdiv.className = 'bodydivunloaded';
-            return true;
-        }
+    // Reload the current window
+    if (win == '_reload') {
+        window.top.location = url;
+        return window.top.location.reload();
     }
 
-    return opendoc(url, win); 
-}
-
-/**
- * Pre process a document just before it's unloaded.
- */
-ui.onbeforeunload = function() {
-
-    if (ui.pagetransitions && ui.isMobile()) {
-        
-        // Slide the main body div out
-        var bdiv = $('bodydiv');
-        if (!isNil(bdiv))
-            bdiv.className = 'bodydivunloaded';
+    // Let the current top window handle the navigation
+    if (win == '_view') {
+        if (!window.top.onnavigate)
+            return window.top.open(url, '_self');
+        return window.top.onnavigate(url);
     }
-};
 
-
-/**
- * Return the last visited page.
- */
-ui.lastvisited = function() {
-    return localStorage.getItem('ui.lastvisited');
+    return window.top.open(url, win);
 }
 
 /**
- * Convert a CSS position to a numeric position.
+ * Build a portable <a href> tag.
  */
-ui.numpos = function(p) {
-    return p == ''? 0 : Number(p.substr(0, p.length - 2));
+ui.ahref = function(loc, target, html) {
+    if (target == '_blank')
+        return '<a href="' + loc + '" target="_blank">' + html + '</a>';
+    return '<a href="javascript:void(0)" onclick="ui.navigate(\'' + loc + '\', \'' + target + '\');">' + html + '</a>';
 };
 
 /**
- * Convert a numeric position to a CSS pixel position.
- */
-ui.pixpos = function(p) {
-    return p + 'px';
+ * Build a menu bar.
+ */ 
+ui.menu = function(name, href, target, hilight) {
+    function Menu() {
+        this.content = function() {
+            if (hilight)
+                return ui.ahref(href, target, '<span class="tbarsmenu">' + name + '</span>');
+            return ui.ahref(href, target, '<span class="tbaramenu">' + name + '</span>');
+        };
+    }
+    return new Menu();
 };
 
+ui.menubar = function(left, right) {
+    var bar = '<table cellpadding="0" cellspacing="0" width="100%" class="tbar"><tr>' +
+    '<td class="dtbar"><table border="0" cellspacing="0" cellpadding="0"><tr>';
+    for (i in left)
+        bar = bar + '<td class="ltbar">' + left[i].content() + '</td>'
+
+    bar = bar + '</tr></table></td>' +
+    '<td class="dtbar"><table border="0" cellpadding="0" cellspacing="0" align="right"><tr>';
+    for (i in right)
+        bar = bar + '<td class="' + (i == 0? 'dtbar' : 'rtbar') + '">' + right[i].content() + '</td>'
+
+    bar = bar + '</tr></table></td></tr></table>';
+    return bar;
+};
+ 
 /**
  * Convert a list of elements to an HTML table.
  */
@@ -473,3 +364,105 @@ ui.datalist = function(l) {
     return '<table class="datatable ' + (window.name == 'dataFrame'? ' databg' : '') + '" style="width: 100%;">' + rows(l, 0) + '</table>';
 }
 
+/**
+ * Autocomplete / suggest support for input fields
+ * To use it declare a 'suggest' function as follows:
+ * function suggestItems() {
+ *       return new Array('abc', 'def', 'ghi');
+ * }
+ * then hook it to an input field as follows:
+ * suggest(document.yourForm.yourInputField, suggestItems);
+ */ 
+ui.selectSuggestion = function(node, value) {
+    for (;;) {
+        node = node.parentNode;
+        if (node.tagName.toLowerCase() == 'div')
+              break;
+    }
+    node.selectSuggestion(value);
+};
+
+ui.hilightSuggestion = function(node, over) {
+    if (over)
+        node.className = 'suggestHilighted';
+    node.className = 'suggestItem';
+};
+
+ui.suggest = function(input, suggestFunction) {
+    input.suggest = suggestFunction;
+      
+    input.selectSuggestion = function(value) {
+        this.hideSuggestDiv();
+        this.value = value;
+    }
+    
+    input.hideSuggestDiv = function() {
+        if (this.suggestDiv != null) {
+            this.suggestDiv.style.visibility = 'hidden';
+        }
+    }
+    
+    input.showSuggestDiv = function() {
+        if (this.suggestDiv == null) {
+            this.suggestDiv = document.createElement('div');
+            this.suggestDiv.input = this;
+            this.suggestDiv.className = 'suggest';
+            input.parentNode.insertBefore(this.suggestDiv, input);
+            this.suggestDiv.style.visibility = 'hidden';
+            this.suggestDiv.style.zIndex = '99';
+            
+            this.suggestDiv.selectSuggestion = function(value) {
+                this.input.selectSuggestion(value);
+            }
+        }
+        
+        var values = this.suggest();
+        var items = '';
+        for (var i = 0; i < values.length; i++) {
+            if (values[i].indexOf(this.value) == -1)
+                continue;
+            if (items.length == 0)
+                items += '<table class="suggestTable">';
+            items += '<tr><td class="suggestItem" ' +
+            'onmouseover="ui.hilightSuggestion(this, true)" onmouseout="ui.hilightSuggestion(this, false)" ' +
+            'onmousedown="ui.selectSuggestion(this, \'' + values[i] + '\')">' + values[i] + '</td></tr>';
+        }
+        if (items.length != 0)
+            items += '</table>';
+        this.suggestDiv.innerHTML = items;
+        
+        if (items.length != 0) {
+            var node = input;              
+            var left = 0;
+            var top = 0;
+            for (;;) {
+                left += node.offsetLeft;
+                top += node.offsetTop;
+                node = node.offsetParent;
+                if (node.tagName.toLowerCase() == 'body')
+                  break;
+            }
+            this.suggestDiv.style.left = left;
+            this.suggestDiv.style.top = top + input.offsetHeight;
+            this.suggestDiv.style.visibility = 'visible';
+        } else
+            this.suggestDiv.style.visibility = 'hidden';
+    }
+      
+    input.onkeydown = function(event) {
+        this.showSuggestDiv();
+    };
+
+    input.onkeyup = function(event) {
+        this.showSuggestDiv();
+    };
+
+    input.onmousedown = function(event) {
+        this.showSuggestDiv();
+    };
+
+    input.onblur = function(event) {
+        setTimeout(function() { input.hideSuggestDiv(); }, 50);
+    };
+};
+

Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/util.js
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/util.js?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/htdocs/util.js (original)
+++ tuscany/sca-cpp/trunk/modules/js/htdocs/util.js Mon Oct 24 08:45:54 2011
@@ -327,28 +327,6 @@ function issubdomain(host) {
 }
 
 /**
- * Convert a host name to a home page title.
- */
-function hometitle(host) {
-    if (!isNil(config.hometitle))
-        return config.hometitle;
-    var h = reverse(host.split('.'));
-    var d = isNil(cdr(h))? car(h) : cadr(h);
-    return d.substr(0, 1).toUpperCase() + d.substr(1);
-}
-
-/**
- * Convert a host name to a window title.
- */
-function windowtitle(host) {
-    if (!isNil(config.windowtitle))
-        return config.windowtitle;
-    var h = reverse(host.split('.'));
-    var d = isNil(cdr(h))? car(h) : cadr(h);
-    return d.substr(0, 1).toUpperCase() + d.substr(1);
-}
-
-/**
  * Format a string like Python format.
  */
 function format() {

Modified: tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp?rev=1188045&r1=1188044&r2=1188045&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp Mon Oct 24 08:45:54 2011
@@ -186,6 +186,38 @@ int translateService(const ServerConf& s
 }
 
 /**
+ * Route an /apps/app-name/... request to the target app domain.
+ */
+int translateDomain(request_rec *r) {
+    httpdDebugRequest(r, "modwiring::translateDomain::input");
+    debug(r->uri, "modwiring::translateDomain::uri");
+
+    // Extract the requested app name
+    const list<value> apath(pathValues(r->uri));
+    if (isNil(cdr(apath)))
+        return HTTP_NOT_FOUND;
+
+    // Compute the target uri in the target app domain
+    ostringstream turi;
+    turi << httpd::scheme(r) << "://" << string(cadr(apath)) << "." << httpd::hostName(r) << ":" << httpd::port(r) << string(path(cddr(apath))) << (r->args != NULL? string("?") + r->args : string(""));
+    debug(str(turi), "modwiring::translateDomain::appuri");
+    
+    // Route to an absolute target URI using mod_proxy or an HTTP client redirect
+    if (useModProxy) {
+        r->filename = apr_pstrdup(r->pool, c_str(string("proxy:") + str(turi)));
+        debug(r->filename, "modwiring::translateDomain::filename");
+        r->proxyreq = PROXYREQ_REVERSE;
+        r->handler = "proxy-server";
+        apr_table_setn(r->notes, "proxy-nocanon", "1");
+        return OK;
+    }
+
+    debug(str(turi), "modwiring::translateDomain::location");
+    r->handler = "mod_tuscany_wiring";
+    return httpd::externalRedirect(str(turi), r);
+}
+
+/**
  * Read the components declared in a composite.
  */
 const failable<list<value> > readComponents(const string& path) {
@@ -315,6 +347,10 @@ int translate(request_rec *r) {
     // Create a scoped memory pool
     gc_scoped_pool pool(r->pool);
 
+    // Translate an app domain request
+    if (!strncmp(r->uri, "/apps/", 6) || !strncmp(r->uri, "/a/", 3))
+        return translateDomain(r);
+
     // Get the server configuration
     const ServerConf& sc = httpd::serverConf<ServerConf>(r, &mod_tuscany_wiring);