Index: simple_grid.js =================================================================== --- simple_grid.js (revision 13756) +++ simple_grid.js (working copy) @@ -125,6 +125,8 @@ var $js_mask = this.getControl('js_mask').value; var result_js = $js_mask.replace(/#NUMBER#/g, new_item_number); eval(result_js); + + this.updateTotals(); } SimpleGrid.prototype.removeRecord = function ($number) { @@ -142,3 +144,15 @@ SimpleGrid.prototype.processRecordDependancies = function ($id) { // prototype } + +SimpleGrid.prototype.each = function($callback) { + var $result = null; + + for (var $i = 0; $i < this.ItemIDs.length; $i++) { + $result = $callback.call(this, this.ItemIDs[$i]); + + if ($result === false) { + break; + } + } +} \ No newline at end of file