rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * do the actual work of evaluating a script once it has been located
 *
 * @param jqueryObj - a jquery object representing a hidden input element with a script in its value attribute
 */
do the actual work of evaluating a script once it has been located

@param jqueryObj - a jquery object representing a hidden input element with a script in its value attribute
do the actual work of evaluating a script once it has been located @param jqueryObj - a jquery object representing a hidden input element with a script in its value attribute
function evalHiddenScript(jqueryObj) {
    if (jqueryObj.attr("name") === undefined || (jqueryObj.closest("[data-open]").length &&
        jqueryObj.closest("[data-open]").attr("data-open") === "false")) {
        return;
    }
    jqueryObj.removeAttr("name");
    jqueryObj.attr("script", "first_run");
    var js = jqueryObj.val();
    try {
        eval(js);
    } catch (err) {
        if (err instanceof ReferenceError) {
            throw new ReferenceError(err.message + " -> offending code: " + js, err.fileName, err.lineNumber);
        } else {
            throw err;
        }
    }
    if (scriptCleanup) {
        jqueryObj.remove();
    }
}
function evalHiddenScript ( jqueryObj ) { if ( jqueryObj . attr ( "name" ) === undefined || ( jqueryObj . closest ( "[data-open]" ) . length && jqueryObj . closest ( "[data-open]" ) . attr ( "data-open" ) === "false" ) ) { return ; } jqueryObj . removeAttr ( "name" ) ; jqueryObj . attr ( "script" , "first_run" ) ; var js = jqueryObj . val ( ) ; try { eval ( js ) ; } catch ( err ) { if ( err instanceof ReferenceError ) { throw new ReferenceError ( err . message + " -> offending code: " + js , err . fileName , err . lineNumber ) ; } else { throw err ; } } if ( scriptCleanup ) { jqueryObj . remove ( ) ; } }
do the actual work of evaluating a script once it has been located
do the actual work of evaluating a script once it has been located
// cleanup script for non-dev modes
