onBeforeRun

fires before a selected file is downloaded

boolean onBeforeRun(string id){ ... };

Parameters

idstringthe id of the downloaded item

Returns

booleanif an event handler returns false, the onBeforeRun handler will not be called

Example

$$("fmanager").attachEvent("onBeforeRun",function(id){
    webix.confirm({
        text:"Do you want to download this file?",
        ok:"Yes",
        cancel:"No",
        callback:function(result){
            if(result)
                $$("files").download(id);
        }
    });
    return false;
});

Related samples

See also
Back to top