function closeThis()

in ui/src/app/common/components/indigo-components/common/table/editable-cell/editable-cell.directive.js [86:114]


    function closeThis() {
        var model = vm.row[vm.column.id];
        if (vm.column.type !== 'select' && _.isUndefined(model.value)) {
            model.value = vm.column.min || 0;
        }
        if ((vm.column.type === 'scalar' || vm.column.type === 'unit') && isChanged) {
            var absv = Math.abs(model.value);
            if (absv !== model.value) {
                model.value = absv;
                notifyService.error('Total Amount made must more than zero.');
            }
        }
        if (vm.column.type === 'input' && model === '') {
            vm.row[vm.column.id] = undefined;
        }


        if (isChanged) {
            isChanged = false;
        }
        vm.onClose({
            data: {
                model: vm.row[vm.column.id],
                row: vm.row,
                column: vm.column.id,
                oldVal: oldVal
            }
        });
    }