Ignore:
Timestamp:
Jun 3, 2010, 4:31:44 AM (14 years ago)
Author:
gav
Message:

Improvements to inventory text search, add inventoryGroup and hide Limit Search unless one of the values is true.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/inventoryItemDetailed/search.gsp

    r565 r566  
    271271                        <tr class="prop">
    272272                            <td valign="top" class="name">
     273
     274                                <jsUtil:toggleControl toggleId="limitSearch"
     275                                                                        imageId="limitSearchImg"
     276                                                                        closedImgUrl="${resource(dir:'images/skin',file:'bullet_toggle_plus.png')}"
     277                                                                        openImgUrl="${resource(dir:'images/skin',file:'bullet_toggle_minus.png')}"
     278                                                                        effect="fade"
     279                                                                        text="Limit Search"
     280                                                                        />
    273281                            </td>
    274282                            <td valign="top" class="value">
    275 <!--                                 <g:checkBox name="searchName" value="${true}" ></g:checkBox> -->
    276                                 <label for="searchName">Name,</label>
    277 <!--                                 <g:checkBox name="searchDescription" value="${true}" ></g:checkBox> -->
    278                                 <label for="searchDescription">Description,</label>
    279 <!--                                 <g:checkBox name="searchComment" value="${true}" ></g:checkBox> -->
    280                                 <label for="searchComment">Comment,</label>
    281 <!--                                 <g:checkBox name="searchLocation" value="${true}" ></g:checkBox> -->
    282                                 <label for="searchLocation">Location and</label>
    283 <!--                                 <g:checkBox name="searchSpareFor" value="${true}" ></g:checkBox> -->
    284                                 <label for="searchSpareFor">Spare For (Asset: name, description and comment).</label>
     283                                <g:if test="${params.searchName || params.searchDescription || params.searchComment || params.searchLocation || params.searchGroup || params.searchSpareFor}" >
     284                                    <div id="limitSearch">
     285                                </g:if>
     286                                <g:else>
     287                                    <div id="limitSearch" style="display:none;">
     288                                </g:else>
     289                                    <g:checkBox name="searchName" value="${params.searchName}" ></g:checkBox>
     290                                    <label for="searchName">Name</label>
     291                                    <g:checkBox name="searchDescription" value="${params.searchDescription}" ></g:checkBox>
     292                                    <label for="searchDescription">Description</label>
     293                                    <g:checkBox name="searchComment" value="${params.searchComment}" ></g:checkBox>
     294                                    <label for="searchComment">Comment</label>
     295                                    <g:checkBox name="searchLocation" value="${params.searchLocation}" ></g:checkBox>
     296                                    <label for="searchLocation">Location</label>
     297                                    <g:checkBox name="searchGroup" value="${params.searchGroup}" ></g:checkBox>
     298                                    <label for="searchGroup">Group</label>
     299                                    <br />
     300                                    <g:checkBox name="searchSpareFor" value="${params.searchSpareFor}" ></g:checkBox>
     301                                    <label for="searchSpareFor">Spare For (Asset: Name, Description and Comment).</label>
     302                                </div>
    285303                            </td>
    286304                        </tr>
Note: See TracChangeset for help on using the changeset viewer.