Admin/system/com/upfiles/upfiles.js

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

function sSize(v) {
    var us = ['KB', 'MB', 'GB'], u = 'b';
    for (var i = 0; i < us.length; i++) {
        if (v < 1024) break;
        v /= 1024;
        u = us[i];
    }
    return v.toFixed(2).replace(/\.?0+$/, '') + u;
}

function swfUploadLoaded() {
    var me = this;
    $id("btnCancel").onclick = function () {
        while (me.getStats().files_queued > 0) {
            me.cancelUpload();
        }
    };
}
function FileProgress(file) {
    var me = this; return $id(file.id) || NEW('div', {
        id: file.id
        , className: 'progress msg'
        , bt: { $: 'a' }
        , tit: {
            $: 'b'
            , innerText: file.name
        }
        , label: {
            $: 'label'
            , innerText: 'message'
        }
        , prog: {
            $: 'div'
            , className: 'value'
        }
        , setText: function (v) {
            this.label.innerText = v;
            return this;
        }
        , setValue: function (v) {
            this.prog.style.width = v + '%';
            return this;
        }
        , toggleCancel: function (v, t) {
            this.bt.style.display = v ? 'block' : 'none';
            if (v) {
                this.bt.onclick = function () {
                    t.cancelUpload(file.id);
                };
            }
            return this;
        }
        , setStarted: function () {
            this.className = 'progress blue';
            return this;
        }
        , setCancelled: function () {
            this.className = 'progress base';
            return this;
        }
后面还有 169 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。