Ignore:
Timestamp:
Mar 31, 2015 3:24:29 PM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/www/deploy/20150304/assets/js/manager.js

    r866 r869  
    116116                                    if (p.script != null
    117117                                            && (o.datasource == 'ajax' || isDev)) {
    118                                         $
    119                                                 .post(
     118                                        $.post(
    120119                                                        o.host + o.hostmodule
    121120                                                        + p.script,
     
    123122                                                        function (data) {
    124123                                                            if (data) {
    125                                                                 parseData = $
    126                                                                         .parseJSON(data);
     124                                                                parseData = $.parseJSON(data);
    127125                                                                p.parseData = parseData;
    128126                                                            }
     
    130128                                                            if (p.callbackSuccess != null) {
    131129                                                                if (parseInt(parseData.ERROR.errCode) === 0)
    132                                                                     p
    133                                                                             .callbackSuccess(parseData);
     130                                                                    p.callbackSuccess(parseData);
    134131                                                                else {
    135                                                                     p
    136                                                                             .callbackFail(parseData.ERROR);
     132                                                                    p.callbackFail(parseData.ERROR);
    137133                                                                }
    138134                                                            }
    139135
    140136                                                        })
    141                                                 .done(
    142                                                         function () {
     137                                                .done(function () {
    143138                                                            if (p.callbackDone != null)
    144                                                                 p
    145                                                                         .callbackDone(p.parseData);
     139                                                                p.callbackDone(p.parseData);
    146140                                                        })
    147141                                                .fail(function () {
     
    152146                                                        function () {
    153147                                                            if (p.callbackAlways != null)
    154                                                                 p
    155                                                                         .callbackAlways(this);
     148                                                                p.callbackAlways(this);
    156149                                                        });
    157150                                    } else if (o.datasource == 'json') {
     
    321314                                        });
    322315                                    });
     316                                   
     317                                    var $body = $("body");
     318                                    $(document).on({
     319                                            ajaxStart: function() { $body.addClass("loading"); },
     320                                            ajaxStop: function() { $body.removeClass("loading"); }   
     321                                        });
     322                                   
    323323                                    sendCommand({
    324324                                        postdata: null,
Note: See TracChangeset for help on using the changeset viewer.