aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_new_channel.js
blob: c4d5408f2c41718919372ac25318802473a7b51f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
	$(document).ready(function() {
//		$("#id_permissions_role").sSelect();
		$("#newchannel-name").blur(function() {
			$("#name-spinner").spin('small');
			var zreg_name = $("#newchannel-name").val();
			$.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
				$("#newchannel-nickname").val(data);
				zFormError("#newchannel-name-feedback",data.error);
				$("#name-spinner").spin(false);
			});
		});
		$("#newchannel-nickname").blur(function() {
			$("#nick-spinner").spin('small');
			var zreg_nick = $("#newchannel-nickname").val();
			$.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
				$("#newchannel-nickname").val(data);
				zFormError("#newchannel-nickname-feedback",data.error);
				$("#nick-spinner").spin(false);
			});
		});

	});