Changeset 502 for trunk/web-app


Ignore:
Timestamp:
May 31, 2010, 1:53:03 PM (11 years ago)
Author:
roberth
Message:

RELTIME fields in the wizard now show the parsed text in blue when leaving the input field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/wizard.js

    r481 r502  
    286286    });
    287287}
     288
     289// Show example of parsed data next to RelTime fields
     290function showExampleReltime(inputfield) {
     291    var fieldName = inputfield.name;
     292
     293    var successFunc = function(data, textStatus, request) {
     294        if( request.status == 200 ) {
     295            document.getElementById( fieldName + "Example" ).value = data;
     296        }
     297    };
     298
     299    var errorFunc = function( request, textStatus, errorThrown ) {
     300        // On error, clear the example field
     301        document.getElementById( fieldName + "Example" ).value = "";
     302    };
     303       
     304    $.ajax({
     305        url     : baseUrl + '/wizard/ajaxParseRelTime?reltime=' + inputfield.value,
     306        success : successFunc,
     307        error   : errorFunc
     308    });
     309}
Note: See TracChangeset for help on using the changeset viewer.