forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefault.js
More file actions
30 lines (25 loc) · 961 Bytes
/
Copy pathDefault.js
File metadata and controls
30 lines (25 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(function () {
$('#source, #view').change(function () {
$(this).closest('form').submit();
});
$('#searchReset').click(function (event) {
$('#search').val('');
$(this).closest('form').submit();
});
$('#package-list form').submit(function (event) {
event.preventDefault();
var form = $(event.target);
var getParams = {
source: $('#source').val(),
search: $('#search').val(),
package: form.find('input[name="package"]').val(),
version: form.find('input[name="version"]').val(),
page: form.find('input[name="page"]').val(),
packageName: form.find('input[name="packageName"]').val()
};
location.href = form.attr('action') + '?' + $.param(getParams);
});
$('#package-list h4').click(function (event) {
var form = $(event.target).closest('li').find('form').submit();
});
});