Fix IE 8 issue on first loading.

This commit is contained in:
Paulo Veiga 2009-07-11 13:19:28 +00:00
parent cb8f1478f6
commit b0d0715ad5

View File

@ -16,6 +16,7 @@
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css"> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css">
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"> <link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/core.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/wiseLibrary.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/js/wiseLibrary.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -24,8 +25,18 @@
boxGenerator.render('recentFiles'); boxGenerator.render('recentFiles');
boxGenerator.render('recentItems'); boxGenerator.render('recentItems');
$('mydocs').makeRounded({radius: 16,borderColor: '#a7c6df',backgroundColor: '#c3def5'}); $('mydocs').makeRounded({radius: 16,borderColor: '#a7c6df',backgroundColor: '#c3def5'});
// IE Hack ....
function afterMindpotLibraryLoading(){};
if (core.UserAgent.isVMLSupported())
{
$import("../js/mindplot.vml.js");
}
}; };
</script> </script>
</head> </head>
<body> <body>
<div class="content"> <div class="content">
@ -85,16 +96,16 @@
</div> </div>
<div id="mydocs"> <div id="mydocs">
<div id="toolbar"> <div id="toolbar">
<input id="selectedMapIds" type="hidden" value=""/> <input id="selectedMapIds" type="hidden" value=""/>
<div class="leftMenu"> <div class="leftMenu">
<div class="button"> <div class="button">
<a href="newMap.htm" rel="moodalbox 500px 190px" title="<spring:message code="NEW_MAP_MSG"/>"> <a href="newMap.htm" rel="moodalbox 500px 190px" title="<spring:message code="NEW_MAP_MSG"/>">
<spring:message code="NEW_MINDMAP"/> <spring:message code="NEW_MINDMAP"/>
</a> </a>
</div> </div>
<div class="button menuLink" onclick="updateLinks($(this).getParent()); new Windoo.Confirm('<spring:message code="DELETE_SELECTED_CONFIRMATION"/>', <div class="button menuLink" onclick="updateLinks($(this).getParent()); new Windoo.Confirm('<spring:message code="DELETE_SELECTED_CONFIRMATION"/>',
{ {
'window': {theme:Windoo.Themes.wise, 'window': {theme:Windoo.Themes.wise,
title:'<spring:message code="DELETE_MAP"/>' title:'<spring:message code="DELETE_MAP"/>'
@ -105,98 +116,98 @@
$(document.toolbarForm).submit(); $(document.toolbarForm).submit();
} }
});"> });">
<spring:message code="DELETE_SELECTED"/> <spring:message code="DELETE_SELECTED"/>
</div>
</div>
<div class="button">
<a href="importMap.htm" rel="moodalbox 500px 250px" title="<spring:message code="IMPORT_MINDMAP_DETAILS"/>">
<spring:message code="IMPORT_MINDMAP"/>
</a>
</div> </div>
</div> </div>
<div class="button"> <c:url value="mymaps.htm" var="shareMap">
<a href="importMap.htm" rel="moodalbox 500px 250px" title="<spring:message code="IMPORT_MINDMAP_DETAILS"/>"> <c:param name="action" value="collaborator"/>
<spring:message code="IMPORT_MINDMAP"/> <c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
</a> </c:url>
</div> <c:url value="mymaps.htm" var="deleteMapUrl">
</div> <c:param name="action" value="delete"/>
<c:url value="mymaps.htm" var="shareMap"> <c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
<c:param name="action" value="collaborator"/> </c:url>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/> <c:url value="mymaps.htm" var="changeStatus">
</c:url> <c:param name="action" value="changeStatus"/>
<c:url value="mymaps.htm" var="deleteMapUrl"> <c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
<c:param name="action" value="delete"/> </c:url>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/> <div id="docTable">
</c:url> <table>
<c:url value="mymaps.htm" var="changeStatus"> <colgroup>
<c:param name="action" value="changeStatus"/> <col width="3%"/>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/> <col width="3%"/>
</c:url> <col width="15%"/>
<div id="docTable"> <col width="30%"/>
<table> <col width="14%"/>
<colgroup> <col width="10%"/>
<col width="3%"/> <col width="20%"/>
<col width="3%"/> <col width="5%"/>
<col width="15%"/> </colgroup>
<col width="30%"/> <thead>
<col width="14%"/> <tr>
<col width="10%"/> <th style="text-align:center">
<col width="20%"/> <input id="checkAll" type="checkbox" onchange="selectAllMaps(this);">
<col width="5%"/> </th>
</colgroup> <th>
<thead> <spring:message code="FILE"/>
<tr> </th>
<th style="text-align:center"> <th>
<input id="checkAll" type="checkbox" onchange="selectAllMaps(this);"> <spring:message code="NAME"/>
</th> </th>
<th> <th>
<spring:message code="FILE"/> <spring:message code="DESCRIPTION"/>
</th> </th>
<th>
<spring:message code="NAME"/>
</th>
<th>
<spring:message code="DESCRIPTION"/>
</th>
<th> <th>
<spring:message code="STATUS"/> <spring:message code="STATUS"/>
</th> </th>
<th> <th>
<spring:message code="CREATOR"/> <spring:message code="CREATOR"/>
</th> </th>
<th> <th>
<spring:message code="LAST_EDITOR"/> <spring:message code="LAST_EDITOR"/>
</th> </th>
<th>&nbsp; <th>&nbsp;
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<c:forEach items="${wisemapsList}" var="mindmap"> <c:forEach items="${wisemapsList}" var="mindmap">
<tr> <tr>
<td> <td>
<div align="center"><input type="checkbox" name="chk" id="chk${mindmap.id}" <div align="center"><input type="checkbox" name="chk" id="chk${mindmap.id}"
onclick="addToSelectedMapList(this);"></div> onclick="addToSelectedMapList(this);"></div>
</td> </td>
<td> <td>
<div class="leftMenu"> <div class="leftMenu">
<img src="../images/icon_list.png" border="0" class="button" <img src="../images/icon_list.png" border="0" class="button"
style="display:block;"> style="display:block;">
<div class="subMenu2"> <div class="subMenu2">
<a href="javascript:openMap('${mindmap.id}')" <a href="javascript:openMap('${mindmap.id}')"
title="<spring:message code="OPEN_MSG"/>"> title="<spring:message code="OPEN_MSG"/>">
<spring:message code="OPEN"/> <spring:message code="OPEN"/>
</a> </a>
<c:if test="${mindmap.owner==requestScope.user}"> <c:if test="${mindmap.owner==requestScope.user}">
<a href="renameMap.htm?mapId=${mindmap.id}" <a href="renameMap.htm?mapId=${mindmap.id}"
rel="moodalbox 400px 180px wizard" rel="moodalbox 400px 180px wizard"
title="<spring:message code="RENAME_DETAILS"/>"> title="<spring:message code="RENAME_DETAILS"/>">
<spring:message code="RENAME"/> <spring:message code="RENAME"/>
</a> </a>
</c:if> </c:if>
<a href="history.htm?action=list&goToMindmapList&mapId=${mindmap.id}" <a href="history.htm?action=list&goToMindmapList&mapId=${mindmap.id}"
rel="moodalbox 600px 400px wizard" rel="moodalbox 600px 400px wizard"
title="<spring:message code="HISTORY_INFO"/>"> title="<spring:message code="HISTORY_INFO"/>">
<spring:message code="HISTORY"/> <spring:message code="HISTORY"/>
</a> </a>
<div class="menuButton menuLink subMenu2Sep" onclick="new Windoo.Confirm('<spring:message code="DELETE_CONFIRMATION"/>', <div class="menuButton menuLink subMenu2Sep" onclick="new Windoo.Confirm('<spring:message code="DELETE_CONFIRMATION"/>',
{ {
window: {'theme':Windoo.Themes.wise, window: {'theme':Windoo.Themes.wise,
title:'<spring:message code="DELETE_MAP"/>' title:'<spring:message code="DELETE_MAP"/>'
@ -206,76 +217,77 @@
form.submit(); form.submit();
} }
});"> });">
<spring:message code="DELETE"/> <spring:message code="DELETE"/>
</div> </div>
<a href="tags.htm?mapId=${mindmap.id}" <a href="tags.htm?mapId=${mindmap.id}"
rel="moodalbox 400px 200px wizard" rel="moodalbox 400px 200px wizard"
title="<spring:message code="TAGS_DETAILS"/>"> title="<spring:message code="TAGS_DETAILS"/>">
<spring:message code="TAGS"/> <spring:message code="TAGS"/>
</a> </a>
<c:if test="${mindmap.owner==requestScope.user}"> <c:if test="${mindmap.owner==requestScope.user}">
<a href="${shareMap}&mapId=${mindmap.id}" <a href="${shareMap}&mapId=${mindmap.id}"
rel="moodalbox 780px 530px wizard" rel="moodalbox 780px 530px wizard"
title="<spring:message code="SHARE_DETAILS"/>"> title="<spring:message code="SHARE_DETAILS"/>">
<spring:message code="COLLABORATION"/> <spring:message code="COLLABORATION"/>
</a> </a>
<a class="subMenu2Sep" href="publish.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px wizard" <a class="subMenu2Sep" href="publish.htm?mapId=${mindmap.id}"
title="<spring:message code="PUBLISH_MSG"/>"> rel="moodalbox 600px 400px wizard"
<spring:message code="PUBLISH"/> title="<spring:message code="PUBLISH_MSG"/>">
</a> <spring:message code="PUBLISH"/>
</c:if> </a>
<a href="export.htm?mapId=${mindmap.id}" </c:if>
rel="moodalbox 600px 400px" title="<spring:message code="EXPORT_DETAILS"/>"> <a href="export.htm?mapId=${mindmap.id}"
<spring:message code="EXPORT"/> rel="moodalbox 600px 400px" title="<spring:message code="EXPORT_DETAILS"/>">
</a> <spring:message code="EXPORT"/>
<a href="javascript:printMap(${mindmap.id});"> </a>
<spring:message code="PRINT"/> <a href="javascript:printMap(${mindmap.id});">
</a> <spring:message code="PRINT"/>
</div> </a>
</div> </div>
</td> </div>
<td> </td>
<div> <td>
<div class="mapTitle"> <div>
<a href="javascript:openMap('${mindmap.id}')"> <div class="mapTitle">
${mindmap.title} <a href="javascript:openMap('${mindmap.id}')">
</a> ${mindmap.title}
</div> </a>
<div class="mapTags"> </div>
${mindmap.tags} <div class="mapTags">
</div> ${mindmap.tags}
</div> </div>
</td> </div>
<td> </td>
${mindmap.description} <td>
</td> ${mindmap.description}
<td> </td>
<c:choose> <td>
<c:when test="${not mindmap.public}"> <c:choose>
<img src="../images/key.png" <c:when test="${not mindmap.public}">
title="<spring:message code="PRIVATE"/>: <spring:message code="ONLY_VIEW_PRIVATE"/>" <img src="../images/key.png"
alt="<spring:message code="PRIVATE"/>"/> title="<spring:message code="PRIVATE"/>: <spring:message code="ONLY_VIEW_PRIVATE"/>"
</c:when> alt="<spring:message code="PRIVATE"/>"/>
<c:otherwise> </c:when>
<img src="../images/world2.png " <c:otherwise>
title="<spring:message code="PUBLIC"/>: <spring:message code="ALL_VIEW_PUBLIC"/>" <img src="../images/world2.png "
alt="title=" title="<spring:message code="PUBLIC"/>: <spring:message code="ALL_VIEW_PUBLIC"/>"
<spring:message code="PUBLIC"/> alt="title="
</c:otherwise> <spring:message code="PUBLIC"/>
</c:choose> </c:otherwise>
</td> </c:choose>
<td>${mindmap.creationUser}</td> </td>
<td>${mindmap.lastEditDate} by ${mindmap.lastEditor}</td> <td>${mindmap.creationUser}</td>
<td><a href="${mapDetail}&mapId=${mindmap.id}"> <td>${mindmap.lastEditDate} by ${mindmap.lastEditor}</td>
<spring:message code="DETAIL"/> <td><a href="${mapDetail}&mapId=${mindmap.id}">
</a> <spring:message code="DETAIL"/>
</td> </a>
</tr> </td>
</c:forEach> </tr>
</tbody> </c:forEach>
</tbody>
</table> </table>
</div> </div>
</div> </div>
<div id="ds1" class="submenu" style="display:none;"> <div id="ds1" class="submenu" style="display:none;">
@ -318,148 +330,148 @@
</form> </form>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function openMap(mapId) { function openMap(mapId) {
document.openForm.mapId.value = mapId; document.openForm.mapId.value = mapId;
document.openForm.submit(); document.openForm.submit();
}
function deleteOkButton(url)
{
var form = document.createElement('form');
form.method = 'post';
form.action = url;
document.body.appendChild(form);
form.submit();
}
Window.onDomReady(initDropDowns);
function initDropDowns()
{
$ES('li[rel="submenu"]', $(document.body)).each(function(el) {
var items = $E('ul', el);
el.addEvent('click', showMenu.bind(items));
}, this);
}
function showMenu(evt)
{
if ($(document).onclick)
{
$(document).fireEvent('click', 0);
showMenu.delay(110, this, evt);
} }
else function deleteOkButton(url)
{ {
this.myEffect = $(this).effects({duration:100, transition: Fx.Transitions.linear}); var form = document.createElement('form');
this.myEffect.start({'opacity':[0,1]}); form.method = 'post';
$(document).onclick = hide.bind(this); form.action = url;
var event = new Event(evt); document.body.appendChild(form);
event.stop(); form.submit();
} }
}
function hide() Window.onDomReady(initDropDowns);
{ function initDropDowns()
this.myEffect.start({'opacity':[1,0]});
$(document).onclick = '';
}
function updateLinks(el)
{
$ES('a', el).each(function(link) {
if (!link.ohref)
{
link.ohref = link.getProperty('ohref');
}
link.href = link.ohref + $('selectedMapIds').value;
});
}
function openWizard(href, title, rel)
{
href = href + $('selectedMapIds').value;
MOOdalBox.open(href, title, rel);
}
function addToSelectedMapList(el)
{
var ids = $('selectedMapIds');
var id = el.id.replace(/[^\d]/g, '');
var value = ids.getProperty("value");
if (value != "")
{ {
var allIds = $A(ids.value.split(',')); $ES('li[rel="submenu"]', $(document.body)).each(function(el) {
var changed = false; var items = $E('ul', el);
if (allIds.contains(id) && !el.checked) el.addEvent('click', showMenu.bind(items));
}, this);
}
function showMenu(evt)
{
if ($(document).onclick)
{ {
allIds.remove(id); $(document).fireEvent('click', 0);
changed = true; showMenu.delay(110, this, evt);
} }
else if (!allIds.contains(id) && el.checked) else
{ {
allIds.extend([id]); this.myEffect = $(this).effects({duration:100, transition: Fx.Transitions.linear});
changed = true; this.myEffect.start({'opacity':[0,1]});
} $(document).onclick = hide.bind(this);
if (changed) var event = new Event(evt);
{ event.stop();
var finalIds = "";
$each(allIds, function(el) {
if (!finalIds == "")
{
el = "," + el;
}
finalIds = finalIds + el;
});
value = finalIds;
} }
} }
else
function hide()
{ {
if (el.checked) this.myEffect.start({'opacity':[1,0]});
{ $(document).onclick = '';
value = id;
}
} }
ids.setProperty("value", value);
}
function updateLinks(el)
function selectAllMaps(elem) {
{ $ES('a', el).each(function(link) {
var value = elem.checked; if (!link.ohref)
var ids = "";
$ES('input[type="checkbox"]', $('docTable')).each(function(el) {
if (el.name.contains('chk'))
{
el.checked = value;
var id = el.id.replace(/[^\d]/g, '');
if (!ids == "")
{ {
id = "," + id; link.ohref = link.getProperty('ohref');
} }
ids = ids + id; link.href = link.ohref + $('selectedMapIds').value;
} });
});
if (!value)
{
$('selectedMapIds').setProperty('value', '');
} }
else
{
$('selectedMapIds').setProperty('value', ids);
}
/*var allElems = document.getElementsByName("chk");
for (var i = 0; i < allElems.length; i++)
{
allElems[i].checked = value;
}*/
}
function printMap(mapId) { function openWizard(href, title, rel)
document.printForm.mapId.value = mapId; {
document.printForm.submit(); href = href + $('selectedMapIds').value;
} MOOdalBox.open(href, title, rel);
}
function addToSelectedMapList(el)
{
var ids = $('selectedMapIds');
var id = el.id.replace(/[^\d]/g, '');
var value = ids.getProperty("value");
if (value != "")
{
var allIds = $A(ids.value.split(','));
var changed = false;
if (allIds.contains(id) && !el.checked)
{
allIds.remove(id);
changed = true;
}
else if (!allIds.contains(id) && el.checked)
{
allIds.extend([id]);
changed = true;
}
if (changed)
{
var finalIds = "";
$each(allIds, function(el) {
if (!finalIds == "")
{
el = "," + el;
}
finalIds = finalIds + el;
});
value = finalIds;
}
}
else
{
if (el.checked)
{
value = id;
}
}
ids.setProperty("value", value);
}
function selectAllMaps(elem)
{
var value = elem.checked;
var ids = "";
$ES('input[type="checkbox"]', $('docTable')).each(function(el) {
if (el.name.contains('chk'))
{
el.checked = value;
var id = el.id.replace(/[^\d]/g, '');
if (!ids == "")
{
id = "," + id;
}
ids = ids + id;
}
});
if (!value)
{
$('selectedMapIds').setProperty('value', '');
}
else
{
$('selectedMapIds').setProperty('value', ids);
}
/*var allElems = document.getElementsByName("chk");
for (var i = 0; i < allElems.length; i++)
{
allElems[i].checked = value;
}*/
}
function printMap(mapId) {
document.printForm.mapId.value = mapId;
document.printForm.submit();
}
</script> </script>
<script type="text/javascript"> <script type="text/javascript">