Skip to content

Commit

Permalink
make download button available
Browse files Browse the repository at this point in the history
  • Loading branch information
xavieryao committed Nov 11, 2016
1 parent 621cd0c commit c85ab27
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ <h4> <span class="fa fa-external-link"></span> 相关链接 </h4>
<h4 class="modal-title" id="isoModalLabel">获取安装镜像</h4>
</div>
<div class="modal-body">
<p>选择安装发行版: <select class="selectpicker" id="isodistro" onchange="switchDistro()"></select></p>
<p>选择安装发行版: <select class="selectpicker" id="isodistro" ></select></p>
<p>选择发行版版本: <select class="selectpicker" id="isoversion">
<option value="none">-</option>
</select>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">下载</button>
<button type="button" class="btn btn-primary" id="btn_download">下载</button>
</div>
</div>
</div>
Expand Down
11 changes: 10 additions & 1 deletion static/js/index.es6
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,17 @@ var refreshISOList = () => {
});
}

$('#isodistro').change(switchDistro);
$('#btn_download').click(() => {
var distro = document.getElementById("isodistro");
var version = document.getElementById("isoversion");
var i = distro.selectedIndex;
var j = version.selectedIndex;
var link = isoinfo[i].urls[j].url;
window.open(link);
$('#isoModal').modal('toggle');
});
refreshISOList();

refreshMirrorList();

});
Expand Down

0 comments on commit c85ab27

Please sign in to comment.