Ignore:
Timestamp:
Nov 21, 2014 3:57:53 PM (10 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/assets/js/frontend/user.js

    r593 r608  
    152152                                $("#success_charge").find('#success_charge_info').text("Quí vị đã nạp thành cÃŽng " + result.amount + " VNĐ vào tài khoản " + result.username + ", tài khoản ảo cá»§a quí vị là " + result.acc_balanced + " VNĐ!");
    153153                                $("#success_charge").modal('show');
     154                                $("#vip-regis-money").text(addCommas(result.acc_balanced));
     155                                $("#topup-money").text(addCommas(result.acc_balanced) + ' VNĐ');
     156                               
    154157                        }else
    155158                        {
     
    205208        });
    206209}
     210
     211function addCommas(nStr)
     212{
     213        nStr += '';
     214        x = nStr.split('.');
     215        x1 = x[0];
     216        x2 = x.length > 1 ? '.' + x[1] : '';
     217        var rgx = /(\d+)(\d{3})/;
     218        while (rgx.test(x1)) {
     219                x1 = x1.replace(rgx, '$1' + ',' + '$2');
     220        }
     221        return x1 + x2;
     222}
Note: See TracChangeset for help on using the changeset viewer.