Changeset 865


Ignore:
Timestamp:
Mar 15, 2011, 4:39:56 PM (13 years ago)
Author:
gav
Message:

Add task show modification update elements on ajax entry save.

Location:
trunk/grails-app
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/EntryDetailedController.groovy

    r862 r865  
    152152                                    }
    153153
     154            def taskInstance = entryList[0].task
     155            def taskModificationList = TaskModification.findAllByTask(taskInstance, [max:100, sort:"id", order:"asc"])
    154156            def model = ['entryList': entryList]
    155             def taskModel = ['taskInstance': entryList[0].task]
     157            def taskModel = ['taskInstance': taskInstance]
     158            def taskModificationModel = ['taskModificationList': taskModificationList ]
    156159
    157160            render(contentType:"text/json") {
     
    164167                                    target:"#taskControlButtons",
    165168                                    content: g.render(template: '/taskDetailed/showTaskControlButtons', model:taskModel) ])
     169                    element([ mode: 'replace',
     170                                    target:"#modifications",
     171                                    content: g.render(template: '/taskDetailed/showTaskModifications', model:taskModificationModel) ])
    166172                }
    167173            }
    168174            return
    169         }
     175        } // Success.
    170176
    171177        if(result.error.code != "default.create.failure")
  • trunk/grails-app/views/taskDetailed/_showTaskTab.gsp

    r861 r865  
    5656                    <td  valign="top" style="text-align:left;" class="value">
    5757                        <div id="modifications" style="display:none;">
    58                             <ul>
    59                             <g:each var="a" in="${taskModificationList}">
    60                                 <li>${a?.encodeAsHTML()}</li>
    61                             </g:each>
    62                             </ul>
     58                            <g:render template="showTaskModifications" />
    6359                        </div>
    6460                    </td>
Note: See TracChangeset for help on using the changeset viewer.