39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>Portlet Editor</title>
|
|
<body style="margin:0;" onload="doLoad(event)">
|
|
|
|
<script type='text/javascript'>
|
|
function doLoad(e){
|
|
var res={};var id='';var servlet='';var custom='';var type=''; var createAltInterfaceFor = ''; var useRoot = '';
|
|
var getDataString=new String(window.location);
|
|
var questionMarkLocation=getDataString.search(/\?/);
|
|
if(questionMarkLocation!=-1){
|
|
getDataString=getDataString.substr(questionMarkLocation+1);
|
|
var getDataArray=getDataString.split(/&/g);
|
|
for(var i=0;i<getDataArray.length;i++){
|
|
var nameValuePair=getDataArray[i].split(/=/);
|
|
res[unescape(nameValuePair[0])]=unescape(nameValuePair[1]);
|
|
}
|
|
}
|
|
if('id' in res)
|
|
id='?id='+res.id;
|
|
if( 'servlet' in res )
|
|
servlet='&servlet='+res.servlet;
|
|
if ('custom' in res){
|
|
custom = '&custom=' + res.custom;
|
|
type = '&altInterface=true';
|
|
} if ('createAltInterfaceFor' in res) {
|
|
prefix = ('id' in res) ? '&' : '?';
|
|
createAltInterfaceFor = prefix + 'createAltInterfaceFor=' + res.createAltInterfaceFor;
|
|
} if ('m_cUseRoot' in res) {
|
|
prefix = ('id' in res) ? '&' : '?';
|
|
useRoot = prefix + 'm_cUseRoot=' + res.useRoot;
|
|
}
|
|
window.location='editor.jsp'+id+servlet+custom+type+createAltInterfaceFor+useRoot;
|
|
}
|
|
</script>
|
|
</head>
|
|
</body>
|
|
</html>
|