Changeset 825


Ignore:
Timestamp:
Feb 24, 2011, 5:09:48 PM (14 years ago)
Author:
gav
Message:

Add jQuery AJAX util js and css, part 2.

Location:
trunk
Files:
4 edited

Legend:

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

    r818 r825  
    321321default.create.failure={0} could not be created.
    322322default.create.revision.failure=Could not create revision.
     323default.could.not.perform.operation=Could not perform operation.
    323324default.optimistic.locking.failure=Another user has updated this item while you were editing, please check the updated values.
    324325default.file.over.max.size=Supplied file is greater than max size of {0} {1}.
  • trunk/grails-app/views/layouts/main.gsp

    r810 r825  
    2828                    <img src="${resource(dir:'images',file:'loading_bar.gif')}" alt="Spinner" />
    2929                </div>
     30                <div id="jQueryAjaxLoading" class="jQueryAjaxLoading" style="display:none;">
     31                    <img src="${resource(dir:'images',file:'loading.gif')}" alt="Loading" title="Loading" />
     32                </div>
     33                <div id="jQueryAjaxDefaultError" class="message_error" style="display:none;">
     34                    <g:message code="default.could.not.perform.operation" />
     35                </div>'
    3036                <g:if env="production">
    3137                    <div id="Header">
  • trunk/web-app/css/main.css

    r824 r825  
    231231.jQueryAjaxLoading {
    232232    margin: 10px 0 5px 0;
    233     padding: 5px 5px 5px 0px
     233    padding: 5px 5px 5px 0px;
    234234}
    235235
  • trunk/web-app/js/application.js

    r824 r825  
    1515// jQuery AJAX utils.
    1616
    17 function getLoadingHtml() {
    18     var imgSrc = getContextPath()+"/images/loading.gif";
    19     return '<div class="jQueryAjaxLoading"><img src="'+imgSrc+'" />.</div>';
     17function loadingIndication() {
     18    return jQuery('#jQueryAjaxLoading').clone();
    2019}
    2120
    22 function getErrorHtml() {
    23     var html =  '<div class="message_error">Could not perform operation.</div>';
    24     return html;
     21function errorIndication() {
     22    return jQuery('#jQueryAjaxDefaultError').clone();
    2523}
Note: See TracChangeset for help on using the changeset viewer.