Changeset 850


Ignore:
Timestamp:
Mar 7, 2011, 2:07:46 PM (9 years ago)
Author:
gav
Message:

Task show ajax improvement, save/restore form and data if no response from server.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/i18n/messages.properties

    r837 r850  
    516516#
    517517appCore.rebuild.text.search.index=The text search index is being rebuilt in the background, see log file for details.
     518
     519#
     520# Ajax messages.
     521#
     522ajax.default.could.not.perform.operation=Could not perform operation, no response from server.
  • trunk/grails-app/views/layouts/main.gsp

    r827 r850  
    3232                </div>
    3333                <div id="jQueryAjaxDefaultError" class="message_error" style="display:none;">
    34                     <g:message code="default.could.not.perform.operation" />
     34                    <g:message code="ajax.default.could.not.perform.operation" />
    3535                </div>
    3636                <g:if env="production">
  • trunk/web-app/js/taskShow.js

    r845 r850  
    5050        }
    5151        else {
    52             createContainer.html(errorIndication().show()).slideDown(600);
    53             button.show(600, function() {
    54                 if(jQuery.browser.msie) {
    55                     jQuery(this).get(0).style.removeAttribute('filter'); // Remove blur/fuzzy text in IE.
    56                 }
     52            createContainer.html(savedHtml);
     53            createContainer.prepend(errorIndication().show()).slideDown(600);
     54            // Scroll the window.
     55            jQuery('html,body').animate({scrollTop: createContainer.offset().top - 70}, 900, function() {
     56                createContainer.find(':input[name="comment"]').focus();
    5757            });
    5858        }
     
    6060
    6161    // Start.
     62    var savedHtml = createContainer.children().detach();
    6263    createContainer.html(loadingIndication().show()).slideDown(600);
    6364
Note: See TracChangeset for help on using the changeset viewer.