Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cadastroweb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Israel Barreto Sant'Anna
cadastroweb
Commits
e7071399
Commit
e7071399
authored
11 years ago
by
Fabiano Sluzarski
Browse files
Options
Downloads
Patches
Plain Diff
changed view list layout
parent
d0b4388c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/webapp/WEB-INF/tags/form/fields/table.tagx
+96
-8
96 additions, 8 deletions
src/main/webapp/WEB-INF/tags/form/fields/table.tagx
src/main/webapp/WEB-INF/tags/util/load-scripts.tagx
+1
-1
1 addition, 1 deletion
src/main/webapp/WEB-INF/tags/util/load-scripts.tagx
with
97 additions
and
9 deletions
src/main/webapp/WEB-INF/tags/form/fields/table.tagx
+
96
−
8
View file @
e7071399
...
...
@@ -44,6 +44,8 @@
<table>
<thead>
<tr>
<th></th>
<spring:eval var="colCounter" expression="colCounter + 1" />
<c:forTokens items="${columnLabels}" delims="${'✏'}" var="columnHeading">
<th>
<c:out value="${columnHeading}" />
...
...
@@ -51,18 +53,28 @@
</th>
</c:forTokens>
<th></th>
<c:if test="${update}">
<!--
<c:if test="${update}">
<th></th>
<spring:eval var="colCounter" expression="colCounter + 1" />
</c:if>
<c:if test="${delete}">
<th></th>
<spring:eval var="colCounter" expression="colCounter + 1" />
</c:if>
</c:if>
-->
</tr>
</thead>
<spring:eval var="radioId" expression="1" />
<c:set var="control" value="true" />
<c:forEach items="${data}" var="item">
<tr>
<c:set var="itemId"><spring:eval expression="item[typeIdFieldName]"/></c:set>
<td class="utilbox">
<input type="radio" id="${radioId}" name="radioButton" value="${itemId}"/>
<script type="text/javascript">
Spring.addDecoration(new Spring.ElementDecoration({elementId : '${radioId}', widgetType: 'dijit.form.RadioButton', widgetAttrs : {}}));
</script>
<spring:eval var="radioId" expression="radioId + 1" />
</td>
<c:forTokens items="${columnProperties}" delims="${'✏'}" var="column" varStatus="num">
<c:set var="columnMaxLength" value="${lengths[num.count-1]}" />
<c:set var="columnType" value="${types[num.count-1]}" />
...
...
@@ -91,8 +103,51 @@
<c:out value="${colTxt}" />
</td>
</c:forTokens>
<c:set var="itemId"><spring:eval expression="item[typeIdFieldName]"/></c:set>
<td class="utilbox">
<c:if test="${control}">
<td rowspan="${fn:length(data)}" class="utilbox" valign="top">
<spring:url value="/resources/images/show.png" var="show_image_url" />
<spring:message arguments="${typeName}" code="entity_show" var="show_label" htmlEscape="false" />
<a onclick="showRedirect()" alt="${fn:escapeXml(show_label)}" title="${fn:escapeXml(show_label)}">
<img alt="${fn:escapeXml(show_label)}" class="image" src="${show_image_url}" title="${fn:escapeXml(show_label)}" />
</a>
<br/>
<c:if test="${update}">
<spring:url value="/resources/images/update.png" var="update_image_url" />
<spring:message arguments="${typeName}" code="entity_update" var="update_label" htmlEscape="false" />
<a onclick="updateRedirect()" alt="${fn:escapeXml(update_label)}" title="${fn:escapeXml(update_label)}">
<img alt="${fn:escapeXml(update_label)}" class="image" src="${update_image_url}" title="${fn:escapeXml(update_label)}" />
</a>
</c:if>
<c:if test="${delete}">
<spring:url value="${path}/${itemId}" var="delete_form_url" />
<spring:url value="/resources/images/delete.png" var="delete_image_url" />
<form:form name="deleteForm" action="" method="DELETE">
<spring:message arguments="${typeName}" code="entity_delete" var="delete_label" htmlEscape="false" />
<c:set var="delete_confirm_msg">
<!-- <spring:escapeBody javaScriptEscape="true"> -->
<spring:message code="entity_delete_confirm" htmlEscape="false" />
<!-- </spring:escapeBody> -->
</c:set>
<input alt="${fn:escapeXml(delete_label)}" class="image" src="${delete_image_url}" title="${fn:escapeXml(delete_label)}" type="image" value="${fn:escapeXml(delete_label)}" onclick="return deleteRedirect();"/>
<c:if test="${not empty param.page}">
<input name="page" type="hidden" value="1" />
</c:if>
<c:if test="${not empty param.size}">
<input name="size" type="hidden" value="${fn:escapeXml(param.size)}" />
</c:if>
</form:form>
</c:if>
</td>
<c:set var="control" value="false" />
</c:if>
<!-- <c:set var="itemId"><spring:eval expression="item[typeIdFieldName]"/></c:set> -->
<!-- <td class="utilbox">
<spring:url value="${path}/${itemId}" var="show_form_url" />
<spring:url value="/resources/images/show.png" var="show_image_url" />
<spring:message arguments="${typeName}" code="entity_show" var="show_label" htmlEscape="false" />
...
...
@@ -118,11 +173,11 @@
<spring:url value="/resources/images/delete.png" var="delete_image_url" />
<form:form action="${delete_form_url}" method="DELETE">
<spring:message arguments="${typeName}" code="entity_delete" var="delete_label" htmlEscape="false" />
<c:set var="delete_confirm_msg">
<c:set var="delete_confirm_msg">
-->
<!-- <spring:escapeBody javaScriptEscape="true"> -->
<spring:message code="entity_delete_confirm" htmlEscape="false" />
<!--
<spring:message code="entity_delete_confirm" htmlEscape="false" />
-->
<!-- </spring:escapeBody> -->
</c:set>
<!--
</c:set>
<input alt="${fn:escapeXml(delete_label)}" class="image" src="${delete_image_url}" title="${fn:escapeXml(delete_label)}" type="image" value="${fn:escapeXml(delete_label)}" onclick="return confirm('${delete_confirm_msg}');" />
<c:if test="${not empty param.page}">
<input name="page" type="hidden" value="1" />
...
...
@@ -132,7 +187,7 @@
</c:if>
</form:form>
</td>
</c:if>
</c:if>
-->
</tr>
</c:forEach>
<tr class="footer">
...
...
@@ -157,6 +212,39 @@
</tr>
</table>
<script type="text/javascript">
function showRedirect(){
var radioElements = document.getElementsByName("radioButton");
for (var i=0; i < radioElements.length; i++)
if(radioElements[i].checked == true) {
var pathHeader = window.location.href.substring(0,window.location.href.lastIndexOf("${path}"));
window.location.href=pathHeader+"${path}/"+radioElements[i].value;
}
}
function updateRedirect(){
var radioElements = document.getElementsByName("radioButton");
for (var i=0; i < radioElements.length; i++)
if(radioElements[i].checked == true) {
var pathHeader = window.location.href.substring(0,window.location.href.lastIndexOf("${path}"));
window.location.href=pathHeader+"${path}/"+radioElements[i].value+"?form";
}
}
function deleteRedirect(){
var radioElements = document.getElementsByName("radioButton");
for (var i=0; i < radioElements.length; i++)
if(radioElements[i].checked == true) {
var pathHeader = window.location.href.substring(0,window.location.href.lastIndexOf("${path}"));
document.deleteForm.action = pathHeader+"${path}/"+radioElements[i].value;
return confirm('${delete_confirm_msg}');
}
}
</script>
</c:if>
</jsp:root>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/tags/util/load-scripts.tagx
+
1
−
1
View file @
e7071399
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment