Skip to content
Snippets Groups Projects
Commit aebf9744 authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette
Browse files

Update solution for Utilbox position

Update solution for Utilbox position
parent 84f6b125
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,30 @@ ...@@ -53,8 +53,30 @@
<spring:eval var="colCounter" expression="1" /> <spring:eval var="colCounter" expression="1" />
<script type="text/javascript">
function updateRadioButton(type, id){
var buttonId = document.getElementsByName("radioButton").length + id;
document.getElementById("tmp_"+id).id=buttonId;
Spring.addDecoration(new Spring.ElementDecoration({elementId : buttonId, widgetType: 'dijit.form.'+type, widgetAttrs : {}}));
}
function updateUtilboxPosition(id){
if (document.getElementById(id)){
if ( document.getElementsByClassName("dijitDialogTitleBar").length ){
document.getElementById(id).style.top = "50%";
}
}
document.getElementById(id).id=id+"_stylized";
}
</script>
<table class="table-with-utilbox"> <table class="table-with-utilbox">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<spring:eval var="colCounter" expression="colCounter + 1" /> <spring:eval var="colCounter" expression="colCounter + 1" />
...@@ -77,15 +99,6 @@ ...@@ -77,15 +99,6 @@
</thead> </thead>
<spring:eval var="radioId" expression="1" /> <spring:eval var="radioId" expression="1" />
<c:set var="control" value="true" /> <c:set var="control" value="true" />
<script type="text/javascript">
function updateRadioButton(type, id){
var buttonId = document.getElementsByName("radioButton").length + id;
document.getElementById("tmp_"+id).id=buttonId;
Spring.addDecoration(new Spring.ElementDecoration({elementId : buttonId, widgetType: 'dijit.form.'+type, widgetAttrs : {}}));
}
</script>
<c:forEach items="${data}" var="item"> <c:forEach items="${data}" var="item">
<tr> <tr>
<c:set var="itemId"><spring:eval expression="item.${typeIdFieldName}"/></c:set> <c:set var="itemId"><spring:eval expression="item.${typeIdFieldName}"/></c:set>
...@@ -144,16 +157,7 @@ ...@@ -144,16 +157,7 @@
<td rowspan="${fn:length(data)}" class="utilbox" valign="top"> <td rowspan="${fn:length(data)}" class="utilbox" valign="top">
<div class="utilbox-actions" id="id_utilbox-actions"> <div class="utilbox-actions" id="id_utilbox-actions">
<script type="text/javascript">updateUtilboxPosition('id_utilbox-actions');</script>
<script type="text/javascript">
$(document).ready(function(e){
if ($('#id_utilbox-actions')){
if ( $('.dijitDialogTitleBar').length ){
$('#id_utilbox-actions').css({ top: ($(window).height()/2) });
}
}
});
</script>
<spring:url value="/resources/images/show.png" var="show_image_url" /> <spring:url value="/resources/images/show.png" var="show_image_url" />
<spring:message arguments="${typeName}" code="entity_show" var="show_label" htmlEscape="false" /> <spring:message arguments="${typeName}" code="entity_show" var="show_label" htmlEscape="false" />
...@@ -285,6 +289,7 @@ ...@@ -285,6 +289,7 @@
<script type="text/javascript"> <script type="text/javascript">
function showRedirect(){ function showRedirect(){
var radioElements = document.getElementsByName("radioButton"); var radioElements = document.getElementsByName("radioButton");
console.log("${path}"); console.log("${path}");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment