function activateCancelBudgetEvent(){

                    $("#form-update-"+budgetId+" button[name='cancel']").click(function(e){
                        e.preventDefault();
                        ajax.send("Budget/getById", {budget_id: budgetId}, getBudgetByIdCallBack);

                        function getBudgetByIdCallBack(result){
                            if(helpers.validateData(result, budgetBody, "html", "default", "data")){
                                $(budgetBody).after(result.data);
                                $(budgetBody).remove();
                                events.budget.reInit();
                            }
                        }
                    });
                }
// 2. if cancel, then go and get the current budgets(regardless of any changes)
2. if cancel, then go and get the current budgets(regardless of any changes)
2 . if cancel then go and get the current budgets ( regardless of any changes )
function activateCancelBudgetEvent(){
                    $("#form-update-"+budgetId+" button[name='cancel']").click(function(e){
                        e.preventDefault();
                        ajax.send("Budget/getById", {budget_id: budgetId}, getBudgetByIdCallBack);
                        function getBudgetByIdCallBack(result){
                            if(helpers.validateData(result, budgetBody, "html", "default", "data")){
                                $(budgetBody).after(result.data);
                                $(budgetBody).remove();
                                events.budget.reInit();
                            }
                        }
                    });
                }
function activateCancelBudgetEvent ( ) { $ ( "#form-update-" + budgetId + " button[name='cancel']" ) . click ( function ( e ) { e . preventDefault ( ) ; ajax . send ( "Budget/getById" , { budget_id : budgetId } , getBudgetByIdCallBack ) ; function getBudgetByIdCallBack ( result ) { if ( helpers . validateData ( result , budgetBody , "html" , "default" , "data" ) ) { $ ( budgetBody ) . after ( result . data ) ; $ ( budgetBody ) . remove ( ) ; events . budget . reInit ( ) ; } } } ) ; }
2. if cancel, then go and get the current budgets(regardless of any changes)
2 . if cancel then go and get the current budgets ( regardless of any changes )