- Timestamp:
- Jan 12, 2010, 2:33:28 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r260 r262 23 23 24 24 def setTaskSearchParamsMax = { 25 if(params.newMax.isInteger()) 25 def max = 1000 26 if(params.newMax.isInteger()) { 26 27 def i = params.newMax.toInteger() 27 if(params.newMax.toInteger() > 0) 28 session.taskSearchParamsMax = params.newMax 29 params.max = params.newMax 28 if(i > 0 && i <= max) 29 session.taskSearchParamsMax = params.newMax 30 if(i > max) 31 session.taskSearchParamsMax = max 32 } 30 33 forward(action: 'search', params: params) 31 34 } … … 37 40 38 41 // TaskSearchService protects itself but filterPane does not. 39 params.max = Math.min( params.max ? params.max.toInteger() : 10, 99999)42 params.max = Math.min( params.max ? params.max.toInteger() : 10, 1000 ) 40 43 41 44 def taskInstanceList = [] -
trunk/grails-app/views/taskDetailed/search.gsp
r221 r262 7 7 <g:javascript src="overlayPane.js" /> 8 8 <nav:resources override="true"/> 9 <export:resource /> 9 10 </head> 10 11 <body> … … 36 37 <a href='' onclick="showElement('searchPane'); return false;">Quick</a> 37 38 </span> 38 Results: ${taskInstanceTotal}39 Results: ${taskInstanceList.size()} / ${taskInstanceTotal} 39 40 <span class="searchButtons"> 40 41 <filterpane:filterButton text="Advanced" appliedText="Advanced" /> 41 42 </span> 42 43 </div> 44 45 <div id="resultsControlClosed"> 46 <a href='' onclick="showElement('results'); 47 Element.hide('resultsControlClosed'); 48 Element.show('resultsControlOpened'); 49 return false"> 50 Options <img src="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" alt="Show" /> 51 </a> 52 </div> 53 54 <div id="resultsControlOpened" style="display:none;"> 55 <a href='' onclick="hideElement('results'); 56 Element.hide('resultsControlOpened'); 57 Element.show('resultsControlClosed'); 58 return false"> 59 Options <img src="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" alt="Show" /> 60 </a> 61 </div> 62 63 64 <div id="results" style="display:none;"> 65 <g:form method="post" > 66 <g:hiddenField name="params" value="${filterParams}" /> 67 <div class="dialog"> 68 <table> 69 <tbody> 70 71 <tr class="prop"> 72 <td valign="top" class="name"> 73 <label for="max">Results per page:</label> 74 </td> 75 <td valign="top" class="value"> 76 <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> 77 78 <span class="buttons"> 79 <g:actionSubmit action="setTaskSearchParamsMax" class="go" value="Update" /> 80 </span> 81 </td> 82 </tr> 83 84 </tbody> 85 </table> 86 </div> 87 <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> 88 </g:form> 89 </div> 90 91 <br /> 92 93 <g:if test="${taskInstanceList.size() > 10}"> 94 <div class="paginateButtons"> 95 <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> 96 </div> 97 </g:if> 43 98 44 99 <div class="list">
Note: See TracChangeset
for help on using the changeset viewer.