VRFS-2697 fixed js typo

This commit is contained in:
Jonathan Kolyer 2015-01-31 08:59:25 +00:00
parent fdcc77ae80
commit abb5c3afb2
1 changed files with 10 additions and 11 deletions

View File

@ -18,19 +18,18 @@ context.JK.WebsiteValidator = class WebsiteValidator
validator.validate_url_site()
validate_url_format: () =>
url = @url_input.val()
if 0 < url.length
regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
regexp.test(url)
else
true
regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
regexp.test(@url_input.val())
show_validation_status: () =>
yn = this.validate_url_format()
if yn
@input_div.find('.valid_checkmark').show()
else
@input_div.find('.valid_checkmark').hide()
url = @url_input.val()
yn = true
if 0 < url.length
yn = this.validate_url_format()
if yn
@input_div.find('.valid_checkmark').show()
else
@input_div.find('.valid_checkmark').hide()
yn
validate_url_site: () =>