Changeset 863 for trunk


Ignore:
Timestamp:
Mar 14, 2011, 2:50:56 PM (14 years ago)
Author:
gav
Message:

Add check for submit_confirmResult in entry create ajax.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/entryDetailed/_create.gsp

    r860 r863  
    121121                                type="button"
    122122                                value="Resolved"
    123                                 onclick="return confirm('${message(code:'task.clear.attention.flag.on.completion.confirm')}');"
     123                                onclick="submit_confirmResult = confirm('${message(code:'task.clear.attention.flag.on.completion.confirm')}');"
    124124                                name="submit_andComplete"/>
    125125                </g:if>
  • trunk/web-app/js/taskShow.js

    r859 r863  
     1
     2var submit_confirmResult = true
    13
    24function showButton(button) {
     
    1719    });
    1820    // Register 'submit_*' input button click handlers.
    19     target.find('input[name^="submit_"]').click(function(){
     21    target.find('input[name^="submit_"]').click(function(e){
    2022        target.find(':input[name="submitAction"]').val(jQuery(this).attr('name'));
    2123        target.find('form:first').submit();
     
    3537function submitCreateEntryForm(event) {
    3638
     39    event.preventDefault();
     40
     41    if(submit_confirmResult == false) {
     42        submit_confirmResult = true
     43        return false;
     44    }
     45
    3746    var actionUrl = getContextPath()+"/entryDetailed/ajaxSave/";
    38 
    39     event.preventDefault();
    4047    var listContainer = event.data.listContainer;
    4148    var source = event.data.source;
Note: See TracChangeset for help on using the changeset viewer.