{%extends "basedialog.html"%} {%import "commonExecuteCallback.js" as commons%} {%block title %}Download as File{%endblock%} {%block body%}

Select the file type to download and the number of documents to include

{%endblock%} {%block onOK%} global.downloadtype=$('#filetype').val(); global.downloadcount=$('#numrows').val(); {% call(results) commons.ipython_execute(this._genDisplayScript(addOptionDict={}),prefix,extraCommandOptions="{'doDownload':global.downloadtype, 'doDownloadCount':global.downloadcount}") %} $('#results{{prefix}}').html({{results["error"] or results}}); $('#loading{{prefix}}').css('display','none'); {% endcall %} {%endblock%} {%block onDialogShown%} var btnok = $('.btn-ok'); var setOkBtnStatus = function() { if ($('#numrows').length && Number($('#numrows').val()) <= 0) { btnok.attr('disabled', 'disabled'); } else { btnok.attr('disabled', null); } } $('#numrows').val(Math.min(100, {{totalDocs}})); $('#numrows').on('input', function () { setOkBtnStatus(); }); setOkBtnStatus(); {%endblock%} {%block cellOuputHTML%}
{%endblock%}