File: legacy/php-build/include/calx/registerFunction.js

Recommend this page to a friend!
  Packages of ikhsan   jQuery Calx   legacy/php-build/include/calx/registerFunction.js   Download  
File: legacy/php-build/include/calx/registerFunction.js
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: jQuery Calx
Calculate form input values based on formulas
Author: By
Last change:
Date: 5 months ago
Size: 761 bytes
 

Contents

Class file image Download
/** * register custom function to the calx formula sets * @param {string} funcName the function name, must be all uppercase * @param {function} funcDefinition the function definition to describe how the function should behave * @param {bool} override override flag, should it override built in function if the same name exists * @return {void} */ registerFunction : function (funcName, funcDefinition, override) { override = (typeof(override) == 'undefined') ? false : override; if(override){ for(var a in formula){ if(typeof(formula[a][funcName]) != 'undefined'){ delete(formula[a][funcName]); } } } formula.user_defined[funcName] = funcDefinition; }