Ignore:
Timestamp:
Apr 19, 2010, 2:07:48 AM (14 years ago)
Author:
gav
Message:

Improved table row onclick implementation for all detailed list and search views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/taskDetailed/show.gsp

    r474 r498  
    291291                                    <tbody>
    292292                                        <g:each in="${entryFaultList}" status="i" var="entry">
    293                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
    294 
    295                                                     <td style="width:65%">${entry.comment.encodeAsHTML()}</td>
    296                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
    297                                                     <td>
     293                                                <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
     294
     295                                                    <td style="width:65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     296                                                        ${entry.comment.encodeAsHTML()}
     297                                                    </td>
     298
     299                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     300                                                        <g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/>
     301                                                    </td>
     302
     303                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
    298304                                                        <g:if test="${entry.productionReference}">
    299305                                                            ${entry.productionReference.encodeAsHTML()}
     
    303309                                                        </g:else>
    304310                                                    </td>
    305                                                     <td>${entry.durationHour}:${entry.durationMinute}</td>
    306                                                     <td>${entry.enteredBy.encodeAsHTML()}</td>
    307 
    308                                                     <td>
     311
     312                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     313                                                        ${entry.durationHour}:${entry.durationMinute}
     314                                                    </td>
     315
     316                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     317                                                        ${entry.enteredBy.encodeAsHTML()}
     318                                                    </td>
     319
     320                                                    <td class="notClickable">
    309321                                                        <g:link controller="entryDetailed" action="edit" id="${entry.id}">
    310322                                                            <img  src="${resource(dir:'images/skin',file:'database_edit.png')}" alt="Edit" />
     
    349361                                    <tbody>
    350362                                        <g:each in="${entryCauseList}" status="i" var="entry">
    351                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
    352 
    353                                                     <td style="width:65%">${entry.comment.encodeAsHTML()}</td>
    354                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
    355                                                     <td>${entry.enteredBy.encodeAsHTML()}</td>
    356 
    357                                                     <td>
     363                                                <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
     364
     365                                                    <td style="width:65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     366                                                        ${entry.comment.encodeAsHTML()}
     367                                                    </td>
     368
     369                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     370                                                        <g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/>
     371                                                    </td>
     372
     373                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     374                                                        ${entry.enteredBy.encodeAsHTML()}
     375                                                    </td>
     376
     377                                                    <td class="notClickable">
    358378                                                        <g:link controller="entryDetailed" action="edit" id="${entry.id}">
    359379                                                            <img  src="${resource(dir:'images/skin',file:'database_edit.png')}" alt="Edit" />
     
    399419                                    <tbody>
    400420                                        <g:each in="${entryWorkDoneList}" status="i" var="entry">
    401                                                 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
    402 
    403                                                     <td width="65%">${entry.comment.encodeAsHTML()}</td>
    404                                                     <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td>
    405                                                     <td>${entry.durationHour}:${entry.durationMinute}</td>
    406                                                     <td>${entry.enteredBy.encodeAsHTML()}</td>
    407 
    408                                                     <td>
     421                                                <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
     422
     423                                                    <td width="65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     424                                                        ${entry.comment.encodeAsHTML()}
     425                                                    </td>
     426                                                   
     427                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     428                                                        <g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/>
     429                                                    </td>
     430                                                   
     431                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     432                                                        ${entry.durationHour}:${entry.durationMinute}
     433                                                    </td>
     434                                                   
     435                                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
     436                                                        ${entry.enteredBy.encodeAsHTML()}
     437                                                    </td>
     438
     439                                                    <td class="notClickable">
    409440                                                        <g:link controller="entryDetailed" action="edit" id="${entry.id}">
    410441                                                            <img  src="${resource(dir:'images/skin',file:'database_edit.png')}" alt="Edit" />
     
    513544
    514545                                                <td valign="top" class="name">
    515                                                     ${maintenanceAction?.procedureStepNumber}
     546                                                    ${fieldValue(bean:maintenanceAction, field:'procedureStepNumber')}
    516547                                                </td>
    517548
    518549                                                <td  valign="top" style="text-align:left;" class="value">
    519                                                     ${maintenanceAction?.description}
     550                                                    ${fieldValue(bean:maintenanceAction, field:'description')}
    520551                                                </td>
    521552
    522553                                                <td  valign="top" style="text-align:left;" class="value">
    523                                                     ${maintenanceAction?.reasoning}
     554                                                    ${fieldValue(bean:maintenanceAction, field:'reasoning')}
    524555                                                </td>
    525556
    526557                                                <td  valign="top" style="text-align:left;" class="value">
    527                                                     ${maintenanceAction?.asset}
     558                                                    ${fieldValue(bean:maintenanceAction, field:'asset')}
    528559                                                </td>
    529560
    530561                                                <td  valign="top" style="text-align:left;" class="value">
    531                                                     ${maintenanceAction?.assetSubItem}
     562                                                    ${fieldValue(bean:maintenanceAction, field:'assetSubItem')}
    532563                                                </td>
    533564
     
    659690                                    <tbody>
    660691                                        <g:each in="${inventoryMovementList}" status="i" var="inventoryMovementInstance">
    661                                             <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'/>
    662 
    663                                                 <td>${fieldValue(bean:inventoryMovementInstance, field:'inventoryItem')}</td>
    664                                                 <td>${fieldValue(bean:inventoryMovementInstance, field:'quantity')}</td>
    665                                                 <td>${fieldValue(bean:inventoryMovementInstance, field:'inventoryMovementType')}</td>
    666                                                 <td><g:formatDate date="${inventoryMovementInstance.date}" format="EEE, dd-MMM-yyyy"/></td>
    667                                                 <td>
     692                                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
     693
     694                                                <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
     695                                                    ${fieldValue(bean:inventoryMovementInstance, field:'inventoryItem')}
     696                                                </td>
     697
     698                                                <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
     699                                                    ${fieldValue(bean:inventoryMovementInstance, field:'quantity')}
     700                                                </td>
     701
     702                                                <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
     703                                                    ${fieldValue(bean:inventoryMovementInstance, field:'inventoryMovementType')}
     704                                                </td>
     705
     706                                                <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
     707                                                    <g:formatDate date="${inventoryMovementInstance.date}" format="EEE, dd-MMM-yyyy"/>
     708                                                </td>
     709
     710                                                <td class="notClickable">
    668711                                                    <g:link controller="inventoryMovementDetailed" action="show" id="${inventoryMovementInstance.id}">
    669712                                                        <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
     
    720763                                    <tbody>
    721764                                    <g:each in="${subTaskInstanceList}" status="i" var="subTaskInstance">
    722                                     <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'/>
    723 
    724                                             <td>${fieldValue(bean:subTaskInstance, field:'id')}</td>
    725 
    726                                             <td><g:formatDate date="${subTaskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td>
    727 
    728                                             <td>${subTaskInstance.description}</td>
    729 
    730 
    731                                             <td>${subTaskInstance.leadPerson}</td>
    732 
    733                                             <td>${subTaskInstance.taskPriority}</td>
    734 
    735                                             <td>${subTaskInstance.taskStatus}</td>
    736 
    737                                             <td>
     765                                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
     766
     767                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     768                                                ${fieldValue(bean:subTaskInstance, field:'id')}
     769                                            </td>
     770
     771                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     772                                                <g:formatDate date="${subTaskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/>
     773                                            </td>
     774
     775                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     776                                                ${fieldValue(bean:subTaskInstance, field:'description')}
     777                                            </td>
     778
     779
     780                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     781                                                ${fieldValue(bean:subTaskInstance, field:'leadPerson')}
     782                                            </td>
     783
     784                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     785                                                ${fieldValue(bean:subTaskInstance, field:'taskPriority')}
     786                                            </td>
     787
     788                                            <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${subTaskInstance.id}"'>
     789                                                ${fieldValue(bean:subTaskInstance, field:'taskStatus')}
     790                                            </td>
     791
     792                                            <td class="notClickable">
    738793                                                <g:link action="show" id="${subTaskInstance.id}">
    739794                                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
Note: See TracChangeset for help on using the changeset viewer.