bootstrap.js 1.22 KB
require.config({
    paths: {
        'fastflow-fastflow': "../addons/fastflow/js/fastflow",
		'fastflow-base': "../addons/fastflow/js/fastflowbase",
        'fastflow-fixed-columns': "../addons/fastflow/js/fastflow-fixed-columns",
		'fastflow-form-builder': "../addons/fastflow/js/form-builder",
    },
    shim: {
        'fastflow': {
            exports: 'fastflow'
        },
        'fastflow-fixed-columns':{
            deps: ['bootstrap-table'],
        }
    }
});

if (Config.modulename === 'admin' && Config.controllername === 'index' && Config.actionname === 'index') {
    $.ajax({
        type: "POST",
        url: "fastflow/flow/bill/getBadge",
        data: {},
        dataType: "json",
        success: function (data) {
            if (data['code'] == 1) {
                data['data'].forEach(function (item) {
                    if (item['count'] > 0) {
                        $('a[addtabs=' + item['id'] + ']').append('<span class="pull-right-container fastflow-badge" style="margin-right: 20px"> <small class="' + item['shape'] + ' pull-right ' + item['color'] + '">' + item['show'] + '</small></span>');
                    }
                });
            }
        }
    });
}