function disableElement (clients, ui) {

    return function (file) {
        var uiItem    = ui.getOptionIn([CLIENT_FILES_OPT, file.name]);
        var item      = uiItem.toJS();
        var disableFn = uiItem.getIn(["callbacks", "disable"]);

        if (disableFn) {
            disableFn.call(ui, item);
        }

        ui.setOptionIn([CLIENT_FILES_OPT, item.name, "active"], false, {silent: true});

        removeElement(clients, item.id);
    };
}
@param clients
@param ui
@returns {Function}